mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Move some libs to node_modules
This commit is contained in:
parent
b929544286
commit
19600bd4c1
104 changed files with 121 additions and 55629 deletions
|
@ -273,9 +273,9 @@ require_once '../locale/function.php';
|
|||
<script src="../view/css/flagstrap/js/jquery.flagstrap.min.js" type="text/javascript"></script>
|
||||
<script src="../view/bootstrap/bootstrapSelectPicker/js/bootstrap-select.min.js" type="text/javascript"></script>
|
||||
<script src="../node_modules/sweetalert/dist/sweetalert.min.js" type="text/javascript"></script>
|
||||
<script src="../view/js/jquery.lazy/jquery.lazy.min.js" type="text/javascript"></script>
|
||||
<script src="../view/js/jquery.lazy/jquery.lazy.plugins.min.js" type="text/javascript"></script>
|
||||
<script src="../view/js/js-cookie/js.cookie.js" type="text/javascript"></script>
|
||||
<script src="../node_modules/jquery-lazy/jquery.lazy.min.js" type="text/javascript"></script>
|
||||
<script src="../node_modules/jquery-lazy/jquery.lazy.plugins.min.js" type="text/javascript"></script>
|
||||
<script src="../node_modules/js-cookie/dist/js.cookie.js" type="text/javascript"></script>
|
||||
<script src="../view/js/script.js" type="text/javascript"></script>
|
||||
|
||||
<script>
|
||||
|
|
27
node_modules/.package-lock.json
generated
vendored
27
node_modules/.package-lock.json
generated
vendored
|
@ -321,6 +321,19 @@
|
|||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
|
||||
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
|
||||
},
|
||||
"node_modules/jquery-lazy": {
|
||||
"version": "1.7.11",
|
||||
"resolved": "https://registry.npmjs.org/jquery-lazy/-/jquery-lazy-1.7.11.tgz",
|
||||
"integrity": "sha512-jNAOMwfgf+lYaOCc/atBVjbOzAIRW5BUyjQ4b4jJPkQM6I0zGZd4m/Y73ekfAlrQQDg3/Dge3YNhW7Cqjgi0UA==",
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/jquery-toast-plugin": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/jquery-toast-plugin/-/jquery-toast-plugin-1.3.2.tgz",
|
||||
"integrity": "sha512-0j/nfqA2FHFuJXp8QL33EVVCY//TDVfq4LULhTbasZYl2aZlX6YiSF5IGrI31dQiS9S4JkXBUfX3rMJcfl/u/g=="
|
||||
},
|
||||
"node_modules/jquery-ui": {
|
||||
"version": "1.13.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.1.tgz",
|
||||
|
@ -337,6 +350,14 @@
|
|||
"jquery": ">=1.8.0 <4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/js-cookie": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
|
||||
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/keycode": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz",
|
||||
|
@ -361,9 +382,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/moment": {
|
||||
"version": "2.29.3",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
|
||||
"integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==",
|
||||
"version": "2.29.4",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
||||
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
|
|
5
node_modules/moment/CHANGELOG.md
generated
vendored
5
node_modules/moment/CHANGELOG.md
generated
vendored
|
@ -1,6 +1,11 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
### 2.29.4
|
||||
|
||||
* Release Jul 6, 2022
|
||||
* [#6015](https://github.com/moment/moment/pull/6015) [bugfix] Fix ReDoS in preprocessRFC2822 regex
|
||||
|
||||
### 2.29.3 [Full changelog](https://gist.github.com/ichernev/edebd440f49adcaec72e5e77b791d8be)
|
||||
|
||||
* Release Apr 17, 2022
|
||||
|
|
6
node_modules/moment/dist/moment.js
generated
vendored
6
node_modules/moment/dist/moment.js
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
//! moment.js
|
||||
//! version : 2.29.3
|
||||
//! version : 2.29.4
|
||||
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
//! license : MIT
|
||||
//! momentjs.com
|
||||
|
@ -2448,7 +2448,7 @@ function untruncateYear(yearStr) {
|
|||
function preprocessRFC2822(s) {
|
||||
// Remove comments and folding whitespace and replace multiple-spaces with a single space
|
||||
return s
|
||||
.replace(/\([^)]*\)|[\n\t]/g, ' ')
|
||||
.replace(/\([^()]*\)|[\n\t]/g, ' ')
|
||||
.replace(/(\s\s+)/g, ' ')
|
||||
.replace(/^\s\s*/, '')
|
||||
.replace(/\s\s*$/, '');
|
||||
|
@ -5629,7 +5629,7 @@ addParseToken('x', function (input, array, config) {
|
|||
|
||||
//! moment.js
|
||||
|
||||
hooks.version = '2.29.3';
|
||||
hooks.version = '2.29.4';
|
||||
|
||||
setHookCallback(createLocal);
|
||||
|
||||
|
|
4
node_modules/moment/min/moment-with-locales.js
generated
vendored
4
node_modules/moment/min/moment-with-locales.js
generated
vendored
|
@ -2448,7 +2448,7 @@
|
|||
function preprocessRFC2822(s) {
|
||||
// Remove comments and folding whitespace and replace multiple-spaces with a single space
|
||||
return s
|
||||
.replace(/\([^)]*\)|[\n\t]/g, ' ')
|
||||
.replace(/\([^()]*\)|[\n\t]/g, ' ')
|
||||
.replace(/(\s\s+)/g, ' ')
|
||||
.replace(/^\s\s*/, '')
|
||||
.replace(/\s\s*$/, '');
|
||||
|
@ -5629,7 +5629,7 @@
|
|||
|
||||
//! moment.js
|
||||
|
||||
hooks.version = '2.29.3';
|
||||
hooks.version = '2.29.4';
|
||||
|
||||
setHookCallback(createLocal);
|
||||
|
||||
|
|
2
node_modules/moment/min/moment-with-locales.min.js
generated
vendored
2
node_modules/moment/min/moment-with-locales.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/moment/min/moment-with-locales.min.js.map
generated
vendored
2
node_modules/moment/min/moment-with-locales.min.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/moment/min/moment.min.js
generated
vendored
2
node_modules/moment/min/moment.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/moment/min/moment.min.js.map
generated
vendored
2
node_modules/moment/min/moment.min.js.map
generated
vendored
File diff suppressed because one or more lines are too long
6
node_modules/moment/moment.js
generated
vendored
6
node_modules/moment/moment.js
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
//! moment.js
|
||||
//! version : 2.29.3
|
||||
//! version : 2.29.4
|
||||
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
//! license : MIT
|
||||
//! momentjs.com
|
||||
|
@ -2454,7 +2454,7 @@
|
|||
function preprocessRFC2822(s) {
|
||||
// Remove comments and folding whitespace and replace multiple-spaces with a single space
|
||||
return s
|
||||
.replace(/\([^)]*\)|[\n\t]/g, ' ')
|
||||
.replace(/\([^()]*\)|[\n\t]/g, ' ')
|
||||
.replace(/(\s\s+)/g, ' ')
|
||||
.replace(/^\s\s*/, '')
|
||||
.replace(/\s\s*$/, '');
|
||||
|
@ -5635,7 +5635,7 @@
|
|||
|
||||
//! moment.js
|
||||
|
||||
hooks.version = '2.29.3';
|
||||
hooks.version = '2.29.4';
|
||||
|
||||
setHookCallback(createLocal);
|
||||
|
||||
|
|
2
node_modules/moment/package.json
generated
vendored
2
node_modules/moment/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "moment",
|
||||
"version": "2.29.3",
|
||||
"version": "2.29.4",
|
||||
"description": "Parse, validate, manipulate, and display dates",
|
||||
"homepage": "https://momentjs.com",
|
||||
"author": "Iskren Ivov Chernev <iskren.chernev@gmail.com> (https://github.com/ichernev)",
|
||||
|
|
2
node_modules/moment/src/lib/create/from-string.js
generated
vendored
2
node_modules/moment/src/lib/create/from-string.js
generated
vendored
|
@ -151,7 +151,7 @@ function untruncateYear(yearStr) {
|
|||
function preprocessRFC2822(s) {
|
||||
// Remove comments and folding whitespace and replace multiple-spaces with a single space
|
||||
return s
|
||||
.replace(/\([^)]*\)|[\n\t]/g, ' ')
|
||||
.replace(/\([^()]*\)|[\n\t]/g, ' ')
|
||||
.replace(/(\s\s+)/g, ' ')
|
||||
.replace(/^\s\s*/, '')
|
||||
.replace(/\s\s*$/, '');
|
||||
|
|
4
node_modules/moment/src/moment.js
generated
vendored
4
node_modules/moment/src/moment.js
generated
vendored
|
@ -1,12 +1,12 @@
|
|||
//! moment.js
|
||||
//! version : 2.29.3
|
||||
//! version : 2.29.4
|
||||
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
//! license : MIT
|
||||
//! momentjs.com
|
||||
|
||||
import { hooks as moment, setHookCallback } from './lib/utils/hooks';
|
||||
|
||||
moment.version = '2.29.3';
|
||||
moment.version = '2.29.4';
|
||||
|
||||
import {
|
||||
min,
|
||||
|
|
54
package-lock.json
generated
54
package-lock.json
generated
|
@ -15,8 +15,11 @@
|
|||
"fontawesome-free": "^1.0.4",
|
||||
"infinite-scroll": "^4.0.1",
|
||||
"jquery": "^3.6.0",
|
||||
"jquery-lazy": "^1.7.11",
|
||||
"jquery-toast-plugin": "^1.3.2",
|
||||
"jquery-ui": "^1.13.1",
|
||||
"jquery-ui-dist": "^1.13.1",
|
||||
"js-cookie": "^3.0.1",
|
||||
"keycode": "^2.2.1",
|
||||
"moment-timezone": "^0.5.34",
|
||||
"sweetalert": "^2.1.2",
|
||||
|
@ -347,6 +350,19 @@
|
|||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
|
||||
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
|
||||
},
|
||||
"node_modules/jquery-lazy": {
|
||||
"version": "1.7.11",
|
||||
"resolved": "https://registry.npmjs.org/jquery-lazy/-/jquery-lazy-1.7.11.tgz",
|
||||
"integrity": "sha512-jNAOMwfgf+lYaOCc/atBVjbOzAIRW5BUyjQ4b4jJPkQM6I0zGZd4m/Y73ekfAlrQQDg3/Dge3YNhW7Cqjgi0UA==",
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/jquery-toast-plugin": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/jquery-toast-plugin/-/jquery-toast-plugin-1.3.2.tgz",
|
||||
"integrity": "sha512-0j/nfqA2FHFuJXp8QL33EVVCY//TDVfq4LULhTbasZYl2aZlX6YiSF5IGrI31dQiS9S4JkXBUfX3rMJcfl/u/g=="
|
||||
},
|
||||
"node_modules/jquery-ui": {
|
||||
"version": "1.13.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.1.tgz",
|
||||
|
@ -363,6 +379,14 @@
|
|||
"jquery": ">=1.8.0 <4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/js-cookie": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
|
||||
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/keycode": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz",
|
||||
|
@ -387,9 +411,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/moment": {
|
||||
"version": "2.29.3",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
|
||||
"integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==",
|
||||
"version": "2.29.4",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
||||
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
|
@ -882,6 +906,19 @@
|
|||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
|
||||
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
|
||||
},
|
||||
"jquery-lazy": {
|
||||
"version": "1.7.11",
|
||||
"resolved": "https://registry.npmjs.org/jquery-lazy/-/jquery-lazy-1.7.11.tgz",
|
||||
"integrity": "sha512-jNAOMwfgf+lYaOCc/atBVjbOzAIRW5BUyjQ4b4jJPkQM6I0zGZd4m/Y73ekfAlrQQDg3/Dge3YNhW7Cqjgi0UA==",
|
||||
"requires": {
|
||||
"jquery": ">=1.7.2"
|
||||
}
|
||||
},
|
||||
"jquery-toast-plugin": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/jquery-toast-plugin/-/jquery-toast-plugin-1.3.2.tgz",
|
||||
"integrity": "sha512-0j/nfqA2FHFuJXp8QL33EVVCY//TDVfq4LULhTbasZYl2aZlX6YiSF5IGrI31dQiS9S4JkXBUfX3rMJcfl/u/g=="
|
||||
},
|
||||
"jquery-ui": {
|
||||
"version": "1.13.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.1.tgz",
|
||||
|
@ -898,6 +935,11 @@
|
|||
"jquery": ">=1.8.0 <4.0.0"
|
||||
}
|
||||
},
|
||||
"js-cookie": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
|
||||
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw=="
|
||||
},
|
||||
"keycode": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz",
|
||||
|
@ -922,9 +964,9 @@
|
|||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.29.3",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
|
||||
"integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw=="
|
||||
"version": "2.29.4",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
||||
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
|
||||
},
|
||||
"moment-timezone": {
|
||||
"version": "0.5.34",
|
||||
|
|
|
@ -10,8 +10,11 @@
|
|||
"fontawesome-free": "^1.0.4",
|
||||
"infinite-scroll": "^4.0.1",
|
||||
"jquery": "^3.6.0",
|
||||
"jquery-lazy": "^1.7.11",
|
||||
"jquery-toast-plugin": "^1.3.2",
|
||||
"jquery-ui": "^1.13.1",
|
||||
"jquery-ui-dist": "^1.13.1",
|
||||
"js-cookie": "^3.0.1",
|
||||
"keycode": "^2.2.1",
|
||||
"moment-timezone": "^0.5.34",
|
||||
"sweetalert": "^2.1.2",
|
||||
|
|
|
@ -110,8 +110,8 @@ $poster = Live::getPosterImage($livet['users_id'], $_REQUEST['live_servers_id'],
|
|||
include $global['systemRootPath'] . 'view/include/bootstrap.js.php';
|
||||
?>
|
||||
<script src="<?php echo getURL('view/js/script.js'); ?>" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>view/js/js-cookie/js.cookie.js" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>view/js/jquery-toast/jquery.toast.min.js" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>node_modules/js-cookie/dist/js.cookie.js" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>node_modules/jquery-toast-plugin/dist/jquery.toast.min.js" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>node_modules/sweetalert/dist/sweetalert.min.js" type="text/javascript"></script>
|
||||
<script>
|
||||
<?php
|
||||
|
|
|
@ -123,8 +123,8 @@ $controls = Live::getAllControlls($streamName);
|
|||
?>
|
||||
</div>
|
||||
<script src="<?php echo getURL('view/js/script.js'); ?>" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>view/js/js-cookie/js.cookie.js" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>view/js/jquery-toast/jquery.toast.min.js" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>node_modules/js-cookie/dist/js.cookie.js" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>node_modules/jquery-toast-plugin/dist/jquery.toast.min.js" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>node_modules/sweetalert/dist/sweetalert.min.js" type="text/javascript"></script>
|
||||
<!-- getFooterCode start -->
|
||||
<?php
|
||||
|
|
|
@ -58,7 +58,7 @@ if(!empty($_REQUEST['nameIdentification'])){
|
|||
<link rel="shortcut icon" href="<?php echo $config->getFavicon(); ?>" sizes="16x16,24x24,32x32,48x48,144x144">
|
||||
<meta name="msapplication-TileImage" content="<?php echo $config->getFavicon(true); ?>">
|
||||
<script src="<?php echo getURL('node_modules/jquery/dist/jquery.min.js'); ?>"></script>
|
||||
<script src="<?php echo getCDN(); ?>view/js/js-cookie/js.cookie.js" type="text/javascript"></script>
|
||||
<script src="<?php echo getCDN(); ?>node_modules/js-cookie/dist/js.cookie.js" type="text/javascript"></script>
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/bootstrap.js.php';
|
||||
?>
|
||||
|
|
|
@ -266,15 +266,14 @@ $_REQUEST['hideAutoplaySwitch'] = 1;
|
|||
$jsFiles = array();
|
||||
$jsFiles[] = "view/js/BootstrapMenu.min.js";
|
||||
$jsFiles[] = "node_modules/sweetalert/dist/sweetalert.min.js";
|
||||
$jsFiles[] = "view/js/bootpag/jquery.bootpag.min.js";
|
||||
$jsFiles[] = "view/js/bootgrid/jquery.bootgrid.js";
|
||||
$jsFiles[] = "view/bootstrap/bootstrapSelectPicker/js/bootstrap-select.min.js";
|
||||
$jsFiles[] = "view/js/script.js";
|
||||
$jsFiles[] = "view/js/js-cookie/js.cookie.js";
|
||||
$jsFiles[] = "node_modules/js-cookie/dist/js.cookie.js";
|
||||
$jsFiles[] = "view/css/flagstrap/js/jquery.flagstrap.min.js";
|
||||
$jsFiles[] = "view/js/jquery.lazy/jquery.lazy.min.js";
|
||||
$jsFiles[] = "view/js/jquery.lazy/jquery.lazy.plugins.min.js";
|
||||
$jsFiles[] = "view/js/jquery-toast/jquery.toast.min.js";
|
||||
$jsFiles[] = "node_modules/jquery-lazy/jquery.lazy.min.js";
|
||||
$jsFiles[] = "node_modules/jquery-lazy/jquery.lazy.plugins.min.js";
|
||||
$jsFiles[] = "node_modules/jquery-toast-plugin/dist/jquery.toast.min.js";
|
||||
?>
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/bootstrap.js.php';
|
||||
|
|
|
@ -124,5 +124,5 @@ if (!empty($_GET['action'])) {
|
|||
include $global['systemRootPath'] . 'view/include/bootstrap.js.php';
|
||||
?>
|
||||
<script src="<?php echo getURL('view/js/script.js'); ?>" type="text/javascript"></script>
|
||||
<script src="<?php echo getURL('view/js/js-cookie/js.cookie.js'); ?>" type="text/javascript"></script>
|
||||
<script src="<?php echo getURL('node_modules/js-cookie/dist/js.cookie.js'); ?>" type="text/javascript"></script>
|
||||
</html>
|
|
@ -46,8 +46,8 @@ showAlertMessage();
|
|||
});
|
||||
</script>
|
||||
|
||||
<script src="<?php echo getURL('view/js/jquery.lazy/jquery.lazy.min.js'); ?>" type="text/javascript"></script>
|
||||
<script src="<?php echo getURL('view/js/jquery.lazy/jquery.lazy.plugins.min.js'); ?>" type="text/javascript"></script>
|
||||
<script src="<?php echo getURL('node_modules/jquery-lazy/jquery.lazy.min.js'); ?>" type="text/javascript"></script>
|
||||
<script src="<?php echo getURL('node_modules/jquery-lazy/jquery.lazy.plugins.min.js'); ?>" type="text/javascript"></script>
|
||||
<script src="<?php echo getURL('node_modules/moment/moment.js'); ?>"></script>
|
||||
<?php echo getTagIfExists('node_modules/moment/locale/'. getLanguage().'.js'); ?>
|
||||
<script src="<?php echo getURL('node_modules/moment-timezone/builds/moment-timezone-with-data.min.js'); ?>"></script>
|
||||
|
@ -64,11 +64,10 @@ include $global['systemRootPath'] . 'view/include/bootstrap.js.php';
|
|||
?>
|
||||
<?php
|
||||
$jsFiles = [];
|
||||
//$jsFiles[] = "view/js/jquery.lazy/jquery.lazy.min.js";
|
||||
//$jsFiles[] = "view/js/jquery.lazy/jquery.lazy.plugins.min.js";
|
||||
//$jsFiles[] = "node_modules/jquery-lazy/jquery.lazy.min.js";
|
||||
//$jsFiles[] = "node_modules/jquery-lazy/jquery.lazy.plugins.min.js";
|
||||
//$jsFiles[] = "view/js/script.js";
|
||||
$jsFiles[] = "node_modules/sweetalert/dist/sweetalert.min.js";
|
||||
$jsFiles[] = "view/js/bootpag/jquery.bootpag.min.js";
|
||||
$jsFiles[] = "view/js/bootgrid/jquery.bootgrid.js";
|
||||
$jsFiles[] = "view/bootstrap/bootstrapSelectPicker/js/bootstrap-select.min.js";
|
||||
//$jsFiles[] = "view/js/bootstrap-toggle/bootstrap-toggle.min.js";
|
||||
|
@ -76,8 +75,8 @@ $jsFiles[] = "view/js/jquery.bootstrap-autohidingnavbar.min.js";
|
|||
$jsFiles[] = "view/css/flagstrap/js/jquery.flagstrap.min.js";
|
||||
$jsFiles[] = "view/js/webui-popover/jquery.webui-popover.min.js";
|
||||
$jsFiles[] = "view/js/bootstrap-list-filter/bootstrap-list-filter.min.js";
|
||||
$jsFiles[] = "view/js/js-cookie/js.cookie.js";
|
||||
$jsFiles[] = "view/js/jquery-toast/jquery.toast.min.js";
|
||||
$jsFiles[] = "node_modules/js-cookie/dist/js.cookie.js";
|
||||
$jsFiles[] = "node_modules/jquery-toast-plugin/dist/jquery.toast.min.js";
|
||||
$jsFiles[] = "view/bootstrap/jquery-bootstrap-scrolling-tabs/jquery.scrolling-tabs.min.js";
|
||||
$jsFiles[] = "view/js/BootstrapMenu.min.js";
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ $cssFiles = [];
|
|||
//$cssFiles[] = "view/js/seetalert/sweetalert.css";
|
||||
$cssFiles[] = "view/bootstrap/bootstrapSelectPicker/css/bootstrap-select.min.css";
|
||||
$cssFiles[] = "view/js/bootgrid/jquery.bootgrid.css";
|
||||
$cssFiles[] = "view/js/jquery-toast/jquery.toast.min.css";
|
||||
$cssFiles[] = "node_modules/jquery-toast-plugin/dist/jquery.toast.min.css";
|
||||
$cssFiles[] = "view/bootstrap/jquery-bootstrap-scrolling-tabs/jquery.scrolling-tabs.min.css";
|
||||
//$cssFiles[] = "view/css/custom/{$theme}.css";
|
||||
$cssFiles = array_merge($cssFiles);
|
||||
|
|
|
@ -1,179 +0,0 @@
|
|||
/**
|
||||
* @preserve
|
||||
* bootpag - jQuery plugin for dynamic pagination
|
||||
*
|
||||
* Copyright (c) 2015 botmonster@7items.com
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Project home:
|
||||
* http://botmonster.com/jquery-bootpag/
|
||||
*
|
||||
* Version: 1.0.7
|
||||
*
|
||||
*/
|
||||
(function($, window) {
|
||||
|
||||
$.fn.bootpag = function(options){
|
||||
|
||||
var $owner = this,
|
||||
settings = $.extend({
|
||||
total: 0,
|
||||
page: 1,
|
||||
maxVisible: null,
|
||||
leaps: true,
|
||||
href: 'javascript:void(0);',
|
||||
hrefVariable: '{{number}}',
|
||||
next: '»',
|
||||
prev: '«',
|
||||
firstLastUse: false,
|
||||
first: '<span aria-hidden="true">←</span>',
|
||||
last: '<span aria-hidden="true">→</span>',
|
||||
wrapClass: 'pagination',
|
||||
activeClass: 'active',
|
||||
disabledClass: 'disabled',
|
||||
nextClass: 'next',
|
||||
prevClass: 'prev',
|
||||
lastClass: 'last',
|
||||
firstClass: 'first'
|
||||
},
|
||||
$owner.data('settings') || {},
|
||||
options || {});
|
||||
|
||||
if(settings.total <= 0)
|
||||
return this;
|
||||
|
||||
if(!$.isNumeric(settings.maxVisible) && !settings.maxVisible){
|
||||
settings.maxVisible = parseInt(settings.total, 10);
|
||||
}
|
||||
|
||||
$owner.data('settings', settings);
|
||||
|
||||
function renderPage($bootpag, page){
|
||||
|
||||
page = parseInt(page, 10);
|
||||
var lp,
|
||||
maxV = settings.maxVisible == 0 ? 1 : settings.maxVisible,
|
||||
step = settings.maxVisible == 1 ? 0 : 1,
|
||||
vis = Math.floor((page - 1) / maxV) * maxV,
|
||||
$page = $bootpag.find('li');
|
||||
settings.page = page = page < 0 ? 0 : page > settings.total ? settings.total : page;
|
||||
$page.removeClass(settings.activeClass);
|
||||
lp = page - 1 < 1 ? 1 :
|
||||
settings.leaps && page - 1 >= settings.maxVisible ?
|
||||
Math.floor((page - 1) / maxV) * maxV : page - 1;
|
||||
|
||||
if(settings.firstLastUse) {
|
||||
$page
|
||||
.first()
|
||||
.toggleClass(settings.disabledClass, page === 1);
|
||||
}
|
||||
|
||||
var lfirst = $page.first();
|
||||
if(settings.firstLastUse) {
|
||||
lfirst = lfirst.next();
|
||||
}
|
||||
|
||||
lfirst
|
||||
.toggleClass(settings.disabledClass, page === 1)
|
||||
.attr('data-lp', lp)
|
||||
.find('a').attr('href', href(lp));
|
||||
|
||||
var step = settings.maxVisible == 1 ? 0 : 1;
|
||||
|
||||
lp = page + 1 > settings.total ? settings.total :
|
||||
settings.leaps && page + 1 < settings.total - settings.maxVisible ?
|
||||
vis + settings.maxVisible + step: page + 1;
|
||||
|
||||
var llast = $page.last();
|
||||
if(settings.firstLastUse) {
|
||||
llast = llast.prev();
|
||||
}
|
||||
|
||||
llast
|
||||
.toggleClass(settings.disabledClass, page === settings.total)
|
||||
.attr('data-lp', lp)
|
||||
.find('a').attr('href', href(lp));
|
||||
|
||||
$page
|
||||
.last()
|
||||
.toggleClass(settings.disabledClass, page === settings.total);
|
||||
|
||||
|
||||
var $currPage = $page.filter('[data-lp='+page+']');
|
||||
|
||||
var clist = "." + [settings.nextClass,
|
||||
settings.prevClass,
|
||||
settings.firstClass,
|
||||
settings.lastClass].join(",.");
|
||||
if(!$currPage.not(clist).length){
|
||||
var d = page <= vis ? -settings.maxVisible : 0;
|
||||
$page.not(clist).each(function(index){
|
||||
lp = index + 1 + vis + d;
|
||||
$(this)
|
||||
.attr('data-lp', lp)
|
||||
.toggle(lp <= settings.total)
|
||||
.find('a').html(lp).attr('href', href(lp));
|
||||
});
|
||||
$currPage = $page.filter('[data-lp='+page+']');
|
||||
}
|
||||
$currPage.not(clist).addClass(settings.activeClass);
|
||||
$owner.data('settings', settings);
|
||||
}
|
||||
|
||||
function href(c){
|
||||
|
||||
return settings.href.replace(settings.hrefVariable, c);
|
||||
}
|
||||
|
||||
return this.each(function(){
|
||||
|
||||
var $bootpag, lp, me = $(this),
|
||||
p = ['<ul class="', settings.wrapClass, ' bootpag">'];
|
||||
|
||||
if(settings.firstLastUse){
|
||||
p = p.concat(['<li data-lp="1" class="', settings.firstClass,
|
||||
'"><a href="', href(1), '">', settings.first, '</a></li>']);
|
||||
}
|
||||
if(settings.prev){
|
||||
p = p.concat(['<li data-lp="1" class="', settings.prevClass,
|
||||
'"><a href="', href(1), '">', settings.prev, '</a></li>']);
|
||||
}
|
||||
for(var c = 1; c <= Math.min(settings.total, settings.maxVisible); c++){
|
||||
p = p.concat(['<li data-lp="', c, '"><a href="', href(c), '">', c, '</a></li>']);
|
||||
}
|
||||
if(settings.next){
|
||||
lp = settings.leaps && settings.total > settings.maxVisible
|
||||
? Math.min(settings.maxVisible + 1, settings.total) : 2;
|
||||
p = p.concat(['<li data-lp="', lp, '" class="',
|
||||
settings.nextClass, '"><a href="', href(lp),
|
||||
'">', settings.next, '</a></li>']);
|
||||
}
|
||||
if(settings.firstLastUse){
|
||||
p = p.concat(['<li data-lp="', settings.total, '" class="last"><a href="',
|
||||
href(settings.total),'">', settings.last, '</a></li>']);
|
||||
}
|
||||
p.push('</ul>');
|
||||
me.find('ul.bootpag').remove();
|
||||
me.append(p.join(''));
|
||||
$bootpag = me.find('ul.bootpag');
|
||||
|
||||
me.find('li').click(function paginationClick(){
|
||||
|
||||
var me = $(this);
|
||||
if(me.hasClass(settings.disabledClass) || me.hasClass(settings.activeClass)){
|
||||
return;
|
||||
}
|
||||
var page = parseInt(me.attr('data-lp'), 10);
|
||||
$owner.find('ul.bootpag').each(function(){
|
||||
renderPage($(this), page);
|
||||
});
|
||||
|
||||
$owner.trigger('page', page);
|
||||
});
|
||||
renderPage($bootpag, settings.page);
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery, window);
|
21
view/js/bootpag/jquery.bootpag.min.js
vendored
21
view/js/bootpag/jquery.bootpag.min.js
vendored
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
|
||||
bootpag - jQuery plugin for dynamic pagination
|
||||
|
||||
Copyright (c) 2015 botmonster@7items.com
|
||||
|
||||
Licensed under the MIT license:
|
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
Project home:
|
||||
http://botmonster.com/jquery-bootpag/
|
||||
|
||||
Version: 1.0.7
|
||||
|
||||
*/
|
||||
(function(h,q){h.fn.bootpag=function(p){function m(c,b){b=parseInt(b,10);var d,e=0==a.maxVisible?1:a.maxVisible,k=1==a.maxVisible?0:1,n=Math.floor((b-1)/e)*e,f=c.find("li");a.page=b=0>b?0:b>a.total?a.total:b;f.removeClass(a.activeClass);d=1>b-1?1:a.leaps&&b-1>=a.maxVisible?Math.floor((b-1)/e)*e:b-1;a.firstLastUse&&f.first().toggleClass(a.disabledClass,1===b);e=f.first();a.firstLastUse&&(e=e.next());e.toggleClass(a.disabledClass,1===b).attr("data-lp",d).find("a").attr("href",g(d));k=1==a.maxVisible?
|
||||
0:1;d=b+1>a.total?a.total:a.leaps&&b+1<a.total-a.maxVisible?n+a.maxVisible+k:b+1;e=f.last();a.firstLastUse&&(e=e.prev());e.toggleClass(a.disabledClass,b===a.total).attr("data-lp",d).find("a").attr("href",g(d));f.last().toggleClass(a.disabledClass,b===a.total);e=f.filter("[data-lp="+b+"]");k="."+[a.nextClass,a.prevClass,a.firstClass,a.lastClass].join(",.");if(!e.not(k).length){var m=b<=n?-a.maxVisible:0;f.not(k).each(function(b){d=b+1+n+m;h(this).attr("data-lp",d).toggle(d<=a.total).find("a").html(d).attr("href",
|
||||
g(d))});e=f.filter("[data-lp="+b+"]")}e.not(k).addClass(a.activeClass);l.data("settings",a)}function g(c){return a.href.replace(a.hrefVariable,c)}var l=this,a=h.extend({total:0,page:1,maxVisible:null,leaps:!0,href:"javascript:void(0);",hrefVariable:"{{number}}",next:"»",prev:"«",firstLastUse:!1,first:'<span aria-hidden="true">←</span>',last:'<span aria-hidden="true">→</span>',wrapClass:"pagination",activeClass:"active",disabledClass:"disabled",nextClass:"next",prevClass:"prev",
|
||||
lastClass:"last",firstClass:"first"},l.data("settings")||{},p||{});if(0>=a.total)return this;h.isNumeric(a.maxVisible)||a.maxVisible||(a.maxVisible=parseInt(a.total,10));l.data("settings",a);return this.each(function(){var c,b,d=h(this);c=['<ul class="',a.wrapClass,' bootpag">'];a.firstLastUse&&(c=c.concat(['<li data-lp="1" class="',a.firstClass,'"><a href="',g(1),'">',a.first,"</a></li>"]));a.prev&&(c=c.concat(['<li data-lp="1" class="',a.prevClass,'"><a href="',g(1),'">',a.prev,"</a></li>"]));for(b=
|
||||
1;b<=Math.min(a.total,a.maxVisible);b++)c=c.concat(['<li data-lp="',b,'"><a href="',g(b),'">',b,"</a></li>"]);a.next&&(b=a.leaps&&a.total>a.maxVisible?Math.min(a.maxVisible+1,a.total):2,c=c.concat(['<li data-lp="',b,'" class="',a.nextClass,'"><a href="',g(b),'">',a.next,"</a></li>"]));a.firstLastUse&&(c=c.concat(['<li data-lp="',a.total,'" class="last"><a href="',g(a.total),'">',a.last,"</a></li>"]));c.push("</ul>");d.find("ul.bootpag").remove();d.append(c.join(""));c=d.find("ul.bootpag");d.find("li").click(function(){var b=
|
||||
h(this);if(!b.hasClass(a.disabledClass)&&!b.hasClass(a.activeClass)){var c=parseInt(b.attr("data-lp"),10);l.find("ul.bootpag").each(function(){m(h(this),c)});l.trigger("page",c)}});m(c,a.page)})}})(jQuery,window);
|
15418
view/js/bootstrap3-wysiwyg/amd/bootstrap3-wysihtml5.all.js
vendored
15418
view/js/bootstrap3-wysiwyg/amd/bootstrap3-wysihtml5.all.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -1,17 +0,0 @@
|
|||
define("bootstrap.wysihtml5.commands", ["wysihtml5"], function(wysihtml5) {
|
||||
|
||||
(function(wysihtml5) {
|
||||
wysihtml5.commands.small = {
|
||||
exec: function(composer, command) {
|
||||
return wysihtml5.commands.formatInline.exec(composer, command, "small");
|
||||
},
|
||||
|
||||
state: function(composer, command) {
|
||||
return wysihtml5.commands.formatInline.state(composer, command, "small");
|
||||
}
|
||||
};
|
||||
})(wysihtml5);
|
||||
|
||||
|
||||
|
||||
});
|
|
@ -1,515 +0,0 @@
|
|||
/*!
|
||||
|
||||
handlebars v1.3.0
|
||||
|
||||
Copyright (C) 2011 by Yehuda Katz
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
@license
|
||||
*/
|
||||
|
||||
define(
|
||||
'handlebars/safe-string',["exports"],
|
||||
function(__exports__) {
|
||||
|
||||
// Build out our basic SafeString type
|
||||
function SafeString(string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
SafeString.prototype.toString = function() {
|
||||
return "" + this.string;
|
||||
};
|
||||
|
||||
__exports__["default"] = SafeString;
|
||||
});
|
||||
define(
|
||||
'handlebars/utils',["./safe-string","exports"],
|
||||
function(__dependency1__, __exports__) {
|
||||
|
||||
/*jshint -W004 */
|
||||
var SafeString = __dependency1__["default"];
|
||||
|
||||
var escape = {
|
||||
"&": "&",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
'"': """,
|
||||
"'": "'",
|
||||
"`": "`"
|
||||
};
|
||||
|
||||
var badChars = /[&<>"'`]/g;
|
||||
var possible = /[&<>"'`]/;
|
||||
|
||||
function escapeChar(chr) {
|
||||
return escape[chr] || "&";
|
||||
}
|
||||
|
||||
function extend(obj, value) {
|
||||
for(var key in value) {
|
||||
if(Object.prototype.hasOwnProperty.call(value, key)) {
|
||||
obj[key] = value[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
__exports__.extend = extend;var toString = Object.prototype.toString;
|
||||
__exports__.toString = toString;
|
||||
// Sourced from lodash
|
||||
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
||||
var isFunction = function(value) {
|
||||
return typeof value === 'function';
|
||||
};
|
||||
// fallback for older versions of Chrome and Safari
|
||||
if (isFunction(/x/)) {
|
||||
isFunction = function(value) {
|
||||
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
||||
};
|
||||
}
|
||||
var isFunction;
|
||||
__exports__.isFunction = isFunction;
|
||||
var isArray = Array.isArray || function(value) {
|
||||
return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false;
|
||||
};
|
||||
__exports__.isArray = isArray;
|
||||
|
||||
function escapeExpression(string) {
|
||||
// don't escape SafeStrings, since they're already safe
|
||||
if (string instanceof SafeString) {
|
||||
return string.toString();
|
||||
} else if (!string && string !== 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// Force a string conversion as this will be done by the append regardless and
|
||||
// the regex test will do this transparently behind the scenes, causing issues if
|
||||
// an object's to string has escaped characters in it.
|
||||
string = "" + string;
|
||||
|
||||
if(!possible.test(string)) { return string; }
|
||||
return string.replace(badChars, escapeChar);
|
||||
}
|
||||
|
||||
__exports__.escapeExpression = escapeExpression;function isEmpty(value) {
|
||||
if (!value && value !== 0) {
|
||||
return true;
|
||||
} else if (isArray(value) && value.length === 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
__exports__.isEmpty = isEmpty;
|
||||
});
|
||||
define(
|
||||
'handlebars/exception',["exports"],
|
||||
function(__exports__) {
|
||||
|
||||
|
||||
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
||||
|
||||
function Exception(message, node) {
|
||||
var line;
|
||||
if (node && node.firstLine) {
|
||||
line = node.firstLine;
|
||||
|
||||
message += ' - ' + line + ':' + node.firstColumn;
|
||||
}
|
||||
|
||||
var tmp = Error.prototype.constructor.call(this, message);
|
||||
|
||||
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
|
||||
for (var idx = 0; idx < errorProps.length; idx++) {
|
||||
this[errorProps[idx]] = tmp[errorProps[idx]];
|
||||
}
|
||||
|
||||
if (line) {
|
||||
this.lineNumber = line;
|
||||
this.column = node.firstColumn;
|
||||
}
|
||||
}
|
||||
|
||||
Exception.prototype = new Error();
|
||||
|
||||
__exports__["default"] = Exception;
|
||||
});
|
||||
define(
|
||||
'handlebars/base',["./utils","./exception","exports"],
|
||||
function(__dependency1__, __dependency2__, __exports__) {
|
||||
|
||||
var Utils = __dependency1__;
|
||||
var Exception = __dependency2__["default"];
|
||||
|
||||
var VERSION = "1.3.0";
|
||||
__exports__.VERSION = VERSION;var COMPILER_REVISION = 4;
|
||||
__exports__.COMPILER_REVISION = COMPILER_REVISION;
|
||||
var REVISION_CHANGES = {
|
||||
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
||||
2: '== 1.0.0-rc.3',
|
||||
3: '== 1.0.0-rc.4',
|
||||
4: '>= 1.0.0'
|
||||
};
|
||||
__exports__.REVISION_CHANGES = REVISION_CHANGES;
|
||||
var isArray = Utils.isArray,
|
||||
isFunction = Utils.isFunction,
|
||||
toString = Utils.toString,
|
||||
objectType = '[object Object]';
|
||||
|
||||
function HandlebarsEnvironment(helpers, partials) {
|
||||
this.helpers = helpers || {};
|
||||
this.partials = partials || {};
|
||||
|
||||
registerDefaultHelpers(this);
|
||||
}
|
||||
|
||||
__exports__.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = {
|
||||
constructor: HandlebarsEnvironment,
|
||||
|
||||
logger: logger,
|
||||
log: log,
|
||||
|
||||
registerHelper: function(name, fn, inverse) {
|
||||
if (toString.call(name) === objectType) {
|
||||
if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); }
|
||||
Utils.extend(this.helpers, name);
|
||||
} else {
|
||||
if (inverse) { fn.not = inverse; }
|
||||
this.helpers[name] = fn;
|
||||
}
|
||||
},
|
||||
|
||||
registerPartial: function(name, str) {
|
||||
if (toString.call(name) === objectType) {
|
||||
Utils.extend(this.partials, name);
|
||||
} else {
|
||||
this.partials[name] = str;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function registerDefaultHelpers(instance) {
|
||||
instance.registerHelper('helperMissing', function(arg) {
|
||||
if(arguments.length === 2) {
|
||||
return undefined;
|
||||
} else {
|
||||
throw new Exception("Missing helper: '" + arg + "'");
|
||||
}
|
||||
});
|
||||
|
||||
instance.registerHelper('blockHelperMissing', function(context, options) {
|
||||
var inverse = options.inverse || function() {}, fn = options.fn;
|
||||
|
||||
if (isFunction(context)) { context = context.call(this); }
|
||||
|
||||
if(context === true) {
|
||||
return fn(this);
|
||||
} else if(context === false || context == null) {
|
||||
return inverse(this);
|
||||
} else if (isArray(context)) {
|
||||
if(context.length > 0) {
|
||||
return instance.helpers.each(context, options);
|
||||
} else {
|
||||
return inverse(this);
|
||||
}
|
||||
} else {
|
||||
return fn(context);
|
||||
}
|
||||
});
|
||||
|
||||
instance.registerHelper('each', function(context, options) {
|
||||
var fn = options.fn, inverse = options.inverse;
|
||||
var i = 0, ret = "", data;
|
||||
|
||||
if (isFunction(context)) { context = context.call(this); }
|
||||
|
||||
if (options.data) {
|
||||
data = createFrame(options.data);
|
||||
}
|
||||
|
||||
if(context && typeof context === 'object') {
|
||||
if (isArray(context)) {
|
||||
for(var j = context.length; i<j; i++) {
|
||||
if (data) {
|
||||
data.index = i;
|
||||
data.first = (i === 0);
|
||||
data.last = (i === (context.length-1));
|
||||
}
|
||||
ret = ret + fn(context[i], { data: data });
|
||||
}
|
||||
} else {
|
||||
for(var key in context) {
|
||||
if(context.hasOwnProperty(key)) {
|
||||
if(data) {
|
||||
data.key = key;
|
||||
data.index = i;
|
||||
data.first = (i === 0);
|
||||
}
|
||||
ret = ret + fn(context[key], {data: data});
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(i === 0){
|
||||
ret = inverse(this);
|
||||
}
|
||||
|
||||
return ret;
|
||||
});
|
||||
|
||||
instance.registerHelper('if', function(conditional, options) {
|
||||
if (isFunction(conditional)) { conditional = conditional.call(this); }
|
||||
|
||||
// Default behavior is to render the positive path if the value is truthy and not empty.
|
||||
// The `includeZero` option may be set to treat the condtional as purely not empty based on the
|
||||
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
|
||||
if ((!options.hash.includeZero && !conditional) || Utils.isEmpty(conditional)) {
|
||||
return options.inverse(this);
|
||||
} else {
|
||||
return options.fn(this);
|
||||
}
|
||||
});
|
||||
|
||||
instance.registerHelper('unless', function(conditional, options) {
|
||||
return instance.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn, hash: options.hash});
|
||||
});
|
||||
|
||||
instance.registerHelper('with', function(context, options) {
|
||||
if (isFunction(context)) { context = context.call(this); }
|
||||
|
||||
if (!Utils.isEmpty(context)) return options.fn(context);
|
||||
});
|
||||
|
||||
instance.registerHelper('log', function(context, options) {
|
||||
var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
|
||||
instance.log(level, context);
|
||||
});
|
||||
}
|
||||
|
||||
var logger = {
|
||||
methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' },
|
||||
|
||||
// State enum
|
||||
DEBUG: 0,
|
||||
INFO: 1,
|
||||
WARN: 2,
|
||||
ERROR: 3,
|
||||
level: 3,
|
||||
|
||||
// can be overridden in the host environment
|
||||
log: function(level, obj) {
|
||||
if (logger.level <= level) {
|
||||
var method = logger.methodMap[level];
|
||||
if (typeof console !== 'undefined' && console[method]) {
|
||||
console[method].call(console, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
__exports__.logger = logger;
|
||||
function log(level, obj) { logger.log(level, obj); }
|
||||
|
||||
__exports__.log = log;var createFrame = function(object) {
|
||||
var obj = {};
|
||||
Utils.extend(obj, object);
|
||||
return obj;
|
||||
};
|
||||
__exports__.createFrame = createFrame;
|
||||
});
|
||||
define(
|
||||
'handlebars/runtime',["./utils","./exception","./base","exports"],
|
||||
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
||||
|
||||
var Utils = __dependency1__;
|
||||
var Exception = __dependency2__["default"];
|
||||
var COMPILER_REVISION = __dependency3__.COMPILER_REVISION;
|
||||
var REVISION_CHANGES = __dependency3__.REVISION_CHANGES;
|
||||
|
||||
function checkRevision(compilerInfo) {
|
||||
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
||||
currentRevision = COMPILER_REVISION;
|
||||
|
||||
if (compilerRevision !== currentRevision) {
|
||||
if (compilerRevision < currentRevision) {
|
||||
var runtimeVersions = REVISION_CHANGES[currentRevision],
|
||||
compilerVersions = REVISION_CHANGES[compilerRevision];
|
||||
throw new Exception("Template was precompiled with an older version of Handlebars than the current runtime. "+
|
||||
"Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").");
|
||||
} else {
|
||||
// Use the embedded version info since the runtime doesn't know about this revision yet
|
||||
throw new Exception("Template was precompiled with a newer version of Handlebars than the current runtime. "+
|
||||
"Please update your runtime to a newer version ("+compilerInfo[1]+").");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
__exports__.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial
|
||||
|
||||
function template(templateSpec, env) {
|
||||
if (!env) {
|
||||
throw new Exception("No environment passed to template");
|
||||
}
|
||||
|
||||
// Note: Using env.VM references rather than local var references throughout this section to allow
|
||||
// for external users to override these as psuedo-supported APIs.
|
||||
var invokePartialWrapper = function(partial, name, context, helpers, partials, data) {
|
||||
var result = env.VM.invokePartial.apply(this, arguments);
|
||||
if (result != null) { return result; }
|
||||
|
||||
if (env.compile) {
|
||||
var options = { helpers: helpers, partials: partials, data: data };
|
||||
partials[name] = env.compile(partial, { data: data !== undefined }, env);
|
||||
return partials[name](context, options);
|
||||
} else {
|
||||
throw new Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
|
||||
}
|
||||
};
|
||||
|
||||
// Just add water
|
||||
var container = {
|
||||
escapeExpression: Utils.escapeExpression,
|
||||
invokePartial: invokePartialWrapper,
|
||||
programs: [],
|
||||
program: function(i, fn, data) {
|
||||
var programWrapper = this.programs[i];
|
||||
if(data) {
|
||||
programWrapper = program(i, fn, data);
|
||||
} else if (!programWrapper) {
|
||||
programWrapper = this.programs[i] = program(i, fn);
|
||||
}
|
||||
return programWrapper;
|
||||
},
|
||||
merge: function(param, common) {
|
||||
var ret = param || common;
|
||||
|
||||
if (param && common && (param !== common)) {
|
||||
ret = {};
|
||||
Utils.extend(ret, common);
|
||||
Utils.extend(ret, param);
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
programWithDepth: env.VM.programWithDepth,
|
||||
noop: env.VM.noop,
|
||||
compilerInfo: null
|
||||
};
|
||||
|
||||
return function(context, options) {
|
||||
options = options || {};
|
||||
var namespace = options.partial ? options : env,
|
||||
helpers,
|
||||
partials;
|
||||
|
||||
if (!options.partial) {
|
||||
helpers = options.helpers;
|
||||
partials = options.partials;
|
||||
}
|
||||
var result = templateSpec.call(
|
||||
container,
|
||||
namespace, context,
|
||||
helpers,
|
||||
partials,
|
||||
options.data);
|
||||
|
||||
if (!options.partial) {
|
||||
env.VM.checkRevision(container.compilerInfo);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
__exports__.template = template;function programWithDepth(i, fn, data /*, $depth */) {
|
||||
var args = Array.prototype.slice.call(arguments, 3);
|
||||
|
||||
var prog = function(context, options) {
|
||||
options = options || {};
|
||||
|
||||
return fn.apply(this, [context, options.data || data].concat(args));
|
||||
};
|
||||
prog.program = i;
|
||||
prog.depth = args.length;
|
||||
return prog;
|
||||
}
|
||||
|
||||
__exports__.programWithDepth = programWithDepth;function program(i, fn, data) {
|
||||
var prog = function(context, options) {
|
||||
options = options || {};
|
||||
|
||||
return fn(context, options.data || data);
|
||||
};
|
||||
prog.program = i;
|
||||
prog.depth = 0;
|
||||
return prog;
|
||||
}
|
||||
|
||||
__exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data) {
|
||||
var options = { partial: true, helpers: helpers, partials: partials, data: data };
|
||||
|
||||
if(partial === undefined) {
|
||||
throw new Exception("The partial " + name + " could not be found");
|
||||
} else if(partial instanceof Function) {
|
||||
return partial(context, options);
|
||||
}
|
||||
}
|
||||
|
||||
__exports__.invokePartial = invokePartial;function noop() { return ""; }
|
||||
|
||||
__exports__.noop = noop;
|
||||
});
|
||||
define(
|
||||
'handlebars.runtime',["./handlebars/base","./handlebars/safe-string","./handlebars/exception","./handlebars/utils","./handlebars/runtime","exports"],
|
||||
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __exports__) {
|
||||
|
||||
/*globals Handlebars: true */
|
||||
var base = __dependency1__;
|
||||
|
||||
// Each of these augment the Handlebars object. No need to setup here.
|
||||
// (This is done to easily share code between commonjs and browse envs)
|
||||
var SafeString = __dependency2__["default"];
|
||||
var Exception = __dependency3__["default"];
|
||||
var Utils = __dependency4__;
|
||||
var runtime = __dependency5__;
|
||||
|
||||
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
||||
var create = function() {
|
||||
var hb = new base.HandlebarsEnvironment();
|
||||
|
||||
Utils.extend(hb, base);
|
||||
hb.SafeString = SafeString;
|
||||
hb.Exception = Exception;
|
||||
hb.Utils = Utils;
|
||||
|
||||
hb.VM = runtime;
|
||||
hb.template = function(spec) {
|
||||
return runtime.template(spec, hb);
|
||||
};
|
||||
|
||||
return hb;
|
||||
};
|
||||
|
||||
var Handlebars = create();
|
||||
Handlebars.create = create;
|
||||
|
||||
__exports__["default"] = Handlebars;
|
||||
});
|
|
@ -1,425 +0,0 @@
|
|||
define("bootstrap.wysihtml5.templates", ["handlebars.runtime", "wysihtml5"], function(HandlebarsEnv, wysihtml5) {
|
||||
this["wysihtml5"] = wysihtml5;
|
||||
var Handlebars = HandlebarsEnv.default;
|
||||
|
||||
this["wysihtml5"] = this["wysihtml5"] || {};
|
||||
this["wysihtml5"]["tpl"] = this["wysihtml5"]["tpl"] || {};
|
||||
|
||||
this["wysihtml5"]["tpl"]["blockquote"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
|
||||
return " \n <span class=\"fa fa-quote-left\"></span>\n ";
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-quote\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"blockquote\" data-wysihtml5-display-format-name=\"false\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["color"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
buffer += "<li class=\"dropdown\">\n <a class=\"btn btn-default dropdown-toggle ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\" data-toggle=\"dropdown\" tabindex=\"-1\">\n <span class=\"current-color\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.black)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</span>\n <b class=\"caret\"></b>\n </a>\n <ul class=\"dropdown-menu\">\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"black\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"black\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.black)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"silver\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"silver\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.silver)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"gray\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"gray\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.gray)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"maroon\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"maroon\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.maroon)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"red\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"red\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.red)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"purple\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"purple\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.purple)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"green\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"green\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.green)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"olive\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"olive\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.olive)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"navy\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"navy\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.navy)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"blue\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"blue\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.blue)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"orange\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"orange\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.orange)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n </ul>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["emphasis"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"small\" title=\"CTRL+S\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.small)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n ";
|
||||
return buffer;
|
||||
}
|
||||
|
||||
buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"bold\" title=\"CTRL+B\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.bold)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"italic\" title=\"CTRL+I\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.italic)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"underline\" title=\"CTRL+U\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.underline)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.small), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </div>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["font-styles"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-font\"></span>\n ";
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-font\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li class=\"dropdown\">\n <a class=\"btn btn-default dropdown-toggle ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\" data-toggle=\"dropdown\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n <span class=\"current-font\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.normal)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</span>\n <b class=\"caret\"></b>\n </a>\n <ul class=\"dropdown-menu\">\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"p\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.normal)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h1\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h1)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h2\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h2)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h3\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h3)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h4\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h4)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h5\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h5)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h6\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h6)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n </ul>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["html"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-pencil\"></span>\n ";
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-pencil\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-action=\"change_view\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.html)),stack1 == null || stack1 === false ? stack1 : stack1.edit)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n </div>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["image"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
|
||||
return "modal-sm";
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-file-image-o\"></span>\n ";
|
||||
}
|
||||
|
||||
function program7(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-picture\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li>\n <div class=\"bootstrap-wysihtml5-insert-image-modal modal fade\" data-wysihtml5-dialog=\"insertImage\">\n <div class=\"modal-dialog ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.smallmodals), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <a class=\"close\" data-dismiss=\"modal\">×</a>\n <h3>"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</h3>\n </div>\n <div class=\"modal-body\">\n <div class=\"form-group\">\n <input value=\"http://\" class=\"bootstrap-wysihtml5-insert-image-url form-control\" data-wysihtml5-dialog-field=\"src\">\n </div> \n </div>\n <div class=\"modal-footer\">\n <a class=\"btn btn-default\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"cancel\" href=\"#\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.cancel)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n <a class=\"btn btn-primary\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"save\" href=\"#\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n </div>\n </div>\n </div>\n </div>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"insertImage\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["link"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
|
||||
return "modal-sm";
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-share-square-o\"></span>\n ";
|
||||
}
|
||||
|
||||
function program7(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-share\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li>\n <div class=\"bootstrap-wysihtml5-insert-link-modal modal fade\" data-wysihtml5-dialog=\"createLink\">\n <div class=\"modal-dialog ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.smallmodals), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <a class=\"close\" data-dismiss=\"modal\">×</a>\n <h3>"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</h3>\n </div>\n <div class=\"modal-body\">\n <div class=\"form-group\">\n <input value=\"http://\" class=\"bootstrap-wysihtml5-insert-link-url form-control\" data-wysihtml5-dialog-field=\"href\">\n </div> \n <div class=\"checkbox\">\n <label> \n <input type=\"checkbox\" class=\"bootstrap-wysihtml5-insert-link-target\" checked>"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.target)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\n </label>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a class=\"btn btn-default\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"cancel\" href=\"#\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.cancel)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n <a href=\"#\" class=\"btn btn-primary\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"save\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n </div>\n </div>\n </div>\n </div>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"createLink\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["lists"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-list-ul\"></span>\n ";
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-list\"></span>\n ";
|
||||
}
|
||||
|
||||
function program7(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-list-ol\"></span>\n ";
|
||||
}
|
||||
|
||||
function program9(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-th-list\"></span>\n ";
|
||||
}
|
||||
|
||||
function program11(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-outdent\"></span>\n ";
|
||||
}
|
||||
|
||||
function program13(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-indent-right\"></span>\n ";
|
||||
}
|
||||
|
||||
function program15(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-indent\"></span>\n ";
|
||||
}
|
||||
|
||||
function program17(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-indent-left\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"insertUnorderedList\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.unordered)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"insertOrderedList\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.ordered)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(9, program9, data),fn:self.program(7, program7, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"Outdent\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.outdent)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(13, program13, data),fn:self.program(11, program11, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"Indent\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.indent)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(17, program17, data),fn:self.program(15, program15, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n </div>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
});
|
File diff suppressed because it is too large
Load diff
14972
view/js/bootstrap3-wysiwyg/bootstrap3-wysihtml5.all.js
vendored
14972
view/js/bootstrap3-wysiwyg/bootstrap3-wysihtml5.all.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
117
view/js/bootstrap3-wysiwyg/bootstrap3-wysihtml5.css
vendored
117
view/js/bootstrap3-wysiwyg/bootstrap3-wysihtml5.css
vendored
|
@ -1,117 +0,0 @@
|
|||
ul.wysihtml5-toolbar {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar::after {
|
||||
clear: both;
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar > li {
|
||||
float: left;
|
||||
display: list-item;
|
||||
list-style: none;
|
||||
margin: 0 5px 10px 0;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar a.btn.wysihtml5-command-active {
|
||||
background-image: none;
|
||||
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
background-color: #E6E6E6;
|
||||
background-color: #D9D9D9;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
ul.wysihtml5-commands-disabled .dropdown-menu {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div.wysihtml5-colors {
|
||||
display:block;
|
||||
width: 50px;
|
||||
height: 20px;
|
||||
margin-top: 2px;
|
||||
margin-left: 5px;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar a.wysihtml5-colors-title {
|
||||
padding-left: 70px;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] {
|
||||
background: black !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] {
|
||||
background: silver !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] {
|
||||
background: gray !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] {
|
||||
background: maroon !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] {
|
||||
background: red !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] {
|
||||
background: purple !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] {
|
||||
background: green !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] {
|
||||
background: olive !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] {
|
||||
background: navy !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] {
|
||||
background: blue !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] {
|
||||
background: orange !important;
|
||||
}
|
||||
|
||||
.glyphicon-quote:before {
|
||||
content: "\201C";
|
||||
font-family: Georgia, serif;
|
||||
font-size: 50px;
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
left: -3px;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.glyphicon-quote:after {
|
||||
content: "\0000a0";
|
||||
}
|
||||
|
318
view/js/bootstrap3-wysiwyg/bootstrap3-wysihtml5.js
vendored
318
view/js/bootstrap3-wysiwyg/bootstrap3-wysihtml5.js
vendored
|
@ -1,318 +0,0 @@
|
|||
(function (factory) {
|
||||
'use strict';
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5', ['jquery', 'wysihtml5', 'bootstrap', 'bootstrap.wysihtml5.templates', 'bootstrap.wysihtml5.commands'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery, wysihtml5); // jshint ignore:line
|
||||
}
|
||||
}(function ($, wysihtml5) {
|
||||
'use strict';
|
||||
var bsWysihtml5 = function($, wysihtml5) {
|
||||
|
||||
var templates = function(key, locale, options) {
|
||||
if(wysihtml5.tpl[key]) {
|
||||
return wysihtml5.tpl[key]({locale: locale, options: options});
|
||||
}
|
||||
};
|
||||
|
||||
var Wysihtml5 = function(el, options) {
|
||||
this.el = el;
|
||||
var toolbarOpts = $.extend(true, {}, defaultOptions, options);
|
||||
for(var t in toolbarOpts.customTemplates) {
|
||||
if (toolbarOpts.customTemplates.hasOwnProperty(t)) {
|
||||
wysihtml5.tpl[t] = toolbarOpts.customTemplates[t];
|
||||
}
|
||||
}
|
||||
this.toolbar = this.createToolbar(el, toolbarOpts);
|
||||
this.editor = this.createEditor(toolbarOpts);
|
||||
};
|
||||
|
||||
Wysihtml5.prototype = {
|
||||
|
||||
constructor: Wysihtml5,
|
||||
|
||||
createEditor: function(options) {
|
||||
options = options || {};
|
||||
|
||||
// Add the toolbar to a clone of the options object so multiple instances
|
||||
// of the WYISYWG don't break because 'toolbar' is already defined
|
||||
options = $.extend(true, {}, options);
|
||||
options.toolbar = this.toolbar[0];
|
||||
|
||||
this.initializeEditor(this.el[0], options);
|
||||
},
|
||||
|
||||
|
||||
initializeEditor: function(el, options) {
|
||||
var editor = new wysihtml5.Editor(this.el[0], options);
|
||||
|
||||
editor.on('beforeload', this.syncBootstrapDialogEvents);
|
||||
editor.on('beforeload', this.loadParserRules);
|
||||
|
||||
// #30 - body is in IE 10 not created by default, which leads to nullpointer
|
||||
// 2014/02/13 - adapted to wysihtml5-0.4, does not work in IE
|
||||
if(editor.composer.editableArea.contentDocument) {
|
||||
this.addMoreShortcuts(editor,
|
||||
editor.composer.editableArea.contentDocument.body || editor.composer.editableArea.contentDocument,
|
||||
options.shortcuts);
|
||||
} else {
|
||||
this.addMoreShortcuts(editor, editor.composer.editableArea, options.shortcuts);
|
||||
}
|
||||
|
||||
if(options && options.events) {
|
||||
for(var eventName in options.events) {
|
||||
if (options.events.hasOwnProperty(eventName)) {
|
||||
editor.on(eventName, options.events[eventName]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return editor;
|
||||
},
|
||||
|
||||
loadParserRules: function() {
|
||||
if($.type(this.config.parserRules) === 'string') {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
url: this.config.parserRules,
|
||||
context: this,
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
console.log(errorThrown);
|
||||
},
|
||||
success: function (parserRules) {
|
||||
this.config.parserRules = parserRules;
|
||||
console.log('parserrules loaded');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(this.config.pasteParserRulesets && $.type(this.config.pasteParserRulesets) === 'string') {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
url: this.config.pasteParserRulesets,
|
||||
context: this,
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
console.log(errorThrown);
|
||||
},
|
||||
success: function (pasteParserRulesets) {
|
||||
this.config.pasteParserRulesets = pasteParserRulesets;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//sync wysihtml5 events for dialogs with bootstrap events
|
||||
syncBootstrapDialogEvents: function() {
|
||||
var editor = this;
|
||||
$.map(this.toolbar.commandMapping, function(value) {
|
||||
return [value];
|
||||
}).filter(function(commandObj) {
|
||||
return commandObj.dialog;
|
||||
}).map(function(commandObj) {
|
||||
return commandObj.dialog;
|
||||
}).forEach(function(dialog) {
|
||||
dialog.on('show', function() {
|
||||
$(this.container).modal('show');
|
||||
});
|
||||
dialog.on('hide', function() {
|
||||
$(this.container).modal('hide');
|
||||
setTimeout(editor.composer.focus, 0);
|
||||
});
|
||||
$(dialog.container).on('shown.bs.modal', function () {
|
||||
$(this).find('input, select, textarea').first().focus();
|
||||
});
|
||||
});
|
||||
this.on('change_view', function() {
|
||||
$(this.toolbar.container.children).find('a.btn').not('[data-wysihtml5-action="change_view"]').toggleClass('disabled');
|
||||
});
|
||||
},
|
||||
|
||||
createToolbar: function(el, options) {
|
||||
var self = this;
|
||||
var toolbar = $('<ul/>', {
|
||||
'class' : 'wysihtml5-toolbar',
|
||||
'style': 'display:none'
|
||||
});
|
||||
var culture = options.locale || defaultOptions.locale || 'en';
|
||||
if(!locale.hasOwnProperty(culture)) {
|
||||
console.debug('Locale \'' + culture + '\' not found. Available locales are: ' + Object.keys(locale) + '. Falling back to \'en\'.');
|
||||
culture = 'en';
|
||||
}
|
||||
var localeObject = $.extend(true, {}, locale.en, locale[culture]);
|
||||
for(var key in options.toolbar) {
|
||||
if(options.toolbar[key]) {
|
||||
toolbar.append(templates(key, localeObject, options));
|
||||
}
|
||||
}
|
||||
|
||||
toolbar.find('a[data-wysihtml5-command="formatBlock"]').click(function(e) {
|
||||
var target = e.delegateTarget || e.target || e.srcElement,
|
||||
el = $(target),
|
||||
showformat = el.data('wysihtml5-display-format-name'),
|
||||
formatname = el.data('wysihtml5-format-name') || el.html();
|
||||
if(showformat === undefined || showformat === 'true') {
|
||||
self.toolbar.find('.current-font').text(formatname);
|
||||
}
|
||||
});
|
||||
|
||||
toolbar.find('a[data-wysihtml5-command="foreColor"]').click(function(e) {
|
||||
var target = e.target || e.srcElement;
|
||||
var el = $(target);
|
||||
self.toolbar.find('.current-color').text(el.html());
|
||||
});
|
||||
|
||||
this.el.before(toolbar);
|
||||
|
||||
return toolbar;
|
||||
},
|
||||
|
||||
addMoreShortcuts: function(editor, el, shortcuts) {
|
||||
/* some additional shortcuts */
|
||||
wysihtml5.dom.observe(el, 'keydown', function(event) {
|
||||
var keyCode = event.keyCode,
|
||||
command = shortcuts[keyCode];
|
||||
if ((event.ctrlKey || event.metaKey || event.altKey) && command && wysihtml5.commands[command]) {
|
||||
var commandObj = editor.toolbar.commandMapping[command + ':null'];
|
||||
if (commandObj && commandObj.dialog && !commandObj.state) {
|
||||
commandObj.dialog.show();
|
||||
} else {
|
||||
wysihtml5.commands[command].exec(editor.composer, command);
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// these define our public api
|
||||
var methods = {
|
||||
resetDefaults: function() {
|
||||
$.fn.wysihtml5.defaultOptions = $.extend(true, {}, $.fn.wysihtml5.defaultOptionsCache);
|
||||
},
|
||||
bypassDefaults: function(options) {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
$this.data('wysihtml5', new Wysihtml5($this, options));
|
||||
});
|
||||
},
|
||||
shallowExtend: function (options) {
|
||||
var settings = $.extend({}, $.fn.wysihtml5.defaultOptions, options || {}, $(this).data());
|
||||
var that = this;
|
||||
return methods.bypassDefaults.apply(that, [settings]);
|
||||
},
|
||||
deepExtend: function(options) {
|
||||
var settings = $.extend(true, {}, $.fn.wysihtml5.defaultOptions, options || {});
|
||||
var that = this;
|
||||
return methods.bypassDefaults.apply(that, [settings]);
|
||||
},
|
||||
init: function(options) {
|
||||
var that = this;
|
||||
return methods.shallowExtend.apply(that, [options]);
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.wysihtml5 = function ( method ) {
|
||||
if ( methods[method] ) {
|
||||
return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
|
||||
} else if ( typeof method === 'object' || ! method ) {
|
||||
return methods.init.apply( this, arguments );
|
||||
} else {
|
||||
$.error( 'Method ' + method + ' does not exist on jQuery.wysihtml5' );
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.wysihtml5.Constructor = Wysihtml5;
|
||||
|
||||
var defaultOptions = $.fn.wysihtml5.defaultOptions = {
|
||||
toolbar: {
|
||||
'font-styles': true,
|
||||
'color': false,
|
||||
'emphasis': {
|
||||
'small': true
|
||||
},
|
||||
'blockquote': true,
|
||||
'lists': true,
|
||||
'html': false,
|
||||
'link': true,
|
||||
'image': true,
|
||||
'smallmodals': false
|
||||
},
|
||||
useLineBreaks: false,
|
||||
parserRules: {
|
||||
classes: {
|
||||
'wysiwyg-color-silver' : 1,
|
||||
'wysiwyg-color-gray' : 1,
|
||||
'wysiwyg-color-white' : 1,
|
||||
'wysiwyg-color-maroon' : 1,
|
||||
'wysiwyg-color-red' : 1,
|
||||
'wysiwyg-color-purple' : 1,
|
||||
'wysiwyg-color-fuchsia' : 1,
|
||||
'wysiwyg-color-green' : 1,
|
||||
'wysiwyg-color-lime' : 1,
|
||||
'wysiwyg-color-olive' : 1,
|
||||
'wysiwyg-color-yellow' : 1,
|
||||
'wysiwyg-color-navy' : 1,
|
||||
'wysiwyg-color-blue' : 1,
|
||||
'wysiwyg-color-teal' : 1,
|
||||
'wysiwyg-color-aqua' : 1,
|
||||
'wysiwyg-color-orange' : 1
|
||||
},
|
||||
tags: {
|
||||
'b': {},
|
||||
'i': {},
|
||||
'strong': {},
|
||||
'em': {},
|
||||
'p': {},
|
||||
'br': {},
|
||||
'ol': {},
|
||||
'ul': {},
|
||||
'li': {},
|
||||
'h1': {},
|
||||
'h2': {},
|
||||
'h3': {},
|
||||
'h4': {},
|
||||
'h5': {},
|
||||
'h6': {},
|
||||
'blockquote': {},
|
||||
'u': 1,
|
||||
'img': {
|
||||
'check_attributes': {
|
||||
'width': 'numbers',
|
||||
'alt': 'alt',
|
||||
'src': 'url',
|
||||
'height': 'numbers'
|
||||
}
|
||||
},
|
||||
'a': {
|
||||
'check_attributes': {
|
||||
'href': 'url'
|
||||
},
|
||||
'set_attributes': {
|
||||
'target': '_blank',
|
||||
'rel': 'nofollow'
|
||||
}
|
||||
},
|
||||
'span': 1,
|
||||
'div': 1,
|
||||
'small': 1,
|
||||
'code': 1,
|
||||
'pre': 1
|
||||
}
|
||||
},
|
||||
locale: 'en',
|
||||
shortcuts: {
|
||||
'83': 'small',// S
|
||||
'75': 'createLink'// K
|
||||
}
|
||||
};
|
||||
|
||||
if (typeof $.fn.wysihtml5.defaultOptionsCache === 'undefined') {
|
||||
$.fn.wysihtml5.defaultOptionsCache = $.extend(true, {}, $.fn.wysihtml5.defaultOptions);
|
||||
}
|
||||
|
||||
var locale = $.fn.wysihtml5.locale = {};
|
||||
};
|
||||
bsWysihtml5($, wysihtml5);
|
||||
}));
|
|
@ -1,3 +0,0 @@
|
|||
/*! bootstrap3-wysihtml5-bower 2014-09-26 */
|
||||
|
||||
ul.wysihtml5-toolbar{margin:0;padding:0;display:block}ul.wysihtml5-toolbar::after{clear:both;display:table;content:""}ul.wysihtml5-toolbar>li{float:left;display:list-item;list-style:none;margin:0 5px 10px 0}ul.wysihtml5-toolbar a[data-wysihtml5-command=bold]{font-weight:700}ul.wysihtml5-toolbar a[data-wysihtml5-command=italic]{font-style:italic}ul.wysihtml5-toolbar a[data-wysihtml5-command=underline]{text-decoration:underline}ul.wysihtml5-toolbar a.btn.wysihtml5-command-active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#D9D9D9;outline:0}ul.wysihtml5-commands-disabled .dropdown-menu{display:none!important}ul.wysihtml5-toolbar div.wysihtml5-colors{display:block;width:50px;height:20px;margin-top:2px;margin-left:5px;position:absolute;pointer-events:none}ul.wysihtml5-toolbar a.wysihtml5-colors-title{padding-left:70px}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=black]{background:#000!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=silver]{background:silver!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=gray]{background:gray!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=maroon]{background:maroon!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=red]{background:red!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=purple]{background:purple!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=green]{background:green!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=olive]{background:olive!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=navy]{background:navy!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=blue]{background:#00f!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=orange]{background:orange!important}.glyphicon-quote:before{content:"\201C";font-family:Georgia,serif;font-size:50px;position:absolute;top:-4px;left:-3px;max-height:100%}.glyphicon-quote:after{content:"\0000a0"}
|
File diff suppressed because one or more lines are too long
|
@ -1,12 +0,0 @@
|
|||
(function(wysihtml5) {
|
||||
wysihtml5.commands.small = {
|
||||
exec: function(composer, command) {
|
||||
return wysihtml5.commands.formatInline.exec(composer, command, "small");
|
||||
},
|
||||
|
||||
state: function(composer, command) {
|
||||
return wysihtml5.commands.formatInline.state(composer, command, "small");
|
||||
}
|
||||
};
|
||||
})(wysihtml5);
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
/**
|
||||
* Arabic translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.ar-AR', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["ar-AR"] = {
|
||||
font_styles: {
|
||||
normal: "نص عادي",
|
||||
h1: "عنوان رئيسي 1",
|
||||
h2: "عنوان رئيسي 2",
|
||||
h3: "عنوان رئيسي 3",
|
||||
h4: "عنوان رئيسي 4",
|
||||
h5: "عنوان رئيسي 5",
|
||||
h6: "عنوان رئيسي 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "عريض",
|
||||
italic: "مائل",
|
||||
underline: "تحته خط"
|
||||
},
|
||||
lists: {
|
||||
unordered: "قائمة منقطة",
|
||||
ordered: "قائمة مرقمة",
|
||||
outdent: "محاذاه للخارج",
|
||||
indent: "محاذاه للداخل"
|
||||
},
|
||||
link: {
|
||||
insert: "إضافة رابط",
|
||||
cancel: "إلغاء"
|
||||
},
|
||||
image: {
|
||||
insert: "إضافة صورة",
|
||||
cancel: "إلغاء"
|
||||
},
|
||||
html: {
|
||||
edit: "تعديل HTML"
|
||||
},
|
||||
|
||||
colours: {
|
||||
black: "أسود",
|
||||
silver: "فضي",
|
||||
gray: "رمادي",
|
||||
maroon: "بني",
|
||||
red: "أحمر",
|
||||
purple: "بنفسجي",
|
||||
green: "أخضر",
|
||||
olive: "زيتوني",
|
||||
navy: "أزرق قاتم",
|
||||
blue: "أزرق نيلي",
|
||||
orange: "برتقالي"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,60 +0,0 @@
|
|||
/**
|
||||
* Bulgarian translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.bg-BG', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["bg-BG"] = {
|
||||
font_styles: {
|
||||
normal: "Нормален текст",
|
||||
h1: "Заглавие 1",
|
||||
h2: "Заглавие 2",
|
||||
h3: "Заглавие 3",
|
||||
h4: "Заглавие 4",
|
||||
h5: "Заглавие 5",
|
||||
h6: "Заглавие 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Удебелен",
|
||||
italic: "Курсив",
|
||||
underline: "Подчертан"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Неподреден списък",
|
||||
ordered: "Подреден списък",
|
||||
outdent: "Намали отстояние",
|
||||
indent: "Увеличи отстояние"
|
||||
},
|
||||
link: {
|
||||
insert: "Вмъкни връзка",
|
||||
cancel: "Отмени"
|
||||
},
|
||||
image: {
|
||||
insert: "Вмъкни картинка",
|
||||
cancel: "Отмени"
|
||||
},
|
||||
html: {
|
||||
edit: "Редакртирай HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Черен",
|
||||
silver: "Сребърен",
|
||||
gray: "Сив",
|
||||
maroon: "Коричневый",
|
||||
red: "Червен",
|
||||
purple: "Виолетов",
|
||||
green: "Зелен",
|
||||
olive: "Маслинен",
|
||||
navy: "Морско син",
|
||||
blue: "Син",
|
||||
orange: "Оранжев"
|
||||
}
|
||||
};
|
||||
}));
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
/**
|
||||
* Catalan translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.ca-CT', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["ca-CT"] = {
|
||||
font_styles: {
|
||||
normal: "Text normal",
|
||||
h1: "Títol 1",
|
||||
h2: "Títol 2",
|
||||
h3: "Títol 3",
|
||||
h4: "Títol 4",
|
||||
h5: "Títol 5",
|
||||
h6: "Títol 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Negreta",
|
||||
italic: "Cursiva",
|
||||
underline: "Subratllat"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Llista desordenada",
|
||||
ordered: "Llista ordenada",
|
||||
outdent: "Esborrar tabulació",
|
||||
indent: "Afegir tabulació"
|
||||
},
|
||||
link: {
|
||||
insert: "Afegir enllaç",
|
||||
cancel: "Cancelar"
|
||||
},
|
||||
image: {
|
||||
insert: "Afegir imatge",
|
||||
cancel: "Cancelar"
|
||||
},
|
||||
html: {
|
||||
edit: "Editar HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Negre",
|
||||
silver: "Plata",
|
||||
gray: "Gris",
|
||||
maroon: "Marró",
|
||||
red: "Vermell",
|
||||
purple: "Porpre",
|
||||
green: "Verd",
|
||||
olive: "Oliva",
|
||||
navy: "Blau marí",
|
||||
blue: "Blau",
|
||||
orange: "Taronja"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,59 +0,0 @@
|
|||
/**
|
||||
* Czech translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.cs-CZ', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["cs-CZ"] = {
|
||||
font_styles: {
|
||||
normal: "Normální text",
|
||||
h1: "Nadpis úrovně 1",
|
||||
h2: "Nadpis úrovně 2",
|
||||
h3: "Nadpis úrovně 3",
|
||||
h4: "Nadpis úrovně 4",
|
||||
h5: "Nadpis úrovně 5",
|
||||
h6: "Nadpis úrovně 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Tučné",
|
||||
italic: "Kurzíva",
|
||||
underline: "Podtržení"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Seznam s odrážkami",
|
||||
ordered: "Číslovaný seznam",
|
||||
outdent: "Zvětšit odsazení",
|
||||
indent: "Zmenšit odsazení"
|
||||
},
|
||||
link: {
|
||||
insert: "Vložit odkaz",
|
||||
cancel: "Zrušit"
|
||||
},
|
||||
image: {
|
||||
insert: "Vložit obrázek",
|
||||
cancel: "Zrušit"
|
||||
},
|
||||
html: {
|
||||
edit: "Upravit HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Černá",
|
||||
silver: "Stříbrná",
|
||||
gray: "Šedá",
|
||||
maroon: "Vínová",
|
||||
red: "Červená",
|
||||
purple: "Fialová",
|
||||
green: "Zelená",
|
||||
olive: "Olivová",
|
||||
navy: "Tmavomodrá",
|
||||
blue: "Modrá",
|
||||
orange: "Oranžová"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,59 +0,0 @@
|
|||
/**
|
||||
* Danish translations
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.da-DK', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["da-DK"] = {
|
||||
font_styles: {
|
||||
normal: "Normal tekst",
|
||||
h1: "Overskrift 1",
|
||||
h2: "Overskrift 2",
|
||||
h3: "Overskrift 3",
|
||||
h4: "Overskrift 4",
|
||||
h5: "Overskrift 5",
|
||||
h6: "Overskrift 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Fed",
|
||||
italic: "Kursiv",
|
||||
underline: "Understreget"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Uordnet liste",
|
||||
ordered: "Ordnet liste",
|
||||
outdent: "Udryk",
|
||||
indent: "Indryk"
|
||||
},
|
||||
link: {
|
||||
insert: "Indsæt Link",
|
||||
cancel: "Annuler"
|
||||
},
|
||||
image: {
|
||||
insert: "Indsæt billede",
|
||||
cancel: "Annuler"
|
||||
},
|
||||
html: {
|
||||
edit: "Rediger HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Sort",
|
||||
silver: "Sølv",
|
||||
gray: "Grå",
|
||||
maroon: "Mørkerød",
|
||||
red: "Rød",
|
||||
purple: "Lilla",
|
||||
green: "Grøn",
|
||||
olive: "Lysegrøn",
|
||||
navy: "Mørkeblå",
|
||||
blue: "Blå",
|
||||
orange: "Orange"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* German translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.de-DE', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["de-DE"] = {
|
||||
font_styles: {
|
||||
normal: "Normaler Text",
|
||||
h1: "Überschrift 1",
|
||||
h2: "Überschrift 2",
|
||||
h3: "Überschrift 3",
|
||||
h4: "Überschrift 4",
|
||||
h5: "Überschrift 5",
|
||||
h6: "Überschrift 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Fett",
|
||||
italic: "Kursiv",
|
||||
underline: "Unterstrichen",
|
||||
small: "Klein"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Ungeordnete Liste",
|
||||
ordered: "Geordnete Liste",
|
||||
outdent: "Einzug verkleinern",
|
||||
indent: "Einzug vergrößern"
|
||||
},
|
||||
link: {
|
||||
insert: "Link einfügen",
|
||||
cancel: "Abbrechen",
|
||||
target: "Link in neuen Fenster öffnen"
|
||||
},
|
||||
image: {
|
||||
insert: "Bild einfügen",
|
||||
cancel: "Abbrechen"
|
||||
},
|
||||
html: {
|
||||
edit: "HTML bearbeiten"
|
||||
},
|
||||
colours: {
|
||||
black: "Schwarz",
|
||||
silver: "Silber",
|
||||
gray: "Grau",
|
||||
maroon: "Kastanienbraun",
|
||||
red: "Rot",
|
||||
purple: "Violett",
|
||||
green: "Grün",
|
||||
olive: "Olivgrün",
|
||||
navy: "Marineblau",
|
||||
blue: "Blau",
|
||||
orange: "Orange"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,56 +0,0 @@
|
|||
/**
|
||||
* Greek translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.el-GR', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["el-GR"] = {
|
||||
font_styles: {
|
||||
normal: "Απλό κείμενο",
|
||||
h1: "Κεφαλίδα 1",
|
||||
h2: "Κεφαλίδα 2",
|
||||
h3: "Κεφαλίδα 3"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "B",
|
||||
italic: "I",
|
||||
underline: "U"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Λίστα με κουκκίδες",
|
||||
ordered: "Αριθμημένη λίστα",
|
||||
outdent: "Μείωση εσοχής",
|
||||
indent: "Αύξηση εσοχής"
|
||||
},
|
||||
link: {
|
||||
insert: "Εισαγωγή Συνδέσμου",
|
||||
cancel: "Άκυρο"
|
||||
},
|
||||
image: {
|
||||
insert: "Εισαγωγή Εικόνας",
|
||||
cancel: "Άκυρο"
|
||||
},
|
||||
html: {
|
||||
edit: "Επεξεργασία HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Μαύρο",
|
||||
silver: "Ασημί",
|
||||
gray: "Γκρι",
|
||||
maroon: "Καφέ",
|
||||
red: "Κόκκινο",
|
||||
purple: "Μωβ",
|
||||
green: "Πράσινο",
|
||||
olive: "Λαδί",
|
||||
navy: "Βαθύ Μπλε",
|
||||
blue: "Μπλε",
|
||||
orange: "Πορτοκαλί"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* English translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.en-US', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
$.fn.wysihtml5.locale.en = $.fn.wysihtml5.locale['en-US'] = {
|
||||
font_styles: {
|
||||
normal: 'Normal text',
|
||||
h1: 'Heading 1',
|
||||
h2: 'Heading 2',
|
||||
h3: 'Heading 3',
|
||||
h4: 'Heading 4',
|
||||
h5: 'Heading 5',
|
||||
h6: 'Heading 6'
|
||||
},
|
||||
emphasis: {
|
||||
bold: 'Bold',
|
||||
italic: 'Italic',
|
||||
underline: 'Underline',
|
||||
small: 'Small'
|
||||
},
|
||||
lists: {
|
||||
unordered: 'Unordered list',
|
||||
ordered: 'Ordered list',
|
||||
outdent: 'Outdent',
|
||||
indent: 'Indent'
|
||||
},
|
||||
link: {
|
||||
insert: 'Insert link',
|
||||
cancel: 'Cancel',
|
||||
target: 'Open link in new window'
|
||||
},
|
||||
image: {
|
||||
insert: 'Insert image',
|
||||
cancel: 'Cancel'
|
||||
},
|
||||
html: {
|
||||
edit: 'Edit HTML'
|
||||
},
|
||||
colours: {
|
||||
black: 'Black',
|
||||
silver: 'Silver',
|
||||
gray: 'Grey',
|
||||
maroon: 'Maroon',
|
||||
red: 'Red',
|
||||
purple: 'Purple',
|
||||
green: 'Green',
|
||||
olive: 'Olive',
|
||||
navy: 'Navy',
|
||||
blue: 'Blue',
|
||||
orange: 'Orange'
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* Spanish Argenina translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.es-AR', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["es-AR"] = {
|
||||
font_styles: {
|
||||
normal: "Texto normal",
|
||||
h1: "Título 1",
|
||||
h2: "Título 2",
|
||||
h3: "Título 3",
|
||||
h4: "Título 4",
|
||||
h5: "Título 5",
|
||||
h6: "Título 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Negrita",
|
||||
italic: "Itálica",
|
||||
underline: "Subrayado",
|
||||
small: "Subíndice"
|
||||
},
|
||||
lists: {
|
||||
ordered: "Lista ordenada",
|
||||
unordered: "Lista desordenada",
|
||||
indent: "Agregar sangría",
|
||||
outdent: "Eliminar sangría"
|
||||
},
|
||||
link: {
|
||||
insert: "Insertar enlace",
|
||||
cancel: "Cancelar",
|
||||
target: "Abrir enlace en una ventana nueva"
|
||||
},
|
||||
image: {
|
||||
insert: "Insertar imagen",
|
||||
cancel: "Cancelar"
|
||||
},
|
||||
html: {
|
||||
edit: "Editar HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Negro",
|
||||
silver: "Plata",
|
||||
gray: "Gris",
|
||||
maroon: "Marrón",
|
||||
red: "Rojo",
|
||||
purple: "Púrpura",
|
||||
green: "Verde",
|
||||
olive: "Oliva",
|
||||
navy: "Azul Marino",
|
||||
blue: "Azul",
|
||||
orange: "Naranja"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* Spanish translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.es-ES', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["es-ES"] = {
|
||||
font_styles: {
|
||||
normal: "Texto normal",
|
||||
h1: "Título 1",
|
||||
h2: "Título 2",
|
||||
h3: "Título 3",
|
||||
h4: "Título 4",
|
||||
h5: "Título 5",
|
||||
h6: "Título 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Negrita",
|
||||
italic: "Itálica",
|
||||
underline: "Subrayado",
|
||||
small: "Subíndice"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Lista desordenada",
|
||||
ordered: "Lista ordenada",
|
||||
outdent: "Eliminar sangría",
|
||||
indent: "Agregar sangría"
|
||||
},
|
||||
link: {
|
||||
insert: "Insertar enlace",
|
||||
cancel: "Cancelar",
|
||||
target: "Abrir enlace en una ventana nueva"
|
||||
},
|
||||
image: {
|
||||
insert: "Insertar imagen",
|
||||
cancel: "Cancelar"
|
||||
},
|
||||
html: {
|
||||
edit: "Editar HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Negro",
|
||||
silver: "Plata",
|
||||
gray: "Gris",
|
||||
maroon: "Marrón",
|
||||
red: "Rojo",
|
||||
purple: "Púrpura",
|
||||
green: "Verde",
|
||||
olive: "Oliva",
|
||||
navy: "Azul Marino",
|
||||
blue: "Azul",
|
||||
orange: "Naranja"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* French translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.fr-FR', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["fr-FR"] = {
|
||||
font_styles: {
|
||||
normal: "Texte normal",
|
||||
h1: "Titre 1",
|
||||
h2: "Titre 2",
|
||||
h3: "Titre 3",
|
||||
h4: "Titre 4",
|
||||
h5: "Titre 5",
|
||||
h6: "Titre 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Gras",
|
||||
italic: "Italique",
|
||||
underline: "Souligné",
|
||||
small: "Petit"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Liste à puces",
|
||||
ordered: "Liste numérotée",
|
||||
outdent: "Diminuer le retrait",
|
||||
indent: "Augmenter le retrait"
|
||||
},
|
||||
link: {
|
||||
target: "Ouvrir le lien dans une nouvelle fenêtre",
|
||||
insert: "Insérer un lien",
|
||||
cancel: "Annuler"
|
||||
},
|
||||
image: {
|
||||
insert: "Insérer une image",
|
||||
cancel: "Annuler"
|
||||
},
|
||||
html: {
|
||||
edit: "Editer en HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Noir",
|
||||
silver: "Gris clair",
|
||||
gray: "Gris",
|
||||
maroon: "Marron",
|
||||
red: "Rouge",
|
||||
purple: "Pourpre",
|
||||
green: "Vert",
|
||||
olive: "Olive",
|
||||
navy: "Bleu marine",
|
||||
blue: "Bleu",
|
||||
orange: "Orange"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,56 +0,0 @@
|
|||
/**
|
||||
* Croatian localisation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.hr-HR', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["hr-HR"] = {
|
||||
font_styles: {
|
||||
normal: "Normalan tekst",
|
||||
h1: "Naslov 1",
|
||||
h2: "Naslov 2",
|
||||
h3: "Naslov 3"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Podebljano",
|
||||
italic: "Nakrivljeno",
|
||||
underline: "Podcrtano"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Nesortirana lista",
|
||||
ordered: "Sortirana lista",
|
||||
outdent: "Izdubi",
|
||||
indent: "Udubi"
|
||||
},
|
||||
link: {
|
||||
insert: "Umetni poveznicu",
|
||||
cancel: "Otkaži"
|
||||
},
|
||||
image: {
|
||||
insert: "Umetni sliku",
|
||||
cancel: "Otkaži"
|
||||
},
|
||||
html: {
|
||||
edit: "Izmjeni HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Crna",
|
||||
silver: "Srebrna",
|
||||
gray: "Siva",
|
||||
maroon: "Kestenjasta",
|
||||
red: "Crvena",
|
||||
purple: "Ljubičasta",
|
||||
green: "Zelena",
|
||||
olive: "Maslinasta",
|
||||
navy: "Mornarska",
|
||||
blue: "Plava",
|
||||
orange: "Narandžasta"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,60 +0,0 @@
|
|||
/**
|
||||
* Hungarian translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.hu-HU', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["hu-HU"] = {
|
||||
font_styles: {
|
||||
normal: "Szövegtörzs",
|
||||
h1: "Főcím",
|
||||
h2: "Alcím",
|
||||
h3: "Harmadrangú alcím",
|
||||
h4: "Negyedrangú alcím",
|
||||
h5: "Ötödrangú alcím",
|
||||
h6: "Hatodrangú alcím"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Vastag",
|
||||
italic: "Dölt",
|
||||
underline: "Aláhúzott"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Pontozott lista",
|
||||
ordered: "Számozott lista",
|
||||
outdent: "Behúzás növelése",
|
||||
indent: "Behúzás csökkentése"
|
||||
},
|
||||
link: {
|
||||
insert: "Hivatkozás beszúrása",
|
||||
cancel: "Mégsem",
|
||||
target: "Hivatkozás megnyitása új ablakban"
|
||||
},
|
||||
image: {
|
||||
insert: "Kép beszúrása",
|
||||
cancel: "Mégsem"
|
||||
},
|
||||
html: {
|
||||
edit: "HTML szerkesztése"
|
||||
},
|
||||
colours: {
|
||||
black: "Fekete",
|
||||
silver: "Ezüst",
|
||||
gray: "Szürke",
|
||||
maroon: "Gesztenyebarna",
|
||||
red: "Piros",
|
||||
purple: "Lila",
|
||||
green: "Zöld",
|
||||
olive: "Olajzöld",
|
||||
navy: "Tengerkék",
|
||||
blue: "Kék",
|
||||
orange: "Narancs"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* Hebrew translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.il-HE', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["il-HE"] = {
|
||||
font_styles: {
|
||||
normal: "רגיל",
|
||||
h1: "כותרת 1",
|
||||
h2: "כותרת 2",
|
||||
h3: "כותרת 3",
|
||||
h4: "כותרת 4",
|
||||
h5: "כותרת 5",
|
||||
h6: "כותרת 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "מודגש",
|
||||
italic: "טקסט נטוי",
|
||||
underline: "קו תחתון",
|
||||
small: "קטן"
|
||||
},
|
||||
lists: {
|
||||
unordered: "רשימה עם תבליטים",
|
||||
ordered: "רשימה ממוספרת",
|
||||
outdent: "הקטן כניסה",
|
||||
indent: "הגדל כניסה",
|
||||
indered: "הגדל כניסה"
|
||||
},
|
||||
link: {
|
||||
insert: "הכנס קישור",
|
||||
cancel: "בטל קישור"
|
||||
},
|
||||
image: {
|
||||
insert: "הוסף תמונה",
|
||||
cancel: "בטל"
|
||||
},
|
||||
html: {
|
||||
edit: "עורך HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "שחור",
|
||||
silver: "כסף",
|
||||
gray: "אפור",
|
||||
maroon: "חום",
|
||||
red: "אדום",
|
||||
purple: "סגול",
|
||||
green: "ירוק",
|
||||
olive: "ירוק זית",
|
||||
navy: "כחול צי",
|
||||
blue: "כחול",
|
||||
orange: "כתום"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,55 +0,0 @@
|
|||
/**
|
||||
* Italian translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.it-IT', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["it-IT"] = {
|
||||
font_styles: {
|
||||
normal: "Testo normale",
|
||||
h1: "Titolo 1",
|
||||
h2: "Titolo 2"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Grassetto",
|
||||
italic: "Corsivo",
|
||||
underline: "Sottolineato"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Lista non ordinata",
|
||||
ordered: "Lista ordinata",
|
||||
outdent: "Elimina rientro",
|
||||
indent: "Aggiungi rientro"
|
||||
},
|
||||
link: {
|
||||
insert: "Inserisci link",
|
||||
cancel: "Annulla"
|
||||
},
|
||||
image: {
|
||||
insert: "Inserisci immagine",
|
||||
cancel: "Annulla"
|
||||
},
|
||||
html: {
|
||||
edit: "Modifica HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Nero",
|
||||
silver: "Argento",
|
||||
gray: "Grigio",
|
||||
maroon: "Marrone",
|
||||
red: "Rosso",
|
||||
purple: "Viola",
|
||||
green: "Verde",
|
||||
olive: "Oliva",
|
||||
navy: "Blu Marino",
|
||||
blue: "Blu",
|
||||
orange: "Arancio"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,57 +0,0 @@
|
|||
/**
|
||||
* Japanese translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.ja-JP', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["ja-JP"] = {
|
||||
font_styles: {
|
||||
normal: "通常の文字",
|
||||
h1: "見出し1",
|
||||
h2: "見出し2",
|
||||
h3: "見出し3"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "太字",
|
||||
italic: "斜体",
|
||||
underline: "下線"
|
||||
},
|
||||
lists: {
|
||||
unordered: "点字リスト",
|
||||
ordered: "数字リスト",
|
||||
outdent: "左寄せ",
|
||||
indent: "右寄せ"
|
||||
},
|
||||
link: {
|
||||
insert: "リンクの挿入",
|
||||
cancel: "キャンセル"
|
||||
},
|
||||
image: {
|
||||
insert: "画像の挿入",
|
||||
cancel: "キャンセル"
|
||||
},
|
||||
html: {
|
||||
edit: "HTMLを編集"
|
||||
},
|
||||
colours: {
|
||||
black: "黒色",
|
||||
silver: "シルバー",
|
||||
gray: "グレー",
|
||||
maroon: "栗色",
|
||||
red: "赤色",
|
||||
purple: "紫色",
|
||||
green: "緑色",
|
||||
olive: "オリーブ",
|
||||
navy: "ネイビー",
|
||||
blue: "青色",
|
||||
orange: "オレンジ"
|
||||
}
|
||||
|
||||
};
|
||||
}));
|
|
@ -1,57 +0,0 @@
|
|||
/**
|
||||
* Korean translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.ko-KR', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["ko-KR"] = {
|
||||
font_styles: {
|
||||
normal: "일반",
|
||||
h1: "헤드라인 1",
|
||||
h2: "헤드라인 2",
|
||||
h3: "헤드라인 3"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "굵게",
|
||||
italic: "기울게",
|
||||
underline: "밑줄"
|
||||
},
|
||||
lists: {
|
||||
unordered: "기호목록",
|
||||
ordered: "숫자목록",
|
||||
outdent: "내어쓰기",
|
||||
indent: "들여쓰기"
|
||||
},
|
||||
link: {
|
||||
insert: "링크 삽입",
|
||||
cancel: "취소"
|
||||
},
|
||||
image: {
|
||||
insert: "이미지 삽입",
|
||||
cancel: "취소"
|
||||
},
|
||||
html: {
|
||||
edit: "HTML 편집"
|
||||
},
|
||||
colours: {
|
||||
black: "검은색",
|
||||
silver: "은색",
|
||||
gray: "회색",
|
||||
maroon: "고동색",
|
||||
red: "빨간색",
|
||||
purple: "보라색",
|
||||
green: "초록색",
|
||||
olive: "올리브",
|
||||
navy: "네이비",
|
||||
blue: "파란색",
|
||||
orange: "주황색"
|
||||
}
|
||||
|
||||
};
|
||||
}));
|
|
@ -1,56 +0,0 @@
|
|||
/**
|
||||
* Lithuanian translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.lt-LT', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["lt-LT"] = {
|
||||
font_styles: {
|
||||
normal: "Normalus",
|
||||
h1: "Antraštė 1",
|
||||
h2: "Antraštė 2",
|
||||
h3: "Antraštė 3"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Pastorintas",
|
||||
italic: "Kursyvas",
|
||||
underline: "Pabrauktas"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Suženklintas sąrašas",
|
||||
ordered: "Numeruotas sąrašas",
|
||||
outdent: "Padidinti įtrauką",
|
||||
indent: "Sumažinti įtrauką"
|
||||
},
|
||||
link: {
|
||||
insert: "Įterpti nuorodą",
|
||||
cancel: "Atšaukti"
|
||||
},
|
||||
image: {
|
||||
insert: "Įterpti atvaizdą",
|
||||
cancel: "Atšaukti"
|
||||
},
|
||||
html: {
|
||||
edit: "Redaguoti HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Juoda",
|
||||
silver: "Sidabrinė",
|
||||
gray: "Pilka",
|
||||
maroon: "Kaštoninė",
|
||||
red: "Raudona",
|
||||
purple: "Violetinė",
|
||||
green: "Žalia",
|
||||
olive: "Gelsvai žalia",
|
||||
navy: "Tamsiai mėlyna",
|
||||
blue: "Mėlyna",
|
||||
orange: "Oranžinė"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,56 +0,0 @@
|
|||
/**
|
||||
* Moldavian translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.mo-MD', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["mo-MD"] = {
|
||||
font_styles: {
|
||||
normal: "Normal",
|
||||
h1: "Titlu 1",
|
||||
h2: "Titlu 2"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Bold",
|
||||
italic: "Cursiv",
|
||||
underline: "Accentuat"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Neordonata",
|
||||
ordered: "Ordonata",
|
||||
outdent: "Margine",
|
||||
indent: "zimțuire"
|
||||
},
|
||||
link: {
|
||||
insert: "Indroduce link-ul",
|
||||
cancel: "Anula"
|
||||
},
|
||||
image: {
|
||||
insert: "Insera imagina",
|
||||
cancel: "Anula"
|
||||
},
|
||||
html: {
|
||||
edit: "Editare HTML"
|
||||
},
|
||||
|
||||
colours: {
|
||||
black: "Negru",
|
||||
silver: "Argint",
|
||||
gray: "Gri",
|
||||
maroon: "Castaniu",
|
||||
red: "Roșu",
|
||||
purple: "Violet",
|
||||
green: "Verde",
|
||||
olive: "Oliv",
|
||||
navy: "Marin",
|
||||
blue: "Albastru",
|
||||
orange: "Portocaliu"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,57 +0,0 @@
|
|||
/**
|
||||
* Norwegian translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.nb-NB', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["nb-NB"] = {
|
||||
font_styles: {
|
||||
normal: "Normal tekst",
|
||||
h1: "Tittel 1",
|
||||
h2: "Tittel 2",
|
||||
h3: "Tittel 3"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Fet",
|
||||
italic: "Kursiv",
|
||||
underline: "Understrekning"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Usortert",
|
||||
ordered: "Sortert",
|
||||
outdent: "Detabuler",
|
||||
indent: "Tabuler",
|
||||
indered: "Tabuler"
|
||||
},
|
||||
link: {
|
||||
insert: "Sett inn lenke",
|
||||
cancel: "Avbryt"
|
||||
},
|
||||
image: {
|
||||
insert: "Sett inn bilde",
|
||||
cancel: "Avbryt"
|
||||
},
|
||||
html: {
|
||||
edit: "Rediger HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Svart",
|
||||
silver: "Sølv",
|
||||
gray: "Grå",
|
||||
maroon: "Brun",
|
||||
red: "Rød",
|
||||
purple: "Lilla",
|
||||
green: "Grønn",
|
||||
olive: "Oliven",
|
||||
navy: "Marineblå",
|
||||
blue: "Blå",
|
||||
orange: "Oransj"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,56 +0,0 @@
|
|||
/**
|
||||
* Dutch translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.nl-NL', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["nl-NL"] = {
|
||||
font_styles: {
|
||||
normal: "Normale Tekst",
|
||||
h1: "Kop 1",
|
||||
h2: "Kop 2",
|
||||
h3: "Kop 3"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Vet",
|
||||
italic: "Cursief",
|
||||
underline: "Onderstrepen"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Ongeordende lijst",
|
||||
ordered: "Geordende lijst",
|
||||
outdent: "Inspringen verkleinen",
|
||||
indent: "Inspringen vergroten"
|
||||
},
|
||||
link: {
|
||||
insert: "Link invoegen",
|
||||
cancel: "Annuleren"
|
||||
},
|
||||
image: {
|
||||
insert: "Afbeelding invoegen",
|
||||
cancel: "Annuleren"
|
||||
},
|
||||
html: {
|
||||
edit: "HTML bewerken"
|
||||
},
|
||||
colours: {
|
||||
black: "Zwart",
|
||||
silver: "Zilver",
|
||||
gray: "Grijs",
|
||||
maroon: "Kastanjebruin",
|
||||
red: "Rood",
|
||||
purple: "Paars",
|
||||
green: "Groen",
|
||||
olive: "Olijfgroen",
|
||||
navy: "Donkerblauw",
|
||||
blue: "Blauw",
|
||||
orange: "Oranje"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,60 +0,0 @@
|
|||
/**
|
||||
* Polish translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.pl-PL', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["pl-PL"] = {
|
||||
font_styles: {
|
||||
normal: "Tekst podstawowy",
|
||||
h1: "Nagłówek 1",
|
||||
h2: "Nagłówek 2",
|
||||
h3: "Nagłówek 3",
|
||||
h4: "Nagłówek 4",
|
||||
h5: "Nagłówek 5",
|
||||
h6: "Nagłówek 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Pogrubienie",
|
||||
italic: "Kursywa",
|
||||
underline: "Podkreślenie"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Lista wypunktowana",
|
||||
ordered: "Lista numerowana",
|
||||
outdent: "Zmniejsz wcięcie",
|
||||
indent: "Zwiększ wcięcie"
|
||||
},
|
||||
link: {
|
||||
insert: "Wstaw odnośnik",
|
||||
cancel: "Anuluj",
|
||||
target: "Otwórz odnośnik w nowym oknie"
|
||||
},
|
||||
image: {
|
||||
insert: "Wstaw obrazek",
|
||||
cancel: "Anuluj"
|
||||
},
|
||||
html: {
|
||||
edit: "Edycja HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Czarny",
|
||||
silver: "Srebrny",
|
||||
gray: "Szary",
|
||||
maroon: "Kasztanowy",
|
||||
red: "Czerwony",
|
||||
purple: "Fioletowy",
|
||||
green: "Zielony",
|
||||
olive: "Oliwkowy",
|
||||
navy: "Granatowy",
|
||||
blue: "Niebieski",
|
||||
orange: "Pomarańczowy"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* Brazilian portuguese translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.pt-BR', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["pt-BR"] = {
|
||||
font_styles: {
|
||||
normal: "Texto normal",
|
||||
h1: "Título 1",
|
||||
h2: "Título 2",
|
||||
h3: "Título 3",
|
||||
h4: "Título 4",
|
||||
h5: "Título 5",
|
||||
h6: "Título 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Negrito",
|
||||
italic: "Itálico",
|
||||
underline: "Sublinhado",
|
||||
small: "Pequeno"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Lista",
|
||||
ordered: "Lista numerada",
|
||||
outdent: "Remover indentação",
|
||||
indent: "Indentar"
|
||||
},
|
||||
link: {
|
||||
insert: "Inserir link",
|
||||
cancel: "Cancelar",
|
||||
target: "Abrir link em um nova janela"
|
||||
},
|
||||
image: {
|
||||
insert: "Inserir imagem",
|
||||
cancel: "Cancelar"
|
||||
},
|
||||
html: {
|
||||
edit: "Editar HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Preto",
|
||||
silver: "Prata",
|
||||
gray: "Cinza",
|
||||
maroon: "Marrom",
|
||||
red: "Vermelho",
|
||||
purple: "Roxo",
|
||||
green: "Verde",
|
||||
olive: "Oliva",
|
||||
navy: "Marinho",
|
||||
blue: "Azul",
|
||||
orange: "Laranja"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* Russian translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.ru-RU', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["ru-RU"] = {
|
||||
font_styles: {
|
||||
normal: "Обычный текст",
|
||||
h1: "Заголовок 1",
|
||||
h2: "Заголовок 2",
|
||||
h3: "Заголовок 3",
|
||||
h4: "Заголовок 4",
|
||||
h5: "Заголовок 5",
|
||||
h6: "Заголовок 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Полужирный",
|
||||
italic: "Курсив",
|
||||
underline: "Подчёркнутый",
|
||||
small: "Уменьшенный"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Маркированный список",
|
||||
ordered: "Нумерованный список",
|
||||
outdent: "Уменьшить отступ",
|
||||
indent: "Увеличить отступ"
|
||||
},
|
||||
link: {
|
||||
insert: "Вставить ссылку",
|
||||
cancel: "Отмена"
|
||||
},
|
||||
image: {
|
||||
insert: "Вставить изображение",
|
||||
cancel: "Отмена"
|
||||
},
|
||||
html: {
|
||||
edit: "HTML код"
|
||||
},
|
||||
colours: {
|
||||
black: "Чёрный",
|
||||
silver: "Серебряный",
|
||||
gray: "Серый",
|
||||
maroon: "Коричневый",
|
||||
red: "Красный",
|
||||
purple: "Фиолетовый",
|
||||
green: "Зелёный",
|
||||
olive: "Оливковый",
|
||||
navy: "Тёмно-синий",
|
||||
blue: "Синий",
|
||||
orange: "Оранжевый"
|
||||
}
|
||||
};
|
||||
}));
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/**
|
||||
* Slovak translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.sk-SK', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["sk-SK"] = {
|
||||
font_styles: {
|
||||
normal: "Normálny text",
|
||||
h1: "Nadpis úrovne 1",
|
||||
h2: "Nadpis úrovne 2",
|
||||
h3: "Nadpis úrovne 3"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Tučné",
|
||||
italic: "Kurzíva",
|
||||
underline: "Podčiarknuté"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Neusporiadaný zoznam",
|
||||
ordered: "Číslovaný zoznam",
|
||||
outdent: "Zväčšiť odsadenie",
|
||||
indent: "Zmenšiť odsadenie"
|
||||
},
|
||||
link: {
|
||||
insert: "Vložiť odkaz",
|
||||
cancel: "Zrušiť"
|
||||
},
|
||||
image: {
|
||||
insert: "Vložiť obrázok",
|
||||
cancel: "Zrušiť"
|
||||
},
|
||||
html: {
|
||||
edit: "Editovať HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Čierna",
|
||||
silver: "Strieborná",
|
||||
gray: "Šedá",
|
||||
maroon: "Bordová",
|
||||
red: "Červená",
|
||||
purple: "Fialová",
|
||||
green: "Zelená",
|
||||
olive: "Olivová",
|
||||
navy: "Tmavomodrá",
|
||||
blue: "Modrá",
|
||||
orange: "Oranžová"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,56 +0,0 @@
|
|||
/**
|
||||
* Swedish translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.sv-SE', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["sv-SE"] = {
|
||||
font_styles: {
|
||||
normal: "Normal Text",
|
||||
h1: "Rubrik 1",
|
||||
h2: "Rubrik 2",
|
||||
h3: "Rubrik 3"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Fet",
|
||||
italic: "Kursiv",
|
||||
underline: "Understruken"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Osorterad lista",
|
||||
ordered: "Sorterad lista",
|
||||
outdent: "Minska indrag",
|
||||
indent: "Öka indrag"
|
||||
},
|
||||
link: {
|
||||
insert: "Lägg till länk",
|
||||
cancel: "Avbryt"
|
||||
},
|
||||
image: {
|
||||
insert: "Lägg till Bild",
|
||||
cancel: "Avbryt"
|
||||
},
|
||||
html: {
|
||||
edit: "Redigera HTML"
|
||||
},
|
||||
colours: {
|
||||
black: "Svart",
|
||||
silver: "Silver",
|
||||
gray: "Grå",
|
||||
maroon: "Kastaniebrun",
|
||||
red: "Röd",
|
||||
purple: "Lila",
|
||||
green: "Grön",
|
||||
olive: "Olivgrön",
|
||||
navy: "Marinblå",
|
||||
blue: "Blå",
|
||||
orange: "Orange"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* Turkish translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.tr-TR', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["tr-TR"] = {
|
||||
font_styles: {
|
||||
normal: "Normal Yazı",
|
||||
h1: "Başlık 1",
|
||||
h2: "Başlık 2",
|
||||
h3: "Başlık 3",
|
||||
h4: 'Başlık 4',
|
||||
h5: 'Başlık 5',
|
||||
h6: 'Başlık 6'
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Kalın",
|
||||
italic: "İtalik",
|
||||
underline: "Altı Çizili",
|
||||
small: 'Küçük'
|
||||
},
|
||||
lists: {
|
||||
unordered: "Sırasız Liste",
|
||||
ordered: "Sıralı Liste",
|
||||
outdent: "Girintiyi Azalt",
|
||||
indent: "Girintiyi Arttır"
|
||||
},
|
||||
link: {
|
||||
insert: "Bağlantı Ekle",
|
||||
cancel: "Vazgeç",
|
||||
target: 'Bağlantıyı yeni sekmede aç'
|
||||
},
|
||||
image: {
|
||||
insert: "Resim Ekle",
|
||||
cancel: "Vazgeç"
|
||||
},
|
||||
html: {
|
||||
edit: "HTML Düzenle"
|
||||
},
|
||||
colours: {
|
||||
black: "Siyah",
|
||||
silver: "Gümüş",
|
||||
gray: "Gri",
|
||||
maroon: "Vişne Çürüğü",
|
||||
red: "Kırmızı",
|
||||
purple: "Pembe",
|
||||
green: "Yeşil",
|
||||
olive: "Zeytin Yeşili",
|
||||
navy: "Lacivert",
|
||||
blue: "Mavi",
|
||||
orange: "Turuncu"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,57 +0,0 @@
|
|||
/**
|
||||
* Ukrainian translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.ua-UA', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["ua-UA"] = {
|
||||
font_styles: {
|
||||
normal: "Звичайний текст",
|
||||
h1: "Заголовок 1",
|
||||
h2: "Заголовок 2",
|
||||
h3: "Заголовок 3"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "Напівжирний",
|
||||
italic: "Курсив",
|
||||
underline: "Підкреслений"
|
||||
},
|
||||
lists: {
|
||||
unordered: "Маркований список",
|
||||
ordered: "Нумерований список",
|
||||
outdent: "Зменшити відступ",
|
||||
indent: "Збільшити відступ"
|
||||
},
|
||||
link: {
|
||||
insert: "Вставити посилання",
|
||||
cancel: "Відміна"
|
||||
},
|
||||
image: {
|
||||
insert: "Вставити зображення",
|
||||
cancel: "Відміна"
|
||||
},
|
||||
html: {
|
||||
edit: "HTML код"
|
||||
},
|
||||
colours: {
|
||||
black: "Чорний",
|
||||
silver: "Срібний",
|
||||
gray: "Сірий",
|
||||
maroon: "Коричневий",
|
||||
red: "Червоний",
|
||||
purple: "Фіолетовий",
|
||||
green: "Зелений",
|
||||
olive: "Оливковий",
|
||||
navy: "Темно-синій",
|
||||
blue: "Синій",
|
||||
orange: "Помаранчевий"
|
||||
}
|
||||
};
|
||||
}));
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
/**
|
||||
* Chinese translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.zh-CN', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["zh-CN"] = {
|
||||
font_styles: {
|
||||
normal: "正文",
|
||||
h1: "标题 1",
|
||||
h2: "标题 2",
|
||||
h3: "标题 3",
|
||||
h4: "标题 4",
|
||||
h5: "标题 5",
|
||||
h6: "标题 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "粗体",
|
||||
italic: "斜体",
|
||||
underline: "下划线"
|
||||
},
|
||||
lists: {
|
||||
unordered: "项目符号",
|
||||
ordered: "编号",
|
||||
outdent: "减少缩进",
|
||||
indent: "增加缩进"
|
||||
},
|
||||
link: {
|
||||
insert: "插入链接",
|
||||
cancel: "取消",
|
||||
target: "新窗口打开链接"
|
||||
},
|
||||
image: {
|
||||
insert: "插入图片",
|
||||
cancel: "取消"
|
||||
},
|
||||
html: {
|
||||
edit: "HTML代码"
|
||||
},
|
||||
colours: {
|
||||
black: "黑色",
|
||||
silver: "银色",
|
||||
gray: "灰色",
|
||||
maroon: "赤红色",
|
||||
red: "红色",
|
||||
purple: "紫色",
|
||||
green: "绿色",
|
||||
olive: "橄榄色",
|
||||
navy: "深蓝色",
|
||||
blue: "蓝色",
|
||||
orange: "橙色"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,60 +0,0 @@
|
|||
/**
|
||||
* Chinese Traditional translation for bootstrap-wysihtml5
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define('bootstrap.wysihtml5.zh-TW', ['jquery', 'bootstrap.wysihtml5'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($){
|
||||
$.fn.wysihtml5.locale["zh-TW"] = {
|
||||
font_styles: {
|
||||
normal: "內文",
|
||||
h1: "標題 1",
|
||||
h2: "標題 2",
|
||||
h3: "標題 3",
|
||||
h3: "標題 4",
|
||||
h3: "標題 5",
|
||||
h3: "標題 6"
|
||||
},
|
||||
emphasis: {
|
||||
bold: "粗體",
|
||||
italic: "斜體",
|
||||
underline: "底線"
|
||||
},
|
||||
lists: {
|
||||
unordered: "項目符號",
|
||||
ordered: "編號列表",
|
||||
outdent: "減少縮排",
|
||||
indent: "增加縮排"
|
||||
},
|
||||
link: {
|
||||
insert: "插入超連結",
|
||||
cancel: "取消",
|
||||
target: "新窗口打開鏈接"
|
||||
},
|
||||
image: {
|
||||
insert: "插入圖片連結",
|
||||
cancel: "取消"
|
||||
},
|
||||
html: {
|
||||
edit: "HTML原始碼"
|
||||
},
|
||||
colours: {
|
||||
black: "黑色",
|
||||
silver: "銀色",
|
||||
gray: "灰色",
|
||||
maroon: "栗色",
|
||||
red: "红色",
|
||||
purple: "紫色",
|
||||
green: "綠色",
|
||||
olive: "橄欖色",
|
||||
navy: "深藍色",
|
||||
blue: "藍色",
|
||||
orange: "橙色"
|
||||
}
|
||||
};
|
||||
}));
|
|
@ -1,487 +0,0 @@
|
|||
{
|
||||
"classes": {
|
||||
"wysiwyg-clear-both": 1,
|
||||
"wysiwyg-clear-left": 1,
|
||||
"wysiwyg-clear-right": 1,
|
||||
"wysiwyg-color-aqua": 1,
|
||||
"wysiwyg-color-black": 1,
|
||||
"wysiwyg-color-blue": 1,
|
||||
"wysiwyg-color-fuchsia": 1,
|
||||
"wysiwyg-color-gray": 1,
|
||||
"wysiwyg-color-green": 1,
|
||||
"wysiwyg-color-lime": 1,
|
||||
"wysiwyg-color-maroon": 1,
|
||||
"wysiwyg-color-navy": 1,
|
||||
"wysiwyg-color-olive": 1,
|
||||
"wysiwyg-color-purple": 1,
|
||||
"wysiwyg-color-red": 1,
|
||||
"wysiwyg-color-silver": 1,
|
||||
"wysiwyg-color-teal": 1,
|
||||
"wysiwyg-color-white": 1,
|
||||
"wysiwyg-color-yellow": 1,
|
||||
"wysiwyg-float-left": 1,
|
||||
"wysiwyg-float-right": 1,
|
||||
"wysiwyg-font-size-large": 1,
|
||||
"wysiwyg-font-size-larger": 1,
|
||||
"wysiwyg-font-size-medium": 1,
|
||||
"wysiwyg-font-size-small": 1,
|
||||
"wysiwyg-font-size-smaller": 1,
|
||||
"wysiwyg-font-size-x-large": 1,
|
||||
"wysiwyg-font-size-x-small": 1,
|
||||
"wysiwyg-font-size-xx-large": 1,
|
||||
"wysiwyg-font-size-xx-small": 1,
|
||||
"wysiwyg-text-align-center": 1,
|
||||
"wysiwyg-text-align-justify": 1,
|
||||
"wysiwyg-text-align-left": 1,
|
||||
"wysiwyg-text-align-right": 1
|
||||
},
|
||||
"tags": {
|
||||
"a": {
|
||||
"check_attributes": {
|
||||
"href": "url",
|
||||
"target": "any"
|
||||
},
|
||||
"set_attributes": {
|
||||
"rel": "nofollow"
|
||||
}
|
||||
},
|
||||
"abbr": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"acronym": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"address": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"applet": {
|
||||
"remove": 1
|
||||
},
|
||||
"area": {
|
||||
"remove": 1
|
||||
},
|
||||
"article": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"aside": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"audio": {
|
||||
"remove": 1
|
||||
},
|
||||
"b": {},
|
||||
"base": {
|
||||
"remove": 1
|
||||
},
|
||||
"basefont": {
|
||||
"remove": 1
|
||||
},
|
||||
"bdi": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"bdo": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"bgsound": {
|
||||
"remove": 1
|
||||
},
|
||||
"big": {
|
||||
"rename_tag": "span",
|
||||
"set_class": "wysiwyg-font-size-larger"
|
||||
},
|
||||
"blink": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"blockquote": {
|
||||
"check_attributes": {
|
||||
"cite": "url"
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"br": {
|
||||
"add_class": {
|
||||
"clear": "clear_br"
|
||||
}
|
||||
},
|
||||
"button": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"canvas": {
|
||||
"remove": 1
|
||||
},
|
||||
"caption": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"center": {
|
||||
"rename_tag": "div",
|
||||
"set_class": "wysiwyg-text-align-center"
|
||||
},
|
||||
"cite": {},
|
||||
"code": {},
|
||||
"col": {
|
||||
"remove": 1
|
||||
},
|
||||
"colgroup": {
|
||||
"remove": 1
|
||||
},
|
||||
"command": {
|
||||
"remove": 1
|
||||
},
|
||||
"comment": {
|
||||
"remove": 1
|
||||
},
|
||||
"datalist": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"dd": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"del": {
|
||||
"remove": 1
|
||||
},
|
||||
"details": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"device": {
|
||||
"remove": 1
|
||||
},
|
||||
"dfn": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"dir": {
|
||||
"rename_tag": "ul"
|
||||
},
|
||||
"div": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"dl": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"dt": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"em": {},
|
||||
"embed": {
|
||||
"remove": 1
|
||||
},
|
||||
"fieldset": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"figcaption": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"figure": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"font": {
|
||||
"add_class": {
|
||||
"size": "size_font"
|
||||
},
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"footer": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"form": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"frame": {
|
||||
"remove": 1
|
||||
},
|
||||
"frameset": {
|
||||
"remove": 1
|
||||
},
|
||||
"h1": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"h2": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"h3": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"h4": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"h5": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"h6": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"remove": 1
|
||||
},
|
||||
"header": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"hgroup": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"hr": {},
|
||||
"html": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"i": {},
|
||||
"iframe": {
|
||||
"remove": 1
|
||||
},
|
||||
"img": {
|
||||
"add_class": {
|
||||
"align": "align_img"
|
||||
},
|
||||
"check_attributes": {
|
||||
"alt": "alt",
|
||||
"height": "numbers",
|
||||
"src": "url",
|
||||
"width": "numbers"
|
||||
}
|
||||
},
|
||||
"input": {
|
||||
"remove": 1
|
||||
},
|
||||
"ins": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"isindex": {
|
||||
"remove": 1
|
||||
},
|
||||
"kbd": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"keygen": {
|
||||
"remove": 1
|
||||
},
|
||||
"label": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"legend": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"li": {},
|
||||
"link": {
|
||||
"remove": 1
|
||||
},
|
||||
"listing": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"map": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"mark": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"marquee": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"menu": {
|
||||
"rename_tag": "ul"
|
||||
},
|
||||
"meta": {
|
||||
"remove": 1
|
||||
},
|
||||
"meter": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"multicol": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"nav": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"nextid": {
|
||||
"remove": 1
|
||||
},
|
||||
"nobr": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"noembed": {
|
||||
"remove": 1
|
||||
},
|
||||
"noframes": {
|
||||
"remove": 1
|
||||
},
|
||||
"noscript": {
|
||||
"remove": 1
|
||||
},
|
||||
"object": {
|
||||
"remove": 1
|
||||
},
|
||||
"ol": {},
|
||||
"optgroup": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"option": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"output": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"p": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"param": {
|
||||
"remove": 1
|
||||
},
|
||||
"plaintext": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"pre": {},
|
||||
"progress": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"q": {
|
||||
"check_attributes": {
|
||||
"cite": "url"
|
||||
}
|
||||
},
|
||||
"rb": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"rp": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"rt": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"ruby": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"s": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"samp": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"script": {
|
||||
"remove": 1
|
||||
},
|
||||
"section": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"select": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"small": {
|
||||
"rename_tag": "span",
|
||||
"set_class": "wysiwyg-font-size-smaller"
|
||||
},
|
||||
"source": {
|
||||
"remove": 1
|
||||
},
|
||||
"spacer": {
|
||||
"remove": 1
|
||||
},
|
||||
"span": {},
|
||||
"strike": {
|
||||
"remove": 1
|
||||
},
|
||||
"strong": {},
|
||||
"style": {
|
||||
"remove": 1
|
||||
},
|
||||
"sub": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"summary": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"sup": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"svg": {
|
||||
"remove": 1
|
||||
},
|
||||
"table": {},
|
||||
"tbody": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"td": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"colspan": "numbers",
|
||||
"rowspan": "numbers"
|
||||
}
|
||||
},
|
||||
"textarea": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"tfoot": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"th": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"colspan": "numbers",
|
||||
"rowspan": "numbers"
|
||||
}
|
||||
},
|
||||
"thead": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"time": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"title": {
|
||||
"remove": 1
|
||||
},
|
||||
"tr": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"track": {
|
||||
"remove": 1
|
||||
},
|
||||
"tt": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"u": {},
|
||||
"ul": {},
|
||||
"var": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"video": {
|
||||
"remove": 1
|
||||
},
|
||||
"wbr": {
|
||||
"remove": 1
|
||||
},
|
||||
"xml": {
|
||||
"remove": 1
|
||||
},
|
||||
"xmp": {
|
||||
"rename_tag": "span"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,590 +0,0 @@
|
|||
{
|
||||
"classes": "any",
|
||||
"classes_blacklist": {
|
||||
"Apple-interchange-newline": 1,
|
||||
"MsoNormal": 1,
|
||||
"MsoPlainText": 1
|
||||
},
|
||||
"comments": 1,
|
||||
"tags": {
|
||||
"a": {
|
||||
"check_attributes": {
|
||||
"href": "href",
|
||||
"id": "any",
|
||||
"rel": "any",
|
||||
"target": "any"
|
||||
}
|
||||
},
|
||||
"abbr": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"acronym": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"address": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"applet": {
|
||||
"remove": 1
|
||||
},
|
||||
"area": {
|
||||
"remove": 1
|
||||
},
|
||||
"article": null,
|
||||
"aside": null,
|
||||
"audio": {
|
||||
"remove": 1
|
||||
},
|
||||
"b": {},
|
||||
"base": {
|
||||
"remove": 1
|
||||
},
|
||||
"basefont": {
|
||||
"remove": 1
|
||||
},
|
||||
"bdi": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"bdo": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"bgsound": {
|
||||
"remove": 1
|
||||
},
|
||||
"big": {
|
||||
"rename_tag": "span",
|
||||
"set_class": "wysiwyg-font-size-larger"
|
||||
},
|
||||
"blink": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"blockquote": {
|
||||
"add_style": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"cite": "url",
|
||||
"id": "any"
|
||||
},
|
||||
"keep_styles": {
|
||||
"float": 1,
|
||||
"textAlign": 1
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"br": {
|
||||
"add_class": {
|
||||
"clear": "clear_br"
|
||||
}
|
||||
},
|
||||
"button": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"canvas": {
|
||||
"remove": 1
|
||||
},
|
||||
"caption": null,
|
||||
"center": null,
|
||||
"cite": {},
|
||||
"code": {},
|
||||
"col": {
|
||||
"remove": 1
|
||||
},
|
||||
"colgroup": {
|
||||
"remove": 1
|
||||
},
|
||||
"command": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"comment": {
|
||||
"remove": 1
|
||||
},
|
||||
"datalist": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"dd": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"del": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"details": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"device": {
|
||||
"remove": 1
|
||||
},
|
||||
"dfn": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"dir": {
|
||||
"rename_tag": "ul"
|
||||
},
|
||||
"div": {
|
||||
"add_style": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"contenteditable": "any",
|
||||
"id": "any"
|
||||
},
|
||||
"keep_styles": {
|
||||
"float": 1,
|
||||
"textAlign": 1
|
||||
},
|
||||
"one_of_type": {
|
||||
"alignment_object": 1
|
||||
},
|
||||
"remove_action": "unwrap"
|
||||
},
|
||||
"dl": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"dt": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"em": {},
|
||||
"embed": {
|
||||
"remove": 1
|
||||
},
|
||||
"fieldset": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"figcaption": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"figure": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"font": {
|
||||
"add_class": {
|
||||
"size": "size_font"
|
||||
},
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"footer": {
|
||||
"add_style": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"id": "any"
|
||||
},
|
||||
"keep_styles": {
|
||||
"float": 1,
|
||||
"textAlign": 1
|
||||
},
|
||||
"one_of_type": {
|
||||
"alignment_object": 1
|
||||
},
|
||||
"remove_action": "unwrap",
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"form": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"frame": {
|
||||
"remove": 1
|
||||
},
|
||||
"frameset": {
|
||||
"remove": 1
|
||||
},
|
||||
"h1": null,
|
||||
"h2": null,
|
||||
"h3": null,
|
||||
"h4": {
|
||||
"add_style": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"id": "any"
|
||||
},
|
||||
"keep_styles": {
|
||||
"float": 1,
|
||||
"textAlign": {}
|
||||
}
|
||||
},
|
||||
"h5": null,
|
||||
"h6": null,
|
||||
"head": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"header": null,
|
||||
"hgroup": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"hr": {},
|
||||
"html": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"i": {},
|
||||
"iframe": {
|
||||
"check_attributes": {
|
||||
"frameborder": "any",
|
||||
"height": "any",
|
||||
"id": "any",
|
||||
"src": "any",
|
||||
"style": "any",
|
||||
"width": "any"
|
||||
}
|
||||
},
|
||||
"img": {
|
||||
"add_class": {
|
||||
"align": "align_img"
|
||||
},
|
||||
"check_attributes": {
|
||||
"alt": "alt",
|
||||
"height": "numbers",
|
||||
"id": "any",
|
||||
"src": "src",
|
||||
"width": "numbers"
|
||||
},
|
||||
"one_of_type": {
|
||||
"valid_image_src": 1
|
||||
}
|
||||
},
|
||||
"input": {
|
||||
"remove": 1
|
||||
},
|
||||
"ins": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"isindex": {
|
||||
"remove": 1
|
||||
},
|
||||
"kbd": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"keygen": {
|
||||
"remove": 1
|
||||
},
|
||||
"label": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"legend": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"li": {},
|
||||
"link": {
|
||||
"remove": 1
|
||||
},
|
||||
"listing": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"map": {
|
||||
"remove": 1
|
||||
},
|
||||
"mark": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"marquee": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"menu": {
|
||||
"rename_tag": "ul"
|
||||
},
|
||||
"meta": {
|
||||
"remove": 1
|
||||
},
|
||||
"meter": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"multicol": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"nav": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"nextid": {
|
||||
"remove": 1
|
||||
},
|
||||
"nobr": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"noembed": {
|
||||
"remove": 1
|
||||
},
|
||||
"noframes": {
|
||||
"remove": 1
|
||||
},
|
||||
"noscript": {
|
||||
"remove": 1
|
||||
},
|
||||
"object": {
|
||||
"remove": 1
|
||||
},
|
||||
"ol": {},
|
||||
"optgroup": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"option": {
|
||||
"remove": 1
|
||||
},
|
||||
"output": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"p": null,
|
||||
"param": {
|
||||
"remove": 1
|
||||
},
|
||||
"plaintext": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"pre": {},
|
||||
"progress": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"q": {
|
||||
"check_attributes": {
|
||||
"cite": "url",
|
||||
"id": "any"
|
||||
}
|
||||
},
|
||||
"rb": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"rp": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"rt": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"ruby": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"s": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"samp": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"script": {
|
||||
"check_attributes": {
|
||||
"charset": "any",
|
||||
"src": "any",
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"section": null,
|
||||
"select": {
|
||||
"remove": 1
|
||||
},
|
||||
"small": {
|
||||
"rename_tag": "span",
|
||||
"set_class": "wysiwyg-font-size-smaller"
|
||||
},
|
||||
"source": {
|
||||
"remove": 1
|
||||
},
|
||||
"spacer": {
|
||||
"remove": 1
|
||||
},
|
||||
"span": {
|
||||
"check_attributes": {
|
||||
"id": "any"
|
||||
},
|
||||
"keep_styles": {
|
||||
"backgroundColor": 1,
|
||||
"color": 1,
|
||||
"fontSize": 1
|
||||
},
|
||||
"one_of_type": {
|
||||
"text_color_object": 1,
|
||||
"text_fontsize_object": 1,
|
||||
"text_formatting_object": 1
|
||||
},
|
||||
"remove_action": "unwrap"
|
||||
},
|
||||
"strike": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"strong": {},
|
||||
"style": {
|
||||
"check_attributes": {
|
||||
"charset": "any",
|
||||
"src": "any",
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"sub": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"summary": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"sup": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"svg": {
|
||||
"remove": 1
|
||||
},
|
||||
"table": {
|
||||
"check_attributes": {
|
||||
"id": "any"
|
||||
},
|
||||
"keep_styles": {
|
||||
"float": 1,
|
||||
"textAlign": 1,
|
||||
"width": 1
|
||||
}
|
||||
},
|
||||
"tbody": null,
|
||||
"td": {
|
||||
"add_style": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"align": "any",
|
||||
"class": "any",
|
||||
"colspan": "numbers",
|
||||
"id": "any",
|
||||
"rowspan": "numbers",
|
||||
"valign": "any"
|
||||
},
|
||||
"keep_styles": {
|
||||
"backgroundColor": 1,
|
||||
"height": 1,
|
||||
"width": 1
|
||||
}
|
||||
},
|
||||
"textarea": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"tfoot": null,
|
||||
"th": {
|
||||
"add_style": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"align": "any",
|
||||
"colspan": "numbers",
|
||||
"id": "any",
|
||||
"rowspan": "numbers",
|
||||
"valign": "any"
|
||||
},
|
||||
"keep_styles": {
|
||||
"backgroundColor": 1,
|
||||
"height": 1,
|
||||
"width": 1
|
||||
}
|
||||
},
|
||||
"thead": {
|
||||
"add_style": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"id": "any"
|
||||
}
|
||||
},
|
||||
"time": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"title": {
|
||||
"remove": 1
|
||||
},
|
||||
"tr": {
|
||||
"add_style": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"id": "any"
|
||||
}
|
||||
},
|
||||
"track": {
|
||||
"remove": 1
|
||||
},
|
||||
"tt": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"u": {},
|
||||
"ul": {
|
||||
"check_attributes": {
|
||||
"id": "any"
|
||||
}
|
||||
},
|
||||
"var": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"video": {
|
||||
"remove": 1
|
||||
},
|
||||
"wbr": {
|
||||
"remove": 1
|
||||
},
|
||||
"xml": {
|
||||
"remove": 1
|
||||
},
|
||||
"xmp": {
|
||||
"unwrap": 1
|
||||
}
|
||||
},
|
||||
"type_definitions": {
|
||||
"alignment_object": {
|
||||
"classes": {
|
||||
"wysiwyg-float-left": 1,
|
||||
"wysiwyg-float-right": 1,
|
||||
"wysiwyg-text-align-center": 1,
|
||||
"wysiwyg-text-align-justify": 1,
|
||||
"wysiwyg-text-align-left": 1,
|
||||
"wysiwyg-text-align-right": 1
|
||||
},
|
||||
"styles": {
|
||||
"float": [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
"text-align": [
|
||||
"left",
|
||||
"right",
|
||||
"center"
|
||||
]
|
||||
}
|
||||
},
|
||||
"text_color_object": {
|
||||
"styles": {
|
||||
"background-color": true,
|
||||
"color": true
|
||||
}
|
||||
},
|
||||
"text_fontsize_object": {
|
||||
"styles": {
|
||||
"font-size": true
|
||||
}
|
||||
},
|
||||
"text_formatting_object": {
|
||||
"classes": {
|
||||
"wysiwyg-color-aqua": 1,
|
||||
"wysiwyg-color-black": 1,
|
||||
"wysiwyg-color-blue": 1,
|
||||
"wysiwyg-color-fuchsia": 1,
|
||||
"wysiwyg-color-gray": 1,
|
||||
"wysiwyg-color-green": 1,
|
||||
"wysiwyg-color-lime": 1,
|
||||
"wysiwyg-color-maroon": 1,
|
||||
"wysiwyg-color-navy": 1,
|
||||
"wysiwyg-color-olive": 1,
|
||||
"wysiwyg-color-purple": 1,
|
||||
"wysiwyg-color-red": 1,
|
||||
"wysiwyg-color-silver": 1,
|
||||
"wysiwyg-color-teal": 1,
|
||||
"wysiwyg-color-white": 1,
|
||||
"wysiwyg-color-yellow": 1,
|
||||
"wysiwyg-font-size-large": 1,
|
||||
"wysiwyg-font-size-larger": 1,
|
||||
"wysiwyg-font-size-medium": 1,
|
||||
"wysiwyg-font-size-small": 1,
|
||||
"wysiwyg-font-size-smaller": 1,
|
||||
"wysiwyg-font-size-x-large": 1,
|
||||
"wysiwyg-font-size-x-small": 1,
|
||||
"wysiwyg-font-size-xx-large": 1,
|
||||
"wysiwyg-font-size-xx-small": 1
|
||||
}
|
||||
},
|
||||
"valid_image_src": {
|
||||
"attrs": {
|
||||
"src": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,586 +0,0 @@
|
|||
{
|
||||
"classes": {
|
||||
"wysiwyg-clear-both": 1,
|
||||
"wysiwyg-clear-left": 1,
|
||||
"wysiwyg-clear-right": 1,
|
||||
"wysiwyg-color-aqua": 1,
|
||||
"wysiwyg-color-black": 1,
|
||||
"wysiwyg-color-blue": 1,
|
||||
"wysiwyg-color-fuchsia": 1,
|
||||
"wysiwyg-color-gray": 1,
|
||||
"wysiwyg-color-green": 1,
|
||||
"wysiwyg-color-lime": 1,
|
||||
"wysiwyg-color-maroon": 1,
|
||||
"wysiwyg-color-navy": 1,
|
||||
"wysiwyg-color-olive": 1,
|
||||
"wysiwyg-color-purple": 1,
|
||||
"wysiwyg-color-red": 1,
|
||||
"wysiwyg-color-silver": 1,
|
||||
"wysiwyg-color-teal": 1,
|
||||
"wysiwyg-color-white": 1,
|
||||
"wysiwyg-color-yellow": 1,
|
||||
"wysiwyg-float-left": 1,
|
||||
"wysiwyg-float-right": 1,
|
||||
"wysiwyg-font-size-large": 1,
|
||||
"wysiwyg-font-size-larger": 1,
|
||||
"wysiwyg-font-size-medium": 1,
|
||||
"wysiwyg-font-size-small": 1,
|
||||
"wysiwyg-font-size-smaller": 1,
|
||||
"wysiwyg-font-size-x-large": 1,
|
||||
"wysiwyg-font-size-x-small": 1,
|
||||
"wysiwyg-font-size-xx-large": 1,
|
||||
"wysiwyg-font-size-xx-small": 1,
|
||||
"wysiwyg-text-align-center": 1,
|
||||
"wysiwyg-text-align-justify": 1,
|
||||
"wysiwyg-text-align-left": 1,
|
||||
"wysiwyg-text-align-right": 1
|
||||
},
|
||||
"comments": 1,
|
||||
"tags": {
|
||||
"a": {
|
||||
"check_attributes": {
|
||||
"href": "href",
|
||||
"target": "any"
|
||||
},
|
||||
"set_attributes": {
|
||||
"rel": "nofollow"
|
||||
}
|
||||
},
|
||||
"abbr": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"acronym": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"address": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"applet": {
|
||||
"remove": 1
|
||||
},
|
||||
"area": {
|
||||
"remove": 1
|
||||
},
|
||||
"article": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"aside": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"audio": {
|
||||
"remove": 1
|
||||
},
|
||||
"b": {},
|
||||
"base": {
|
||||
"remove": 1
|
||||
},
|
||||
"basefont": {
|
||||
"remove": 1
|
||||
},
|
||||
"bdi": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"bdo": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"bgsound": {
|
||||
"remove": 1
|
||||
},
|
||||
"big": {
|
||||
"rename_tag": "span",
|
||||
"set_class": "wysiwyg-font-size-larger"
|
||||
},
|
||||
"blink": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"blockquote": {
|
||||
"check_attributes": {
|
||||
"cite": "url"
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"br": {
|
||||
"add_class": {
|
||||
"clear": "clear_br"
|
||||
}
|
||||
},
|
||||
"button": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"canvas": {
|
||||
"remove": 1
|
||||
},
|
||||
"caption": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"center": {
|
||||
"rename_tag": "div",
|
||||
"set_class": "wysiwyg-text-align-center"
|
||||
},
|
||||
"cite": {},
|
||||
"code": {},
|
||||
"col": {
|
||||
"remove": 1
|
||||
},
|
||||
"colgroup": {
|
||||
"remove": 1
|
||||
},
|
||||
"command": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"comment": {
|
||||
"remove": 1
|
||||
},
|
||||
"datalist": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"dd": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"del": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"details": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"device": {
|
||||
"remove": 1
|
||||
},
|
||||
"dfn": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"dir": {
|
||||
"rename_tag": "ul"
|
||||
},
|
||||
"div": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"keep_styles": {
|
||||
"float": 1,
|
||||
"textAlign": 1
|
||||
},
|
||||
"one_of_type": {
|
||||
"visible_content_object": 1
|
||||
},
|
||||
"remove_action": "unwrap"
|
||||
},
|
||||
"dl": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"dt": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"em": {},
|
||||
"embed": {
|
||||
"remove": 1
|
||||
},
|
||||
"fieldset": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"figcaption": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"figure": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"font": {
|
||||
"add_class": {
|
||||
"size": "size_font"
|
||||
},
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"footer": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"form": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"frame": {
|
||||
"remove": 1
|
||||
},
|
||||
"frameset": {
|
||||
"remove": 1
|
||||
},
|
||||
"h1": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"h2": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"h3": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"h4": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"h5": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"h6": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"header": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"hgroup": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"hr": {},
|
||||
"html": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"i": {},
|
||||
"iframe": {
|
||||
"remove": 1
|
||||
},
|
||||
"img": {
|
||||
"add_class": {
|
||||
"align": "align_img"
|
||||
},
|
||||
"check_attributes": {
|
||||
"alt": "alt",
|
||||
"height": "numbers",
|
||||
"src": "src",
|
||||
"width": "numbers"
|
||||
},
|
||||
"one_of_type": {
|
||||
"valid_image_src": 1
|
||||
}
|
||||
},
|
||||
"input": {
|
||||
"remove": 1
|
||||
},
|
||||
"ins": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"isindex": {
|
||||
"remove": 1
|
||||
},
|
||||
"kbd": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"keygen": {
|
||||
"remove": 1
|
||||
},
|
||||
"label": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"legend": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"li": {},
|
||||
"link": {
|
||||
"remove": 1
|
||||
},
|
||||
"listing": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"map": {
|
||||
"remove": 1
|
||||
},
|
||||
"mark": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"marquee": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"menu": {
|
||||
"rename_tag": "ul"
|
||||
},
|
||||
"meta": {
|
||||
"remove": 1
|
||||
},
|
||||
"meter": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"multicol": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"nav": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"nextid": {
|
||||
"remove": 1
|
||||
},
|
||||
"nobr": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"noembed": {
|
||||
"remove": 1
|
||||
},
|
||||
"noframes": {
|
||||
"remove": 1
|
||||
},
|
||||
"noscript": {
|
||||
"remove": 1
|
||||
},
|
||||
"object": {
|
||||
"remove": 1
|
||||
},
|
||||
"ol": {},
|
||||
"optgroup": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"option": {
|
||||
"remove": 1
|
||||
},
|
||||
"output": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"p": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"param": {
|
||||
"remove": 1
|
||||
},
|
||||
"plaintext": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"pre": {},
|
||||
"progress": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"q": {
|
||||
"check_attributes": {
|
||||
"cite": "url"
|
||||
}
|
||||
},
|
||||
"rb": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"rp": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"rt": {
|
||||
"rename_tag": "span"
|
||||
},
|
||||
"ruby": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"s": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"samp": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"script": {
|
||||
"remove": 1
|
||||
},
|
||||
"section": {
|
||||
"rename_tag": "div"
|
||||
},
|
||||
"select": {
|
||||
"remove": 1
|
||||
},
|
||||
"small": {
|
||||
"rename_tag": "span",
|
||||
"set_class": "wysiwyg-font-size-smaller"
|
||||
},
|
||||
"source": {
|
||||
"remove": 1
|
||||
},
|
||||
"spacer": {
|
||||
"remove": 1
|
||||
},
|
||||
"span": {
|
||||
"keep_styles": {
|
||||
"backgroundColor": 1,
|
||||
"color": 1,
|
||||
"fontSize": 1
|
||||
},
|
||||
"one_of_type": {
|
||||
"text_color_object": 1,
|
||||
"text_fontsize_object": 1,
|
||||
"text_formatting_object": 1
|
||||
},
|
||||
"remove_action": "unwrap"
|
||||
},
|
||||
"strike": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"strong": {},
|
||||
"style": {
|
||||
"remove": 1
|
||||
},
|
||||
"sub": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"summary": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"sup": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"svg": {
|
||||
"remove": 1
|
||||
},
|
||||
"table": {},
|
||||
"tbody": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"td": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"align": "any",
|
||||
"colspan": "numbers",
|
||||
"rowspan": "numbers",
|
||||
"valign": "any"
|
||||
}
|
||||
},
|
||||
"textarea": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"tfoot": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"th": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
},
|
||||
"check_attributes": {
|
||||
"colspan": "numbers",
|
||||
"rowspan": "numbers"
|
||||
}
|
||||
},
|
||||
"thead": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"time": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"title": {
|
||||
"remove": 1
|
||||
},
|
||||
"tr": {
|
||||
"add_class": {
|
||||
"align": "align_text"
|
||||
}
|
||||
},
|
||||
"track": {
|
||||
"remove": 1
|
||||
},
|
||||
"tt": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"u": {},
|
||||
"ul": {},
|
||||
"var": {
|
||||
"unwrap": 1
|
||||
},
|
||||
"video": {
|
||||
"remove": 1
|
||||
},
|
||||
"wbr": {
|
||||
"remove": 1
|
||||
},
|
||||
"xml": {
|
||||
"remove": 1
|
||||
},
|
||||
"xmp": {
|
||||
"unwrap": 1
|
||||
}
|
||||
},
|
||||
"type_definitions": {
|
||||
"alignment_object": {
|
||||
"classes": {
|
||||
"wysiwyg-float-left": 1,
|
||||
"wysiwyg-float-right": 1,
|
||||
"wysiwyg-text-align-center": 1,
|
||||
"wysiwyg-text-align-justify": 1,
|
||||
"wysiwyg-text-align-left": 1,
|
||||
"wysiwyg-text-align-right": 1
|
||||
},
|
||||
"styles": {
|
||||
"float": [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
"text-align": [
|
||||
"left",
|
||||
"right",
|
||||
"center"
|
||||
]
|
||||
}
|
||||
},
|
||||
"text_color_object": {
|
||||
"styles": {
|
||||
"background-color": true,
|
||||
"color": true
|
||||
}
|
||||
},
|
||||
"text_fontsize_object": {
|
||||
"styles": {
|
||||
"font-size": true
|
||||
}
|
||||
},
|
||||
"text_formatting_object": {
|
||||
"classes": {
|
||||
"wysiwyg-color-aqua": 1,
|
||||
"wysiwyg-color-black": 1,
|
||||
"wysiwyg-color-blue": 1,
|
||||
"wysiwyg-color-fuchsia": 1,
|
||||
"wysiwyg-color-gray": 1,
|
||||
"wysiwyg-color-green": 1,
|
||||
"wysiwyg-color-lime": 1,
|
||||
"wysiwyg-color-maroon": 1,
|
||||
"wysiwyg-color-navy": 1,
|
||||
"wysiwyg-color-olive": 1,
|
||||
"wysiwyg-color-purple": 1,
|
||||
"wysiwyg-color-red": 1,
|
||||
"wysiwyg-color-silver": 1,
|
||||
"wysiwyg-color-teal": 1,
|
||||
"wysiwyg-color-white": 1,
|
||||
"wysiwyg-color-yellow": 1,
|
||||
"wysiwyg-font-size-large": 1,
|
||||
"wysiwyg-font-size-larger": 1,
|
||||
"wysiwyg-font-size-medium": 1,
|
||||
"wysiwyg-font-size-small": 1,
|
||||
"wysiwyg-font-size-smaller": 1,
|
||||
"wysiwyg-font-size-x-large": 1,
|
||||
"wysiwyg-font-size-x-small": 1,
|
||||
"wysiwyg-font-size-xx-large": 1,
|
||||
"wysiwyg-font-size-xx-small": 1
|
||||
}
|
||||
},
|
||||
"valid_image_src": {
|
||||
"attrs": {
|
||||
"src": {}
|
||||
}
|
||||
},
|
||||
"visible_content_object": {
|
||||
"methods": {
|
||||
"has_visible_contet": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"tags": {
|
||||
"a": {
|
||||
"check_attributes": {
|
||||
"href": "url"
|
||||
},
|
||||
"set_attributes": {
|
||||
"rel": "nofollow",
|
||||
"target": "_blank"
|
||||
}
|
||||
},
|
||||
"b": {},
|
||||
"br": {},
|
||||
"div": {},
|
||||
"em": {},
|
||||
"i": {},
|
||||
"li": {},
|
||||
"ol": {},
|
||||
"p": {},
|
||||
"span": {},
|
||||
"strong": {},
|
||||
"ul": {}
|
||||
}
|
||||
}
|
|
@ -1,419 +0,0 @@
|
|||
this["wysihtml5"] = this["wysihtml5"] || {};
|
||||
this["wysihtml5"]["tpl"] = this["wysihtml5"]["tpl"] || {};
|
||||
|
||||
this["wysihtml5"]["tpl"]["blockquote"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
|
||||
return " \n <span class=\"fa fa-quote-left\"></span>\n ";
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-quote\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"blockquote\" data-wysihtml5-display-format-name=\"false\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["color"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
buffer += "<li class=\"dropdown\">\n <a class=\"btn btn-default dropdown-toggle ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\" data-toggle=\"dropdown\" tabindex=\"-1\">\n <span class=\"current-color\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.black)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</span>\n <b class=\"caret\"></b>\n </a>\n <ul class=\"dropdown-menu\">\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"black\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"black\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.black)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"silver\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"silver\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.silver)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"gray\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"gray\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.gray)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"maroon\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"maroon\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.maroon)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"red\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"red\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.red)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"purple\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"purple\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.purple)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"green\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"green\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.green)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"olive\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"olive\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.olive)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"navy\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"navy\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.navy)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"blue\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"blue\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.blue)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"orange\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"orange\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.orange)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n </ul>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["emphasis"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"small\" title=\"CTRL+S\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.small)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n ";
|
||||
return buffer;
|
||||
}
|
||||
|
||||
buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"bold\" title=\"CTRL+B\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.bold)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"italic\" title=\"CTRL+I\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.italic)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"underline\" title=\"CTRL+U\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.underline)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.small), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </div>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["font-styles"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-font\"></span>\n ";
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-font\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li class=\"dropdown\">\n <a class=\"btn btn-default dropdown-toggle ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\" data-toggle=\"dropdown\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n <span class=\"current-font\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.normal)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</span>\n <b class=\"caret\"></b>\n </a>\n <ul class=\"dropdown-menu\">\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"p\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.normal)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h1\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h1)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h2\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h2)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h3\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h3)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h4\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h4)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h5\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h5)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h6\" tabindex=\"-1\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h6)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a></li>\n </ul>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["html"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-pencil\"></span>\n ";
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-pencil\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-action=\"change_view\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.html)),stack1 == null || stack1 === false ? stack1 : stack1.edit)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n </div>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["image"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
|
||||
return "modal-sm";
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-file-image-o\"></span>\n ";
|
||||
}
|
||||
|
||||
function program7(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-picture\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li>\n <div class=\"bootstrap-wysihtml5-insert-image-modal modal fade\" data-wysihtml5-dialog=\"insertImage\">\n <div class=\"modal-dialog ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.smallmodals), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <a class=\"close\" data-dismiss=\"modal\">×</a>\n <h3>"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</h3>\n </div>\n <div class=\"modal-body\">\n <div class=\"form-group\">\n <input value=\"http://\" class=\"bootstrap-wysihtml5-insert-image-url form-control\" data-wysihtml5-dialog-field=\"src\">\n </div> \n </div>\n <div class=\"modal-footer\">\n <a class=\"btn btn-default\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"cancel\" href=\"#\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.cancel)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n <a class=\"btn btn-primary\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"save\" href=\"#\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n </div>\n </div>\n </div>\n </div>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"insertImage\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["link"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
|
||||
return "modal-sm";
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-share-square-o\"></span>\n ";
|
||||
}
|
||||
|
||||
function program7(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-share\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li>\n <div class=\"bootstrap-wysihtml5-insert-link-modal modal fade\" data-wysihtml5-dialog=\"createLink\">\n <div class=\"modal-dialog ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.smallmodals), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <a class=\"close\" data-dismiss=\"modal\">×</a>\n <h3>"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</h3>\n </div>\n <div class=\"modal-body\">\n <div class=\"form-group\">\n <input value=\"http://\" class=\"bootstrap-wysihtml5-insert-link-url form-control\" data-wysihtml5-dialog-field=\"href\">\n </div> \n <div class=\"checkbox\">\n <label> \n <input type=\"checkbox\" class=\"bootstrap-wysihtml5-insert-link-target\" checked>"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.target)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\n </label>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a class=\"btn btn-default\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"cancel\" href=\"#\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.cancel)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n <a href=\"#\" class=\"btn btn-primary\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"save\">"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "</a>\n </div>\n </div>\n </div>\n </div>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"createLink\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
||||
|
||||
this["wysihtml5"]["tpl"]["lists"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
||||
this.compilerInfo = [4,'>= 1.0.0'];
|
||||
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
||||
|
||||
function program1(depth0,data) {
|
||||
|
||||
var buffer = "", stack1;
|
||||
buffer += "btn-"
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function program3(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-list-ul\"></span>\n ";
|
||||
}
|
||||
|
||||
function program5(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-list\"></span>\n ";
|
||||
}
|
||||
|
||||
function program7(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-list-ol\"></span>\n ";
|
||||
}
|
||||
|
||||
function program9(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-th-list\"></span>\n ";
|
||||
}
|
||||
|
||||
function program11(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-outdent\"></span>\n ";
|
||||
}
|
||||
|
||||
function program13(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-indent-right\"></span>\n ";
|
||||
}
|
||||
|
||||
function program15(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"fa fa-indent\"></span>\n ";
|
||||
}
|
||||
|
||||
function program17(depth0,data) {
|
||||
|
||||
|
||||
return "\n <span class=\"glyphicon glyphicon-indent-left\"></span>\n ";
|
||||
}
|
||||
|
||||
buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"insertUnorderedList\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.unordered)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"insertOrderedList\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.ordered)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(9, program9, data),fn:self.program(7, program7, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"Outdent\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.outdent)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(13, program13, data),fn:self.program(11, program11, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n <a class=\"btn ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += " btn-default\" data-wysihtml5-command=\"Indent\" title=\""
|
||||
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.indent)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
||||
+ "\" tabindex=\"-1\">\n ";
|
||||
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(17, program17, data),fn:self.program(15, program15, data),data:data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </a>\n </div>\n</li>\n";
|
||||
return buffer;
|
||||
});
|
1
view/js/jquery-toast/jquery.toast.min.css
vendored
1
view/js/jquery-toast/jquery.toast.min.css
vendored
|
@ -1 +0,0 @@
|
|||
.jq-toast-wrap,.jq-toast-wrap *{margin:0;padding:0}.jq-toast-wrap{display:block;position:fixed;width:250px;pointer-events:none!important;letter-spacing:normal;z-index:9000!important}.jq-toast-wrap.bottom-left{bottom:20px;left:20px}.jq-toast-wrap.bottom-right{bottom:20px;right:40px}.jq-toast-wrap.top-left{top:20px;left:20px}.jq-toast-wrap.top-right{top:20px;right:40px}.jq-toast-single{display:block;width:100%;padding:10px;margin:0 0 5px;border-radius:4px;font-size:12px;font-family:arial,sans-serif;line-height:17px;position:relative;pointer-events:all!important;background-color:#444;color:#fff}.jq-toast-single h2{font-family:arial,sans-serif;font-size:14px;margin:0 0 7px;background:0 0;color:inherit;line-height:inherit;letter-spacing:normal}.jq-toast-single a{color:#eee;text-decoration:none;font-weight:700;border-bottom:1px solid #fff;padding-bottom:3px;font-size:12px}.jq-toast-single ul{margin:0 0 0 15px;background:0 0;padding:0}.jq-toast-single ul li{list-style-type:disc!important;line-height:17px;background:0 0;margin:0;padding:0;letter-spacing:normal}.close-jq-toast-single{position:absolute;top:3px;right:7px;font-size:14px;cursor:pointer}.jq-toast-loader{display:block;position:absolute;top:-2px;height:5px;width:0;left:0;border-radius:5px;background:red}.jq-toast-loaded{width:100%}.jq-has-icon{padding:10px 10px 10px 50px;background-repeat:no-repeat;background-position:10px}.jq-icon-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=);background-color:#31708f;color:#d9edf7;border-color:#bce8f1}.jq-icon-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=);background-color:#8a6d3b;color:#fcf8e3;border-color:#faebcc}.jq-icon-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=);background-color:#a94442;color:#f2dede;border-color:#ebccd1}.jq-icon-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==);color:#dff0d8;background-color:#3c763d;border-color:#d6e9c6}
|
1
view/js/jquery-toast/jquery.toast.min.js
vendored
1
view/js/jquery-toast/jquery.toast.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,375 +0,0 @@
|
|||
Lazy is dual-licensed under MIT and GPL-2.0 license. Please choose one of them, both are listed below.
|
||||
|
||||
|
||||
---------------------------------
|
||||
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Daniel 'Eisbehr' Kern, eisbehr.de
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
---------------------------------
|
||||
|
||||
|
||||
GPL-2.0 License
|
||||
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{description}
|
||||
Copyright (C) {year} {fullname}
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -1,264 +0,0 @@
|
|||
### jQuery & Zepto Lazy - Delayed Content, Image and Background Loader
|
||||
[](http://github.com/eisbehr-/jquery.lazy)
|
||||
[](http://www.npmjs.org/package/jquery-lazy)
|
||||
[](http://bower.io/search/?q=jquery-lazy)
|
||||
[](https://david-dm.org/eisbehr-/jquery.lazy)
|
||||
[](https://david-dm.org/eisbehr-/jquery.lazy?type=dev)
|
||||
|
||||
---
|
||||
|
||||
[](https://jetbrains.com/phpstorm)
|
||||
_This project is friendly supported by [JetBrains](https://jetbrains.com) & [PhpStorm](https://jetbrains.com/phpstorm)!_
|
||||
|
||||
---
|
||||
|
||||
### Table of Contents
|
||||
* [About Lazy](#about-lazy)
|
||||
* [Compatibility](#compatibility)
|
||||
* [Documentation / Examples](#documentation--examples)
|
||||
* [Installation](#installation)
|
||||
* [CDN](#cdn)
|
||||
* [Self-Hosted](#self-hosted)
|
||||
* [Package Managers](#package-managers)
|
||||
* [Basic Usage](#basic-usage)
|
||||
* [Callbacks / Events](#callbacks--events)
|
||||
* [Instances and public Functions](#instances-and-public-functions)
|
||||
* [Custom Content Loaders](#custom-content-loaders)
|
||||
* [Loader Plugins](#loader-plugins)
|
||||
* [Configuration Parameters](#configuration-parameters)
|
||||
* [Build and Validation](#build-and-validation)
|
||||
* [Available gulp Tasks](#available-gulp-tasks)
|
||||
* [Bugs / Feature request](#bugs--feature-request)
|
||||
* [License](#license)
|
||||
* [Donation](#donation)
|
||||
|
||||
---
|
||||
|
||||
## About Lazy
|
||||
Lazy is a fast, feature-rich and lightweight delayed content loading plugin for jQuery and Zepto.
|
||||
It's designed to speed up page loading times and decrease traffic to your users by only loading the content in view.
|
||||
You can use Lazy in all vertical and horizontal scroll ways.
|
||||
It supports images in `<img />` tags and backgrounds, supplied with css like `background-image`, by default.
|
||||
On those elements Lazy can set an default image or a placeholder while loading and supports retina displays as well.
|
||||
But Lazy is even able to load any other content you want by [plugins](#loader-plugins) and [custom loaders](#custom-content-loaders).
|
||||
|
||||
|
||||
## Compatibility
|
||||
Lazy will work with a wide range of browsers and support jQuery versions for years backwards and Zepto as alternative.
|
||||
You can pick any version since jQuery 1.7.2 or Zepto 1.1.6 or greater.
|
||||
There is no way to guarantee, that Lazy will work with all browsers, but all I've tested worked great so far.
|
||||
If you find any problems in specific browsers, [please let me know](http://github.com/eisbehr-/jquery.lazy/issues).
|
||||
|
||||
**Tested in:** IE, Chrome (+ mobile), Firefox (+ mobile), Safari (+ mobile) and Android Browser.
|
||||
|
||||
|
||||
## Documentation / Examples
|
||||
For [documentation](http://jquery.eisbehr.de/lazy/#parameter), [examples](http://jquery.eisbehr.de/lazy/#examples) and other information take a look on the [project page](http://jquery.eisbehr.de/lazy/).
|
||||
|
||||
|
||||
## Installation
|
||||
First of all, you will need a copy of [jQuery](http://jquery.com) or [Zepto](http://zeptojs.com) to use Lazy successfully on your project.
|
||||
If you get this you can install Lazy by different ways.
|
||||
Some examples below:
|
||||
|
||||
#### CDN
|
||||
Lazy and all plugins are available over [cdnjs](http://cdnjs.com) and [jsDelivr](http://jsdelivr.com) CDN and can directly included to every page.
|
||||
```HTML
|
||||
<!-- jsDeliver -->
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/gh/eisbehr-/jquery.lazy@1.7.7/jquery.lazy.min.js"></script>
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/gh/eisbehr-/jquery.lazy@1.7.7/jquery.lazy.plugins.min.js"></script>
|
||||
|
||||
<!-- cdnjs -->
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.7/jquery.lazy.min.js"></script>
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.7/jquery.lazy.plugins.min.js"></script>
|
||||
```
|
||||
|
||||
#### Self-Hosted
|
||||
[Download](https://github.com/eisbehr-/jquery.lazy/archive/master.zip) and save one of two available files to include Lazy to your page, either the [development](http://raw.githubusercontent.com/eisbehr-/jquery.lazy/master/jquery.lazy.js) or the [minified](http://raw.githubusercontent.com/eisbehr-/jquery.lazy/master/jquery.lazy.min.js) version.
|
||||
```HTML
|
||||
<script type="text/javascript" src="jquery.lazy.min.js"></script>
|
||||
```
|
||||
|
||||
#### Package Managers
|
||||
Lazy is even available through [NPM](http://npmjs.org) and [Bower](http://bower.io).
|
||||
Just use one of the following commands below:
|
||||
|
||||
[](https://nodei.co/npm/jquery-lazy/)
|
||||
```sh
|
||||
$ npm install jquery-lazy
|
||||
$ bower install jquery-lazy
|
||||
```
|
||||
|
||||
|
||||
## Basic Usage
|
||||
1.) The basic usage of Lazy ist pretty easy.
|
||||
First of all you need to prepare all elements you want to lazy load.
|
||||
By default add a `data-src` attribute to images containing the loadable image and/or a `data-loader` attribute to elements witch shall use a [plugin](#loader-plugins) or [custom loaders](#custom-content-loaders).
|
||||
```HTML
|
||||
<img class="lazy" data-src="path/to/image_to_load.jpg" src="" />
|
||||
```
|
||||
|
||||
2.) Start using Lazy by calling it after page load.
|
||||
You don't have to specify your elements exactly, but for better performance, or different options, load your elements over unique classes or any other selector.
|
||||
```JS
|
||||
$(function($) {
|
||||
$("img.lazy").Lazy();
|
||||
});
|
||||
```
|
||||
Take a look at the [documentation](http://jquery.eisbehr.de/lazy/) to get an idea what Lazy is capable of.
|
||||
|
||||
|
||||
## Callbacks / Events
|
||||
Lazy comes with a bunch of [callbacks and events](http://jquery.eisbehr.de/lazy/index.php?c=callback) you can assign to.
|
||||
Just add them by initialization settings:
|
||||
* `beforeLoad` - before item is about to be loaded
|
||||
* `afterLoad` - after the item was loaded successfully
|
||||
* `onError` - whenever an item could not be loaded
|
||||
* `onFinishedAll` - after all items in instance was loaded or returned an error
|
||||
|
||||
|
||||
## Instances and public Functions
|
||||
Lazy supports multiple parallel instances.
|
||||
Just initialize them with different selectors.
|
||||
To access an instances public functions you can initialize them in an object oriented manner or grab the instance bind to every element by default:
|
||||
```JS
|
||||
// object oriented way
|
||||
var instance = $("img.lazy").Lazy({chainable: false});
|
||||
|
||||
// grab from elements (only works well if you use same selectors)
|
||||
$("img.lazy").Lazy();
|
||||
var instance = $("img.lazy").data("plugin_lazy");
|
||||
```
|
||||
|
||||
Every instance has some public available functions to control it's behavior.
|
||||
There are currently six available:
|
||||
```JS
|
||||
instance.config(entryName[, newValue]); // get or set an configuration entry
|
||||
instance.addItems(items); // add new items to current instance
|
||||
instance.getItems(); // get all unhandled items left of current instance
|
||||
instance.update([useThrottle]); // loads all elements in current viewport
|
||||
instance.force(items); // force loading specific items, ignoring the viewport
|
||||
instance.loadAll(); // loads all remaining available elements from this instance
|
||||
instance.destroy(); // unbinds all events and stop execution directly
|
||||
```
|
||||
|
||||
|
||||
## Custom Content Loaders
|
||||
With the custom loaders option there is a powerful solution to load every contents the Lazy way.
|
||||
Lazy will handle everything, you just create a loading method witch got triggered whenever the element hits the visibility threshold.
|
||||
It is still possible to load images and custom loaders in the same Lazy instance.
|
||||
|
||||
To use this just define a loader function inside the Lazy initialisation and pass the loader name to the `data-loader` attribute of the elements witch should be lazy loaded.
|
||||
```HTML
|
||||
<div class="lazy" data-loader="customLoaderName"></div>
|
||||
<img class="lazy" data-src="path/to/image_to_load.jpg" src="" />
|
||||
<div class="lazy" data-loader="customLoaderName"></div>
|
||||
<div class="lazy" data-loader="asyncLoader"></div>
|
||||
```
|
||||
```JS
|
||||
$(".lazy").Lazy({
|
||||
// callback
|
||||
beforeLoad: function(element) {
|
||||
console.log("start loading " + element.prop("tagName"));
|
||||
},
|
||||
|
||||
// custom loaders
|
||||
customLoaderName: function(element) {
|
||||
element.html("element handled by custom loader");
|
||||
element.load();
|
||||
},
|
||||
asyncLoader: function(element, response) {
|
||||
setTimeout(function() {
|
||||
element.html("element handled by async loader");
|
||||
response(true);
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## Loader Plugins
|
||||
The loader plugins can extend the functionality of Lazy, like loading other elements and data.
|
||||
It is basically the same as the [custom content loaders](#custom-content-loaders), with the difference, that plugins can extend all further instances globally at once permanently and let them handle specific elements like `<video>` by default, without `data-loader` attribute set.
|
||||
With custom content loaders you have to initialize each instance on setup with the loader.
|
||||
With plugins you only load the plugin file and you're done for all instances from now on.
|
||||
|
||||
For more information and examples, take a look at the [existing plugins](https://github.com/eisbehr-/jquery.lazy/tree/master/plugins) or the [readme.md](https://github.com/eisbehr-/jquery.lazy/tree/master/plugins/README.md) in there.
|
||||
|
||||
|
||||
## Configuration Parameters
|
||||
The following configurations is available by default:
|
||||
|
||||
Name | Type | Default | Description
|
||||
------------------ | ---------- | ------------------ | -----------
|
||||
name | *string* | *'lazy'* | Internal name, used for namespaces and bindings.
|
||||
chainable | *boolean* | *true* | By default Lazy is chainable and will return all elements. If set to `false` Lazy will return the created plugin instance itself for further use.
|
||||
autoDestroy | *boolean* | *true* | Will automatically destroy the instance when no further elements are available to handle.
|
||||
bind | *string* | *'load'* | If set to `load`' Lazy starts working directly after page load. If you want to use Lazy on own events set it to `event`'.
|
||||
threshold | *integer* | *500* | Amount of pixels below the viewport, in which all images gets loaded before the user sees them.
|
||||
visibleOnly | *boolean* | *false* | Determine if only visible elements should be load.
|
||||
appendScroll | *integer* | *window* | An element to listen on for scroll events, useful when images are stored in a container.
|
||||
scrollDirection | *string* | *'both'* | Determines the handles scroll direction. Possible values are `both`, `vertical` and `horizontal`.
|
||||
imageBase | *string* | *null* | If defined this will be used as base path for all images loaded by this instance.
|
||||
defaultImage | *string* | *blank image* | Base64 image string, set as default image source for every image without a predefined source attribute.
|
||||
placeholder | *string* | *null* | Base64 image string, set a background on every element as loading placeholder.
|
||||
delay | *integer* | *-1* | If you want to load all elements at once after page load, then you can specify a delay time in milliseconds.
|
||||
combined | *boolean* | *false* | With this parameter, Lazy will combine the event driven and delayed element loading.
|
||||
**attributes** | | |
|
||||
attribute | *string* | *'data-src'* | Name of the image tag `src` attribute, where the image path is stored.
|
||||
srcsetAttribute | *string* | *'data-srcset'* | Name of the image tag `srcset` attribute, where the source set is stored.
|
||||
sizesAttribute | *string* | *'data-sizes'* | Name of the image tag `sizes` attribute, where the size definition for source set is stored.
|
||||
retinaAttribute | *string* | *'data-retina'* | Name of the image tag attribute, where the path for optional retina image is stored.
|
||||
loaderAttribute | *string* | *'data-loader'* | Name or the element attribute, where the identifier of the plugin or customer loader is sored.
|
||||
imageBaseAttribute | *string* | *'data-imagebase'* | Name ot the image tag element, where the specific image base is stored. This will overwrite the global `imageBase` config.
|
||||
removeAttribute | *boolean* | *true* | Determine if the attribute should be removed from the element after loading.
|
||||
handledName | *string* | *'handled'* | Name of the element tag data attribute, to determine if element is already handled.
|
||||
loadedName | *string* | *'loaded'* | Name of the element tag data attribute, to determine if element is already loaded.
|
||||
**effect** | | |
|
||||
effect | *string* | *'show'* | Function name of the effect you want to use to show the loaded images, like `show` or `fadeIn`.
|
||||
effectTime | *integer* | *0* | Time in milliseconds the effect should use to view the image.
|
||||
**throttle** | | |
|
||||
enableThrottle | *boolean* | *true* | Throttle down the loading calls on scrolling event.
|
||||
throttle | *integer* | *250* | Time in milliseconds the throttle will use to limit the loading calls.
|
||||
**callbacks** | | |
|
||||
beforeLoad | *function* | *undefined* | Callback function, which will be called before the element gets loaded. Has current element and response function as parameters. `this` is the current Lazy instance.
|
||||
afterLoad | *function* | *undefined* | Callback function, which will be called after the element was loaded. Has current element and response function as parameters. `this` is the current Lazy instance.
|
||||
onError | *function* | *undefined* | Callback function, which will be called if the element could not be loaded. Has current element and response function as parameters. `this` is the current Lazy instance.
|
||||
onFinishedAll | *function* | *undefined* | Callback function, which will be called after all elements was loaded or returned an error. The callback has no parameters. `this` is the current Lazy instance.
|
||||
|
||||
|
||||
## Build and Validation
|
||||
This project includes an automated build script using `gulp`.
|
||||
To build your own versions of Lazy you need to [install it](#package-managers) via [npm](https://www.npmjs.com/package/jquery-lazy) first.
|
||||
Afterwards you can use the following command in your console to automatically generate all productive files.
|
||||
While building these files everything will be checked with `jshint` for validity too.
|
||||
```sh
|
||||
$ gulp build
|
||||
```
|
||||
|
||||
### Available `gulp` Tasks:
|
||||
|
||||
Name | Description
|
||||
-------------- | -----------
|
||||
build | check & build everything
|
||||
build-main | check & build main project file
|
||||
build-plugins | check & build single plugin files
|
||||
concat-plugins | build concatenated plugins file
|
||||
validate | check all files with `jshint`
|
||||
watch | watches all files to check & build everything on change
|
||||
|
||||
|
||||
## Bugs / Feature request
|
||||
Please [report](http://github.com/eisbehr-/jquery.lazy/issues) bugs and feel free to [ask](http://github.com/eisbehr-/jquery.lazy/issues) for new features directly on GitHub.
|
||||
|
||||
|
||||
## License
|
||||
Lazy is dual-licensed under [MIT](http://www.opensource.org/licenses/mit-license.php) and [GPL-2.0](http://www.gnu.org/licenses/gpl-2.0.html) license.
|
||||
|
||||
|
||||
## Donation
|
||||
_You like to support me?_
|
||||
_You appreciate my work?_
|
||||
_You use it in commercial projects?_
|
||||
|
||||
Feel free to make a little [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FFL6VQJCUZMXC)! :wink:
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"name": "jquery-lazy",
|
||||
"description": "Lazy is a fast, feature-rich and lightweight delayed content loading plugin for jQuery and Zepto. It's designed to speed up page loading times and decrease traffic to your users by only loading the content in view. You can use Lazy in all vertical and horizontal scroll ways. It supports images in 'img' tags and backgrounds, supplied with css like 'background-image', by default. On those elements Lazy can set an default image or a placeholder while loading and supports retina displays as well. But Lazy is even able to load any other content you want by plugins and custom loaders.",
|
||||
"version": "1.7.7",
|
||||
"main": "jquery.lazy.min.js",
|
||||
"license": [
|
||||
"MIT",
|
||||
"GPL-2.0"
|
||||
],
|
||||
"ignore": [
|
||||
"*.md",
|
||||
"*.json"
|
||||
],
|
||||
"keywords": [
|
||||
"lazy",
|
||||
"lazyload",
|
||||
"load",
|
||||
"loader",
|
||||
"image",
|
||||
"images",
|
||||
"background",
|
||||
"content",
|
||||
"speed",
|
||||
"delay",
|
||||
"delayed",
|
||||
"pageload",
|
||||
"performance",
|
||||
"retina",
|
||||
"placeholder",
|
||||
"jquery",
|
||||
"jquery-plugin",
|
||||
"zepto",
|
||||
"zepto-plugin"
|
||||
],
|
||||
"authors": [{
|
||||
"name": "Daniel 'Eisbehr' Kern",
|
||||
"email": "jquery@eisbehr.de",
|
||||
"homepage": "http://www.eisbehr.de/"
|
||||
}],
|
||||
"homepage": "http://jquery.eisbehr.de/lazy/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/eisbehr-/jquery.lazy.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7.2"
|
||||
}
|
||||
}
|
|
@ -1,150 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
var gulp = require("gulp");
|
||||
var util = require("gulp-util");
|
||||
var data = require("gulp-data");
|
||||
var noop = require("gulp-noop");
|
||||
var rename = require("gulp-rename");
|
||||
var header = require("gulp-header");
|
||||
var jshint = require("gulp-jshint");
|
||||
var uglify = require("gulp-uglify");
|
||||
var concat = require("gulp-concat-util");
|
||||
var pkg = require("./package.json");
|
||||
var nl = require("os").EOL;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** CONFIG & PATHS
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var config = {
|
||||
header : "/*! jQuery & Zepto Lazy <%= info %> - <%= pkg.homepage %> - MIT&GPL-2.0 license - Copyright 2012-<%= year %> <%= pkg.author.name %> */",
|
||||
main : pkg.main,
|
||||
plugins : [
|
||||
"plugins/jquery.lazy.*.js",
|
||||
"!plugins/jquery.lazy.*.min.js"
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** PIPES
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var pipes = {};
|
||||
|
||||
// check files with jshint
|
||||
pipes.validateFiles = function(files) {
|
||||
return gulp.src(files, {base: "./"})
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter("jshint-stylish"));
|
||||
};
|
||||
|
||||
// check all files
|
||||
pipes.validate = function() {
|
||||
return pipes.validateFiles([config.main].concat(config.plugins));
|
||||
};
|
||||
|
||||
// build main project file
|
||||
pipes.buildMain = function() {
|
||||
return pipes.validateFiles(config.main)
|
||||
.pipe(uglify())
|
||||
.pipe(header(config.header + nl, {
|
||||
pkg : pkg,
|
||||
info : "v" + pkg.version,
|
||||
year : new Date().getFullYear()
|
||||
}))
|
||||
.pipe(rename(function(path) {
|
||||
path.extname = ".min" + path.extname;
|
||||
}))
|
||||
.pipe(gulp.dest("./"));
|
||||
};
|
||||
|
||||
// build plugin files
|
||||
pipes.buildPlugins = function() {
|
||||
return pipes.validateFiles(config.plugins)
|
||||
.pipe(data(function(file) {
|
||||
var string = String(file.contents).split("\n")[1];
|
||||
var matches = string.match(/\s-\s([a-z ]+)\s-\sv([0-9.]+)/i);
|
||||
|
||||
return {
|
||||
info: "- " + matches[1] + " v" + matches[2]
|
||||
};
|
||||
}))
|
||||
.pipe(uglify())
|
||||
.pipe(header(config.header + nl, {
|
||||
pkg : pkg,
|
||||
year : new Date().getFullYear()
|
||||
}))
|
||||
.pipe(rename(function(path) {
|
||||
path.extname = ".min" + path.extname;
|
||||
}))
|
||||
.pipe(gulp.dest("./"));
|
||||
};
|
||||
|
||||
// concat plugin files
|
||||
pipes.concatPlugins = function() {
|
||||
return gulp.src(config.plugins)
|
||||
.pipe(concat(config.main.replace(".js", ".plugins.js"), {
|
||||
sep: nl + nl
|
||||
}))
|
||||
.pipe(gulp.dest("./"))
|
||||
.pipe(uglify())
|
||||
.pipe(header(config.header + nl, {
|
||||
pkg : pkg,
|
||||
info : "- All Plugins v" + pkg.version,
|
||||
year : new Date().getFullYear()
|
||||
}))
|
||||
.pipe(rename(function(path) {
|
||||
path.extname = ".min" + path.extname;
|
||||
}))
|
||||
.pipe(gulp.dest("./"));
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** TASKS
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// check & build everything
|
||||
gulp.task("build", ["build-main", "build-plugins", "concat-plugins"]);
|
||||
|
||||
// check & build main project file
|
||||
gulp.task("build-main", pipes.buildMain);
|
||||
|
||||
// check & build single plugin files
|
||||
gulp.task("build-plugins", pipes.buildPlugins);
|
||||
|
||||
// build concatenated plugins file
|
||||
gulp.task("concat-plugins", pipes.concatPlugins);
|
||||
|
||||
// check all files
|
||||
gulp.task("validate", pipes.validate);
|
||||
|
||||
// check, build & watch live changes
|
||||
gulp.task("watch", ["build"], function() {
|
||||
// watch main file
|
||||
gulp.watch(config.main, function() {
|
||||
var task = pipes.buildMain();
|
||||
util.log("updated", "'" + util.colors.red("main file") + "'");
|
||||
return task;
|
||||
});
|
||||
|
||||
// watch plugins
|
||||
gulp.watch(config.plugins, function() {
|
||||
var task = pipes.buildPlugins();
|
||||
util.log("updated", "'" + util.colors.red("plugins") + "'");
|
||||
pipes.concatPlugins();
|
||||
util.log("updated", "'" + util.colors.red("concatenated plugins file") + "'");
|
||||
return task;
|
||||
});
|
||||
});
|
|
@ -1,870 +0,0 @@
|
|||
/*!
|
||||
* jQuery & Zepto Lazy - v1.7.7
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* $("img.lazy").lazy();
|
||||
*/
|
||||
|
||||
;(function(window, undefined) {
|
||||
"use strict";
|
||||
|
||||
// noinspection JSUnresolvedVariable
|
||||
/**
|
||||
* library instance - here and not in construct to be shorter in minimization
|
||||
* @return void
|
||||
*/
|
||||
var $ = window.jQuery || window.Zepto,
|
||||
|
||||
/**
|
||||
* unique plugin instance id counter
|
||||
* @type {number}
|
||||
*/
|
||||
lazyInstanceId = 0,
|
||||
|
||||
/**
|
||||
* helper to register window load for jQuery 3
|
||||
* @type {boolean}
|
||||
*/
|
||||
windowLoaded = false;
|
||||
|
||||
/**
|
||||
* make lazy available to jquery - and make it a bit more case-insensitive :)
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @param {object} settings
|
||||
* @return void
|
||||
*/
|
||||
$.fn.Lazy = $.fn.lazy = function(settings) {
|
||||
return new LazyPlugin(this, settings);
|
||||
};
|
||||
|
||||
/**
|
||||
* helper to add plugins to lazy prototype configuration
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @param {string|Array} names
|
||||
* @param {string|Array} [elements]
|
||||
* @param {function} loader
|
||||
* @return void
|
||||
*/
|
||||
$.Lazy = $.lazy = function(names, elements, loader) {
|
||||
// make second parameter optional
|
||||
if( $.isFunction(elements) ) {
|
||||
loader = elements;
|
||||
elements = [];
|
||||
}
|
||||
|
||||
// exit here if parameter is not a callable function
|
||||
if( !$.isFunction(loader) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// make parameters an array of names to be sure
|
||||
names = $.isArray(names) ? names : [names];
|
||||
elements = $.isArray(elements) ? elements : [elements];
|
||||
|
||||
var config = LazyPlugin.prototype.config,
|
||||
forced = config._f || (config._f = {});
|
||||
|
||||
// add the loader plugin for every name
|
||||
for( var i = 0, l = names.length; i < l; i++ ) {
|
||||
if( config[names[i]] === undefined || $.isFunction(config[names[i]]) ) {
|
||||
config[names[i]] = loader;
|
||||
}
|
||||
}
|
||||
|
||||
// add forced elements loader
|
||||
for( var c = 0, a = elements.length; c < a; c++ ) {
|
||||
forced[elements[c]] = names[0];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* contains all logic and the whole element handling
|
||||
* is packed in a private function outside class to reduce memory usage, because it will not be created on every plugin instance
|
||||
* @access private
|
||||
* @type {function}
|
||||
* @param {LazyPlugin} instance
|
||||
* @param {object} config
|
||||
* @param {object|Array} items
|
||||
* @param {object} events
|
||||
* @param {string} namespace
|
||||
* @return void
|
||||
*/
|
||||
function _executeLazy(instance, config, items, events, namespace) {
|
||||
/**
|
||||
* a helper to trigger the 'onFinishedAll' callback after all other events
|
||||
* @access private
|
||||
* @type {number}
|
||||
*/
|
||||
var _awaitingAfterLoad = 0,
|
||||
|
||||
/**
|
||||
* visible content width
|
||||
* @access private
|
||||
* @type {number}
|
||||
*/
|
||||
_actualWidth = -1,
|
||||
|
||||
/**
|
||||
* visible content height
|
||||
* @access private
|
||||
* @type {number}
|
||||
*/
|
||||
_actualHeight = -1,
|
||||
|
||||
/**
|
||||
* determine possibly detected high pixel density
|
||||
* @access private
|
||||
* @type {boolean}
|
||||
*/
|
||||
_isRetinaDisplay = false,
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_afterLoad = "afterLoad",
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_load = "load",
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_error = "error",
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_img = "img",
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_src = "src",
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_srcset = "srcset",
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_sizes = "sizes",
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_backgroundImage = "background-image";
|
||||
|
||||
/**
|
||||
* initialize plugin
|
||||
* bind loading to events or set delay time to load all items at once
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
function _initialize() {
|
||||
// detect actual device pixel ratio
|
||||
// noinspection JSUnresolvedVariable
|
||||
_isRetinaDisplay = window.devicePixelRatio > 1;
|
||||
|
||||
// prepare all initial items
|
||||
items = _prepareItems(items);
|
||||
|
||||
// if delay time is set load all items at once after delay time
|
||||
if( config.delay >= 0 ) {
|
||||
setTimeout(function() {
|
||||
_lazyLoadItems(true);
|
||||
}, config.delay);
|
||||
}
|
||||
|
||||
// if no delay is set or combine usage is active bind events
|
||||
if( config.delay < 0 || config.combined ) {
|
||||
// create unique event function
|
||||
events.e = _throttle(config.throttle, function(event) {
|
||||
// reset detected window size on resize event
|
||||
if( event.type === "resize" ) {
|
||||
_actualWidth = _actualHeight = -1;
|
||||
}
|
||||
|
||||
// execute 'lazy magic'
|
||||
_lazyLoadItems(event.all);
|
||||
});
|
||||
|
||||
// create function to add new items to instance
|
||||
events.a = function(additionalItems) {
|
||||
additionalItems = _prepareItems(additionalItems);
|
||||
items.push.apply(items, additionalItems);
|
||||
};
|
||||
|
||||
// create function to get all instance items left
|
||||
events.g = function() {
|
||||
// filter loaded items before return in case internal filter was not running until now
|
||||
return (items = $(items).filter(function() {
|
||||
return !$(this).data(config.loadedName);
|
||||
}));
|
||||
};
|
||||
|
||||
// create function to force loading elements
|
||||
events.f = function(forcedItems) {
|
||||
for( var i = 0; i < forcedItems.length; i++ ) {
|
||||
// only handle item if available in current instance
|
||||
// use a compare function, because Zepto can't handle object parameter for filter
|
||||
// var item = items.filter(forcedItems[i]);
|
||||
/* jshint loopfunc: true */
|
||||
var item = items.filter(function() {
|
||||
return this === forcedItems[i];
|
||||
});
|
||||
|
||||
if( item.length ) {
|
||||
_lazyLoadItems(false, item);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// load initial items
|
||||
_lazyLoadItems();
|
||||
|
||||
// bind lazy load functions to scroll and resize event
|
||||
// noinspection JSUnresolvedVariable
|
||||
$(config.appendScroll).on("scroll." + namespace + " resize." + namespace, events.e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* prepare items before handle them
|
||||
* @access private
|
||||
* @param {Array|object|jQuery} items
|
||||
* @return {Array|object|jQuery}
|
||||
*/
|
||||
function _prepareItems(items) {
|
||||
// fetch used configurations before loops
|
||||
var defaultImage = config.defaultImage,
|
||||
placeholder = config.placeholder,
|
||||
imageBase = config.imageBase,
|
||||
srcsetAttribute = config.srcsetAttribute,
|
||||
loaderAttribute = config.loaderAttribute,
|
||||
forcedTags = config._f || {};
|
||||
|
||||
// filter items and only add those who not handled yet and got needed attributes available
|
||||
items = $(items).filter(function() {
|
||||
var element = $(this),
|
||||
tag = _getElementTagName(this);
|
||||
|
||||
return !element.data(config.handledName) &&
|
||||
(element.attr(config.attribute) || element.attr(srcsetAttribute) || element.attr(loaderAttribute) || forcedTags[tag] !== undefined);
|
||||
})
|
||||
|
||||
// append plugin instance to all elements
|
||||
.data("plugin_" + config.name, instance);
|
||||
|
||||
for( var i = 0, l = items.length; i < l; i++ ) {
|
||||
var element = $(items[i]),
|
||||
tag = _getElementTagName(items[i]),
|
||||
elementImageBase = element.attr(config.imageBaseAttribute) || imageBase;
|
||||
|
||||
// generate and update source set if an image base is set
|
||||
if( tag === _img && elementImageBase && element.attr(srcsetAttribute) ) {
|
||||
element.attr(srcsetAttribute, _getCorrectedSrcSet(element.attr(srcsetAttribute), elementImageBase));
|
||||
}
|
||||
|
||||
// add loader to forced element types
|
||||
if( forcedTags[tag] !== undefined && !element.attr(loaderAttribute) ) {
|
||||
element.attr(loaderAttribute, forcedTags[tag]);
|
||||
}
|
||||
|
||||
// set default image on every element without source
|
||||
if( tag === _img && defaultImage && !element.attr(_src) ) {
|
||||
element.attr(_src, defaultImage);
|
||||
}
|
||||
|
||||
// set placeholder on every element without background image
|
||||
else if( tag !== _img && placeholder && (!element.css(_backgroundImage) || element.css(_backgroundImage) === "none") ) {
|
||||
element.css(_backgroundImage, "url('" + placeholder + "')");
|
||||
}
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* the 'lazy magic' - check all items
|
||||
* @access private
|
||||
* @param {boolean} [allItems]
|
||||
* @param {object} [forced]
|
||||
* @return void
|
||||
*/
|
||||
function _lazyLoadItems(allItems, forced) {
|
||||
// skip if no items where left
|
||||
if( !items.length ) {
|
||||
// destroy instance if option is enabled
|
||||
if( config.autoDestroy ) {
|
||||
// noinspection JSUnresolvedFunction
|
||||
instance.destroy();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var elements = forced || items,
|
||||
loadTriggered = false,
|
||||
imageBase = config.imageBase || "",
|
||||
srcsetAttribute = config.srcsetAttribute,
|
||||
handledName = config.handledName;
|
||||
|
||||
// loop all available items
|
||||
for( var i = 0; i < elements.length; i++ ) {
|
||||
// item is at least in loadable area
|
||||
if( allItems || forced || _isInLoadableArea(elements[i]) ) {
|
||||
var element = $(elements[i]),
|
||||
tag = _getElementTagName(elements[i]),
|
||||
attribute = element.attr(config.attribute),
|
||||
elementImageBase = element.attr(config.imageBaseAttribute) || imageBase,
|
||||
customLoader = element.attr(config.loaderAttribute);
|
||||
|
||||
// is not already handled
|
||||
if( !element.data(handledName) &&
|
||||
// and is visible or visibility doesn't matter
|
||||
(!config.visibleOnly || element.is(":visible")) && (
|
||||
// and image source or source set attribute is available
|
||||
(attribute || element.attr(srcsetAttribute)) && (
|
||||
// and is image tag where attribute is not equal source or source set
|
||||
(tag === _img && (elementImageBase + attribute !== element.attr(_src) || element.attr(srcsetAttribute) !== element.attr(_srcset))) ||
|
||||
// or is non image tag where attribute is not equal background
|
||||
(tag !== _img && elementImageBase + attribute !== element.css(_backgroundImage))
|
||||
) ||
|
||||
// or custom loader is available
|
||||
customLoader ))
|
||||
{
|
||||
// mark element always as handled as this point to prevent double handling
|
||||
loadTriggered = true;
|
||||
element.data(handledName, true);
|
||||
|
||||
// load item
|
||||
_handleItem(element, tag, elementImageBase, customLoader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// when something was loaded remove them from remaining items
|
||||
if( loadTriggered ) {
|
||||
items = $(items).filter(function() {
|
||||
return !$(this).data(handledName);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* load the given element the lazy way
|
||||
* @access private
|
||||
* @param {object} element
|
||||
* @param {string} tag
|
||||
* @param {string} imageBase
|
||||
* @param {function} [customLoader]
|
||||
* @return void
|
||||
*/
|
||||
function _handleItem(element, tag, imageBase, customLoader) {
|
||||
// increment count of items waiting for after load
|
||||
++_awaitingAfterLoad;
|
||||
|
||||
// extended error callback for correct 'onFinishedAll' handling
|
||||
var errorCallback = function() {
|
||||
_triggerCallback("onError", element);
|
||||
_reduceAwaiting();
|
||||
|
||||
// prevent further callback calls
|
||||
errorCallback = $.noop;
|
||||
};
|
||||
|
||||
// trigger function before loading image
|
||||
_triggerCallback("beforeLoad", element);
|
||||
|
||||
// fetch all double used data here for better code minimization
|
||||
var srcAttribute = config.attribute,
|
||||
srcsetAttribute = config.srcsetAttribute,
|
||||
sizesAttribute = config.sizesAttribute,
|
||||
retinaAttribute = config.retinaAttribute,
|
||||
removeAttribute = config.removeAttribute,
|
||||
loadedName = config.loadedName,
|
||||
elementRetina = element.attr(retinaAttribute);
|
||||
|
||||
// handle custom loader
|
||||
if( customLoader ) {
|
||||
// on load callback
|
||||
var loadCallback = function() {
|
||||
// remove attribute from element
|
||||
if( removeAttribute ) {
|
||||
element.removeAttr(config.loaderAttribute);
|
||||
}
|
||||
|
||||
// mark element as loaded
|
||||
element.data(loadedName, true);
|
||||
|
||||
// call after load event
|
||||
_triggerCallback(_afterLoad, element);
|
||||
|
||||
// remove item from waiting queue and possibly trigger finished event
|
||||
// it's needed to be asynchronous to run after filter was in _lazyLoadItems
|
||||
setTimeout(_reduceAwaiting, 1);
|
||||
|
||||
// prevent further callback calls
|
||||
loadCallback = $.noop;
|
||||
};
|
||||
|
||||
// bind error event to trigger callback and reduce waiting amount
|
||||
element.off(_error).one(_error, errorCallback)
|
||||
|
||||
// bind after load callback to element
|
||||
.one(_load, loadCallback);
|
||||
|
||||
// trigger custom loader and handle response
|
||||
if( !_triggerCallback(customLoader, element, function(response) {
|
||||
if( response ) {
|
||||
element.off(_load);
|
||||
loadCallback();
|
||||
}
|
||||
else {
|
||||
element.off(_error);
|
||||
errorCallback();
|
||||
}
|
||||
})) element.trigger(_error);
|
||||
}
|
||||
|
||||
// handle images
|
||||
else {
|
||||
// create image object
|
||||
var imageObj = $(new Image());
|
||||
|
||||
// bind error event to trigger callback and reduce waiting amount
|
||||
imageObj.one(_error, errorCallback)
|
||||
|
||||
// bind after load callback to image
|
||||
.one(_load, function() {
|
||||
// remove element from view
|
||||
element.hide();
|
||||
|
||||
// set image back to element
|
||||
// do it as single 'attr' calls, to be sure 'src' is set after 'srcset'
|
||||
if( tag === _img ) {
|
||||
element.attr(_sizes, imageObj.attr(_sizes))
|
||||
.attr(_srcset, imageObj.attr(_srcset))
|
||||
.attr(_src, imageObj.attr(_src));
|
||||
}
|
||||
else {
|
||||
element.css(_backgroundImage, "url('" + imageObj.attr(_src) + "')");
|
||||
}
|
||||
|
||||
// bring it back with some effect!
|
||||
element[config.effect](config.effectTime);
|
||||
|
||||
// remove attribute from element
|
||||
if( removeAttribute ) {
|
||||
element.removeAttr(srcAttribute + " " + srcsetAttribute + " " + retinaAttribute + " " + config.imageBaseAttribute);
|
||||
|
||||
// only remove 'sizes' attribute, if it was a custom one
|
||||
if( sizesAttribute !== _sizes ) {
|
||||
element.removeAttr(sizesAttribute);
|
||||
}
|
||||
}
|
||||
|
||||
// mark element as loaded
|
||||
element.data(loadedName, true);
|
||||
|
||||
// call after load event
|
||||
_triggerCallback(_afterLoad, element);
|
||||
|
||||
// cleanup image object
|
||||
imageObj.remove();
|
||||
|
||||
// remove item from waiting queue and possibly trigger finished event
|
||||
_reduceAwaiting();
|
||||
});
|
||||
|
||||
// set sources
|
||||
// do it as single 'attr' calls, to be sure 'src' is set after 'srcset'
|
||||
var imageSrc = (_isRetinaDisplay && elementRetina ? elementRetina : element.attr(srcAttribute)) || "";
|
||||
imageObj.attr(_sizes, element.attr(sizesAttribute))
|
||||
.attr(_srcset, element.attr(srcsetAttribute))
|
||||
.attr(_src, imageSrc ? imageBase + imageSrc : null);
|
||||
|
||||
// call after load even on cached image
|
||||
imageObj.complete && imageObj.trigger(_load); // jshint ignore : line
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* check if the given element is inside the current viewport or threshold
|
||||
* @access private
|
||||
* @param {object} element
|
||||
* @return {boolean}
|
||||
*/
|
||||
function _isInLoadableArea(element) {
|
||||
var elementBound = element.getBoundingClientRect(),
|
||||
direction = config.scrollDirection,
|
||||
threshold = config.threshold,
|
||||
vertical = // check if element is in loadable area from top
|
||||
((_getActualHeight() + threshold) > elementBound.top) &&
|
||||
// check if element is even in loadable are from bottom
|
||||
(-threshold < elementBound.bottom),
|
||||
horizontal = // check if element is in loadable area from left
|
||||
((_getActualWidth() + threshold) > elementBound.left) &&
|
||||
// check if element is even in loadable area from right
|
||||
(-threshold < elementBound.right);
|
||||
|
||||
if( direction === "vertical" ) {
|
||||
return vertical;
|
||||
}
|
||||
else if( direction === "horizontal" ) {
|
||||
return horizontal;
|
||||
}
|
||||
|
||||
return vertical && horizontal;
|
||||
}
|
||||
|
||||
/**
|
||||
* receive the current viewed width of the browser
|
||||
* @access private
|
||||
* @return {number}
|
||||
*/
|
||||
function _getActualWidth() {
|
||||
return _actualWidth >= 0 ? _actualWidth : (_actualWidth = $(window).width());
|
||||
}
|
||||
|
||||
/**
|
||||
* receive the current viewed height of the browser
|
||||
* @access private
|
||||
* @return {number}
|
||||
*/
|
||||
function _getActualHeight() {
|
||||
return _actualHeight >= 0 ? _actualHeight : (_actualHeight = $(window).height());
|
||||
}
|
||||
|
||||
/**
|
||||
* get lowercase tag name of an element
|
||||
* @access private
|
||||
* @param {object} element
|
||||
* @returns {string}
|
||||
*/
|
||||
function _getElementTagName(element) {
|
||||
return element.tagName.toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* prepend image base to all srcset entries
|
||||
* @access private
|
||||
* @param {string} srcset
|
||||
* @param {string} imageBase
|
||||
* @returns {string}
|
||||
*/
|
||||
function _getCorrectedSrcSet(srcset, imageBase) {
|
||||
if( imageBase ) {
|
||||
// trim, remove unnecessary spaces and split entries
|
||||
var entries = srcset.split(",");
|
||||
srcset = "";
|
||||
|
||||
for( var i = 0, l = entries.length; i < l; i++ ) {
|
||||
srcset += imageBase + entries[i].trim() + (i !== l - 1 ? "," : "");
|
||||
}
|
||||
}
|
||||
|
||||
return srcset;
|
||||
}
|
||||
|
||||
/**
|
||||
* helper function to throttle down event triggering
|
||||
* @access private
|
||||
* @param {number} delay
|
||||
* @param {function} callback
|
||||
* @return {function}
|
||||
*/
|
||||
function _throttle(delay, callback) {
|
||||
var timeout,
|
||||
lastExecute = 0;
|
||||
|
||||
return function(event, ignoreThrottle) {
|
||||
var elapsed = +new Date() - lastExecute;
|
||||
|
||||
function run() {
|
||||
lastExecute = +new Date();
|
||||
// noinspection JSUnresolvedFunction
|
||||
callback.call(instance, event);
|
||||
}
|
||||
|
||||
timeout && clearTimeout(timeout); // jshint ignore : line
|
||||
|
||||
if( elapsed > delay || !config.enableThrottle || ignoreThrottle ) {
|
||||
run();
|
||||
}
|
||||
else {
|
||||
timeout = setTimeout(run, delay - elapsed);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* reduce count of awaiting elements to 'afterLoad' event and fire 'onFinishedAll' if reached zero
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
function _reduceAwaiting() {
|
||||
--_awaitingAfterLoad;
|
||||
|
||||
// if no items were left trigger finished event
|
||||
if( !items.length && !_awaitingAfterLoad ) {
|
||||
_triggerCallback("onFinishedAll");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* single implementation to handle callbacks, pass element and set 'this' to current instance
|
||||
* @access private
|
||||
* @param {string|function} callback
|
||||
* @param {object} [element]
|
||||
* @param {*} [args]
|
||||
* @return {boolean}
|
||||
*/
|
||||
function _triggerCallback(callback, element, args) {
|
||||
if( (callback = config[callback]) ) {
|
||||
// jQuery's internal '$(arguments).slice(1)' are causing problems at least on old iPads
|
||||
// below is shorthand of 'Array.prototype.slice.call(arguments, 1)'
|
||||
callback.apply(instance, [].slice.call(arguments, 1));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// if event driven or window is already loaded don't wait for page loading
|
||||
if( config.bind === "event" || windowLoaded ) {
|
||||
_initialize();
|
||||
}
|
||||
|
||||
// otherwise load initial items and start lazy after page load
|
||||
else {
|
||||
// noinspection JSUnresolvedVariable
|
||||
$(window).on(_load + "." + namespace, _initialize);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* lazy plugin class constructor
|
||||
* @constructor
|
||||
* @access private
|
||||
* @param {object} elements
|
||||
* @param {object} settings
|
||||
* @return {object|LazyPlugin}
|
||||
*/
|
||||
function LazyPlugin(elements, settings) {
|
||||
/**
|
||||
* this lazy plugin instance
|
||||
* @access private
|
||||
* @type {object|LazyPlugin|LazyPlugin.prototype}
|
||||
*/
|
||||
var _instance = this,
|
||||
|
||||
/**
|
||||
* this lazy plugin instance configuration
|
||||
* @access private
|
||||
* @type {object}
|
||||
*/
|
||||
_config = $.extend({}, _instance.config, settings),
|
||||
|
||||
/**
|
||||
* instance generated event executed on container scroll or resize
|
||||
* packed in an object to be referenceable and short named because properties will not be minified
|
||||
* @access private
|
||||
* @type {object}
|
||||
*/
|
||||
_events = {},
|
||||
|
||||
/**
|
||||
* unique namespace for instance related events
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_namespace = _config.name + "-" + (++lazyInstanceId);
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* wrapper to get or set an entry from plugin instance configuration
|
||||
* much smaller on minify as direct access
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @param {string} entryName
|
||||
* @param {*} [value]
|
||||
* @return {LazyPlugin|*}
|
||||
*/
|
||||
_instance.config = function(entryName, value) {
|
||||
if( value === undefined ) {
|
||||
return _config[entryName];
|
||||
}
|
||||
|
||||
_config[entryName] = value;
|
||||
return _instance;
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* add additional items to current instance
|
||||
* @access public
|
||||
* @param {Array|object|string} items
|
||||
* @return {LazyPlugin}
|
||||
*/
|
||||
_instance.addItems = function(items) {
|
||||
_events.a && _events.a($.type(items) === "string" ? $(items) : items); // jshint ignore : line
|
||||
return _instance;
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* get all left items of this instance
|
||||
* @access public
|
||||
* @returns {object}
|
||||
*/
|
||||
_instance.getItems = function() {
|
||||
return _events.g ? _events.g() : {};
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* force lazy to load all items in loadable area right now
|
||||
* by default without throttle
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @param {boolean} [useThrottle]
|
||||
* @return {LazyPlugin}
|
||||
*/
|
||||
_instance.update = function(useThrottle) {
|
||||
_events.e && _events.e({}, !useThrottle); // jshint ignore : line
|
||||
return _instance;
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* force element(s) to load directly, ignoring the viewport
|
||||
* @access public
|
||||
* @param {Array|object|string} items
|
||||
* @return {LazyPlugin}
|
||||
*/
|
||||
_instance.force = function(items) {
|
||||
_events.f && _events.f($.type(items) === "string" ? $(items) : items); // jshint ignore : line
|
||||
return _instance;
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* force lazy to load all available items right now
|
||||
* this call ignores throttling
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @return {LazyPlugin}
|
||||
*/
|
||||
_instance.loadAll = function() {
|
||||
_events.e && _events.e({all: true}, true); // jshint ignore : line
|
||||
return _instance;
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* destroy this plugin instance
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @return undefined
|
||||
*/
|
||||
_instance.destroy = function() {
|
||||
// unbind instance generated events
|
||||
// noinspection JSUnresolvedFunction, JSUnresolvedVariable
|
||||
$(_config.appendScroll).off("." + _namespace, _events.e);
|
||||
// noinspection JSUnresolvedVariable
|
||||
$(window).off("." + _namespace);
|
||||
|
||||
// clear events
|
||||
_events = {};
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
// start using lazy and return all elements to be chainable or instance for further use
|
||||
// noinspection JSUnresolvedVariable
|
||||
_executeLazy(_instance, _config, elements, _events, _namespace);
|
||||
return _config.chainable ? elements : _instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* settings and configuration data
|
||||
* @access public
|
||||
* @type {object}
|
||||
*/
|
||||
LazyPlugin.prototype.config = {
|
||||
// general
|
||||
name : "lazy",
|
||||
chainable : true,
|
||||
autoDestroy : true,
|
||||
bind : "load",
|
||||
threshold : 500,
|
||||
visibleOnly : false,
|
||||
appendScroll : window,
|
||||
scrollDirection : "both",
|
||||
imageBase : null,
|
||||
defaultImage : "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",
|
||||
placeholder : null,
|
||||
delay : -1,
|
||||
combined : false,
|
||||
|
||||
// attributes
|
||||
attribute : "data-src",
|
||||
srcsetAttribute : "data-srcset",
|
||||
sizesAttribute : "data-sizes",
|
||||
retinaAttribute : "data-retina",
|
||||
loaderAttribute : "data-loader",
|
||||
imageBaseAttribute : "data-imagebase",
|
||||
removeAttribute : true,
|
||||
handledName : "handled",
|
||||
loadedName : "loaded",
|
||||
|
||||
// effect
|
||||
effect : "show",
|
||||
effectTime : 0,
|
||||
|
||||
// throttle
|
||||
enableThrottle : true,
|
||||
throttle : 250,
|
||||
|
||||
// callbacks
|
||||
beforeLoad : undefined,
|
||||
afterLoad : undefined,
|
||||
onError : undefined,
|
||||
onFinishedAll : undefined
|
||||
};
|
||||
|
||||
// register window load event globally to prevent not loading elements
|
||||
// since jQuery 3.X ready state is fully async and may be executed after 'load'
|
||||
$(window).on("load", function() {
|
||||
windowLoaded = true;
|
||||
});
|
||||
})(window);
|
2
view/js/jquery.lazy/jquery.lazy.min.js
vendored
2
view/js/jquery.lazy/jquery.lazy.min.js
vendored
|
@ -1,2 +0,0 @@
|
|||
/*! jQuery & Zepto Lazy v1.7.7 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2017 Daniel 'Eisbehr' Kern */
|
||||
!function(t,e){"use strict";function r(r,a,i,u,l){function f(){L=t.devicePixelRatio>1,i=c(i),a.delay>=0&&setTimeout(function(){s(!0)},a.delay),(a.delay<0||a.combined)&&(u.e=v(a.throttle,function(t){"resize"===t.type&&(w=B=-1),s(t.all)}),u.a=function(t){t=c(t),i.push.apply(i,t)},u.g=function(){return i=n(i).filter(function(){return!n(this).data(a.loadedName)})},u.f=function(t){for(var e=0;e<t.length;e++){var r=i.filter(function(){return this===t[e]});r.length&&s(!1,r)}},s(),n(a.appendScroll).on("scroll."+l+" resize."+l,u.e))}function c(t){var i=a.defaultImage,o=a.placeholder,u=a.imageBase,l=a.srcsetAttribute,f=a.loaderAttribute,c=a._f||{};t=n(t).filter(function(){var t=n(this),r=m(this);return!t.data(a.handledName)&&(t.attr(a.attribute)||t.attr(l)||t.attr(f)||c[r]!==e)}).data("plugin_"+a.name,r);for(var s=0,d=t.length;s<d;s++){var A=n(t[s]),g=m(t[s]),h=A.attr(a.imageBaseAttribute)||u;g===N&&h&&A.attr(l)&&A.attr(l,b(A.attr(l),h)),c[g]===e||A.attr(f)||A.attr(f,c[g]),g===N&&i&&!A.attr(E)?A.attr(E,i):g===N||!o||A.css(O)&&"none"!==A.css(O)||A.css(O,"url('"+o+"')")}return t}function s(t,e){if(!i.length)return void(a.autoDestroy&&r.destroy());for(var o=e||i,u=!1,l=a.imageBase||"",f=a.srcsetAttribute,c=a.handledName,s=0;s<o.length;s++)if(t||e||A(o[s])){var g=n(o[s]),h=m(o[s]),b=g.attr(a.attribute),v=g.attr(a.imageBaseAttribute)||l,p=g.attr(a.loaderAttribute);g.data(c)||a.visibleOnly&&!g.is(":visible")||!((b||g.attr(f))&&(h===N&&(v+b!==g.attr(E)||g.attr(f)!==g.attr(F))||h!==N&&v+b!==g.css(O))||p)||(u=!0,g.data(c,!0),d(g,h,v,p))}u&&(i=n(i).filter(function(){return!n(this).data(c)}))}function d(t,e,r,i){++z;var o=function(){y("onError",t),p(),o=n.noop};y("beforeLoad",t);var u=a.attribute,l=a.srcsetAttribute,f=a.sizesAttribute,c=a.retinaAttribute,s=a.removeAttribute,d=a.loadedName,A=t.attr(c);if(i){var g=function(){s&&t.removeAttr(a.loaderAttribute),t.data(d,!0),y(T,t),setTimeout(p,1),g=n.noop};t.off(I).one(I,o).one(D,g),y(i,t,function(e){e?(t.off(D),g()):(t.off(I),o())})||t.trigger(I)}else{var h=n(new Image);h.one(I,o).one(D,function(){t.hide(),e===N?t.attr(C,h.attr(C)).attr(F,h.attr(F)).attr(E,h.attr(E)):t.css(O,"url('"+h.attr(E)+"')"),t[a.effect](a.effectTime),s&&(t.removeAttr(u+" "+l+" "+c+" "+a.imageBaseAttribute),f!==C&&t.removeAttr(f)),t.data(d,!0),y(T,t),h.remove(),p()});var m=(L&&A?A:t.attr(u))||"";h.attr(C,t.attr(f)).attr(F,t.attr(l)).attr(E,m?r+m:null),h.complete&&h.trigger(D)}}function A(t){var e=t.getBoundingClientRect(),r=a.scrollDirection,n=a.threshold,i=h()+n>e.top&&-n<e.bottom,o=g()+n>e.left&&-n<e.right;return"vertical"===r?i:"horizontal"===r?o:i&&o}function g(){return w>=0?w:w=n(t).width()}function h(){return B>=0?B:B=n(t).height()}function m(t){return t.tagName.toLowerCase()}function b(t,e){if(e){var r=t.split(",");t="";for(var a=0,n=r.length;a<n;a++)t+=e+r[a].trim()+(a!==n-1?",":"")}return t}function v(t,e){var n,i=0;return function(o,u){function l(){i=+new Date,e.call(r,o)}var f=+new Date-i;n&&clearTimeout(n),f>t||!a.enableThrottle||u?l():n=setTimeout(l,t-f)}}function p(){--z,i.length||z||y("onFinishedAll")}function y(t,e,n){return!!(t=a[t])&&(t.apply(r,[].slice.call(arguments,1)),!0)}var z=0,w=-1,B=-1,L=!1,T="afterLoad",D="load",I="error",N="img",E="src",F="srcset",C="sizes",O="background-image";"event"===a.bind||o?f():n(t).on(D+"."+l,f)}function a(a,o){var u=this,l=n.extend({},u.config,o),f={},c=l.name+"-"+ ++i;return u.config=function(t,r){return r===e?l[t]:(l[t]=r,u)},u.addItems=function(t){return f.a&&f.a("string"===n.type(t)?n(t):t),u},u.getItems=function(){return f.g?f.g():{}},u.update=function(t){return f.e&&f.e({},!t),u},u.force=function(t){return f.f&&f.f("string"===n.type(t)?n(t):t),u},u.loadAll=function(){return f.e&&f.e({all:!0},!0),u},u.destroy=function(){return n(l.appendScroll).off("."+c,f.e),n(t).off("."+c),f={},e},r(u,l,a,f,c),l.chainable?a:u}var n=t.jQuery||t.Zepto,i=0,o=!1;n.fn.Lazy=n.fn.lazy=function(t){return new a(this,t)},n.Lazy=n.lazy=function(t,r,i){if(n.isFunction(r)&&(i=r,r=[]),n.isFunction(i)){t=n.isArray(t)?t:[t],r=n.isArray(r)?r:[r];for(var o=a.prototype.config,u=o._f||(o._f={}),l=0,f=t.length;l<f;l++)(o[t[l]]===e||n.isFunction(o[t[l]]))&&(o[t[l]]=i);for(var c=0,s=r.length;c<s;c++)u[r[c]]=t[0]}},a.prototype.config={name:"lazy",chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:t,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:e,afterLoad:e,onError:e,onFinishedAll:e},n(t).on("load",function(){o=!0})}(window);
|
|
@ -1,580 +0,0 @@
|
|||
/*!
|
||||
* jQuery & Zepto Lazy - AJAX Plugin - v1.2
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load data by ajax request and pass them to elements inner html, like:
|
||||
// <div data-loader="ajax" data-src"url.html" data-method="post" data-type="html"></div>
|
||||
$.lazy("ajax", function(element, response) {
|
||||
ajaxRequest(this, element, response, element.attr("data-method"));
|
||||
});
|
||||
|
||||
// load data by ajax get request and pass them to elements inner html, like:
|
||||
// <div data-loader="get" data-src"url.html" data-type="html"></div>
|
||||
$.lazy("get", function(element, response) {
|
||||
ajaxRequest(this, element, response, "get");
|
||||
});
|
||||
|
||||
// load data by ajax post request and pass them to elements inner html, like:
|
||||
// <div data-loader="post" data-src"url.html" data-type="html"></div>
|
||||
$.lazy("post", function(element, response) {
|
||||
ajaxRequest(this, element, response, "post");
|
||||
});
|
||||
|
||||
/**
|
||||
* execute ajax request and handle response
|
||||
* @param {object} instance
|
||||
* @param {jQuery|object} element
|
||||
* @param {function} response
|
||||
* @param {string} [method]
|
||||
*/
|
||||
function ajaxRequest(instance, element, response, method) {
|
||||
$.ajax({
|
||||
url: element.attr("data-src"),
|
||||
type: method || "get",
|
||||
dataType: element.attr("data-type") || "html",
|
||||
|
||||
/**
|
||||
* success callback
|
||||
* @access private
|
||||
* @param {*} content
|
||||
* @return {void}
|
||||
*/
|
||||
success: function(content) {
|
||||
// set responded data to element's inner html
|
||||
element.html(content);
|
||||
|
||||
// use response function for Zepto
|
||||
response(true);
|
||||
|
||||
// remove attributes
|
||||
if( instance.config("removeAttribute") )
|
||||
element.removeAttr("data-src data-method data-type");
|
||||
},
|
||||
|
||||
/**
|
||||
* error callback
|
||||
* @access private
|
||||
* @return {void}
|
||||
*/
|
||||
error: function() {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - AV Plugin - v1.4
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// loads audio and video tags including tracks by two ways, like:
|
||||
// <audio>
|
||||
// <data-src src="audio.ogg" type="video/ogg"></data-src>
|
||||
// <data-src src="audio.mp3" type="video/mp3"></data-src>
|
||||
// </audio>
|
||||
// <video data-poster="poster.jpg">
|
||||
// <data-src src="video.ogv" type="video/ogv"></data-src>
|
||||
// <data-src src="video.webm" type="video/webm"></data-src>
|
||||
// <data-src src="video.mp4" type="video/mp4"></data-src>
|
||||
// <data-track kind="captions" src="captions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="descriptions" src="descriptions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="subtitles" src="subtitles.vtt" srclang="de"></data-track>
|
||||
// </video>
|
||||
//
|
||||
// or:
|
||||
// <audio data-src="audio.ogg|video/ogg,video.mp3|video/mp3"></video>
|
||||
// <video data-poster="poster.jpg" data-src="video.ogv|video/ogv,video.webm|video/webm,video.mp4|video/mp4">
|
||||
// <data-track kind="captions" src="captions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="descriptions" src="descriptions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="subtitles" src="subtitles.vtt" srclang="de"></data-track>
|
||||
// </video>
|
||||
$.lazy(["av", "audio", "video"], ["audio", "video"], function(element, response) {
|
||||
var elementTagName = element[0].tagName.toLowerCase();
|
||||
|
||||
if( elementTagName === "audio" || elementTagName === "video" ) {
|
||||
var srcAttr = "data-src",
|
||||
sources = element.find(srcAttr),
|
||||
tracks = element.find("data-track"),
|
||||
sourcesInError = 0,
|
||||
|
||||
// create on error callback for sources
|
||||
onError = function() {
|
||||
if( ++sourcesInError === sources.length )
|
||||
response(false);
|
||||
},
|
||||
|
||||
// create callback to handle a source or track entry
|
||||
handleSource = function() {
|
||||
var source = $(this),
|
||||
type = source[0].tagName.toLowerCase(),
|
||||
attributes = source.prop("attributes"),
|
||||
target = $(type === srcAttr ? "<source>" : "<track>");
|
||||
|
||||
if( type === srcAttr )
|
||||
target.one("error", onError);
|
||||
|
||||
$.each(attributes, function(index, attribute) {
|
||||
target.attr(attribute.name, attribute.value);
|
||||
});
|
||||
|
||||
source.replaceWith(target);
|
||||
};
|
||||
|
||||
// create event for successfull load
|
||||
element.one("loadedmetadata", function() {
|
||||
response(true);
|
||||
})
|
||||
|
||||
// remove default callbacks to ignore loading poster image
|
||||
.off("load error")
|
||||
|
||||
// load poster image
|
||||
.attr("poster", element.attr("data-poster"));
|
||||
|
||||
// load by child tags
|
||||
if( sources.length )
|
||||
sources.each(handleSource);
|
||||
|
||||
// load by attribute
|
||||
else if( element.attr(srcAttr) ) {
|
||||
// split for every entry by comma
|
||||
$.each(element.attr(srcAttr).split(","), function(index, value) {
|
||||
// split again for file and file type
|
||||
var parts = value.split("|");
|
||||
|
||||
// create a source entry
|
||||
element.append($("<source>")
|
||||
.one("error", onError)
|
||||
.attr({src: parts[0].trim(), type: parts[1].trim()}));
|
||||
});
|
||||
|
||||
// remove now obsolete attribute
|
||||
if( this.config("removeAttribute") )
|
||||
element.removeAttr(srcAttr);
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
|
||||
// load optional tracks
|
||||
if( tracks.length )
|
||||
tracks.each(handleSource);
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - iFrame Plugin - v1.5
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load iframe content, like:
|
||||
// <iframe data-src="iframe.html"></iframe>
|
||||
//
|
||||
// enable content error check with:
|
||||
// <iframe data-src="iframe.html" data-error-detect="true"></iframe>
|
||||
$.lazy(["frame", "iframe"], "iframe", function(element, response) {
|
||||
var instance = this;
|
||||
|
||||
if( element[0].tagName.toLowerCase() === "iframe" ) {
|
||||
var srcAttr = "data-src",
|
||||
errorDetectAttr = "data-error-detect",
|
||||
errorDetect = element.attr(errorDetectAttr);
|
||||
|
||||
// default way, just replace the 'src' attribute
|
||||
if( errorDetect !== "true" && errorDetect !== "1" ) {
|
||||
// set iframe source
|
||||
element.attr("src", element.attr(srcAttr));
|
||||
|
||||
// remove attributes
|
||||
if( instance.config("removeAttribute") )
|
||||
element.removeAttr(srcAttr + " " + errorDetectAttr);
|
||||
}
|
||||
|
||||
// extended way, even check if the document is available
|
||||
else {
|
||||
$.ajax({
|
||||
url: element.attr(srcAttr),
|
||||
dataType: "html",
|
||||
crossDomain: true,
|
||||
xhrFields: {withCredentials: true},
|
||||
|
||||
/**
|
||||
* success callback
|
||||
* @access private
|
||||
* @param {*} content
|
||||
* @return {void}
|
||||
*/
|
||||
success: function(content) {
|
||||
// set responded data to element's inner html
|
||||
element.html(content)
|
||||
|
||||
// change iframe src
|
||||
.attr("src", element.attr(srcAttr));
|
||||
|
||||
// remove attributes
|
||||
if( instance.config("removeAttribute") )
|
||||
element.removeAttr(srcAttr + " " + errorDetectAttr);
|
||||
},
|
||||
|
||||
/**
|
||||
* error callback
|
||||
* @access private
|
||||
* @return {void}
|
||||
*/
|
||||
error: function() {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - NOOP Plugin - v1.2
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// will do nothing, used to disable elements or for development
|
||||
// use like:
|
||||
// <div data-loader="noop"></div>
|
||||
|
||||
// does not do anything, just a 'no-operation' helper ;)
|
||||
$.lazy("noop", function() {});
|
||||
|
||||
// does nothing, but response a successfull loading
|
||||
$.lazy("noop-success", function(element, response) {
|
||||
// use response function for Zepto
|
||||
response(true);
|
||||
});
|
||||
|
||||
// does nothing, but response a failed loading
|
||||
$.lazy("noop-error", function(element, response) {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - Picture Plugin - v1.3
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
var srcAttr = "data-src",
|
||||
srcsetAttr = "data-srcset",
|
||||
mediaAttr = "data-media",
|
||||
sizesAttr = "data-sizes",
|
||||
typeAttr = "data-type";
|
||||
|
||||
// loads picture elements like:
|
||||
// <picture>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 400px)" type="image/jpeg"></data-src>
|
||||
// <data-img src="default.jpg" >
|
||||
// </picture>
|
||||
//
|
||||
// or:
|
||||
// <picture data-src="default.jpg">
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 400px)" type="image/jpeg"></data-src>
|
||||
// </picture>
|
||||
//
|
||||
// or just with attributes in one line:
|
||||
// <picture data-src="default.jpg" data-srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" data-media="(min-width: 600px)" data-sizes="" data-type="image/jpeg" />
|
||||
$.lazy(["pic", "picture"], ["picture"], function(element, response) {
|
||||
var elementTagName = element[0].tagName.toLowerCase();
|
||||
|
||||
if( elementTagName === "picture" ) {
|
||||
var sources = element.find(srcAttr),
|
||||
image = element.find("data-img"),
|
||||
imageBase = this.config("imageBase") || "";
|
||||
|
||||
// handle as child elements
|
||||
if( sources.length ) {
|
||||
sources.each(function() {
|
||||
renameElementTag($(this), "source", imageBase);
|
||||
});
|
||||
|
||||
// create img tag from child
|
||||
if( image.length === 1 ) {
|
||||
image = renameElementTag(image, "img", imageBase);
|
||||
|
||||
// bind event callbacks to new image tag
|
||||
image.on("load", function() {
|
||||
response(true);
|
||||
}).on("error", function() {
|
||||
response(false);
|
||||
});
|
||||
|
||||
image.attr("src", image.attr(srcAttr));
|
||||
|
||||
if( this.config("removeAttribute") ) {
|
||||
image.removeAttr(srcAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// create img tag from attribute
|
||||
else if( element.attr(srcAttr) ) {
|
||||
// create image tag
|
||||
createImageObject(element, imageBase + element.attr(srcAttr), response);
|
||||
|
||||
if( this.config("removeAttribute") )
|
||||
element.removeAttr(srcAttr);
|
||||
}
|
||||
|
||||
// pass error state
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
}
|
||||
|
||||
// handle as attributes
|
||||
else if( element.attr(srcsetAttr) ) {
|
||||
// create source elements before img tag
|
||||
$("<source>").attr({
|
||||
media: element.attr(mediaAttr),
|
||||
sizes: element.attr(sizesAttr),
|
||||
type: element.attr(typeAttr),
|
||||
srcset: getCorrectedSrcSet(element.attr(srcsetAttr), imageBase)
|
||||
})
|
||||
.appendTo(element);
|
||||
|
||||
// create image tag
|
||||
createImageObject(element, imageBase + element.attr(srcAttr), response);
|
||||
|
||||
// remove attributes from parent picture element
|
||||
if( this.config("removeAttribute") ) {
|
||||
element.removeAttr(srcAttr + " " + srcsetAttr + " " + mediaAttr + " " + sizesAttr + " " + typeAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// pass error state
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* create a new child element and copy attributes
|
||||
* @param {jQuery|object} element
|
||||
* @param {string} toType
|
||||
* @param {string} imageBase
|
||||
* @return {jQuery|object}
|
||||
*/
|
||||
function renameElementTag(element, toType, imageBase) {
|
||||
var attributes = element.prop("attributes"),
|
||||
target = $("<" + toType + ">");
|
||||
|
||||
$.each(attributes, function(index, attribute) {
|
||||
// build srcset with image base
|
||||
if( attribute.name === "srcset" || attribute.name === srcAttr ) {
|
||||
attribute.value = getCorrectedSrcSet(attribute.value, imageBase);
|
||||
}
|
||||
|
||||
target.attr(attribute.name, attribute.value);
|
||||
});
|
||||
|
||||
element.replaceWith(target);
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* create a new image element inside parent element
|
||||
* @param {jQuery|object} parent
|
||||
* @param {string} src
|
||||
* @param {function} response
|
||||
* @return void
|
||||
*/
|
||||
function createImageObject(parent, src, response) {
|
||||
// create image tag
|
||||
var imageObj = $("<img>")
|
||||
|
||||
// create image tag an bind callbacks for correct response
|
||||
.one("load", function() {
|
||||
response(true);
|
||||
})
|
||||
.one("error", function() {
|
||||
response(false);
|
||||
})
|
||||
|
||||
// set into picture element
|
||||
.appendTo(parent)
|
||||
|
||||
// set src attribute at last to prevent early kick-in
|
||||
.attr("src", src);
|
||||
|
||||
// call after load even on cached image
|
||||
imageObj.complete && imageObj.load(); // jshint ignore : line
|
||||
}
|
||||
|
||||
/**
|
||||
* prepend image base to all srcset entries
|
||||
* @param {string} srcset
|
||||
* @param {string} imageBase
|
||||
* @returns {string}
|
||||
*/
|
||||
function getCorrectedSrcSet(srcset, imageBase) {
|
||||
if( imageBase ) {
|
||||
// trim, remove unnecessary spaces and split entries
|
||||
var entries = srcset.split(",");
|
||||
srcset = "";
|
||||
|
||||
for( var i = 0, l = entries.length; i < l; i++ ) {
|
||||
srcset += imageBase + entries[i].trim() + (i !== l - 1 ? "," : "");
|
||||
}
|
||||
}
|
||||
|
||||
return srcset;
|
||||
}
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - Script Plugin - v1.2
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// loads javascript files for script tags, like:
|
||||
// <script data-src="file.js" type="text/javascript"></script>
|
||||
$.lazy(["js", "javascript", "script"], "script", function(element, response) {
|
||||
if( element[0].tagName.toLowerCase() == "script" ) {
|
||||
element.attr("src", element.attr("data-src"));
|
||||
|
||||
// remove attribute
|
||||
if( this.config("removeAttribute") )
|
||||
element.removeAttr("data-src");
|
||||
}
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - Vimeo Plugin - v1.1
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load vimeo video iframe, like:
|
||||
// <iframe data-loader="vimeo" data-src="176894130" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
$.lazy("vimeo", function(element, response) {
|
||||
if( element[0].tagName.toLowerCase() === "iframe" ) {
|
||||
// pass source to iframe
|
||||
element.attr("src", "https://player.vimeo.com/video/" + element.attr("data-src"));
|
||||
|
||||
// remove attribute
|
||||
if( this.config("removeAttribute") )
|
||||
element.removeAttr("data-src");
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - YouTube Plugin - v1.4
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load youtube video iframe, like:
|
||||
// <iframe data-loader="yt" data-src="1AYGnw6MwFM" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
$.lazy(["yt", "youtube"], function(element, response) {
|
||||
if( element[0].tagName.toLowerCase() === "iframe" ) {
|
||||
// pass source to iframe
|
||||
element.attr("src", "https://www.youtube.com/embed/" + element.attr("data-src") + "?rel=0&showinfo=0");
|
||||
|
||||
// remove attribute
|
||||
if( this.config("removeAttribute") )
|
||||
element.removeAttr("data-src");
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
|
@ -1,2 +0,0 @@
|
|||
/*! jQuery & Zepto Lazy - All Plugins v1.7.7 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2017 Daniel 'Eisbehr' Kern */
|
||||
!function(t){function a(a,e,r,o){t.ajax({url:e.attr("data-src"),type:o||"get",dataType:e.attr("data-type")||"html",success:function(t){e.html(t),r(!0),a.config("removeAttribute")&&e.removeAttr("data-src data-method data-type")},error:function(){r(!1)}})}t.lazy("ajax",function(t,e){a(this,t,e,t.attr("data-method"))}),t.lazy("get",function(t,e){a(this,t,e,"get")}),t.lazy("post",function(t,e){a(this,t,e,"post")})}(window.jQuery||window.Zepto),function(t){t.lazy(["av","audio","video"],["audio","video"],function(a,e){var r=a[0].tagName.toLowerCase();if("audio"===r||"video"===r){var o=a.find("data-src"),i=a.find("data-track"),n=0,c=function(){++n===o.length&&e(!1)},s=function(){var a=t(this),e=a[0].tagName.toLowerCase(),r=a.prop("attributes"),o=t("data-src"===e?"<source>":"<track>");"data-src"===e&&o.one("error",c),t.each(r,function(t,a){o.attr(a.name,a.value)}),a.replaceWith(o)};a.one("loadedmetadata",function(){e(!0)}).off("load error").attr("poster",a.attr("data-poster")),o.length?o.each(s):a.attr("data-src")?(t.each(a.attr("data-src").split(","),function(e,r){var o=r.split("|");a.append(t("<source>").one("error",c).attr({src:o[0].trim(),type:o[1].trim()}))}),this.config("removeAttribute")&&a.removeAttr("data-src")):e(!1),i.length&&i.each(s)}else e(!1)})}(window.jQuery||window.Zepto),function(t){t.lazy(["frame","iframe"],"iframe",function(a,e){var r=this;if("iframe"===a[0].tagName.toLowerCase()){var o=a.attr("data-error-detect");"true"!==o&&"1"!==o?(a.attr("src",a.attr("data-src")),r.config("removeAttribute")&&a.removeAttr("data-src data-error-detect")):t.ajax({url:a.attr("data-src"),dataType:"html",crossDomain:!0,xhrFields:{withCredentials:!0},success:function(t){a.html(t).attr("src",a.attr("data-src")),r.config("removeAttribute")&&a.removeAttr("data-src data-error-detect")},error:function(){e(!1)}})}else e(!1)})}(window.jQuery||window.Zepto),function(t){t.lazy("noop",function(){}),t.lazy("noop-success",function(t,a){a(!0)}),t.lazy("noop-error",function(t,a){a(!1)})}(window.jQuery||window.Zepto),function(t){function a(a,e,i){var n=a.prop("attributes"),c=t("<"+e+">");return t.each(n,function(t,a){"srcset"!==a.name&&a.name!==o||(a.value=r(a.value,i)),c.attr(a.name,a.value)}),a.replaceWith(c),c}function e(a,e,r){var o=t("<img>").one("load",function(){r(!0)}).one("error",function(){r(!1)}).appendTo(a).attr("src",e);o.complete&&o.load()}function r(t,a){if(a){var e=t.split(",");t="";for(var r=0,o=e.length;r<o;r++)t+=a+e[r].trim()+(r!==o-1?",":"")}return t}var o="data-src";t.lazy(["pic","picture"],["picture"],function(i,n){if("picture"===i[0].tagName.toLowerCase()){var c=i.find(o),s=i.find("data-img"),d=this.config("imageBase")||"";c.length?(c.each(function(){a(t(this),"source",d)}),1===s.length?(s=a(s,"img",d),s.on("load",function(){n(!0)}).on("error",function(){n(!1)}),s.attr("src",s.attr(o)),this.config("removeAttribute")&&s.removeAttr(o)):i.attr(o)?(e(i,d+i.attr(o),n),this.config("removeAttribute")&&i.removeAttr(o)):n(!1)):i.attr("data-srcset")?(t("<source>").attr({media:i.attr("data-media"),sizes:i.attr("data-sizes"),type:i.attr("data-type"),srcset:r(i.attr("data-srcset"),d)}).appendTo(i),e(i,d+i.attr(o),n),this.config("removeAttribute")&&i.removeAttr(o+" data-srcset data-media data-sizes data-type")):n(!1)}else n(!1)})}(window.jQuery||window.Zepto),function(t){t.lazy(["js","javascript","script"],"script",function(t,a){"script"==t[0].tagName.toLowerCase()?(t.attr("src",t.attr("data-src")),this.config("removeAttribute")&&t.removeAttr("data-src")):a(!1)})}(window.jQuery||window.Zepto),function(t){t.lazy("vimeo",function(t,a){"iframe"===t[0].tagName.toLowerCase()?(t.attr("src","https://player.vimeo.com/video/"+t.attr("data-src")),this.config("removeAttribute")&&t.removeAttr("data-src")):a(!1)})}(window.jQuery||window.Zepto),function(t){t.lazy(["yt","youtube"],function(t,a){"iframe"===t[0].tagName.toLowerCase()?(t.attr("src","https://www.youtube.com/embed/"+t.attr("data-src")+"?rel=0&showinfo=0"),this.config("removeAttribute")&&t.removeAttr("data-src")):a(!1)})}(window.jQuery||window.Zepto);
|
|
@ -1,68 +0,0 @@
|
|||
{
|
||||
"name": "jquery-lazy",
|
||||
"title": "jQuery & Zepto Lazy - Delayed Content, Image and Background Loader",
|
||||
"version": "1.7.7",
|
||||
"description": "Lazy is a fast, feature-rich and lightweight delayed content loading plugin for jQuery and Zepto. It's designed to speed up page loading times and decrease traffic to your users by only loading the content in view.",
|
||||
"main": "jquery.lazy.js",
|
||||
"homepage": "http://jquery.eisbehr.de/lazy",
|
||||
"bugs": "http://github.com/eisbehr-/jquery.lazy/issues",
|
||||
"author": {
|
||||
"name": "Daniel 'Eisbehr' Kern",
|
||||
"email": "jquery@eisbehr.de",
|
||||
"url": "http://eisbehr.de/"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:eisbehr-/jquery.lazy.git"
|
||||
},
|
||||
"keywords": [
|
||||
"lazy",
|
||||
"lazyload",
|
||||
"load",
|
||||
"loader",
|
||||
"image",
|
||||
"images",
|
||||
"background",
|
||||
"content",
|
||||
"speed",
|
||||
"delay",
|
||||
"delayed",
|
||||
"pageload",
|
||||
"performance",
|
||||
"retina",
|
||||
"placeholder",
|
||||
"jquery",
|
||||
"jquery-plugin",
|
||||
"zepto",
|
||||
"zepto-plugin"
|
||||
],
|
||||
"licenses": [{
|
||||
"type": "MIT",
|
||||
"url": "http://www.opensource.org/licenses/mit-license.php"
|
||||
},{
|
||||
"type": "GPL-2.0",
|
||||
"url": "http://www.gnu.org/licenses/gpl-2.0.html"
|
||||
}],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-concat-util": "^0.5.5",
|
||||
"gulp-data": "^1.2.1",
|
||||
"gulp-header": "^1.8.9",
|
||||
"gulp-jshint": "^2.0.4",
|
||||
"gulp-noop": "^1.0.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-uglify": "^2.1.2",
|
||||
"gulp-util": "^3.0.8",
|
||||
"jshint": "^2.9.5",
|
||||
"jshint-stylish": "^2.2.1"
|
||||
},
|
||||
"scripts": {
|
||||
"validate": "gulp validate",
|
||||
"start": "gulp watch",
|
||||
"watch": "gulp watch",
|
||||
"build": "gulp build"
|
||||
}
|
||||
}
|
|
@ -1,299 +0,0 @@
|
|||
### jQuery Lazy - Loader Plugins
|
||||
[](http://github.com/eisbehr-/jquery.lazy)
|
||||
[](http://www.npmjs.org/package/jquery-lazy)
|
||||
[](http://bower.io/search/?q=jquery-lazy)
|
||||
[](https://david-dm.org/eisbehr-/jquery.lazy)
|
||||
[](https://david-dm.org/eisbehr-/jquery.lazy?type=dev)
|
||||
|
||||
---
|
||||
|
||||
### Table of Contents
|
||||
* [Document Note](#document-note)
|
||||
* [About Loader Plugins](#about-loader-plugins)
|
||||
* [Create an own Loader Plugin](#create-an-own-loader-plugin)
|
||||
* [AJAX Loader](#ajax-loader)
|
||||
* [Audio / Video Loader](#audio--video-loader)
|
||||
* [iFrame Loader](#iframe-loader)
|
||||
* [NOOP Loader](#noop-loader)
|
||||
* [Picture Loader](#picture-loader)
|
||||
* [JS / Script Loader](#js--script-loader)
|
||||
* [Vimeo Video Loader](#vimeo-video-loader)
|
||||
* [YouTube Video Loader](#youtube-video-loader)
|
||||
* [Bugs / Feature request](#bugs--feature-request)
|
||||
* [License](#license)
|
||||
* [Donation](#donation)
|
||||
|
||||
---
|
||||
|
||||
## Document Note
|
||||
This is not the main readme file of this project.
|
||||
Please go to the [project root](https://github.com/eisbehr-/jquery.lazy) and take a look in the [README.md](https://github.com/eisbehr-/jquery.lazy/blob/master/README.md) to learn more about the basics of Lazy.
|
||||
|
||||
|
||||
## About Loader Plugins
|
||||
The loader plugins for Lazy can be used whenever you want to extend the basic functionality by default or globally for many instances of Lazy.
|
||||
Just add the plugins you want to use or a combined file, containing all plugins, to your page and all instances can use the plugins from now on.
|
||||
```HTML
|
||||
<!-- as single plugin files -->
|
||||
<script type="text/javascript" src="jquery.lazy.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.ajax.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.av.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.iframe.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.noop.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.picture.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.script.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.vimeo.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.youtube.min.js"></script>
|
||||
|
||||
<!-- or combined in one file -->
|
||||
<script type="text/javascript" src="jquery.lazy.min.js"></script>
|
||||
<script type="text/javascript" src="jquery.lazy.plugins.min.js"></script>
|
||||
```
|
||||
|
||||
|
||||
## Create an own Loader Plugin
|
||||
If you want to, you can easily create own loader plugins.
|
||||
Just use jQuery or Zepto's public function `Lazy` to create and register them.
|
||||
Best practice is to wrap everything by an [IIFE](https://en.wikipedia.org/wiki/Immediately-invoked_function_expression).
|
||||
```JS
|
||||
(function($) {
|
||||
$.Lazy("pluginName", function(element, response) {
|
||||
// add your logic here
|
||||
|
||||
// 'this' is the current instance of Lazy
|
||||
// so it's possible to access all public functions, like:
|
||||
var imageBase = this.config("imageBase");
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
```
|
||||
|
||||
This loader can now be called on every element with the attribute `data-loader` (_by default_), like:
|
||||
```HTML
|
||||
<div data-loader="pluginName"></div>
|
||||
```
|
||||
|
||||
It's possible to register a plugin with more than one name / alias.
|
||||
```JS
|
||||
(function($) {
|
||||
$.Lazy(["pluginName", "anotherPluginName"], function(element, response) {
|
||||
// the plugin is now available by 'data-loader="pluginLoaderName"'
|
||||
// and 'data-loader="anotherLoaderName"'
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
```
|
||||
|
||||
The optional second parameter gives you the ability to register a plugin by default to an element type.
|
||||
When you do this, there is no need to set the `data-loader` attribute on each element you want to use this loader on.
|
||||
|
||||
But keep in mind, if you register an plugin on often used elements, like `<div>`, Lazy will try to handle each of them!
|
||||
If you want to do so anyway, use a most specific selector for jQuery or Zepto.
|
||||
```JS
|
||||
(function($) {
|
||||
$.Lazy("av", ["audio", "video"], function(element, response) {
|
||||
// this plugin will automatically handle '<audio>' and '<video>' elements,
|
||||
// even when no 'data-loader' attribute was set on the elements
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
```
|
||||
|
||||
For more examples, take a look at the [existing plugins](https://github.com/eisbehr-/jquery.lazy/tree/master/plugins).
|
||||
|
||||
|
||||
## AJAX Loader
|
||||
**Names:** `ajax`, `get`, `post`
|
||||
**Parameters:** `data-src`, `data-method`, `data-type`
|
||||
**Default for:** -
|
||||
|
||||
The AJAX loader can receive data from a given url and paste the response to the inner html of the element.
|
||||
This is useful, when you want do load a bigger amount of content.
|
||||
Use `ajax` as the loader name by default.
|
||||
But there are even some shorthand names for specific request types `GET` and `POST` too.
|
||||
```HTML
|
||||
<!-- simple GET request -->
|
||||
<div data-loader="ajax" data-src="ajax.html"></div>
|
||||
|
||||
<!-- simple post request with configurable response type -->
|
||||
<div data-loader="ajax" data-src="ajax.html" data-method="post" data-type="html"></div>
|
||||
|
||||
<!-- GET request -->
|
||||
<div data-loader="get" data-src="ajax.html"></div>
|
||||
|
||||
<!-- POST request-->
|
||||
<div data-loader="post" data-src="ajax.html"></div>
|
||||
```
|
||||
|
||||
|
||||
## Audio / Video Loader
|
||||
**Names:** `av`, `audio`, `video`
|
||||
**Parameters:** `data-src`, `data-poster`
|
||||
**Default for:** `<audio>`, `<video>`
|
||||
|
||||
Loads `<audio>` and `<video>` elements and attach the sources and tracks in the right order.
|
||||
There are two ways you can prepare your audio and/or video tags.
|
||||
First way is to add all sources by `data-src` attribute, separated by comma and type by pipe on the element.
|
||||
```HTML
|
||||
<audio data-src="file.ogg|audio/ogg,file.mp3|audio/mp3,file.wav|audio/wav"></audio>
|
||||
<video data-src="file.ogv|video/ogv,file.mp4|video/mp4,file.webm|video/webm" data-poster="poster.jpg"></video>
|
||||
```
|
||||
|
||||
The other way is to add the sources and tracks like default, as child elements.
|
||||
```HTML
|
||||
<audio>
|
||||
<data-src src="file.ogg" type="audio/ogg"></data-src>
|
||||
<data-src src="file.mp3" type="audio/mp3"></data-src>
|
||||
<data-src src="file.wav" type="audio/wav"></data-src>
|
||||
</audio>
|
||||
|
||||
<video data-poster="poster.jpg">
|
||||
<data-src src="file.ogv" type="video/ogv"></data-src>
|
||||
<data-src src="file.mp4" type="video/mp4"></data-src>
|
||||
<data-src src="file.webm" type="video/webm"></data-src>
|
||||
<data-track kind="captions" src="captions.vtt" srclang="en"></data-track>
|
||||
<data-track kind="descriptions" src="descriptions.vtt" srclang="en"></data-track>
|
||||
<data-track kind="subtitles" src="subtitles.vtt" srclang="de"></data-track>
|
||||
</video>
|
||||
```
|
||||
|
||||
|
||||
## iFrame Loader
|
||||
**Names:** `frame`, `iframe`
|
||||
**Parameters:** `data-src`, `data-error-detect`
|
||||
**Default for:** `<iframe>`
|
||||
|
||||
Loads `<iframe>` contents.
|
||||
The default will return a successfull load, even if the iframe url is not reachable (_like on 404 or wrong url_), because there is no way to check the loaded content in javascript.
|
||||
It might be the fastest and safest way to do that.
|
||||
If you know the requested path is reachable every time or don't care about error checks, you should use this way!
|
||||
```HTML
|
||||
<iframe data-src="iframe.html"></iframe>
|
||||
```
|
||||
|
||||
The second way is more professional and support error checks.
|
||||
It will load the content by AJAX and checks the response.
|
||||
Afterwards pass the HTML content to iframe inner and set the correct url.
|
||||
This is a very secure check, but could be a bit more tricky on some use cases.
|
||||
You should only use this on the same domain origin.
|
||||
|
||||
To enable this feature, set the attribute `data-error-detect` to `true` or `1` on the iframe element.
|
||||
```HTML
|
||||
<iframe data-loader="iframe" data-src="iframe.html" data-error-detect="true"></iframe>
|
||||
```
|
||||
|
||||
|
||||
## NOOP Loader
|
||||
**Names:** `noop`, `noop-success`, `noop-error`
|
||||
**Parameters:** -
|
||||
**Default for:** -
|
||||
|
||||
The NOOP (_or no-operations_) loader will, like the name said, do nothing.
|
||||
There will even be no callbacks triggered, like `beforeLoad` or `onError`, when using a NOOP` loader.
|
||||
It could be useful for developers or to simple, secure and fast disable some other loaders.
|
||||
It can be used with all elements.
|
||||
```HTML
|
||||
<div data-loader="noop"></div>
|
||||
```
|
||||
|
||||
There are two other NOOP loaders, helping to debug your code.
|
||||
The `noop-success` and `noop-error` loaders will return the current state to Lazy and trigger the right callbacks.
|
||||
```HTML
|
||||
<!-- triggers the 'afterLoad' and 'onFinishedAll' callback -->
|
||||
<div data-loader="noop-success"></div>
|
||||
|
||||
<!-- triggers the 'onError' and 'onFinishedAll' callback -->
|
||||
<div data-loader="noop-error"></div>
|
||||
```
|
||||
|
||||
|
||||
## Picture Loader
|
||||
**Names:** `pic`, `picture`
|
||||
**Parameters:** `data-src`, `data-srcset`, `data-media`, `data-sizes`
|
||||
**Default for:** `<picture>`
|
||||
|
||||
Loads `<picture>` elements and attach the sources.
|
||||
There are two ways you can prepare your picture tags.
|
||||
First way is to create all child elements from a single line:
|
||||
```HTML
|
||||
<picture data-src="default.jpg" data-srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" data-media="(min-width: 600px)" data-type="image/jpeg" />
|
||||
```
|
||||
|
||||
The other way is to add the sources like default, as child elements.
|
||||
```HTML
|
||||
<picture>
|
||||
<data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
<data-img src="default.jpg"></data-img>
|
||||
</picture>
|
||||
|
||||
<picture data-src="default.jpg">
|
||||
<data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
</picture>
|
||||
```
|
||||
|
||||
|
||||
## JS / Script Loader
|
||||
**Names:** `js`, `javascript`, `script`
|
||||
**Parameters:** `data-src`
|
||||
**Default for:** `<script>`
|
||||
|
||||
Loads javascript files on `<script>` element.
|
||||
Change the element like the example below, and the files will be loaded automatically after page load.
|
||||
```HTML
|
||||
<script data-src="script.js" type="text/javascript"></script>
|
||||
```
|
||||
|
||||
**Note:**
|
||||
The viewport detection is not correct in some browsers.
|
||||
So it could happen, that all script files get loaded right after page load, and not when the user scrolls to them.
|
||||
|
||||
|
||||
## Vimeo Video Loader
|
||||
**Names:** `vimeo`
|
||||
**Parameters:** `data-src`
|
||||
**Default for:** -
|
||||
|
||||
Loads vimeo videos in an `<iframe>`.
|
||||
This is the suggested way by vimeo itself.
|
||||
You can prepare the `<iframe>` element as you would do without Lazy.
|
||||
Only add the vimeo video id to the attribute `data-src` and add the loader name.
|
||||
That's all.
|
||||
```HTML
|
||||
<iframe data-loader="vimeo" data-src="176894130" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
```
|
||||
|
||||
**Please keep in mind:**
|
||||
Because this is an iframe and there is no feedback javascript could check on, this loader can only return success to Lazy.
|
||||
There is no way to check if the video was loaded correctly or your provided video id is existing.
|
||||
|
||||
|
||||
## YouTube Video Loader
|
||||
**Names:** `yt`, `youtube`
|
||||
**Parameters:** `data-src`
|
||||
**Default for:** -
|
||||
|
||||
Loads youtube videos in an `<iframe>`.
|
||||
This is the suggested way by youtube itself.
|
||||
You can prepare the `<iframe>` element as you would do without Lazy.
|
||||
Only add the youtube video id to the attribute `data-src` and add the loader name.
|
||||
That's all.
|
||||
```HTML
|
||||
<iframe data-loader="youtube" data-src="1AYGnw6MwFM" width="560" height="315" frameborder="0"></iframe>
|
||||
```
|
||||
|
||||
**Please keep in mind:**
|
||||
Because this is an iframe and there is no feedback javascript could check on, this loader can only return success to Lazy.
|
||||
There is no way to check if the video was loaded correctly or your provided video id is existing.
|
||||
|
||||
|
||||
## Bugs / Feature request
|
||||
Please [report](http://github.com/eisbehr-/jquery.lazy/issues) bugs and feel free to [ask](http://github.com/eisbehr-/jquery.lazy/issues) for new features and loaders directly on GitHub.
|
||||
|
||||
|
||||
## License
|
||||
Lazy plugins are dual-licensed under [MIT](http://www.opensource.org/licenses/mit-license.php) and [GPL-2.0](http://www.gnu.org/licenses/gpl-2.0.html) license.
|
||||
|
||||
|
||||
## Donation
|
||||
_You like to support me?_
|
||||
_You appreciate my work?_
|
||||
_You use it in commercial projects?_
|
||||
|
||||
Feel free to make a little [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FFL6VQJCUZMXC)! :wink:
|
|
@ -1,73 +0,0 @@
|
|||
/*!
|
||||
* jQuery & Zepto Lazy - AJAX Plugin - v1.2
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load data by ajax request and pass them to elements inner html, like:
|
||||
// <div data-loader="ajax" data-src"url.html" data-method="post" data-type="html"></div>
|
||||
$.lazy("ajax", function(element, response) {
|
||||
ajaxRequest(this, element, response, element.attr("data-method"));
|
||||
});
|
||||
|
||||
// load data by ajax get request and pass them to elements inner html, like:
|
||||
// <div data-loader="get" data-src"url.html" data-type="html"></div>
|
||||
$.lazy("get", function(element, response) {
|
||||
ajaxRequest(this, element, response, "get");
|
||||
});
|
||||
|
||||
// load data by ajax post request and pass them to elements inner html, like:
|
||||
// <div data-loader="post" data-src"url.html" data-type="html"></div>
|
||||
$.lazy("post", function(element, response) {
|
||||
ajaxRequest(this, element, response, "post");
|
||||
});
|
||||
|
||||
/**
|
||||
* execute ajax request and handle response
|
||||
* @param {object} instance
|
||||
* @param {jQuery|object} element
|
||||
* @param {function} response
|
||||
* @param {string} [method]
|
||||
*/
|
||||
function ajaxRequest(instance, element, response, method) {
|
||||
$.ajax({
|
||||
url: element.attr("data-src"),
|
||||
type: method || "get",
|
||||
dataType: element.attr("data-type") || "html",
|
||||
|
||||
/**
|
||||
* success callback
|
||||
* @access private
|
||||
* @param {*} content
|
||||
* @return {void}
|
||||
*/
|
||||
success: function(content) {
|
||||
// set responded data to element's inner html
|
||||
element.html(content);
|
||||
|
||||
// use response function for Zepto
|
||||
response(true);
|
||||
|
||||
// remove attributes
|
||||
if( instance.config("removeAttribute") )
|
||||
element.removeAttr("data-src data-method data-type");
|
||||
},
|
||||
|
||||
/**
|
||||
* error callback
|
||||
* @access private
|
||||
* @return {void}
|
||||
*/
|
||||
error: function() {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
})(window.jQuery || window.Zepto);
|
|
@ -1,2 +0,0 @@
|
|||
/*! jQuery & Zepto Lazy - AJAX Plugin v1.2 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2017 Daniel 'Eisbehr' Kern */
|
||||
!function(t){function a(a,e,o,n){t.ajax({url:e.attr("data-src"),type:n||"get",dataType:e.attr("data-type")||"html",success:function(t){e.html(t),o(!0),a.config("removeAttribute")&&e.removeAttr("data-src data-method data-type")},error:function(){o(!1)}})}t.lazy("ajax",function(t,e){a(this,t,e,t.attr("data-method"))}),t.lazy("get",function(t,e){a(this,t,e,"get")}),t.lazy("post",function(t,e){a(this,t,e,"post")})}(window.jQuery||window.Zepto);
|
|
@ -1,115 +0,0 @@
|
|||
/*!
|
||||
* jQuery & Zepto Lazy - AV Plugin - v1.4
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// loads audio and video tags including tracks by two ways, like:
|
||||
// <audio>
|
||||
// <data-src src="audio.ogg" type="video/ogg"></data-src>
|
||||
// <data-src src="audio.mp3" type="video/mp3"></data-src>
|
||||
// </audio>
|
||||
// <video data-poster="poster.jpg">
|
||||
// <data-src src="video.ogv" type="video/ogv"></data-src>
|
||||
// <data-src src="video.webm" type="video/webm"></data-src>
|
||||
// <data-src src="video.mp4" type="video/mp4"></data-src>
|
||||
// <data-track kind="captions" src="captions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="descriptions" src="descriptions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="subtitles" src="subtitles.vtt" srclang="de"></data-track>
|
||||
// </video>
|
||||
//
|
||||
// or:
|
||||
// <audio data-src="audio.ogg|video/ogg,video.mp3|video/mp3"></video>
|
||||
// <video data-poster="poster.jpg" data-src="video.ogv|video/ogv,video.webm|video/webm,video.mp4|video/mp4">
|
||||
// <data-track kind="captions" src="captions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="descriptions" src="descriptions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="subtitles" src="subtitles.vtt" srclang="de"></data-track>
|
||||
// </video>
|
||||
$.lazy(["av", "audio", "video"], ["audio", "video"], function(element, response) {
|
||||
var elementTagName = element[0].tagName.toLowerCase();
|
||||
|
||||
if( elementTagName === "audio" || elementTagName === "video" ) {
|
||||
var srcAttr = "data-src",
|
||||
sources = element.find(srcAttr),
|
||||
tracks = element.find("data-track"),
|
||||
sourcesInError = 0,
|
||||
|
||||
// create on error callback for sources
|
||||
onError = function() {
|
||||
if( ++sourcesInError === sources.length )
|
||||
response(false);
|
||||
},
|
||||
|
||||
// create callback to handle a source or track entry
|
||||
handleSource = function() {
|
||||
var source = $(this),
|
||||
type = source[0].tagName.toLowerCase(),
|
||||
attributes = source.prop("attributes"),
|
||||
target = $(type === srcAttr ? "<source>" : "<track>");
|
||||
|
||||
if( type === srcAttr )
|
||||
target.one("error", onError);
|
||||
|
||||
$.each(attributes, function(index, attribute) {
|
||||
target.attr(attribute.name, attribute.value);
|
||||
});
|
||||
|
||||
source.replaceWith(target);
|
||||
};
|
||||
|
||||
// create event for successfull load
|
||||
element.one("loadedmetadata", function() {
|
||||
response(true);
|
||||
})
|
||||
|
||||
// remove default callbacks to ignore loading poster image
|
||||
.off("load error")
|
||||
|
||||
// load poster image
|
||||
.attr("poster", element.attr("data-poster"));
|
||||
|
||||
// load by child tags
|
||||
if( sources.length )
|
||||
sources.each(handleSource);
|
||||
|
||||
// load by attribute
|
||||
else if( element.attr(srcAttr) ) {
|
||||
// split for every entry by comma
|
||||
$.each(element.attr(srcAttr).split(","), function(index, value) {
|
||||
// split again for file and file type
|
||||
var parts = value.split("|");
|
||||
|
||||
// create a source entry
|
||||
element.append($("<source>")
|
||||
.one("error", onError)
|
||||
.attr({src: parts[0].trim(), type: parts[1].trim()}));
|
||||
});
|
||||
|
||||
// remove now obsolete attribute
|
||||
if( this.config("removeAttribute") )
|
||||
element.removeAttr(srcAttr);
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
|
||||
// load optional tracks
|
||||
if( tracks.length )
|
||||
tracks.each(handleSource);
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
|
@ -1,2 +0,0 @@
|
|||
/*! jQuery & Zepto Lazy - AV Plugin v1.4 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2017 Daniel 'Eisbehr' Kern */
|
||||
!function(t){t.lazy(["av","audio","video"],["audio","video"],function(a,e){var r=a[0].tagName.toLowerCase();if("audio"===r||"video"===r){var o=a.find("data-src"),i=a.find("data-track"),n=0,c=function(){++n===o.length&&e(!1)},d=function(){var a=t(this),e=a[0].tagName.toLowerCase(),r=a.prop("attributes"),o=t("data-src"===e?"<source>":"<track>");"data-src"===e&&o.one("error",c),t.each(r,function(t,a){o.attr(a.name,a.value)}),a.replaceWith(o)};a.one("loadedmetadata",function(){e(!0)}).off("load error").attr("poster",a.attr("data-poster")),o.length?o.each(d):a.attr("data-src")?(t.each(a.attr("data-src").split(","),function(e,r){var o=r.split("|");a.append(t("<source>").one("error",c).attr({src:o[0].trim(),type:o[1].trim()}))}),this.config("removeAttribute")&&a.removeAttr("data-src")):e(!1),i.length&&i.each(d)}else e(!1)})}(window.jQuery||window.Zepto);
|
|
@ -1,81 +0,0 @@
|
|||
/*!
|
||||
* jQuery & Zepto Lazy - iFrame Plugin - v1.5
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load iframe content, like:
|
||||
// <iframe data-src="iframe.html"></iframe>
|
||||
//
|
||||
// enable content error check with:
|
||||
// <iframe data-src="iframe.html" data-error-detect="true"></iframe>
|
||||
$.lazy(["frame", "iframe"], "iframe", function(element, response) {
|
||||
var instance = this;
|
||||
|
||||
if( element[0].tagName.toLowerCase() === "iframe" ) {
|
||||
var srcAttr = "data-src",
|
||||
errorDetectAttr = "data-error-detect",
|
||||
errorDetect = element.attr(errorDetectAttr);
|
||||
|
||||
// default way, just replace the 'src' attribute
|
||||
if( errorDetect !== "true" && errorDetect !== "1" ) {
|
||||
// set iframe source
|
||||
element.attr("src", element.attr(srcAttr));
|
||||
|
||||
// remove attributes
|
||||
if( instance.config("removeAttribute") )
|
||||
element.removeAttr(srcAttr + " " + errorDetectAttr);
|
||||
}
|
||||
|
||||
// extended way, even check if the document is available
|
||||
else {
|
||||
$.ajax({
|
||||
url: element.attr(srcAttr),
|
||||
dataType: "html",
|
||||
crossDomain: true,
|
||||
xhrFields: {withCredentials: true},
|
||||
|
||||
/**
|
||||
* success callback
|
||||
* @access private
|
||||
* @param {*} content
|
||||
* @return {void}
|
||||
*/
|
||||
success: function(content) {
|
||||
// set responded data to element's inner html
|
||||
element.html(content)
|
||||
|
||||
// change iframe src
|
||||
.attr("src", element.attr(srcAttr));
|
||||
|
||||
// remove attributes
|
||||
if( instance.config("removeAttribute") )
|
||||
element.removeAttr(srcAttr + " " + errorDetectAttr);
|
||||
},
|
||||
|
||||
/**
|
||||
* error callback
|
||||
* @access private
|
||||
* @return {void}
|
||||
*/
|
||||
error: function() {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
|
@ -1,2 +0,0 @@
|
|||
/*! jQuery & Zepto Lazy - iFrame Plugin v1.5 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2017 Daniel 'Eisbehr' Kern */
|
||||
!function(t){t.lazy(["frame","iframe"],"iframe",function(r,a){var e=this;if("iframe"===r[0].tagName.toLowerCase()){var o=r.attr("data-error-detect");"true"!==o&&"1"!==o?(r.attr("src",r.attr("data-src")),e.config("removeAttribute")&&r.removeAttr("data-src data-error-detect")):t.ajax({url:r.attr("data-src"),dataType:"html",crossDomain:!0,xhrFields:{withCredentials:!0},success:function(t){r.html(t).attr("src",r.attr("data-src")),e.config("removeAttribute")&&r.removeAttr("data-src data-error-detect")},error:function(){a(!1)}})}else a(!1)})}(window.jQuery||window.Zepto);
|
|
@ -1,30 +0,0 @@
|
|||
/*!
|
||||
* jQuery & Zepto Lazy - NOOP Plugin - v1.2
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// will do nothing, used to disable elements or for development
|
||||
// use like:
|
||||
// <div data-loader="noop"></div>
|
||||
|
||||
// does not do anything, just a 'no-operation' helper ;)
|
||||
$.lazy("noop", function() {});
|
||||
|
||||
// does nothing, but response a successfull loading
|
||||
$.lazy("noop-success", function(element, response) {
|
||||
// use response function for Zepto
|
||||
response(true);
|
||||
});
|
||||
|
||||
// does nothing, but response a failed loading
|
||||
$.lazy("noop-error", function(element, response) {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
|
@ -1,2 +0,0 @@
|
|||
/*! jQuery & Zepto Lazy - NOOP Plugin v1.2 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2017 Daniel 'Eisbehr' Kern */
|
||||
!function(o){o.lazy("noop",function(){}),o.lazy("noop-success",function(o,n){n(!0)}),o.lazy("noop-error",function(o,n){n(!1)})}(window.jQuery||window.Zepto);
|
|
@ -1,187 +0,0 @@
|
|||
/*!
|
||||
* jQuery & Zepto Lazy - Picture Plugin - v1.3
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
var srcAttr = "data-src",
|
||||
srcsetAttr = "data-srcset",
|
||||
mediaAttr = "data-media",
|
||||
sizesAttr = "data-sizes",
|
||||
typeAttr = "data-type";
|
||||
|
||||
// loads picture elements like:
|
||||
// <picture>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 400px)" type="image/jpeg"></data-src>
|
||||
// <data-img src="default.jpg" >
|
||||
// </picture>
|
||||
//
|
||||
// or:
|
||||
// <picture data-src="default.jpg">
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 400px)" type="image/jpeg"></data-src>
|
||||
// </picture>
|
||||
//
|
||||
// or just with attributes in one line:
|
||||
// <picture data-src="default.jpg" data-srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" data-media="(min-width: 600px)" data-sizes="" data-type="image/jpeg" />
|
||||
$.lazy(["pic", "picture"], ["picture"], function(element, response) {
|
||||
var elementTagName = element[0].tagName.toLowerCase();
|
||||
|
||||
if( elementTagName === "picture" ) {
|
||||
var sources = element.find(srcAttr),
|
||||
image = element.find("data-img"),
|
||||
imageBase = this.config("imageBase") || "";
|
||||
|
||||
// handle as child elements
|
||||
if( sources.length ) {
|
||||
sources.each(function() {
|
||||
renameElementTag($(this), "source", imageBase);
|
||||
});
|
||||
|
||||
// create img tag from child
|
||||
if( image.length === 1 ) {
|
||||
image = renameElementTag(image, "img", imageBase);
|
||||
|
||||
// bind event callbacks to new image tag
|
||||
image.on("load", function() {
|
||||
response(true);
|
||||
}).on("error", function() {
|
||||
response(false);
|
||||
});
|
||||
|
||||
image.attr("src", image.attr(srcAttr));
|
||||
|
||||
if( this.config("removeAttribute") ) {
|
||||
image.removeAttr(srcAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// create img tag from attribute
|
||||
else if( element.attr(srcAttr) ) {
|
||||
// create image tag
|
||||
createImageObject(element, imageBase + element.attr(srcAttr), response);
|
||||
|
||||
if( this.config("removeAttribute") )
|
||||
element.removeAttr(srcAttr);
|
||||
}
|
||||
|
||||
// pass error state
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
}
|
||||
|
||||
// handle as attributes
|
||||
else if( element.attr(srcsetAttr) ) {
|
||||
// create source elements before img tag
|
||||
$("<source>").attr({
|
||||
media: element.attr(mediaAttr),
|
||||
sizes: element.attr(sizesAttr),
|
||||
type: element.attr(typeAttr),
|
||||
srcset: getCorrectedSrcSet(element.attr(srcsetAttr), imageBase)
|
||||
})
|
||||
.appendTo(element);
|
||||
|
||||
// create image tag
|
||||
createImageObject(element, imageBase + element.attr(srcAttr), response);
|
||||
|
||||
// remove attributes from parent picture element
|
||||
if( this.config("removeAttribute") ) {
|
||||
element.removeAttr(srcAttr + " " + srcsetAttr + " " + mediaAttr + " " + sizesAttr + " " + typeAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// pass error state
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* create a new child element and copy attributes
|
||||
* @param {jQuery|object} element
|
||||
* @param {string} toType
|
||||
* @param {string} imageBase
|
||||
* @return {jQuery|object}
|
||||
*/
|
||||
function renameElementTag(element, toType, imageBase) {
|
||||
var attributes = element.prop("attributes"),
|
||||
target = $("<" + toType + ">");
|
||||
|
||||
$.each(attributes, function(index, attribute) {
|
||||
// build srcset with image base
|
||||
if( attribute.name === "srcset" || attribute.name === srcAttr ) {
|
||||
attribute.value = getCorrectedSrcSet(attribute.value, imageBase);
|
||||
}
|
||||
|
||||
target.attr(attribute.name, attribute.value);
|
||||
});
|
||||
|
||||
element.replaceWith(target);
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* create a new image element inside parent element
|
||||
* @param {jQuery|object} parent
|
||||
* @param {string} src
|
||||
* @param {function} response
|
||||
* @return void
|
||||
*/
|
||||
function createImageObject(parent, src, response) {
|
||||
// create image tag
|
||||
var imageObj = $("<img>")
|
||||
|
||||
// create image tag an bind callbacks for correct response
|
||||
.one("load", function() {
|
||||
response(true);
|
||||
})
|
||||
.one("error", function() {
|
||||
response(false);
|
||||
})
|
||||
|
||||
// set into picture element
|
||||
.appendTo(parent)
|
||||
|
||||
// set src attribute at last to prevent early kick-in
|
||||
.attr("src", src);
|
||||
|
||||
// call after load even on cached image
|
||||
imageObj.complete && imageObj.load(); // jshint ignore : line
|
||||
}
|
||||
|
||||
/**
|
||||
* prepend image base to all srcset entries
|
||||
* @param {string} srcset
|
||||
* @param {string} imageBase
|
||||
* @returns {string}
|
||||
*/
|
||||
function getCorrectedSrcSet(srcset, imageBase) {
|
||||
if( imageBase ) {
|
||||
// trim, remove unnecessary spaces and split entries
|
||||
var entries = srcset.split(",");
|
||||
srcset = "";
|
||||
|
||||
for( var i = 0, l = entries.length; i < l; i++ ) {
|
||||
srcset += imageBase + entries[i].trim() + (i !== l - 1 ? "," : "");
|
||||
}
|
||||
}
|
||||
|
||||
return srcset;
|
||||
}
|
||||
})(window.jQuery || window.Zepto);
|
|
@ -1,2 +0,0 @@
|
|||
/*! jQuery & Zepto Lazy - Picture Plugin v1.3 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2017 Daniel 'Eisbehr' Kern */
|
||||
!function(t){function e(e,a,n){var o=e.prop("attributes"),c=t("<"+a+">");return t.each(o,function(t,e){"srcset"!==e.name&&e.name!==i||(e.value=r(e.value,n)),c.attr(e.name,e.value)}),e.replaceWith(c),c}function a(e,a,r){var i=t("<img>").one("load",function(){r(!0)}).one("error",function(){r(!1)}).appendTo(e).attr("src",a);i.complete&&i.load()}function r(t,e){if(e){var a=t.split(",");t="";for(var r=0,i=a.length;r<i;r++)t+=e+a[r].trim()+(r!==i-1?",":"")}return t}var i="data-src";t.lazy(["pic","picture"],["picture"],function(n,o){if("picture"===n[0].tagName.toLowerCase()){var c=n.find(i),s=n.find("data-img"),u=this.config("imageBase")||"";c.length?(c.each(function(){e(t(this),"source",u)}),1===s.length?(s=e(s,"img",u),s.on("load",function(){o(!0)}).on("error",function(){o(!1)}),s.attr("src",s.attr(i)),this.config("removeAttribute")&&s.removeAttr(i)):n.attr(i)?(a(n,u+n.attr(i),o),this.config("removeAttribute")&&n.removeAttr(i)):o(!1)):n.attr("data-srcset")?(t("<source>").attr({media:n.attr("data-media"),sizes:n.attr("data-sizes"),type:n.attr("data-type"),srcset:r(n.attr("data-srcset"),u)}).appendTo(n),a(n,u+n.attr(i),o),this.config("removeAttribute")&&n.removeAttr(i+" data-srcset data-media data-sizes data-type")):o(!1)}else o(!1)})}(window.jQuery||window.Zepto);
|
|
@ -1,27 +0,0 @@
|
|||
/*!
|
||||
* jQuery & Zepto Lazy - Script Plugin - v1.2
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// loads javascript files for script tags, like:
|
||||
// <script data-src="file.js" type="text/javascript"></script>
|
||||
$.lazy(["js", "javascript", "script"], "script", function(element, response) {
|
||||
if( element[0].tagName.toLowerCase() == "script" ) {
|
||||
element.attr("src", element.attr("data-src"));
|
||||
|
||||
// remove attribute
|
||||
if( this.config("removeAttribute") )
|
||||
element.removeAttr("data-src");
|
||||
}
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
|
@ -1,2 +0,0 @@
|
|||
/*! jQuery & Zepto Lazy - Script Plugin v1.2 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2017 Daniel 'Eisbehr' Kern */
|
||||
!function(t){t.lazy(["js","javascript","script"],"script",function(t,r){"script"==t[0].tagName.toLowerCase()?(t.attr("src",t.attr("data-src")),this.config("removeAttribute")&&t.removeAttr("data-src")):r(!1)})}(window.jQuery||window.Zepto);
|
|
@ -1,30 +0,0 @@
|
|||
/*!
|
||||
* jQuery & Zepto Lazy - Vimeo Plugin - v1.1
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load vimeo video iframe, like:
|
||||
// <iframe data-loader="vimeo" data-src="176894130" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
$.lazy("vimeo", function(element, response) {
|
||||
if( element[0].tagName.toLowerCase() === "iframe" ) {
|
||||
// pass source to iframe
|
||||
element.attr("src", "https://player.vimeo.com/video/" + element.attr("data-src"));
|
||||
|
||||
// remove attribute
|
||||
if( this.config("removeAttribute") )
|
||||
element.removeAttr("data-src");
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
|
@ -1,2 +0,0 @@
|
|||
/*! jQuery & Zepto Lazy - Vimeo Plugin v1.1 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2017 Daniel 'Eisbehr' Kern */
|
||||
!function(t){t.lazy("vimeo",function(t,e){"iframe"===t[0].tagName.toLowerCase()?(t.attr("src","https://player.vimeo.com/video/"+t.attr("data-src")),this.config("removeAttribute")&&t.removeAttr("data-src")):e(!1)})}(window.jQuery||window.Zepto);
|
|
@ -1,30 +0,0 @@
|
|||
/*!
|
||||
* jQuery & Zepto Lazy - YouTube Plugin - v1.4
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2017, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load youtube video iframe, like:
|
||||
// <iframe data-loader="yt" data-src="1AYGnw6MwFM" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
$.lazy(["yt", "youtube"], function(element, response) {
|
||||
if( element[0].tagName.toLowerCase() === "iframe" ) {
|
||||
// pass source to iframe
|
||||
element.attr("src", "https://www.youtube.com/embed/" + element.attr("data-src") + "?rel=0&showinfo=0");
|
||||
|
||||
// remove attribute
|
||||
if( this.config("removeAttribute") )
|
||||
element.removeAttr("data-src");
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue