Version Description
Download this release
Release Info
Developer | dfactory |
Plugin | Responsive Lightbox & Gallery |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.5 to 2.1
- assets/jstree/jstree.js +8589 -0
- assets/jstree/jstree.min.js +6 -0
- assets/jstree/themes/default-dark/32px.png +0 -0
- assets/jstree/themes/default-dark/40px.png +0 -0
- assets/jstree/themes/default-dark/style.css +1152 -0
- assets/jstree/themes/default-dark/style.min.css +1 -0
- assets/jstree/themes/default-dark/throbber.gif +0 -0
- assets/jstree/themes/default/32px.png +0 -0
- assets/jstree/themes/default/40px.png +0 -0
- assets/jstree/themes/default/style.css +1108 -0
- assets/jstree/themes/default/style.min.css +1 -0
- assets/jstree/themes/default/throbber.gif +0 -0
- assets/jstree/themes/gray/32px.png +0 -0
- assets/jstree/themes/gray/40px.png +0 -0
- assets/jstree/themes/gray/style.css +1259 -0
- assets/jstree/themes/gray/style.min.css +1 -0
- assets/jstree/themes/gray/throbber.gif +0 -0
- assets/jstree/themes/modern/32px.png +0 -0
- assets/jstree/themes/modern/40px.png +0 -0
- assets/jstree/themes/modern/style.css +1261 -0
- assets/jstree/themes/modern/style.min.css +1 -0
- assets/jstree/themes/modern/throbber.gif +0 -0
- assets/perfect-scrollbar/perfect-scrollbar.css +116 -0
- assets/perfect-scrollbar/perfect-scrollbar.js +1324 -0
- assets/perfect-scrollbar/perfect-scrollbar.min.css +1 -0
- assets/perfect-scrollbar/perfect-scrollbar.min.js +6 -0
- assets/select2/css/select2.css +55 -71
- assets/select2/css/select2.min.css +1 -1
- assets/select2/js/i18n/af.js +1 -1
- assets/select2/js/i18n/ar.js +1 -1
- assets/select2/js/i18n/az.js +1 -1
- assets/select2/js/i18n/bg.js +1 -1
- assets/select2/js/i18n/bs.js +1 -1
- assets/select2/js/i18n/ca.js +1 -1
- assets/select2/js/i18n/cs.js +1 -1
- assets/select2/js/i18n/da.js +1 -1
- assets/select2/js/i18n/de.js +1 -1
- assets/select2/js/i18n/dsb.js +1 -1
- assets/select2/js/i18n/el.js +1 -1
- assets/select2/js/i18n/en.js +1 -1
- assets/select2/js/i18n/es.js +1 -1
- assets/select2/js/i18n/et.js +1 -1
- assets/select2/js/i18n/eu.js +1 -1
- assets/select2/js/i18n/fa.js +1 -1
- assets/select2/js/i18n/fi.js +1 -1
- assets/select2/js/i18n/fr.js +2 -2
- assets/select2/js/i18n/gl.js +1 -1
- assets/select2/js/i18n/he.js +1 -1
- assets/select2/js/i18n/hi.js +1 -1
- assets/select2/js/i18n/hr.js +1 -1
- assets/select2/js/i18n/hsb.js +1 -1
- assets/select2/js/i18n/hu.js +1 -1
- assets/select2/js/i18n/hy.js +1 -1
- assets/select2/js/i18n/id.js +1 -1
- assets/select2/js/i18n/is.js +1 -1
- assets/select2/js/i18n/it.js +1 -1
- assets/select2/js/i18n/ja.js +1 -1
- assets/select2/js/i18n/km.js +1 -1
- assets/select2/js/i18n/ko.js +1 -1
- assets/select2/js/i18n/lt.js +1 -1
- assets/select2/js/i18n/lv.js +1 -1
- assets/select2/js/i18n/mk.js +1 -1
- assets/select2/js/i18n/ms.js +1 -1
- assets/select2/js/i18n/nb.js +2 -2
- assets/select2/js/i18n/nl.js +1 -1
- assets/select2/js/i18n/pl.js +1 -1
- assets/select2/js/i18n/ps.js +1 -1
- assets/select2/js/i18n/pt-BR.js +1 -1
- assets/select2/js/i18n/pt.js +1 -1
- assets/select2/js/i18n/ro.js +1 -1
- assets/select2/js/i18n/ru.js +1 -1
- assets/select2/js/i18n/sk.js +1 -1
- assets/select2/js/i18n/sl.js +1 -1
- assets/select2/js/i18n/sr-Cyrl.js +1 -1
- assets/select2/js/i18n/sr.js +1 -1
- assets/select2/js/i18n/sv.js +1 -1
- assets/select2/js/i18n/th.js +1 -1
- assets/select2/js/i18n/tk.js +3 -0
- assets/select2/js/i18n/tr.js +1 -1
- assets/select2/js/i18n/uk.js +1 -1
- assets/select2/js/i18n/vi.js +1 -1
- assets/select2/js/i18n/zh-CN.js +1 -1
- assets/select2/js/i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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*globals jQuery, define, module, exports, require, window, document, postMessage */
|
2 |
+
(function (factory) {
|
3 |
+
"use strict";
|
4 |
+
if (typeof define === 'function' && define.amd) {
|
5 |
+
define(['jquery'], factory);
|
6 |
+
}
|
7 |
+
else if(typeof module !== 'undefined' && module.exports) {
|
8 |
+
module.exports = factory(require('jquery'));
|
9 |
+
}
|
10 |
+
else {
|
11 |
+
factory(jQuery);
|
12 |
+
}
|
13 |
+
}(function ($, undefined) {
|
14 |
+
"use strict";
|
15 |
+
/*!
|
16 |
+
* jsTree 3.3.5
|
17 |
+
* http://jstree.com/
|
18 |
+
*
|
19 |
+
* Copyright (c) 2014 Ivan Bozhanov (http://vakata.com)
|
20 |
+
*
|
21 |
+
* Licensed same as jquery - under the terms of the MIT License
|
22 |
+
* http://www.opensource.org/licenses/mit-license.php
|
23 |
+
*/
|
24 |
+
/*!
|
25 |
+
* if using jslint please allow for the jQuery global and use following options:
|
26 |
+
* jslint: loopfunc: true, browser: true, ass: true, bitwise: true, continue: true, nomen: true, plusplus: true, regexp: true, unparam: true, todo: true, white: true
|
27 |
+
*/
|
28 |
+
/*jshint -W083 */
|
29 |
+
|
30 |
+
// prevent another load? maybe there is a better way?
|
31 |
+
if($.jstree) {
|
32 |
+
return;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* ### jsTree core functionality
|
37 |
+
*/
|
38 |
+
|
39 |
+
// internal variables
|
40 |
+
var instance_counter = 0,
|
41 |
+
ccp_node = false,
|
42 |
+
ccp_mode = false,
|
43 |
+
ccp_inst = false,
|
44 |
+
themes_loaded = [],
|
45 |
+
src = $('script:last').attr('src'),
|
46 |
+
document = window.document; // local variable is always faster to access then a global
|
47 |
+
|
48 |
+
/**
|
49 |
+
* holds all jstree related functions and variables, including the actual class and methods to create, access and manipulate instances.
|
50 |
+
* @name $.jstree
|
51 |
+
*/
|
52 |
+
$.jstree = {
|
53 |
+
/**
|
54 |
+
* specifies the jstree version in use
|
55 |
+
* @name $.jstree.version
|
56 |
+
*/
|
57 |
+
version : '3.3.5',
|
58 |
+
/**
|
59 |
+
* holds all the default options used when creating new instances
|
60 |
+
* @name $.jstree.defaults
|
61 |
+
*/
|
62 |
+
defaults : {
|
63 |
+
/**
|
64 |
+
* configure which plugins will be active on an instance. Should be an array of strings, where each element is a plugin name. The default is `[]`
|
65 |
+
* @name $.jstree.defaults.plugins
|
66 |
+
*/
|
67 |
+
plugins : []
|
68 |
+
},
|
69 |
+
/**
|
70 |
+
* stores all loaded jstree plugins (used internally)
|
71 |
+
* @name $.jstree.plugins
|
72 |
+
*/
|
73 |
+
plugins : {},
|
74 |
+
path : src && src.indexOf('/') !== -1 ? src.replace(/\/[^\/]+$/,'') : '',
|
75 |
+
idregex : /[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,
|
76 |
+
root : '#'
|
77 |
+
};
|
78 |
+
|
79 |
+
/**
|
80 |
+
* creates a jstree instance
|
81 |
+
* @name $.jstree.create(el [, options])
|
82 |
+
* @param {DOMElement|jQuery|String} el the element to create the instance on, can be jQuery extended or a selector
|
83 |
+
* @param {Object} options options for this instance (extends `$.jstree.defaults`)
|
84 |
+
* @return {jsTree} the new instance
|
85 |
+
*/
|
86 |
+
$.jstree.create = function (el, options) {
|
87 |
+
var tmp = new $.jstree.core(++instance_counter),
|
88 |
+
opt = options;
|
89 |
+
options = $.extend(true, {}, $.jstree.defaults, options);
|
90 |
+
if(opt && opt.plugins) {
|
91 |
+
options.plugins = opt.plugins;
|
92 |
+
}
|
93 |
+
$.each(options.plugins, function (i, k) {
|
94 |
+
if(i !== 'core') {
|
95 |
+
tmp = tmp.plugin(k, options[k]);
|
96 |
+
}
|
97 |
+
});
|
98 |
+
$(el).data('jstree', tmp);
|
99 |
+
tmp.init(el, options);
|
100 |
+
return tmp;
|
101 |
+
};
|
102 |
+
/**
|
103 |
+
* remove all traces of jstree from the DOM and destroy all instances
|
104 |
+
* @name $.jstree.destroy()
|
105 |
+
*/
|
106 |
+
$.jstree.destroy = function () {
|
107 |
+
$('.jstree:jstree').jstree('destroy');
|
108 |
+
$(document).off('.jstree');
|
109 |
+
};
|
110 |
+
/**
|
111 |
+
* the jstree class constructor, used only internally
|
112 |
+
* @private
|
113 |
+
* @name $.jstree.core(id)
|
114 |
+
* @param {Number} id this instance's index
|
115 |
+
*/
|
116 |
+
$.jstree.core = function (id) {
|
117 |
+
this._id = id;
|
118 |
+
this._cnt = 0;
|
119 |
+
this._wrk = null;
|
120 |
+
this._data = {
|
121 |
+
core : {
|
122 |
+
themes : {
|
123 |
+
name : false,
|
124 |
+
dots : false,
|
125 |
+
icons : false,
|
126 |
+
ellipsis : false
|
127 |
+
},
|
128 |
+
selected : [],
|
129 |
+
last_error : {},
|
130 |
+
working : false,
|
131 |
+
worker_queue : [],
|
132 |
+
focused : null
|
133 |
+
}
|
134 |
+
};
|
135 |
+
};
|
136 |
+
/**
|
137 |
+
* get a reference to an existing instance
|
138 |
+
*
|
139 |
+
* __Examples__
|
140 |
+
*
|
141 |
+
* // provided a container with an ID of "tree", and a nested node with an ID of "branch"
|
142 |
+
* // all of there will return the same instance
|
143 |
+
* $.jstree.reference('tree');
|
144 |
+
* $.jstree.reference('#tree');
|
145 |
+
* $.jstree.reference($('#tree'));
|
146 |
+
* $.jstree.reference(document.getElementByID('tree'));
|
147 |
+
* $.jstree.reference('branch');
|
148 |
+
* $.jstree.reference('#branch');
|
149 |
+
* $.jstree.reference($('#branch'));
|
150 |
+
* $.jstree.reference(document.getElementByID('branch'));
|
151 |
+
*
|
152 |
+
* @name $.jstree.reference(needle)
|
153 |
+
* @param {DOMElement|jQuery|String} needle
|
154 |
+
* @return {jsTree|null} the instance or `null` if not found
|
155 |
+
*/
|
156 |
+
$.jstree.reference = function (needle) {
|
157 |
+
var tmp = null,
|
158 |
+
obj = null;
|
159 |
+
if(needle && needle.id && (!needle.tagName || !needle.nodeType)) { needle = needle.id; }
|
160 |
+
|
161 |
+
if(!obj || !obj.length) {
|
162 |
+
try { obj = $(needle); } catch (ignore) { }
|
163 |
+
}
|
164 |
+
if(!obj || !obj.length) {
|
165 |
+
try { obj = $('#' + needle.replace($.jstree.idregex,'\\$&')); } catch (ignore) { }
|
166 |
+
}
|
167 |
+
if(obj && obj.length && (obj = obj.closest('.jstree')).length && (obj = obj.data('jstree'))) {
|
168 |
+
tmp = obj;
|
169 |
+
}
|
170 |
+
else {
|
171 |
+
$('.jstree').each(function () {
|
172 |
+
var inst = $(this).data('jstree');
|
173 |
+
if(inst && inst._model.data[needle]) {
|
174 |
+
tmp = inst;
|
175 |
+
return false;
|
176 |
+
}
|
177 |
+
});
|
178 |
+
}
|
179 |
+
return tmp;
|
180 |
+
};
|
181 |
+
/**
|
182 |
+
* Create an instance, get an instance or invoke a command on a instance.
|
183 |
+
*
|
184 |
+
* If there is no instance associated with the current node a new one is created and `arg` is used to extend `$.jstree.defaults` for this new instance. There would be no return value (chaining is not broken).
|
185 |
+
*
|
186 |
+
* If there is an existing instance and `arg` is a string the command specified by `arg` is executed on the instance, with any additional arguments passed to the function. If the function returns a value it will be returned (chaining could break depending on function).
|
187 |
+
*
|
188 |
+
* If there is an existing instance and `arg` is not a string the instance itself is returned (similar to `$.jstree.reference`).
|
189 |
+
*
|
190 |
+
* In any other case - nothing is returned and chaining is not broken.
|
191 |
+
*
|
192 |
+
* __Examples__
|
193 |
+
*
|
194 |
+
* $('#tree1').jstree(); // creates an instance
|
195 |
+
* $('#tree2').jstree({ plugins : [] }); // create an instance with some options
|
196 |
+
* $('#tree1').jstree('open_node', '#branch_1'); // call a method on an existing instance, passing additional arguments
|
197 |
+
* $('#tree2').jstree(); // get an existing instance (or create an instance)
|
198 |
+
* $('#tree2').jstree(true); // get an existing instance (will not create new instance)
|
199 |
+
* $('#branch_1').jstree().select_node('#branch_1'); // get an instance (using a nested element and call a method)
|
200 |
+
*
|
201 |
+
* @name $().jstree([arg])
|
202 |
+
* @param {String|Object} arg
|
203 |
+
* @return {Mixed}
|
204 |
+
*/
|
205 |
+
$.fn.jstree = function (arg) {
|
206 |
+
// check for string argument
|
207 |
+
var is_method = (typeof arg === 'string'),
|
208 |
+
args = Array.prototype.slice.call(arguments, 1),
|
209 |
+
result = null;
|
210 |
+
if(arg === true && !this.length) { return false; }
|
211 |
+
this.each(function () {
|
212 |
+
// get the instance (if there is one) and method (if it exists)
|
213 |
+
var instance = $.jstree.reference(this),
|
214 |
+
method = is_method && instance ? instance[arg] : null;
|
215 |
+
// if calling a method, and method is available - execute on the instance
|
216 |
+
result = is_method && method ?
|
217 |
+
method.apply(instance, args) :
|
218 |
+
null;
|
219 |
+
// if there is no instance and no method is being called - create one
|
220 |
+
if(!instance && !is_method && (arg === undefined || $.isPlainObject(arg))) {
|
221 |
+
$.jstree.create(this, arg);
|
222 |
+
}
|
223 |
+
// if there is an instance and no method is called - return the instance
|
224 |
+
if( (instance && !is_method) || arg === true ) {
|
225 |
+
result = instance || false;
|
226 |
+
}
|
227 |
+
// if there was a method call which returned a result - break and return the value
|
228 |
+
if(result !== null && result !== undefined) {
|
229 |
+
return false;
|
230 |
+
}
|
231 |
+
});
|
232 |
+
// if there was a method call with a valid return value - return that, otherwise continue the chain
|
233 |
+
return result !== null && result !== undefined ?
|
234 |
+
result : this;
|
235 |
+
};
|
236 |
+
/**
|
237 |
+
* used to find elements containing an instance
|
238 |
+
*
|
239 |
+
* __Examples__
|
240 |
+
*
|
241 |
+
* $('div:jstree').each(function () {
|
242 |
+
* $(this).jstree('destroy');
|
243 |
+
* });
|
244 |
+
*
|
245 |
+
* @name $(':jstree')
|
246 |
+
* @return {jQuery}
|
247 |
+
*/
|
248 |
+
$.expr.pseudos.jstree = $.expr.createPseudo(function(search) {
|
249 |
+
return function(a) {
|
250 |
+
return $(a).hasClass('jstree') &&
|
251 |
+
$(a).data('jstree') !== undefined;
|
252 |
+
};
|
253 |
+
});
|
254 |
+
|
255 |
+
/**
|
256 |
+
* stores all defaults for the core
|
257 |
+
* @name $.jstree.defaults.core
|
258 |
+
*/
|
259 |
+
$.jstree.defaults.core = {
|
260 |
+
/**
|
261 |
+
* data configuration
|
262 |
+
*
|
263 |
+
* If left as `false` the HTML inside the jstree container element is used to populate the tree (that should be an unordered list with list items).
|
264 |
+
*
|
265 |
+
* You can also pass in a HTML string or a JSON array here.
|
266 |
+
*
|
267 |
+
* It is possible to pass in a standard jQuery-like AJAX config and jstree will automatically determine if the response is JSON or HTML and use that to populate the tree.
|
268 |
+
* In addition to the standard jQuery ajax options here you can suppy functions for `data` and `url`, the functions will be run in the current instance's scope and a param will be passed indicating which node is being loaded, the return value of those functions will be used.
|
269 |
+
*
|
270 |
+
* The last option is to specify a function, that function will receive the node being loaded as argument and a second param which is a function which should be called with the result.
|
271 |
+
*
|
272 |
+
* __Examples__
|
273 |
+
*
|
274 |
+
* // AJAX
|
275 |
+
* $('#tree').jstree({
|
276 |
+
* 'core' : {
|
277 |
+
* 'data' : {
|
278 |
+
* 'url' : '/get/children/',
|
279 |
+
* 'data' : function (node) {
|
280 |
+
* return { 'id' : node.id };
|
281 |
+
* }
|
282 |
+
* }
|
283 |
+
* });
|
284 |
+
*
|
285 |
+
* // direct data
|
286 |
+
* $('#tree').jstree({
|
287 |
+
* 'core' : {
|
288 |
+
* 'data' : [
|
289 |
+
* 'Simple root node',
|
290 |
+
* {
|
291 |
+
* 'id' : 'node_2',
|
292 |
+
* 'text' : 'Root node with options',
|
293 |
+
* 'state' : { 'opened' : true, 'selected' : true },
|
294 |
+
* 'children' : [ { 'text' : 'Child 1' }, 'Child 2']
|
295 |
+
* }
|
296 |
+
* ]
|
297 |
+
* }
|
298 |
+
* });
|
299 |
+
*
|
300 |
+
* // function
|
301 |
+
* $('#tree').jstree({
|
302 |
+
* 'core' : {
|
303 |
+
* 'data' : function (obj, callback) {
|
304 |
+
* callback.call(this, ['Root 1', 'Root 2']);
|
305 |
+
* }
|
306 |
+
* });
|
307 |
+
*
|
308 |
+
* @name $.jstree.defaults.core.data
|
309 |
+
*/
|
310 |
+
data : false,
|
311 |
+
/**
|
312 |
+
* configure the various strings used throughout the tree
|
313 |
+
*
|
314 |
+
* You can use an object where the key is the string you need to replace and the value is your replacement.
|
315 |
+
* Another option is to specify a function which will be called with an argument of the needed string and should return the replacement.
|
316 |
+
* If left as `false` no replacement is made.
|
317 |
+
*
|
318 |
+
* __Examples__
|
319 |
+
*
|
320 |
+
* $('#tree').jstree({
|
321 |
+
* 'core' : {
|
322 |
+
* 'strings' : {
|
323 |
+
* 'Loading ...' : 'Please wait ...'
|
324 |
+
* }
|
325 |
+
* }
|
326 |
+
* });
|
327 |
+
*
|
328 |
+
* @name $.jstree.defaults.core.strings
|
329 |
+
*/
|
330 |
+
strings : false,
|
331 |
+
/**
|
332 |
+
* determines what happens when a user tries to modify the structure of the tree
|
333 |
+
* If left as `false` all operations like create, rename, delete, move or copy are prevented.
|
334 |
+
* You can set this to `true` to allow all interactions or use a function to have better control.
|
335 |
+
*
|
336 |
+
* __Examples__
|
337 |
+
*
|
338 |
+
* $('#tree').jstree({
|
339 |
+
* 'core' : {
|
340 |
+
* 'check_callback' : function (operation, node, node_parent, node_position, more) {
|
341 |
+
* // operation can be 'create_node', 'rename_node', 'delete_node', 'move_node', 'copy_node' or 'edit'
|
342 |
+
* // in case of 'rename_node' node_position is filled with the new node name
|
343 |
+
* return operation === 'rename_node' ? true : false;
|
344 |
+
* }
|
345 |
+
* }
|
346 |
+
* });
|
347 |
+
*
|
348 |
+
* @name $.jstree.defaults.core.check_callback
|
349 |
+
*/
|
350 |
+
check_callback : false,
|
351 |
+
/**
|
352 |
+
* a callback called with a single object parameter in the instance's scope when something goes wrong (operation prevented, ajax failed, etc)
|
353 |
+
* @name $.jstree.defaults.core.error
|
354 |
+
*/
|
355 |
+
error : $.noop,
|
356 |
+
/**
|
357 |
+
* the open / close animation duration in milliseconds - set this to `false` to disable the animation (default is `200`)
|
358 |
+
* @name $.jstree.defaults.core.animation
|
359 |
+
*/
|
360 |
+
animation : 200,
|
361 |
+
/**
|
362 |
+
* a boolean indicating if multiple nodes can be selected
|
363 |
+
* @name $.jstree.defaults.core.multiple
|
364 |
+
*/
|
365 |
+
multiple : true,
|
366 |
+
/**
|
367 |
+
* theme configuration object
|
368 |
+
* @name $.jstree.defaults.core.themes
|
369 |
+
*/
|
370 |
+
themes : {
|
371 |
+
/**
|
372 |
+
* the name of the theme to use (if left as `false` the default theme is used)
|
373 |
+
* @name $.jstree.defaults.core.themes.name
|
374 |
+
*/
|
375 |
+
name : false,
|
376 |
+
/**
|
377 |
+
* the URL of the theme's CSS file, leave this as `false` if you have manually included the theme CSS (recommended). You can set this to `true` too which will try to autoload the theme.
|
378 |
+
* @name $.jstree.defaults.core.themes.url
|
379 |
+
*/
|
380 |
+
url : false,
|
381 |
+
/**
|
382 |
+
* the location of all jstree themes - only used if `url` is set to `true`
|
383 |
+
* @name $.jstree.defaults.core.themes.dir
|
384 |
+
*/
|
385 |
+
dir : false,
|
386 |
+
/**
|
387 |
+
* a boolean indicating if connecting dots are shown
|
388 |
+
* @name $.jstree.defaults.core.themes.dots
|
389 |
+
*/
|
390 |
+
dots : true,
|
391 |
+
/**
|
392 |
+
* a boolean indicating if node icons are shown
|
393 |
+
* @name $.jstree.defaults.core.themes.icons
|
394 |
+
*/
|
395 |
+
icons : true,
|
396 |
+
/**
|
397 |
+
* a boolean indicating if node ellipsis should be shown - this only works with a fixed with on the container
|
398 |
+
* @name $.jstree.defaults.core.themes.ellipsis
|
399 |
+
*/
|
400 |
+
ellipsis : false,
|
401 |
+
/**
|
402 |
+
* a boolean indicating if the tree background is striped
|
403 |
+
* @name $.jstree.defaults.core.themes.stripes
|
404 |
+
*/
|
405 |
+
stripes : false,
|
406 |
+
/**
|
407 |
+
* a string (or boolean `false`) specifying the theme variant to use (if the theme supports variants)
|
408 |
+
* @name $.jstree.defaults.core.themes.variant
|
409 |
+
*/
|
410 |
+
variant : false,
|
411 |
+
/**
|
412 |
+
* a boolean specifying if a reponsive version of the theme should kick in on smaller screens (if the theme supports it). Defaults to `false`.
|
413 |
+
* @name $.jstree.defaults.core.themes.responsive
|
414 |
+
*/
|
415 |
+
responsive : false
|
416 |
+
},
|
417 |
+
/**
|
418 |
+
* if left as `true` all parents of all selected nodes will be opened once the tree loads (so that all selected nodes are visible to the user)
|
419 |
+
* @name $.jstree.defaults.core.expand_selected_onload
|
420 |
+
*/
|
421 |
+
expand_selected_onload : true,
|
422 |
+
/**
|
423 |
+
* if left as `true` web workers will be used to parse incoming JSON data where possible, so that the UI will not be blocked by large requests. Workers are however about 30% slower. Defaults to `true`
|
424 |
+
* @name $.jstree.defaults.core.worker
|
425 |
+
*/
|
426 |
+
worker : true,
|
427 |
+
/**
|
428 |
+
* Force node text to plain text (and escape HTML). Defaults to `false`
|
429 |
+
* @name $.jstree.defaults.core.force_text
|
430 |
+
*/
|
431 |
+
force_text : false,
|
432 |
+
/**
|
433 |
+
* Should the node should be toggled if the text is double clicked . Defaults to `true`
|
434 |
+
* @name $.jstree.defaults.core.dblclick_toggle
|
435 |
+
*/
|
436 |
+
dblclick_toggle : true,
|
437 |
+
/**
|
438 |
+
* Should the loaded nodes be part of the state. Defaults to `false`
|
439 |
+
* @name $.jstree.defaults.core.loaded_state
|
440 |
+
*/
|
441 |
+
loaded_state : false,
|
442 |
+
/**
|
443 |
+
* Should the last active node be focused when the tree container is blurred and the focused again. This helps working with screen readers. Defaults to `true`
|
444 |
+
* @name $.jstree.defaults.core.restore_focus
|
445 |
+
*/
|
446 |
+
restore_focus : true,
|
447 |
+
/**
|
448 |
+
* Default keyboard shortcuts (an object where each key is the button name or combo - like 'enter', 'ctrl-space', 'p', etc and the value is the function to execute in the instance's scope)
|
449 |
+
* @name $.jstree.defaults.core.keyboard
|
450 |
+
*/
|
451 |
+
keyboard : {
|
452 |
+
'ctrl-space': function (e) {
|
453 |
+
// aria defines space only with Ctrl
|
454 |
+
e.type = "click";
|
455 |
+
$(e.currentTarget).trigger(e);
|
456 |
+
},
|
457 |
+
'enter': function (e) {
|
458 |
+
// enter
|
459 |
+
e.type = "click";
|
460 |
+
$(e.currentTarget).trigger(e);
|
461 |
+
},
|
462 |
+
'left': function (e) {
|
463 |
+
// left
|
464 |
+
e.preventDefault();
|
465 |
+
if(this.is_open(e.currentTarget)) {
|
466 |
+
this.close_node(e.currentTarget);
|
467 |
+
}
|
468 |
+
else {
|
469 |
+
var o = this.get_parent(e.currentTarget);
|
470 |
+
if(o && o.id !== $.jstree.root) { this.get_node(o, true).children('.jstree-anchor').focus(); }
|
471 |
+
}
|
472 |
+
},
|
473 |
+
'up': function (e) {
|
474 |
+
// up
|
475 |
+
e.preventDefault();
|
476 |
+
var o = this.get_prev_dom(e.currentTarget);
|
477 |
+
if(o && o.length) { o.children('.jstree-anchor').focus(); }
|
478 |
+
},
|
479 |
+
'right': function (e) {
|
480 |
+
// right
|
481 |
+
e.preventDefault();
|
482 |
+
if(this.is_closed(e.currentTarget)) {
|
483 |
+
this.open_node(e.currentTarget, function (o) { this.get_node(o, true).children('.jstree-anchor').focus(); });
|
484 |
+
}
|
485 |
+
else if (this.is_open(e.currentTarget)) {
|
486 |
+
var o = this.get_node(e.currentTarget, true).children('.jstree-children')[0];
|
487 |
+
if(o) { $(this._firstChild(o)).children('.jstree-anchor').focus(); }
|
488 |
+
}
|
489 |
+
},
|
490 |
+
'down': function (e) {
|
491 |
+
// down
|
492 |
+
e.preventDefault();
|
493 |
+
var o = this.get_next_dom(e.currentTarget);
|
494 |
+
if(o && o.length) { o.children('.jstree-anchor').focus(); }
|
495 |
+
},
|
496 |
+
'*': function (e) {
|
497 |
+
// aria defines * on numpad as open_all - not very common
|
498 |
+
this.open_all();
|
499 |
+
},
|
500 |
+
'home': function (e) {
|
501 |
+
// home
|
502 |
+
e.preventDefault();
|
503 |
+
var o = this._firstChild(this.get_container_ul()[0]);
|
504 |
+
if(o) { $(o).children('.jstree-anchor').filter(':visible').focus(); }
|
505 |
+
},
|
506 |
+
'end': function (e) {
|
507 |
+
// end
|
508 |
+
e.preventDefault();
|
509 |
+
this.element.find('.jstree-anchor').filter(':visible').last().focus();
|
510 |
+
},
|
511 |
+
'f2': function (e) {
|
512 |
+
// f2 - safe to include - if check_callback is false it will fail
|
513 |
+
e.preventDefault();
|
514 |
+
this.edit(e.currentTarget);
|
515 |
+
}
|
516 |
+
}
|
517 |
+
};
|
518 |
+
$.jstree.core.prototype = {
|
519 |
+
/**
|
520 |
+
* used to decorate an instance with a plugin. Used internally.
|
521 |
+
* @private
|
522 |
+
* @name plugin(deco [, opts])
|
523 |
+
* @param {String} deco the plugin to decorate with
|
524 |
+
* @param {Object} opts options for the plugin
|
525 |
+
* @return {jsTree}
|
526 |
+
*/
|
527 |
+
plugin : function (deco, opts) {
|
528 |
+
var Child = $.jstree.plugins[deco];
|
529 |
+
if(Child) {
|
530 |
+
this._data[deco] = {};
|
531 |
+
Child.prototype = this;
|
532 |
+
return new Child(opts, this);
|
533 |
+
}
|
534 |
+
return this;
|
535 |
+
},
|
536 |
+
/**
|
537 |
+
* initialize the instance. Used internally.
|
538 |
+
* @private
|
539 |
+
* @name init(el, optons)
|
540 |
+
* @param {DOMElement|jQuery|String} el the element we are transforming
|
541 |
+
* @param {Object} options options for this instance
|
542 |
+
* @trigger init.jstree, loading.jstree, loaded.jstree, ready.jstree, changed.jstree
|
543 |
+
*/
|
544 |
+
init : function (el, options) {
|
545 |
+
this._model = {
|
546 |
+
data : {},
|
547 |
+
changed : [],
|
548 |
+
force_full_redraw : false,
|
549 |
+
redraw_timeout : false,
|
550 |
+
default_state : {
|
551 |
+
loaded : true,
|
552 |
+
opened : false,
|
553 |
+
selected : false,
|
554 |
+
disabled : false
|
555 |
+
}
|
556 |
+
};
|
557 |
+
this._model.data[$.jstree.root] = {
|
558 |
+
id : $.jstree.root,
|
559 |
+
parent : null,
|
560 |
+
parents : [],
|
561 |
+
children : [],
|
562 |
+
children_d : [],
|
563 |
+
state : { loaded : false }
|
564 |
+
};
|
565 |
+
|
566 |
+
this.element = $(el).addClass('jstree jstree-' + this._id);
|
567 |
+
this.settings = options;
|
568 |
+
|
569 |
+
this._data.core.ready = false;
|
570 |
+
this._data.core.loaded = false;
|
571 |
+
this._data.core.rtl = (this.element.css("direction") === "rtl");
|
572 |
+
this.element[this._data.core.rtl ? 'addClass' : 'removeClass']("jstree-rtl");
|
573 |
+
this.element.attr('role','tree');
|
574 |
+
if(this.settings.core.multiple) {
|
575 |
+
this.element.attr('aria-multiselectable', true);
|
576 |
+
}
|
577 |
+
if(!this.element.attr('tabindex')) {
|
578 |
+
this.element.attr('tabindex','0');
|
579 |
+
}
|
580 |
+
|
581 |
+
this.bind();
|
582 |
+
/**
|
583 |
+
* triggered after all events are bound
|
584 |
+
* @event
|
585 |
+
* @name init.jstree
|
586 |
+
*/
|
587 |
+
this.trigger("init");
|
588 |
+
|
589 |
+
this._data.core.original_container_html = this.element.find(" > ul > li").clone(true);
|
590 |
+
this._data.core.original_container_html
|
591 |
+
.find("li").addBack()
|
592 |
+
.contents().filter(function() {
|
593 |
+
return this.nodeType === 3 && (!this.nodeValue || /^\s+$/.test(this.nodeValue));
|
594 |
+
})
|
595 |
+
.remove();
|
596 |
+
this.element.html("<"+"ul class='jstree-container-ul jstree-children' role='group'><"+"li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='tree-item'><i class='jstree-icon jstree-ocl'></i><"+"a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>" + this.get_string("Loading ...") + "</a></li></ul>");
|
597 |
+
this.element.attr('aria-activedescendant','j' + this._id + '_loading');
|
598 |
+
this._data.core.li_height = this.get_container_ul().children("li").first().outerHeight() || 24;
|
599 |
+
this._data.core.node = this._create_prototype_node();
|
600 |
+
/**
|
601 |
+
* triggered after the loading text is shown and before loading starts
|
602 |
+
* @event
|
603 |
+
* @name loading.jstree
|
604 |
+
*/
|
605 |
+
this.trigger("loading");
|
606 |
+
this.load_node($.jstree.root);
|
607 |
+
},
|
608 |
+
/**
|
609 |
+
* destroy an instance
|
610 |
+
* @name destroy()
|
611 |
+
* @param {Boolean} keep_html if not set to `true` the container will be emptied, otherwise the current DOM elements will be kept intact
|
612 |
+
*/
|
613 |
+
destroy : function (keep_html) {
|
614 |
+
/**
|
615 |
+
* triggered before the tree is destroyed
|
616 |
+
* @event
|
617 |
+
* @name destroy.jstree
|
618 |
+
*/
|
619 |
+
this.trigger("destroy");
|
620 |
+
if(this._wrk) {
|
621 |
+
try {
|
622 |
+
window.URL.revokeObjectURL(this._wrk);
|
623 |
+
this._wrk = null;
|
624 |
+
}
|
625 |
+
catch (ignore) { }
|
626 |
+
}
|
627 |
+
if(!keep_html) { this.element.empty(); }
|
628 |
+
this.teardown();
|
629 |
+
},
|
630 |
+
/**
|
631 |
+
* Create a prototype node
|
632 |
+
* @name _create_prototype_node()
|
633 |
+
* @return {DOMElement}
|
634 |
+
*/
|
635 |
+
_create_prototype_node : function () {
|
636 |
+
var _node = document.createElement('LI'), _temp1, _temp2;
|
637 |
+
_node.setAttribute('role', 'treeitem');
|
638 |
+
_temp1 = document.createElement('I');
|
639 |
+
_temp1.className = 'jstree-icon jstree-ocl';
|
640 |
+
_temp1.setAttribute('role', 'presentation');
|
641 |
+
_node.appendChild(_temp1);
|
642 |
+
_temp1 = document.createElement('A');
|
643 |
+
_temp1.className = 'jstree-anchor';
|
644 |
+
_temp1.setAttribute('href','#');
|
645 |
+
_temp1.setAttribute('tabindex','-1');
|
646 |
+
_temp2 = document.createElement('I');
|
647 |
+
_temp2.className = 'jstree-icon jstree-themeicon';
|
648 |
+
_temp2.setAttribute('role', 'presentation');
|
649 |
+
_temp1.appendChild(_temp2);
|
650 |
+
_node.appendChild(_temp1);
|
651 |
+
_temp1 = _temp2 = null;
|
652 |
+
|
653 |
+
return _node;
|
654 |
+
},
|
655 |
+
_kbevent_to_func : function (e) {
|
656 |
+
var keys = {
|
657 |
+
8: "Backspace", 9: "Tab", 13: "Return", 19: "Pause", 27: "Esc",
|
658 |
+
32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home",
|
659 |
+
37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "Print", 45: "Insert",
|
660 |
+
46: "Delete", 96: "Numpad0", 97: "Numpad1", 98: "Numpad2", 99 : "Numpad3",
|
661 |
+
100: "Numpad4", 101: "Numpad5", 102: "Numpad6", 103: "Numpad7",
|
662 |
+
104: "Numpad8", 105: "Numpad9", '-13': "NumpadEnter", 112: "F1",
|
663 |
+
113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7",
|
664 |
+
119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "Numlock",
|
665 |
+
145: "Scrolllock", 16: 'Shift', 17: 'Ctrl', 18: 'Alt',
|
666 |
+
48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',
|
667 |
+
54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',
|
668 |
+
66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',
|
669 |
+
73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',
|
670 |
+
80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',
|
671 |
+
87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',
|
672 |
+
186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',
|
673 |
+
219: '[', 220: '\\',221: ']', 222: "'", 111: '/', 106: '*', 173: '-'
|
674 |
+
};
|
675 |
+
var parts = [];
|
676 |
+
if (e.ctrlKey) { parts.push('ctrl'); }
|
677 |
+
if (e.altKey) { parts.push('alt'); }
|
678 |
+
if (e.shiftKey) { parts.push('shift'); }
|
679 |
+
parts.push(keys[e.which] || e.which);
|
680 |
+
parts = parts.sort().join('-').toLowerCase();
|
681 |
+
|
682 |
+
var kb = this.settings.core.keyboard, i, tmp;
|
683 |
+
for (i in kb) {
|
684 |
+
if (kb.hasOwnProperty(i)) {
|
685 |
+
tmp = i;
|
686 |
+
if (tmp !== '-' && tmp !== '+') {
|
687 |
+
tmp = tmp.replace('--', '-MINUS').replace('+-', '-MINUS').replace('++', '-PLUS').replace('-+', '-PLUS');
|
688 |
+
tmp = tmp.split(/-|\+/).sort().join('-').replace('MINUS', '-').replace('PLUS', '+').toLowerCase();
|
689 |
+
}
|
690 |
+
if (tmp === parts) {
|
691 |
+
return kb[i];
|
692 |
+
}
|
693 |
+
}
|
694 |
+
}
|
695 |
+
return null;
|
696 |
+
},
|
697 |
+
/**
|
698 |
+
* part of the destroying of an instance. Used internally.
|
699 |
+
* @private
|
700 |
+
* @name teardown()
|
701 |
+
*/
|
702 |
+
teardown : function () {
|
703 |
+
this.unbind();
|
704 |
+
this.element
|
705 |
+
.removeClass('jstree')
|
706 |
+
.removeData('jstree')
|
707 |
+
.find("[class^='jstree']")
|
708 |
+
.addBack()
|
709 |
+
.attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); });
|
710 |
+
this.element = null;
|
711 |
+
},
|
712 |
+
/**
|
713 |
+
* bind all events. Used internally.
|
714 |
+
* @private
|
715 |
+
* @name bind()
|
716 |
+
*/
|
717 |
+
bind : function () {
|
718 |
+
var word = '',
|
719 |
+
tout = null,
|
720 |
+
was_click = 0;
|
721 |
+
this.element
|
722 |
+
.on("dblclick.jstree", function (e) {
|
723 |
+
if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; }
|
724 |
+
if(document.selection && document.selection.empty) {
|
725 |
+
document.selection.empty();
|
726 |
+
}
|
727 |
+
else {
|
728 |
+
if(window.getSelection) {
|
729 |
+
var sel = window.getSelection();
|
730 |
+
try {
|
731 |
+
sel.removeAllRanges();
|
732 |
+
sel.collapse();
|
733 |
+
} catch (ignore) { }
|
734 |
+
}
|
735 |
+
}
|
736 |
+
})
|
737 |
+
.on("mousedown.jstree", $.proxy(function (e) {
|
738 |
+
if(e.target === this.element[0]) {
|
739 |
+
e.preventDefault(); // prevent losing focus when clicking scroll arrows (FF, Chrome)
|
740 |
+
was_click = +(new Date()); // ie does not allow to prevent losing focus
|
741 |
+
}
|
742 |
+
}, this))
|
743 |
+
.on("mousedown.jstree", ".jstree-ocl", function (e) {
|
744 |
+
e.preventDefault(); // prevent any node inside from losing focus when clicking the open/close icon
|
745 |
+
})
|
746 |
+
.on("click.jstree", ".jstree-ocl", $.proxy(function (e) {
|
747 |
+
this.toggle_node(e.target);
|
748 |
+
}, this))
|
749 |
+
.on("dblclick.jstree", ".jstree-anchor", $.proxy(function (e) {
|
750 |
+
if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; }
|
751 |
+
if(this.settings.core.dblclick_toggle) {
|
752 |
+
this.toggle_node(e.target);
|
753 |
+
}
|
754 |
+
}, this))
|
755 |
+
.on("click.jstree", ".jstree-anchor", $.proxy(function (e) {
|
756 |
+
e.preventDefault();
|
757 |
+
if(e.currentTarget !== document.activeElement) { $(e.currentTarget).focus(); }
|
758 |
+
this.activate_node(e.currentTarget, e);
|
759 |
+
}, this))
|
760 |
+
.on('keydown.jstree', '.jstree-anchor', $.proxy(function (e) {
|
761 |
+
if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; }
|
762 |
+
if(this._data.core.rtl) {
|
763 |
+
if(e.which === 37) { e.which = 39; }
|
764 |
+
else if(e.which === 39) { e.which = 37; }
|
765 |
+
}
|
766 |
+
var f = this._kbevent_to_func(e);
|
767 |
+
if (f) {
|
768 |
+
var r = f.call(this, e);
|
769 |
+
if (r === false || r === true) {
|
770 |
+
return r;
|
771 |
+
}
|
772 |
+
}
|
773 |
+
}, this))
|
774 |
+
.on("load_node.jstree", $.proxy(function (e, data) {
|
775 |
+
if(data.status) {
|
776 |
+
if(data.node.id === $.jstree.root && !this._data.core.loaded) {
|
777 |
+
this._data.core.loaded = true;
|
778 |
+
if(this._firstChild(this.get_container_ul()[0])) {
|
779 |
+
this.element.attr('aria-activedescendant',this._firstChild(this.get_container_ul()[0]).id);
|
780 |
+
}
|
781 |
+
/**
|
782 |
+
* triggered after the root node is loaded for the first time
|
783 |
+
* @event
|
784 |
+
* @name loaded.jstree
|
785 |
+
*/
|
786 |
+
this.trigger("loaded");
|
787 |
+
}
|
788 |
+
if(!this._data.core.ready) {
|
789 |
+
setTimeout($.proxy(function() {
|
790 |
+
if(this.element && !this.get_container_ul().find('.jstree-loading').length) {
|
791 |
+
this._data.core.ready = true;
|
792 |
+
if(this._data.core.selected.length) {
|
793 |
+
if(this.settings.core.expand_selected_onload) {
|
794 |
+
var tmp = [], i, j;
|
795 |
+
for(i = 0, j = this._data.core.selected.length; i < j; i++) {
|
796 |
+
tmp = tmp.concat(this._model.data[this._data.core.selected[i]].parents);
|
797 |
+
}
|
798 |
+
tmp = $.vakata.array_unique(tmp);
|
799 |
+
for(i = 0, j = tmp.length; i < j; i++) {
|
800 |
+
this.open_node(tmp[i], false, 0);
|
801 |
+
}
|
802 |
+
}
|
803 |
+
this.trigger('changed', { 'action' : 'ready', 'selected' : this._data.core.selected });
|
804 |
+
}
|
805 |
+
/**
|
806 |
+
* triggered after all nodes are finished loading
|
807 |
+
* @event
|
808 |
+
* @name ready.jstree
|
809 |
+
*/
|
810 |
+
this.trigger("ready");
|
811 |
+
}
|
812 |
+
}, this), 0);
|
813 |
+
}
|
814 |
+
}
|
815 |
+
}, this))
|
816 |
+
// quick searching when the tree is focused
|
817 |
+
.on('keypress.jstree', $.proxy(function (e) {
|
818 |
+
if(e.target.tagName && e.target.tagName.toLowerCase() === "input") { return true; }
|
819 |
+
if(tout) { clearTimeout(tout); }
|
820 |
+
tout = setTimeout(function () {
|
821 |
+
word = '';
|
822 |
+
}, 500);
|
823 |
+
|
824 |
+
var chr = String.fromCharCode(e.which).toLowerCase(),
|
825 |
+
col = this.element.find('.jstree-anchor').filter(':visible'),
|
826 |
+
ind = col.index(document.activeElement) || 0,
|
827 |
+
end = false;
|
828 |
+
word += chr;
|
829 |
+
|
830 |
+
// match for whole word from current node down (including the current node)
|
831 |
+
if(word.length > 1) {
|
832 |
+
col.slice(ind).each($.proxy(function (i, v) {
|
833 |
+
if($(v).text().toLowerCase().indexOf(word) === 0) {
|
834 |
+
$(v).focus();
|
835 |
+
end = true;
|
836 |
+
return false;
|
837 |
+
}
|
838 |
+
}, this));
|
839 |
+
if(end) { return; }
|
840 |
+
|
841 |
+
// match for whole word from the beginning of the tree
|
842 |
+
col.slice(0, ind).each($.proxy(function (i, v) {
|
843 |
+
if($(v).text().toLowerCase().indexOf(word) === 0) {
|
844 |
+
$(v).focus();
|
845 |
+
end = true;
|
846 |
+
return false;
|
847 |
+
}
|
848 |
+
}, this));
|
849 |
+
if(end) { return; }
|
850 |
+
}
|
851 |
+
// list nodes that start with that letter (only if word consists of a single char)
|
852 |
+
if(new RegExp('^' + chr.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + '+$').test(word)) {
|
853 |
+
// search for the next node starting with that letter
|
854 |
+
col.slice(ind + 1).each($.proxy(function (i, v) {
|
855 |
+
if($(v).text().toLowerCase().charAt(0) === chr) {
|
856 |
+
$(v).focus();
|
857 |
+
end = true;
|
858 |
+
return false;
|
859 |
+
}
|
860 |
+
}, this));
|
861 |
+
if(end) { return; }
|
862 |
+
|
863 |
+
// search from the beginning
|
864 |
+
col.slice(0, ind + 1).each($.proxy(function (i, v) {
|
865 |
+
if($(v).text().toLowerCase().charAt(0) === chr) {
|
866 |
+
$(v).focus();
|
867 |
+
end = true;
|
868 |
+
return false;
|
869 |
+
}
|
870 |
+
}, this));
|
871 |
+
if(end) { return; }
|
872 |
+
}
|
873 |
+
}, this))
|
874 |
+
// THEME RELATED
|
875 |
+
.on("init.jstree", $.proxy(function () {
|
876 |
+
var s = this.settings.core.themes;
|
877 |
+
this._data.core.themes.dots = s.dots;
|
878 |
+
this._data.core.themes.stripes = s.stripes;
|
879 |
+
this._data.core.themes.icons = s.icons;
|
880 |
+
this._data.core.themes.ellipsis = s.ellipsis;
|
881 |
+
this.set_theme(s.name || "default", s.url);
|
882 |
+
this.set_theme_variant(s.variant);
|
883 |
+
}, this))
|
884 |
+
.on("loading.jstree", $.proxy(function () {
|
885 |
+
this[ this._data.core.themes.dots ? "show_dots" : "hide_dots" ]();
|
886 |
+
this[ this._data.core.themes.icons ? "show_icons" : "hide_icons" ]();
|
887 |
+
this[ this._data.core.themes.stripes ? "show_stripes" : "hide_stripes" ]();
|
888 |
+
this[ this._data.core.themes.ellipsis ? "show_ellipsis" : "hide_ellipsis" ]();
|
889 |
+
}, this))
|
890 |
+
.on('blur.jstree', '.jstree-anchor', $.proxy(function (e) {
|
891 |
+
this._data.core.focused = null;
|
892 |
+
$(e.currentTarget).filter('.jstree-hovered').mouseleave();
|
893 |
+
this.element.attr('tabindex', '0');
|
894 |
+
}, this))
|
895 |
+
.on('focus.jstree', '.jstree-anchor', $.proxy(function (e) {
|
896 |
+
var tmp = this.get_node(e.currentTarget);
|
897 |
+
if(tmp && tmp.id) {
|
898 |
+
this._data.core.focused = tmp.id;
|
899 |
+
}
|
900 |
+
this.element.find('.jstree-hovered').not(e.currentTarget).mouseleave();
|
901 |
+
$(e.currentTarget).mouseenter();
|
902 |
+
this.element.attr('tabindex', '-1');
|
903 |
+
}, this))
|
904 |
+
.on('focus.jstree', $.proxy(function () {
|
905 |
+
if(+(new Date()) - was_click > 500 && !this._data.core.focused && this.settings.core.restore_focus) {
|
906 |
+
was_click = 0;
|
907 |
+
var act = this.get_node(this.element.attr('aria-activedescendant'), true);
|
908 |
+
if(act) {
|
909 |
+
act.find('> .jstree-anchor').focus();
|
910 |
+
}
|
911 |
+
}
|
912 |
+
}, this))
|
913 |
+
.on('mouseenter.jstree', '.jstree-anchor', $.proxy(function (e) {
|
914 |
+
this.hover_node(e.currentTarget);
|
915 |
+
}, this))
|
916 |
+
.on('mouseleave.jstree', '.jstree-anchor', $.proxy(function (e) {
|
917 |
+
this.dehover_node(e.currentTarget);
|
918 |
+
}, this));
|
919 |
+
},
|
920 |
+
/**
|
921 |
+
* part of the destroying of an instance. Used internally.
|
922 |
+
* @private
|
923 |
+
* @name unbind()
|
924 |
+
*/
|
925 |
+
unbind : function () {
|
926 |
+
this.element.off('.jstree');
|
927 |
+
$(document).off('.jstree-' + this._id);
|
928 |
+
},
|
929 |
+
/**
|
930 |
+
* trigger an event. Used internally.
|
931 |
+
* @private
|
932 |
+
* @name trigger(ev [, data])
|
933 |
+
* @param {String} ev the name of the event to trigger
|
934 |
+
* @param {Object} data additional data to pass with the event
|
935 |
+
*/
|
936 |
+
trigger : function (ev, data) {
|
937 |
+
if(!data) {
|
938 |
+
data = {};
|
939 |
+
}
|
940 |
+
data.instance = this;
|
941 |
+
this.element.triggerHandler(ev.replace('.jstree','') + '.jstree', data);
|
942 |
+
},
|
943 |
+
/**
|
944 |
+
* returns the jQuery extended instance container
|
945 |
+
* @name get_container()
|
946 |
+
* @return {jQuery}
|
947 |
+
*/
|
948 |
+
get_container : function () {
|
949 |
+
return this.element;
|
950 |
+
},
|
951 |
+
/**
|
952 |
+
* returns the jQuery extended main UL node inside the instance container. Used internally.
|
953 |
+
* @private
|
954 |
+
* @name get_container_ul()
|
955 |
+
* @return {jQuery}
|
956 |
+
*/
|
957 |
+
get_container_ul : function () {
|
958 |
+
return this.element.children(".jstree-children").first();
|
959 |
+
},
|
960 |
+
/**
|
961 |
+
* gets string replacements (localization). Used internally.
|
962 |
+
* @private
|
963 |
+
* @name get_string(key)
|
964 |
+
* @param {String} key
|
965 |
+
* @return {String}
|
966 |
+
*/
|
967 |
+
get_string : function (key) {
|
968 |
+
var a = this.settings.core.strings;
|
969 |
+
if($.isFunction(a)) { return a.call(this, key); }
|
970 |
+
if(a && a[key]) { return a[key]; }
|
971 |
+
return key;
|
972 |
+
},
|
973 |
+
/**
|
974 |
+
* gets the first child of a DOM node. Used internally.
|
975 |
+
* @private
|
976 |
+
* @name _firstChild(dom)
|
977 |
+
* @param {DOMElement} dom
|
978 |
+
* @return {DOMElement}
|
979 |
+
*/
|
980 |
+
_firstChild : function (dom) {
|
981 |
+
dom = dom ? dom.firstChild : null;
|
982 |
+
while(dom !== null && dom.nodeType !== 1) {
|
983 |
+
dom = dom.nextSibling;
|
984 |
+
}
|
985 |
+
return dom;
|
986 |
+
},
|
987 |
+
/**
|
988 |
+
* gets the next sibling of a DOM node. Used internally.
|
989 |
+
* @private
|
990 |
+
* @name _nextSibling(dom)
|
991 |
+
* @param {DOMElement} dom
|
992 |
+
* @return {DOMElement}
|
993 |
+
*/
|
994 |
+
_nextSibling : function (dom) {
|
995 |
+
dom = dom ? dom.nextSibling : null;
|
996 |
+
while(dom !== null && dom.nodeType !== 1) {
|
997 |
+
dom = dom.nextSibling;
|
998 |
+
}
|
999 |
+
return dom;
|
1000 |
+
},
|
1001 |
+
/**
|
1002 |
+
* gets the previous sibling of a DOM node. Used internally.
|
1003 |
+
* @private
|
1004 |
+
* @name _previousSibling(dom)
|
1005 |
+
* @param {DOMElement} dom
|
1006 |
+
* @return {DOMElement}
|
1007 |
+
*/
|
1008 |
+
_previousSibling : function (dom) {
|
1009 |
+
dom = dom ? dom.previousSibling : null;
|
1010 |
+
while(dom !== null && dom.nodeType !== 1) {
|
1011 |
+
dom = dom.previousSibling;
|
1012 |
+
}
|
1013 |
+
return dom;
|
1014 |
+
},
|
1015 |
+
/**
|
1016 |
+
* get the JSON representation of a node (or the actual jQuery extended DOM node) by using any input (child DOM element, ID string, selector, etc)
|
1017 |
+
* @name get_node(obj [, as_dom])
|
1018 |
+
* @param {mixed} obj
|
1019 |
+
* @param {Boolean} as_dom
|
1020 |
+
* @return {Object|jQuery}
|
1021 |
+
*/
|
1022 |
+
get_node : function (obj, as_dom) {
|
1023 |
+
if(obj && obj.id) {
|
1024 |
+
obj = obj.id;
|
1025 |
+
}
|
1026 |
+
var dom;
|
1027 |
+
try {
|
1028 |
+
if(this._model.data[obj]) {
|
1029 |
+
obj = this._model.data[obj];
|
1030 |
+
}
|
1031 |
+
else if(typeof obj === "string" && this._model.data[obj.replace(/^#/, '')]) {
|
1032 |
+
obj = this._model.data[obj.replace(/^#/, '')];
|
1033 |
+
}
|
1034 |
+
else if(typeof obj === "string" && (dom = $('#' + obj.replace($.jstree.idregex,'\\$&'), this.element)).length && this._model.data[dom.closest('.jstree-node').attr('id')]) {
|
1035 |
+
obj = this._model.data[dom.closest('.jstree-node').attr('id')];
|
1036 |
+
}
|
1037 |
+
else if((dom = $(obj, this.element)).length && this._model.data[dom.closest('.jstree-node').attr('id')]) {
|
1038 |
+
obj = this._model.data[dom.closest('.jstree-node').attr('id')];
|
1039 |
+
}
|
1040 |
+
else if((dom = $(obj, this.element)).length && dom.hasClass('jstree')) {
|
1041 |
+
obj = this._model.data[$.jstree.root];
|
1042 |
+
}
|
1043 |
+
else {
|
1044 |
+
return false;
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
if(as_dom) {
|
1048 |
+
obj = obj.id === $.jstree.root ? this.element : $('#' + obj.id.replace($.jstree.idregex,'\\$&'), this.element);
|
1049 |
+
}
|
1050 |
+
return obj;
|
1051 |
+
} catch (ex) { return false; }
|
1052 |
+
},
|
1053 |
+
/**
|
1054 |
+
* get the path to a node, either consisting of node texts, or of node IDs, optionally glued together (otherwise an array)
|
1055 |
+
* @name get_path(obj [, glue, ids])
|
1056 |
+
* @param {mixed} obj the node
|
1057 |
+
* @param {String} glue if you want the path as a string - pass the glue here (for example '/'), if a falsy value is supplied here, an array is returned
|
1058 |
+
* @param {Boolean} ids if set to true build the path using ID, otherwise node text is used
|
1059 |
+
* @return {mixed}
|
1060 |
+
*/
|
1061 |
+
get_path : function (obj, glue, ids) {
|
1062 |
+
obj = obj.parents ? obj : this.get_node(obj);
|
1063 |
+
if(!obj || obj.id === $.jstree.root || !obj.parents) {
|
1064 |
+
return false;
|
1065 |
+
}
|
1066 |
+
var i, j, p = [];
|
1067 |
+
p.push(ids ? obj.id : obj.text);
|
1068 |
+
for(i = 0, j = obj.parents.length; i < j; i++) {
|
1069 |
+
p.push(ids ? obj.parents[i] : this.get_text(obj.parents[i]));
|
1070 |
+
}
|
1071 |
+
p = p.reverse().slice(1);
|
1072 |
+
return glue ? p.join(glue) : p;
|
1073 |
+
},
|
1074 |
+
/**
|
1075 |
+
* get the next visible node that is below the `obj` node. If `strict` is set to `true` only sibling nodes are returned.
|
1076 |
+
* @name get_next_dom(obj [, strict])
|
1077 |
+
* @param {mixed} obj
|
1078 |
+
* @param {Boolean} strict
|
1079 |
+
* @return {jQuery}
|
1080 |
+
*/
|
1081 |
+
get_next_dom : function (obj, strict) {
|
1082 |
+
var tmp;
|
1083 |
+
obj = this.get_node(obj, true);
|
1084 |
+
if(obj[0] === this.element[0]) {
|
1085 |
+
tmp = this._firstChild(this.get_container_ul()[0]);
|
1086 |
+
while (tmp && tmp.offsetHeight === 0) {
|
1087 |
+
tmp = this._nextSibling(tmp);
|
1088 |
+
}
|
1089 |
+
return tmp ? $(tmp) : false;
|
1090 |
+
}
|
1091 |
+
if(!obj || !obj.length) {
|
1092 |
+
return false;
|
1093 |
+
}
|
1094 |
+
if(strict) {
|
1095 |
+
tmp = obj[0];
|
1096 |
+
do {
|
1097 |
+
tmp = this._nextSibling(tmp);
|
1098 |
+
} while (tmp && tmp.offsetHeight === 0);
|
1099 |
+
return tmp ? $(tmp) : false;
|
1100 |
+
}
|
1101 |
+
if(obj.hasClass("jstree-open")) {
|
1102 |
+
tmp = this._firstChild(obj.children('.jstree-children')[0]);
|
1103 |
+
while (tmp && tmp.offsetHeight === 0) {
|
1104 |
+
tmp = this._nextSibling(tmp);
|
1105 |
+
}
|
1106 |
+
if(tmp !== null) {
|
1107 |
+
return $(tmp);
|
1108 |
+
}
|
1109 |
+
}
|
1110 |
+
tmp = obj[0];
|
1111 |
+
do {
|
1112 |
+
tmp = this._nextSibling(tmp);
|
1113 |
+
} while (tmp && tmp.offsetHeight === 0);
|
1114 |
+
if(tmp !== null) {
|
1115 |
+
return $(tmp);
|
1116 |
+
}
|
1117 |
+
return obj.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first();
|
1118 |
+
},
|
1119 |
+
/**
|
1120 |
+
* get the previous visible node that is above the `obj` node. If `strict` is set to `true` only sibling nodes are returned.
|
1121 |
+
* @name get_prev_dom(obj [, strict])
|
1122 |
+
* @param {mixed} obj
|
1123 |
+
* @param {Boolean} strict
|
1124 |
+
* @return {jQuery}
|
1125 |
+
*/
|
1126 |
+
get_prev_dom : function (obj, strict) {
|
1127 |
+
var tmp;
|
1128 |
+
obj = this.get_node(obj, true);
|
1129 |
+
if(obj[0] === this.element[0]) {
|
1130 |
+
tmp = this.get_container_ul()[0].lastChild;
|
1131 |
+
while (tmp && tmp.offsetHeight === 0) {
|
1132 |
+
tmp = this._previousSibling(tmp);
|
1133 |
+
}
|
1134 |
+
return tmp ? $(tmp) : false;
|
1135 |
+
}
|
1136 |
+
if(!obj || !obj.length) {
|
1137 |
+
return false;
|
1138 |
+
}
|
1139 |
+
if(strict) {
|
1140 |
+
tmp = obj[0];
|
1141 |
+
do {
|
1142 |
+
tmp = this._previousSibling(tmp);
|
1143 |
+
} while (tmp && tmp.offsetHeight === 0);
|
1144 |
+
return tmp ? $(tmp) : false;
|
1145 |
+
}
|
1146 |
+
tmp = obj[0];
|
1147 |
+
do {
|
1148 |
+
tmp = this._previousSibling(tmp);
|
1149 |
+
} while (tmp && tmp.offsetHeight === 0);
|
1150 |
+
if(tmp !== null) {
|
1151 |
+
obj = $(tmp);
|
1152 |
+
while(obj.hasClass("jstree-open")) {
|
1153 |
+
obj = obj.children(".jstree-children").first().children(".jstree-node:visible:last");
|
1154 |
+
}
|
1155 |
+
return obj;
|
1156 |
+
}
|
1157 |
+
tmp = obj[0].parentNode.parentNode;
|
1158 |
+
return tmp && tmp.className && tmp.className.indexOf('jstree-node') !== -1 ? $(tmp) : false;
|
1159 |
+
},
|
1160 |
+
/**
|
1161 |
+
* get the parent ID of a node
|
1162 |
+
* @name get_parent(obj)
|
1163 |
+
* @param {mixed} obj
|
1164 |
+
* @return {String}
|
1165 |
+
*/
|
1166 |
+
get_parent : function (obj) {
|
1167 |
+
obj = this.get_node(obj);
|
1168 |
+
if(!obj || obj.id === $.jstree.root) {
|
1169 |
+
return false;
|
1170 |
+
}
|
1171 |
+
return obj.parent;
|
1172 |
+
},
|
1173 |
+
/**
|
1174 |
+
* get a jQuery collection of all the children of a node (node must be rendered), returns false on error
|
1175 |
+
* @name get_children_dom(obj)
|
1176 |
+
* @param {mixed} obj
|
1177 |
+
* @return {jQuery}
|
1178 |
+
*/
|
1179 |
+
get_children_dom : function (obj) {
|
1180 |
+
obj = this.get_node(obj, true);
|
1181 |
+
if(obj[0] === this.element[0]) {
|
1182 |
+
return this.get_container_ul().children(".jstree-node");
|
1183 |
+
}
|
1184 |
+
if(!obj || !obj.length) {
|
1185 |
+
return false;
|
1186 |
+
}
|
1187 |
+
return obj.children(".jstree-children").children(".jstree-node");
|
1188 |
+
},
|
1189 |
+
/**
|
1190 |
+
* checks if a node has children
|
1191 |
+
* @name is_parent(obj)
|
1192 |
+
* @param {mixed} obj
|
1193 |
+
* @return {Boolean}
|
1194 |
+
*/
|
1195 |
+
is_parent : function (obj) {
|
1196 |
+
obj = this.get_node(obj);
|
1197 |
+
return obj && (obj.state.loaded === false || obj.children.length > 0);
|
1198 |
+
},
|
1199 |
+
/**
|
1200 |
+
* checks if a node is loaded (its children are available)
|
1201 |
+
* @name is_loaded(obj)
|
1202 |
+
* @param {mixed} obj
|
1203 |
+
* @return {Boolean}
|
1204 |
+
*/
|
1205 |
+
is_loaded : function (obj) {
|
1206 |
+
obj = this.get_node(obj);
|
1207 |
+
return obj && obj.state.loaded;
|
1208 |
+
},
|
1209 |
+
/**
|
1210 |
+
* check if a node is currently loading (fetching children)
|
1211 |
+
* @name is_loading(obj)
|
1212 |
+
* @param {mixed} obj
|
1213 |
+
* @return {Boolean}
|
1214 |
+
*/
|
1215 |
+
is_loading : function (obj) {
|
1216 |
+
obj = this.get_node(obj);
|
1217 |
+
return obj && obj.state && obj.state.loading;
|
1218 |
+
},
|
1219 |
+
/**
|
1220 |
+
* check if a node is opened
|
1221 |
+
* @name is_open(obj)
|
1222 |
+
* @param {mixed} obj
|
1223 |
+
* @return {Boolean}
|
1224 |
+
*/
|
1225 |
+
is_open : function (obj) {
|
1226 |
+
obj = this.get_node(obj);
|
1227 |
+
return obj && obj.state.opened;
|
1228 |
+
},
|
1229 |
+
/**
|
1230 |
+
* check if a node is in a closed state
|
1231 |
+
* @name is_closed(obj)
|
1232 |
+
* @param {mixed} obj
|
1233 |
+
* @return {Boolean}
|
1234 |
+
*/
|
1235 |
+
is_closed : function (obj) {
|
1236 |
+
obj = this.get_node(obj);
|
1237 |
+
return obj && this.is_parent(obj) && !obj.state.opened;
|
1238 |
+
},
|
1239 |
+
/**
|
1240 |
+
* check if a node has no children
|
1241 |
+
* @name is_leaf(obj)
|
1242 |
+
* @param {mixed} obj
|
1243 |
+
* @return {Boolean}
|
1244 |
+
*/
|
1245 |
+
is_leaf : function (obj) {
|
1246 |
+
return !this.is_parent(obj);
|
1247 |
+
},
|
1248 |
+
/**
|
1249 |
+
* loads a node (fetches its children using the `core.data` setting). Multiple nodes can be passed to by using an array.
|
1250 |
+
* @name load_node(obj [, callback])
|
1251 |
+
* @param {mixed} obj
|
1252 |
+
* @param {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives two arguments - the node and a boolean status
|
1253 |
+
* @return {Boolean}
|
1254 |
+
* @trigger load_node.jstree
|
1255 |
+
*/
|
1256 |
+
load_node : function (obj, callback) {
|
1257 |
+
var k, l, i, j, c;
|
1258 |
+
if($.isArray(obj)) {
|
1259 |
+
this._load_nodes(obj.slice(), callback);
|
1260 |
+
return true;
|
1261 |
+
}
|
1262 |
+
obj = this.get_node(obj);
|
1263 |
+
if(!obj) {
|
1264 |
+
if(callback) { callback.call(this, obj, false); }
|
1265 |
+
return false;
|
1266 |
+
}
|
1267 |
+
// if(obj.state.loading) { } // the node is already loading - just wait for it to load and invoke callback? but if called implicitly it should be loaded again?
|
1268 |
+
if(obj.state.loaded) {
|
1269 |
+
obj.state.loaded = false;
|
1270 |
+
for(i = 0, j = obj.parents.length; i < j; i++) {
|
1271 |
+
this._model.data[obj.parents[i]].children_d = $.vakata.array_filter(this._model.data[obj.parents[i]].children_d, function (v) {
|
1272 |
+
return $.inArray(v, obj.children_d) === -1;
|
1273 |
+
});
|
1274 |
+
}
|
1275 |
+
for(k = 0, l = obj.children_d.length; k < l; k++) {
|
1276 |
+
if(this._model.data[obj.children_d[k]].state.selected) {
|
1277 |
+
c = true;
|
1278 |
+
}
|
1279 |
+
delete this._model.data[obj.children_d[k]];
|
1280 |
+
}
|
1281 |
+
if (c) {
|
1282 |
+
this._data.core.selected = $.vakata.array_filter(this._data.core.selected, function (v) {
|
1283 |
+
return $.inArray(v, obj.children_d) === -1;
|
1284 |
+
});
|
1285 |
+
}
|
1286 |
+
obj.children = [];
|
1287 |
+
obj.children_d = [];
|
1288 |
+
if(c) {
|
1289 |
+
this.trigger('changed', { 'action' : 'load_node', 'node' : obj, 'selected' : this._data.core.selected });
|
1290 |
+
}
|
1291 |
+
}
|
1292 |
+
obj.state.failed = false;
|
1293 |
+
obj.state.loading = true;
|
1294 |
+
this.get_node(obj, true).addClass("jstree-loading").attr('aria-busy',true);
|
1295 |
+
this._load_node(obj, $.proxy(function (status) {
|
1296 |
+
obj = this._model.data[obj.id];
|
1297 |
+
obj.state.loading = false;
|
1298 |
+
obj.state.loaded = status;
|
1299 |
+
obj.state.failed = !obj.state.loaded;
|
1300 |
+
var dom = this.get_node(obj, true), i = 0, j = 0, m = this._model.data, has_children = false;
|
1301 |
+
for(i = 0, j = obj.children.length; i < j; i++) {
|
1302 |
+
if(m[obj.children[i]] && !m[obj.children[i]].state.hidden) {
|
1303 |
+
has_children = true;
|
1304 |
+
break;
|
1305 |
+
}
|
1306 |
+
}
|
1307 |
+
if(obj.state.loaded && dom && dom.length) {
|
1308 |
+
dom.removeClass('jstree-closed jstree-open jstree-leaf');
|
1309 |
+
if (!has_children) {
|
1310 |
+
dom.addClass('jstree-leaf');
|
1311 |
+
}
|
1312 |
+
else {
|
1313 |
+
if (obj.id !== '#') {
|
1314 |
+
dom.addClass(obj.state.opened ? 'jstree-open' : 'jstree-closed');
|
1315 |
+
}
|
1316 |
+
}
|
1317 |
+
}
|
1318 |
+
dom.removeClass("jstree-loading").attr('aria-busy',false);
|
1319 |
+
/**
|
1320 |
+
* triggered after a node is loaded
|
1321 |
+
* @event
|
1322 |
+
* @name load_node.jstree
|
1323 |
+
* @param {Object} node the node that was loading
|
1324 |
+
* @param {Boolean} status was the node loaded successfully
|
1325 |
+
*/
|
1326 |
+
this.trigger('load_node', { "node" : obj, "status" : status });
|
1327 |
+
if(callback) {
|
1328 |
+
callback.call(this, obj, status);
|
1329 |
+
}
|
1330 |
+
}, this));
|
1331 |
+
return true;
|
1332 |
+
},
|
1333 |
+
/**
|
1334 |
+
* load an array of nodes (will also load unavailable nodes as soon as the appear in the structure). Used internally.
|
1335 |
+
* @private
|
1336 |
+
* @name _load_nodes(nodes [, callback])
|
1337 |
+
* @param {array} nodes
|
1338 |
+
* @param {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives one argument - the array passed to _load_nodes
|
1339 |
+
*/
|
1340 |
+
_load_nodes : function (nodes, callback, is_callback, force_reload) {
|
1341 |
+
var r = true,
|
1342 |
+
c = function () { this._load_nodes(nodes, callback, true); },
|
1343 |
+
m = this._model.data, i, j, tmp = [];
|
1344 |
+
for(i = 0, j = nodes.length; i < j; i++) {
|
1345 |
+
if(m[nodes[i]] && ( (!m[nodes[i]].state.loaded && !m[nodes[i]].state.failed) || (!is_callback && force_reload) )) {
|
1346 |
+
if(!this.is_loading(nodes[i])) {
|
1347 |
+
this.load_node(nodes[i], c);
|
1348 |
+
}
|
1349 |
+
r = false;
|
1350 |
+
}
|
1351 |
+
}
|
1352 |
+
if(r) {
|
1353 |
+
for(i = 0, j = nodes.length; i < j; i++) {
|
1354 |
+
if(m[nodes[i]] && m[nodes[i]].state.loaded) {
|
1355 |
+
tmp.push(nodes[i]);
|
1356 |
+
}
|
1357 |
+
}
|
1358 |
+
if(callback && !callback.done) {
|
1359 |
+
callback.call(this, tmp);
|
1360 |
+
callback.done = true;
|
1361 |
+
}
|
1362 |
+
}
|
1363 |
+
},
|
1364 |
+
/**
|
1365 |
+
* loads all unloaded nodes
|
1366 |
+
* @name load_all([obj, callback])
|
1367 |
+
* @param {mixed} obj the node to load recursively, omit to load all nodes in the tree
|
1368 |
+
* @param {function} callback a function to be executed once loading all the nodes is complete,
|
1369 |
+
* @trigger load_all.jstree
|
1370 |
+
*/
|
1371 |
+
load_all : function (obj, callback) {
|
1372 |
+
if(!obj) { obj = $.jstree.root; }
|
1373 |
+
obj = this.get_node(obj);
|
1374 |
+
if(!obj) { return false; }
|
1375 |
+
var to_load = [],
|
1376 |
+
m = this._model.data,
|
1377 |
+
c = m[obj.id].children_d,
|
1378 |
+
i, j;
|
1379 |
+
if(obj.state && !obj.state.loaded) {
|
1380 |
+
to_load.push(obj.id);
|
1381 |
+
}
|
1382 |
+
for(i = 0, j = c.length; i < j; i++) {
|
1383 |
+
if(m[c[i]] && m[c[i]].state && !m[c[i]].state.loaded) {
|
1384 |
+
to_load.push(c[i]);
|
1385 |
+
}
|
1386 |
+
}
|
1387 |
+
if(to_load.length) {
|
1388 |
+
this._load_nodes(to_load, function () {
|
1389 |
+
this.load_all(obj, callback);
|
1390 |
+
});
|
1391 |
+
}
|
1392 |
+
else {
|
1393 |
+
/**
|
1394 |
+
* triggered after a load_all call completes
|
1395 |
+
* @event
|
1396 |
+
* @name load_all.jstree
|
1397 |
+
* @param {Object} node the recursively loaded node
|
1398 |
+
*/
|
1399 |
+
if(callback) { callback.call(this, obj); }
|
1400 |
+
this.trigger('load_all', { "node" : obj });
|
1401 |
+
}
|
1402 |
+
},
|
1403 |
+
/**
|
1404 |
+
* handles the actual loading of a node. Used only internally.
|
1405 |
+
* @private
|
1406 |
+
* @name _load_node(obj [, callback])
|
1407 |
+
* @param {mixed} obj
|
1408 |
+
* @param {function} callback a function to be executed once loading is complete, the function is executed in the instance's scope and receives one argument - a boolean status
|
1409 |
+
* @return {Boolean}
|
1410 |
+
*/
|
1411 |
+
_load_node : function (obj, callback) {
|
1412 |
+
var s = this.settings.core.data, t;
|
1413 |
+
var notTextOrCommentNode = function notTextOrCommentNode () {
|
1414 |
+
return this.nodeType !== 3 && this.nodeType !== 8;
|
1415 |
+
};
|
1416 |
+
// use original HTML
|
1417 |
+
if(!s) {
|
1418 |
+
if(obj.id === $.jstree.root) {
|
1419 |
+
return this._append_html_data(obj, this._data.core.original_container_html.clone(true), function (status) {
|
1420 |
+
callback.call(this, status);
|
1421 |
+
});
|
1422 |
+
}
|
1423 |
+
else {
|
1424 |
+
return callback.call(this, false);
|
1425 |
+
}
|
1426 |
+
// return callback.call(this, obj.id === $.jstree.root ? this._append_html_data(obj, this._data.core.original_container_html.clone(true)) : false);
|
1427 |
+
}
|
1428 |
+
if($.isFunction(s)) {
|
1429 |
+
return s.call(this, obj, $.proxy(function (d) {
|
1430 |
+
if(d === false) {
|
1431 |
+
callback.call(this, false);
|
1432 |
+
}
|
1433 |
+
else {
|
1434 |
+
this[typeof d === 'string' ? '_append_html_data' : '_append_json_data'](obj, typeof d === 'string' ? $($.parseHTML(d)).filter(notTextOrCommentNode) : d, function (status) {
|
1435 |
+
callback.call(this, status);
|
1436 |
+
});
|
1437 |
+
}
|
1438 |
+
// return d === false ? callback.call(this, false) : callback.call(this, this[typeof d === 'string' ? '_append_html_data' : '_append_json_data'](obj, typeof d === 'string' ? $(d) : d));
|
1439 |
+
}, this));
|
1440 |
+
}
|
1441 |
+
if(typeof s === 'object') {
|
1442 |
+
if(s.url) {
|
1443 |
+
s = $.extend(true, {}, s);
|
1444 |
+
if($.isFunction(s.url)) {
|
1445 |
+
s.url = s.url.call(this, obj);
|
1446 |
+
}
|
1447 |
+
if($.isFunction(s.data)) {
|
1448 |
+
s.data = s.data.call(this, obj);
|
1449 |
+
}
|
1450 |
+
return $.ajax(s)
|
1451 |
+
.done($.proxy(function (d,t,x) {
|
1452 |
+
var type = x.getResponseHeader('Content-Type');
|
1453 |
+
if((type && type.indexOf('json') !== -1) || typeof d === "object") {
|
1454 |
+
return this._append_json_data(obj, d, function (status) { callback.call(this, status); });
|
1455 |
+
//return callback.call(this, this._append_json_data(obj, d));
|
1456 |
+
}
|
1457 |
+
if((type && type.indexOf('html') !== -1) || typeof d === "string") {
|
1458 |
+
return this._append_html_data(obj, $($.parseHTML(d)).filter(notTextOrCommentNode), function (status) { callback.call(this, status); });
|
1459 |
+
// return callback.call(this, this._append_html_data(obj, $(d)));
|
1460 |
+
}
|
1461 |
+
this._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'core', 'id' : 'core_04', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id, 'xhr' : x }) };
|
1462 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
1463 |
+
return callback.call(this, false);
|
1464 |
+
}, this))
|
1465 |
+
.fail($.proxy(function (f) {
|
1466 |
+
this._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'core', 'id' : 'core_04', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id, 'xhr' : f }) };
|
1467 |
+
callback.call(this, false);
|
1468 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
1469 |
+
}, this));
|
1470 |
+
}
|
1471 |
+
if ($.isArray(s)) {
|
1472 |
+
t = $.extend(true, [], s);
|
1473 |
+
} else if ($.isPlainObject(s)) {
|
1474 |
+
t = $.extend(true, {}, s);
|
1475 |
+
} else {
|
1476 |
+
t = s;
|
1477 |
+
}
|
1478 |
+
if(obj.id === $.jstree.root) {
|
1479 |
+
return this._append_json_data(obj, t, function (status) {
|
1480 |
+
callback.call(this, status);
|
1481 |
+
});
|
1482 |
+
}
|
1483 |
+
else {
|
1484 |
+
this._data.core.last_error = { 'error' : 'nodata', 'plugin' : 'core', 'id' : 'core_05', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id }) };
|
1485 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
1486 |
+
return callback.call(this, false);
|
1487 |
+
}
|
1488 |
+
//return callback.call(this, (obj.id === $.jstree.root ? this._append_json_data(obj, t) : false) );
|
1489 |
+
}
|
1490 |
+
if(typeof s === 'string') {
|
1491 |
+
if(obj.id === $.jstree.root) {
|
1492 |
+
return this._append_html_data(obj, $($.parseHTML(s)).filter(notTextOrCommentNode), function (status) {
|
1493 |
+
callback.call(this, status);
|
1494 |
+
});
|
1495 |
+
}
|
1496 |
+
else {
|
1497 |
+
this._data.core.last_error = { 'error' : 'nodata', 'plugin' : 'core', 'id' : 'core_06', 'reason' : 'Could not load node', 'data' : JSON.stringify({ 'id' : obj.id }) };
|
1498 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
1499 |
+
return callback.call(this, false);
|
1500 |
+
}
|
1501 |
+
//return callback.call(this, (obj.id === $.jstree.root ? this._append_html_data(obj, $(s)) : false) );
|
1502 |
+
}
|
1503 |
+
return callback.call(this, false);
|
1504 |
+
},
|
1505 |
+
/**
|
1506 |
+
* adds a node to the list of nodes to redraw. Used only internally.
|
1507 |
+
* @private
|
1508 |
+
* @name _node_changed(obj [, callback])
|
1509 |
+
* @param {mixed} obj
|
1510 |
+
*/
|
1511 |
+
_node_changed : function (obj) {
|
1512 |
+
obj = this.get_node(obj);
|
1513 |
+
if (obj && $.inArray(obj.id, this._model.changed) === -1) {
|
1514 |
+
this._model.changed.push(obj.id);
|
1515 |
+
}
|
1516 |
+
},
|
1517 |
+
/**
|
1518 |
+
* appends HTML content to the tree. Used internally.
|
1519 |
+
* @private
|
1520 |
+
* @name _append_html_data(obj, data)
|
1521 |
+
* @param {mixed} obj the node to append to
|
1522 |
+
* @param {String} data the HTML string to parse and append
|
1523 |
+
* @trigger model.jstree, changed.jstree
|
1524 |
+
*/
|
1525 |
+
_append_html_data : function (dom, data, cb) {
|
1526 |
+
dom = this.get_node(dom);
|
1527 |
+
dom.children = [];
|
1528 |
+
dom.children_d = [];
|
1529 |
+
var dat = data.is('ul') ? data.children() : data,
|
1530 |
+
par = dom.id,
|
1531 |
+
chd = [],
|
1532 |
+
dpc = [],
|
1533 |
+
m = this._model.data,
|
1534 |
+
p = m[par],
|
1535 |
+
s = this._data.core.selected.length,
|
1536 |
+
tmp, i, j;
|
1537 |
+
dat.each($.proxy(function (i, v) {
|
1538 |
+
tmp = this._parse_model_from_html($(v), par, p.parents.concat());
|
1539 |
+
if(tmp) {
|
1540 |
+
chd.push(tmp);
|
1541 |
+
dpc.push(tmp);
|
1542 |
+
if(m[tmp].children_d.length) {
|
1543 |
+
dpc = dpc.concat(m[tmp].children_d);
|
1544 |
+
}
|
1545 |
+
}
|
1546 |
+
}, this));
|
1547 |
+
p.children = chd;
|
1548 |
+
p.children_d = dpc;
|
1549 |
+
for(i = 0, j = p.parents.length; i < j; i++) {
|
1550 |
+
m[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc);
|
1551 |
+
}
|
1552 |
+
/**
|
1553 |
+
* triggered when new data is inserted to the tree model
|
1554 |
+
* @event
|
1555 |
+
* @name model.jstree
|
1556 |
+
* @param {Array} nodes an array of node IDs
|
1557 |
+
* @param {String} parent the parent ID of the nodes
|
1558 |
+
*/
|
1559 |
+
this.trigger('model', { "nodes" : dpc, 'parent' : par });
|
1560 |
+
if(par !== $.jstree.root) {
|
1561 |
+
this._node_changed(par);
|
1562 |
+
this.redraw();
|
1563 |
+
}
|
1564 |
+
else {
|
1565 |
+
this.get_container_ul().children('.jstree-initial-node').remove();
|
1566 |
+
this.redraw(true);
|
1567 |
+
}
|
1568 |
+
if(this._data.core.selected.length !== s) {
|
1569 |
+
this.trigger('changed', { 'action' : 'model', 'selected' : this._data.core.selected });
|
1570 |
+
}
|
1571 |
+
cb.call(this, true);
|
1572 |
+
},
|
1573 |
+
/**
|
1574 |
+
* appends JSON content to the tree. Used internally.
|
1575 |
+
* @private
|
1576 |
+
* @name _append_json_data(obj, data)
|
1577 |
+
* @param {mixed} obj the node to append to
|
1578 |
+
* @param {String} data the JSON object to parse and append
|
1579 |
+
* @param {Boolean} force_processing internal param - do not set
|
1580 |
+
* @trigger model.jstree, changed.jstree
|
1581 |
+
*/
|
1582 |
+
_append_json_data : function (dom, data, cb, force_processing) {
|
1583 |
+
if(this.element === null) { return; }
|
1584 |
+
dom = this.get_node(dom);
|
1585 |
+
dom.children = [];
|
1586 |
+
dom.children_d = [];
|
1587 |
+
// *%$@!!!
|
1588 |
+
if(data.d) {
|
1589 |
+
data = data.d;
|
1590 |
+
if(typeof data === "string") {
|
1591 |
+
data = JSON.parse(data);
|
1592 |
+
}
|
1593 |
+
}
|
1594 |
+
if(!$.isArray(data)) { data = [data]; }
|
1595 |
+
var w = null,
|
1596 |
+
args = {
|
1597 |
+
'df' : this._model.default_state,
|
1598 |
+
'dat' : data,
|
1599 |
+
'par' : dom.id,
|
1600 |
+
'm' : this._model.data,
|
1601 |
+
't_id' : this._id,
|
1602 |
+
't_cnt' : this._cnt,
|
1603 |
+
'sel' : this._data.core.selected
|
1604 |
+
},
|
1605 |
+
func = function (data, undefined) {
|
1606 |
+
if(data.data) { data = data.data; }
|
1607 |
+
var dat = data.dat,
|
1608 |
+
par = data.par,
|
1609 |
+
chd = [],
|
1610 |
+
dpc = [],
|
1611 |
+
add = [],
|
1612 |
+
df = data.df,
|
1613 |
+
t_id = data.t_id,
|
1614 |
+
t_cnt = data.t_cnt,
|
1615 |
+
m = data.m,
|
1616 |
+
p = m[par],
|
1617 |
+
sel = data.sel,
|
1618 |
+
tmp, i, j, rslt,
|
1619 |
+
parse_flat = function (d, p, ps) {
|
1620 |
+
if(!ps) { ps = []; }
|
1621 |
+
else { ps = ps.concat(); }
|
1622 |
+
if(p) { ps.unshift(p); }
|
1623 |
+
var tid = d.id.toString(),
|
1624 |
+
i, j, c, e,
|
1625 |
+
tmp = {
|
1626 |
+
id : tid,
|
1627 |
+
text : d.text || '',
|
1628 |
+
icon : d.icon !== undefined ? d.icon : true,
|
1629 |
+
parent : p,
|
1630 |
+
parents : ps,
|
1631 |
+
children : d.children || [],
|
1632 |
+
children_d : d.children_d || [],
|
1633 |
+
data : d.data,
|
1634 |
+
state : { },
|
1635 |
+
li_attr : { id : false },
|
1636 |
+
a_attr : { href : '#' },
|
1637 |
+
original : false
|
1638 |
+
};
|
1639 |
+
for(i in df) {
|
1640 |
+
if(df.hasOwnProperty(i)) {
|
1641 |
+
tmp.state[i] = df[i];
|
1642 |
+
}
|
1643 |
+
}
|
1644 |
+
if(d && d.data && d.data.jstree && d.data.jstree.icon) {
|
1645 |
+
tmp.icon = d.data.jstree.icon;
|
1646 |
+
}
|
1647 |
+
if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") {
|
1648 |
+
tmp.icon = true;
|
1649 |
+
}
|
1650 |
+
if(d && d.data) {
|
1651 |
+
tmp.data = d.data;
|
1652 |
+
if(d.data.jstree) {
|
1653 |
+
for(i in d.data.jstree) {
|
1654 |
+
if(d.data.jstree.hasOwnProperty(i)) {
|
1655 |
+
tmp.state[i] = d.data.jstree[i];
|
1656 |
+
}
|
1657 |
+
}
|
1658 |
+
}
|
1659 |
+
}
|
1660 |
+
if(d && typeof d.state === 'object') {
|
1661 |
+
for (i in d.state) {
|
1662 |
+
if(d.state.hasOwnProperty(i)) {
|
1663 |
+
tmp.state[i] = d.state[i];
|
1664 |
+
}
|
1665 |
+
}
|
1666 |
+
}
|
1667 |
+
if(d && typeof d.li_attr === 'object') {
|
1668 |
+
for (i in d.li_attr) {
|
1669 |
+
if(d.li_attr.hasOwnProperty(i)) {
|
1670 |
+
tmp.li_attr[i] = d.li_attr[i];
|
1671 |
+
}
|
1672 |
+
}
|
1673 |
+
}
|
1674 |
+
if(!tmp.li_attr.id) {
|
1675 |
+
tmp.li_attr.id = tid;
|
1676 |
+
}
|
1677 |
+
if(d && typeof d.a_attr === 'object') {
|
1678 |
+
for (i in d.a_attr) {
|
1679 |
+
if(d.a_attr.hasOwnProperty(i)) {
|
1680 |
+
tmp.a_attr[i] = d.a_attr[i];
|
1681 |
+
}
|
1682 |
+
}
|
1683 |
+
}
|
1684 |
+
if(d && d.children && d.children === true) {
|
1685 |
+
tmp.state.loaded = false;
|
1686 |
+
tmp.children = [];
|
1687 |
+
tmp.children_d = [];
|
1688 |
+
}
|
1689 |
+
m[tmp.id] = tmp;
|
1690 |
+
for(i = 0, j = tmp.children.length; i < j; i++) {
|
1691 |
+
c = parse_flat(m[tmp.children[i]], tmp.id, ps);
|
1692 |
+
e = m[c];
|
1693 |
+
tmp.children_d.push(c);
|
1694 |
+
if(e.children_d.length) {
|
1695 |
+
tmp.children_d = tmp.children_d.concat(e.children_d);
|
1696 |
+
}
|
1697 |
+
}
|
1698 |
+
delete d.data;
|
1699 |
+
delete d.children;
|
1700 |
+
m[tmp.id].original = d;
|
1701 |
+
if(tmp.state.selected) {
|
1702 |
+
add.push(tmp.id);
|
1703 |
+
}
|
1704 |
+
return tmp.id;
|
1705 |
+
},
|
1706 |
+
parse_nest = function (d, p, ps) {
|
1707 |
+
if(!ps) { ps = []; }
|
1708 |
+
else { ps = ps.concat(); }
|
1709 |
+
if(p) { ps.unshift(p); }
|
1710 |
+
var tid = false, i, j, c, e, tmp;
|
1711 |
+
do {
|
1712 |
+
tid = 'j' + t_id + '_' + (++t_cnt);
|
1713 |
+
} while(m[tid]);
|
1714 |
+
|
1715 |
+
tmp = {
|
1716 |
+
id : false,
|
1717 |
+
text : typeof d === 'string' ? d : '',
|
1718 |
+
icon : typeof d === 'object' && d.icon !== undefined ? d.icon : true,
|
1719 |
+
parent : p,
|
1720 |
+
parents : ps,
|
1721 |
+
children : [],
|
1722 |
+
children_d : [],
|
1723 |
+
data : null,
|
1724 |
+
state : { },
|
1725 |
+
li_attr : { id : false },
|
1726 |
+
a_attr : { href : '#' },
|
1727 |
+
original : false
|
1728 |
+
};
|
1729 |
+
for(i in df) {
|
1730 |
+
if(df.hasOwnProperty(i)) {
|
1731 |
+
tmp.state[i] = df[i];
|
1732 |
+
}
|
1733 |
+
}
|
1734 |
+
if(d && d.id) { tmp.id = d.id.toString(); }
|
1735 |
+
if(d && d.text) { tmp.text = d.text; }
|
1736 |
+
if(d && d.data && d.data.jstree && d.data.jstree.icon) {
|
1737 |
+
tmp.icon = d.data.jstree.icon;
|
1738 |
+
}
|
1739 |
+
if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") {
|
1740 |
+
tmp.icon = true;
|
1741 |
+
}
|
1742 |
+
if(d && d.data) {
|
1743 |
+
tmp.data = d.data;
|
1744 |
+
if(d.data.jstree) {
|
1745 |
+
for(i in d.data.jstree) {
|
1746 |
+
if(d.data.jstree.hasOwnProperty(i)) {
|
1747 |
+
tmp.state[i] = d.data.jstree[i];
|
1748 |
+
}
|
1749 |
+
}
|
1750 |
+
}
|
1751 |
+
}
|
1752 |
+
if(d && typeof d.state === 'object') {
|
1753 |
+
for (i in d.state) {
|
1754 |
+
if(d.state.hasOwnProperty(i)) {
|
1755 |
+
tmp.state[i] = d.state[i];
|
1756 |
+
}
|
1757 |
+
}
|
1758 |
+
}
|
1759 |
+
if(d && typeof d.li_attr === 'object') {
|
1760 |
+
for (i in d.li_attr) {
|
1761 |
+
if(d.li_attr.hasOwnProperty(i)) {
|
1762 |
+
tmp.li_attr[i] = d.li_attr[i];
|
1763 |
+
}
|
1764 |
+
}
|
1765 |
+
}
|
1766 |
+
if(tmp.li_attr.id && !tmp.id) {
|
1767 |
+
tmp.id = tmp.li_attr.id.toString();
|
1768 |
+
}
|
1769 |
+
if(!tmp.id) {
|
1770 |
+
tmp.id = tid;
|
1771 |
+
}
|
1772 |
+
if(!tmp.li_attr.id) {
|
1773 |
+
tmp.li_attr.id = tmp.id;
|
1774 |
+
}
|
1775 |
+
if(d && typeof d.a_attr === 'object') {
|
1776 |
+
for (i in d.a_attr) {
|
1777 |
+
if(d.a_attr.hasOwnProperty(i)) {
|
1778 |
+
tmp.a_attr[i] = d.a_attr[i];
|
1779 |
+
}
|
1780 |
+
}
|
1781 |
+
}
|
1782 |
+
if(d && d.children && d.children.length) {
|
1783 |
+
for(i = 0, j = d.children.length; i < j; i++) {
|
1784 |
+
c = parse_nest(d.children[i], tmp.id, ps);
|
1785 |
+
e = m[c];
|
1786 |
+
tmp.children.push(c);
|
1787 |
+
if(e.children_d.length) {
|
1788 |
+
tmp.children_d = tmp.children_d.concat(e.children_d);
|
1789 |
+
}
|
1790 |
+
}
|
1791 |
+
tmp.children_d = tmp.children_d.concat(tmp.children);
|
1792 |
+
}
|
1793 |
+
if(d && d.children && d.children === true) {
|
1794 |
+
tmp.state.loaded = false;
|
1795 |
+
tmp.children = [];
|
1796 |
+
tmp.children_d = [];
|
1797 |
+
}
|
1798 |
+
delete d.data;
|
1799 |
+
delete d.children;
|
1800 |
+
tmp.original = d;
|
1801 |
+
m[tmp.id] = tmp;
|
1802 |
+
if(tmp.state.selected) {
|
1803 |
+
add.push(tmp.id);
|
1804 |
+
}
|
1805 |
+
return tmp.id;
|
1806 |
+
};
|
1807 |
+
|
1808 |
+
if(dat.length && dat[0].id !== undefined && dat[0].parent !== undefined) {
|
1809 |
+
// Flat JSON support (for easy import from DB):
|
1810 |
+
// 1) convert to object (foreach)
|
1811 |
+
for(i = 0, j = dat.length; i < j; i++) {
|
1812 |
+
if(!dat[i].children) {
|
1813 |
+
dat[i].children = [];
|
1814 |
+
}
|
1815 |
+
if(!dat[i].state) {
|
1816 |
+
dat[i].state = {};
|
1817 |
+
}
|
1818 |
+
m[dat[i].id.toString()] = dat[i];
|
1819 |
+
}
|
1820 |
+
// 2) populate children (foreach)
|
1821 |
+
for(i = 0, j = dat.length; i < j; i++) {
|
1822 |
+
if (!m[dat[i].parent.toString()]) {
|
1823 |
+
this._data.core.last_error = { 'error' : 'parse', 'plugin' : 'core', 'id' : 'core_07', 'reason' : 'Node with invalid parent', 'data' : JSON.stringify({ 'id' : dat[i].id.toString(), 'parent' : dat[i].parent.toString() }) };
|
1824 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
1825 |
+
continue;
|
1826 |
+
}
|
1827 |
+
|
1828 |
+
m[dat[i].parent.toString()].children.push(dat[i].id.toString());
|
1829 |
+
// populate parent.children_d
|
1830 |
+
p.children_d.push(dat[i].id.toString());
|
1831 |
+
}
|
1832 |
+
// 3) normalize && populate parents and children_d with recursion
|
1833 |
+
for(i = 0, j = p.children.length; i < j; i++) {
|
1834 |
+
tmp = parse_flat(m[p.children[i]], par, p.parents.concat());
|
1835 |
+
dpc.push(tmp);
|
1836 |
+
if(m[tmp].children_d.length) {
|
1837 |
+
dpc = dpc.concat(m[tmp].children_d);
|
1838 |
+
}
|
1839 |
+
}
|
1840 |
+
for(i = 0, j = p.parents.length; i < j; i++) {
|
1841 |
+
m[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc);
|
1842 |
+
}
|
1843 |
+
// ?) three_state selection - p.state.selected && t - (if three_state foreach(dat => ch) -> foreach(parents) if(parent.selected) child.selected = true;
|
1844 |
+
rslt = {
|
1845 |
+
'cnt' : t_cnt,
|
1846 |
+
'mod' : m,
|
1847 |
+
'sel' : sel,
|
1848 |
+
'par' : par,
|
1849 |
+
'dpc' : dpc,
|
1850 |
+
'add' : add
|
1851 |
+
};
|
1852 |
+
}
|
1853 |
+
else {
|
1854 |
+
for(i = 0, j = dat.length; i < j; i++) {
|
1855 |
+
tmp = parse_nest(dat[i], par, p.parents.concat());
|
1856 |
+
if(tmp) {
|
1857 |
+
chd.push(tmp);
|
1858 |
+
dpc.push(tmp);
|
1859 |
+
if(m[tmp].children_d.length) {
|
1860 |
+
dpc = dpc.concat(m[tmp].children_d);
|
1861 |
+
}
|
1862 |
+
}
|
1863 |
+
}
|
1864 |
+
p.children = chd;
|
1865 |
+
p.children_d = dpc;
|
1866 |
+
for(i = 0, j = p.parents.length; i < j; i++) {
|
1867 |
+
m[p.parents[i]].children_d = m[p.parents[i]].children_d.concat(dpc);
|
1868 |
+
}
|
1869 |
+
rslt = {
|
1870 |
+
'cnt' : t_cnt,
|
1871 |
+
'mod' : m,
|
1872 |
+
'sel' : sel,
|
1873 |
+
'par' : par,
|
1874 |
+
'dpc' : dpc,
|
1875 |
+
'add' : add
|
1876 |
+
};
|
1877 |
+
}
|
1878 |
+
if(typeof window === 'undefined' || typeof window.document === 'undefined') {
|
1879 |
+
postMessage(rslt);
|
1880 |
+
}
|
1881 |
+
else {
|
1882 |
+
return rslt;
|
1883 |
+
}
|
1884 |
+
},
|
1885 |
+
rslt = function (rslt, worker) {
|
1886 |
+
if(this.element === null) { return; }
|
1887 |
+
this._cnt = rslt.cnt;
|
1888 |
+
var i, m = this._model.data;
|
1889 |
+
for (i in m) {
|
1890 |
+
if (m.hasOwnProperty(i) && m[i].state && m[i].state.loading && rslt.mod[i]) {
|
1891 |
+
rslt.mod[i].state.loading = true;
|
1892 |
+
}
|
1893 |
+
}
|
1894 |
+
this._model.data = rslt.mod; // breaks the reference in load_node - careful
|
1895 |
+
|
1896 |
+
if(worker) {
|
1897 |
+
var j, a = rslt.add, r = rslt.sel, s = this._data.core.selected.slice();
|
1898 |
+
m = this._model.data;
|
1899 |
+
// if selection was changed while calculating in worker
|
1900 |
+
if(r.length !== s.length || $.vakata.array_unique(r.concat(s)).length !== r.length) {
|
1901 |
+
// deselect nodes that are no longer selected
|
1902 |
+
for(i = 0, j = r.length; i < j; i++) {
|
1903 |
+
if($.inArray(r[i], a) === -1 && $.inArray(r[i], s) === -1) {
|
1904 |
+
m[r[i]].state.selected = false;
|
1905 |
+
}
|
1906 |
+
}
|
1907 |
+
// select nodes that were selected in the mean time
|
1908 |
+
for(i = 0, j = s.length; i < j; i++) {
|
1909 |
+
if($.inArray(s[i], r) === -1) {
|
1910 |
+
m[s[i]].state.selected = true;
|
1911 |
+
}
|
1912 |
+
}
|
1913 |
+
}
|
1914 |
+
}
|
1915 |
+
if(rslt.add.length) {
|
1916 |
+
this._data.core.selected = this._data.core.selected.concat(rslt.add);
|
1917 |
+
}
|
1918 |
+
|
1919 |
+
this.trigger('model', { "nodes" : rslt.dpc, 'parent' : rslt.par });
|
1920 |
+
|
1921 |
+
if(rslt.par !== $.jstree.root) {
|
1922 |
+
this._node_changed(rslt.par);
|
1923 |
+
this.redraw();
|
1924 |
+
}
|
1925 |
+
else {
|
1926 |
+
// this.get_container_ul().children('.jstree-initial-node').remove();
|
1927 |
+
this.redraw(true);
|
1928 |
+
}
|
1929 |
+
if(rslt.add.length) {
|
1930 |
+
this.trigger('changed', { 'action' : 'model', 'selected' : this._data.core.selected });
|
1931 |
+
}
|
1932 |
+
cb.call(this, true);
|
1933 |
+
};
|
1934 |
+
if(this.settings.core.worker && window.Blob && window.URL && window.Worker) {
|
1935 |
+
try {
|
1936 |
+
if(this._wrk === null) {
|
1937 |
+
this._wrk = window.URL.createObjectURL(
|
1938 |
+
new window.Blob(
|
1939 |
+
['self.onmessage = ' + func.toString()],
|
1940 |
+
{type:"text/javascript"}
|
1941 |
+
)
|
1942 |
+
);
|
1943 |
+
}
|
1944 |
+
if(!this._data.core.working || force_processing) {
|
1945 |
+
this._data.core.working = true;
|
1946 |
+
w = new window.Worker(this._wrk);
|
1947 |
+
w.onmessage = $.proxy(function (e) {
|
1948 |
+
rslt.call(this, e.data, true);
|
1949 |
+
try { w.terminate(); w = null; } catch(ignore) { }
|
1950 |
+
if(this._data.core.worker_queue.length) {
|
1951 |
+
this._append_json_data.apply(this, this._data.core.worker_queue.shift());
|
1952 |
+
}
|
1953 |
+
else {
|
1954 |
+
this._data.core.working = false;
|
1955 |
+
}
|
1956 |
+
}, this);
|
1957 |
+
if(!args.par) {
|
1958 |
+
if(this._data.core.worker_queue.length) {
|
1959 |
+
this._append_json_data.apply(this, this._data.core.worker_queue.shift());
|
1960 |
+
}
|
1961 |
+
else {
|
1962 |
+
this._data.core.working = false;
|
1963 |
+
}
|
1964 |
+
}
|
1965 |
+
else {
|
1966 |
+
w.postMessage(args);
|
1967 |
+
}
|
1968 |
+
}
|
1969 |
+
else {
|
1970 |
+
this._data.core.worker_queue.push([dom, data, cb, true]);
|
1971 |
+
}
|
1972 |
+
}
|
1973 |
+
catch(e) {
|
1974 |
+
rslt.call(this, func(args), false);
|
1975 |
+
if(this._data.core.worker_queue.length) {
|
1976 |
+
this._append_json_data.apply(this, this._data.core.worker_queue.shift());
|
1977 |
+
}
|
1978 |
+
else {
|
1979 |
+
this._data.core.working = false;
|
1980 |
+
}
|
1981 |
+
}
|
1982 |
+
}
|
1983 |
+
else {
|
1984 |
+
rslt.call(this, func(args), false);
|
1985 |
+
}
|
1986 |
+
},
|
1987 |
+
/**
|
1988 |
+
* parses a node from a jQuery object and appends them to the in memory tree model. Used internally.
|
1989 |
+
* @private
|
1990 |
+
* @name _parse_model_from_html(d [, p, ps])
|
1991 |
+
* @param {jQuery} d the jQuery object to parse
|
1992 |
+
* @param {String} p the parent ID
|
1993 |
+
* @param {Array} ps list of all parents
|
1994 |
+
* @return {String} the ID of the object added to the model
|
1995 |
+
*/
|
1996 |
+
_parse_model_from_html : function (d, p, ps) {
|
1997 |
+
if(!ps) { ps = []; }
|
1998 |
+
else { ps = [].concat(ps); }
|
1999 |
+
if(p) { ps.unshift(p); }
|
2000 |
+
var c, e, m = this._model.data,
|
2001 |
+
data = {
|
2002 |
+
id : false,
|
2003 |
+
text : false,
|
2004 |
+
icon : true,
|
2005 |
+
parent : p,
|
2006 |
+
parents : ps,
|
2007 |
+
children : [],
|
2008 |
+
children_d : [],
|
2009 |
+
data : null,
|
2010 |
+
state : { },
|
2011 |
+
li_attr : { id : false },
|
2012 |
+
a_attr : { href : '#' },
|
2013 |
+
original : false
|
2014 |
+
}, i, tmp, tid;
|
2015 |
+
for(i in this._model.default_state) {
|
2016 |
+
if(this._model.default_state.hasOwnProperty(i)) {
|
2017 |
+
data.state[i] = this._model.default_state[i];
|
2018 |
+
}
|
2019 |
+
}
|
2020 |
+
tmp = $.vakata.attributes(d, true);
|
2021 |
+
$.each(tmp, function (i, v) {
|
2022 |
+
v = $.trim(v);
|
2023 |
+
if(!v.length) { return true; }
|
2024 |
+
data.li_attr[i] = v;
|
2025 |
+
if(i === 'id') {
|
2026 |
+
data.id = v.toString();
|
2027 |
+
}
|
2028 |
+
});
|
2029 |
+
tmp = d.children('a').first();
|
2030 |
+
if(tmp.length) {
|
2031 |
+
tmp = $.vakata.attributes(tmp, true);
|
2032 |
+
$.each(tmp, function (i, v) {
|
2033 |
+
v = $.trim(v);
|
2034 |
+
if(v.length) {
|
2035 |
+
data.a_attr[i] = v;
|
2036 |
+
}
|
2037 |
+
});
|
2038 |
+
}
|
2039 |
+
tmp = d.children("a").first().length ? d.children("a").first().clone() : d.clone();
|
2040 |
+
tmp.children("ins, i, ul").remove();
|
2041 |
+
tmp = tmp.html();
|
2042 |
+
tmp = $('<div />').html(tmp);
|
2043 |
+
data.text = this.settings.core.force_text ? tmp.text() : tmp.html();
|
2044 |
+
tmp = d.data();
|
2045 |
+
data.data = tmp ? $.extend(true, {}, tmp) : null;
|
2046 |
+
data.state.opened = d.hasClass('jstree-open');
|
2047 |
+
data.state.selected = d.children('a').hasClass('jstree-clicked');
|
2048 |
+
data.state.disabled = d.children('a').hasClass('jstree-disabled');
|
2049 |
+
if(data.data && data.data.jstree) {
|
2050 |
+
for(i in data.data.jstree) {
|
2051 |
+
if(data.data.jstree.hasOwnProperty(i)) {
|
2052 |
+
data.state[i] = data.data.jstree[i];
|
2053 |
+
}
|
2054 |
+
}
|
2055 |
+
}
|
2056 |
+
tmp = d.children("a").children(".jstree-themeicon");
|
2057 |
+
if(tmp.length) {
|
2058 |
+
data.icon = tmp.hasClass('jstree-themeicon-hidden') ? false : tmp.attr('rel');
|
2059 |
+
}
|
2060 |
+
if(data.state.icon !== undefined) {
|
2061 |
+
data.icon = data.state.icon;
|
2062 |
+
}
|
2063 |
+
if(data.icon === undefined || data.icon === null || data.icon === "") {
|
2064 |
+
data.icon = true;
|
2065 |
+
}
|
2066 |
+
tmp = d.children("ul").children("li");
|
2067 |
+
do {
|
2068 |
+
tid = 'j' + this._id + '_' + (++this._cnt);
|
2069 |
+
} while(m[tid]);
|
2070 |
+
data.id = data.li_attr.id ? data.li_attr.id.toString() : tid;
|
2071 |
+
if(tmp.length) {
|
2072 |
+
tmp.each($.proxy(function (i, v) {
|
2073 |
+
c = this._parse_model_from_html($(v), data.id, ps);
|
2074 |
+
e = this._model.data[c];
|
2075 |
+
data.children.push(c);
|
2076 |
+
if(e.children_d.length) {
|
2077 |
+
data.children_d = data.children_d.concat(e.children_d);
|
2078 |
+
}
|
2079 |
+
}, this));
|
2080 |
+
data.children_d = data.children_d.concat(data.children);
|
2081 |
+
}
|
2082 |
+
else {
|
2083 |
+
if(d.hasClass('jstree-closed')) {
|
2084 |
+
data.state.loaded = false;
|
2085 |
+
}
|
2086 |
+
}
|
2087 |
+
if(data.li_attr['class']) {
|
2088 |
+
data.li_attr['class'] = data.li_attr['class'].replace('jstree-closed','').replace('jstree-open','');
|
2089 |
+
}
|
2090 |
+
if(data.a_attr['class']) {
|
2091 |
+
data.a_attr['class'] = data.a_attr['class'].replace('jstree-clicked','').replace('jstree-disabled','');
|
2092 |
+
}
|
2093 |
+
m[data.id] = data;
|
2094 |
+
if(data.state.selected) {
|
2095 |
+
this._data.core.selected.push(data.id);
|
2096 |
+
}
|
2097 |
+
return data.id;
|
2098 |
+
},
|
2099 |
+
/**
|
2100 |
+
* parses a node from a JSON object (used when dealing with flat data, which has no nesting of children, but has id and parent properties) and appends it to the in memory tree model. Used internally.
|
2101 |
+
* @private
|
2102 |
+
* @name _parse_model_from_flat_json(d [, p, ps])
|
2103 |
+
* @param {Object} d the JSON object to parse
|
2104 |
+
* @param {String} p the parent ID
|
2105 |
+
* @param {Array} ps list of all parents
|
2106 |
+
* @return {String} the ID of the object added to the model
|
2107 |
+
*/
|
2108 |
+
_parse_model_from_flat_json : function (d, p, ps) {
|
2109 |
+
if(!ps) { ps = []; }
|
2110 |
+
else { ps = ps.concat(); }
|
2111 |
+
if(p) { ps.unshift(p); }
|
2112 |
+
var tid = d.id.toString(),
|
2113 |
+
m = this._model.data,
|
2114 |
+
df = this._model.default_state,
|
2115 |
+
i, j, c, e,
|
2116 |
+
tmp = {
|
2117 |
+
id : tid,
|
2118 |
+
text : d.text || '',
|
2119 |
+
icon : d.icon !== undefined ? d.icon : true,
|
2120 |
+
parent : p,
|
2121 |
+
parents : ps,
|
2122 |
+
children : d.children || [],
|
2123 |
+
children_d : d.children_d || [],
|
2124 |
+
data : d.data,
|
2125 |
+
state : { },
|
2126 |
+
li_attr : { id : false },
|
2127 |
+
a_attr : { href : '#' },
|
2128 |
+
original : false
|
2129 |
+
};
|
2130 |
+
for(i in df) {
|
2131 |
+
if(df.hasOwnProperty(i)) {
|
2132 |
+
tmp.state[i] = df[i];
|
2133 |
+
}
|
2134 |
+
}
|
2135 |
+
if(d && d.data && d.data.jstree && d.data.jstree.icon) {
|
2136 |
+
tmp.icon = d.data.jstree.icon;
|
2137 |
+
}
|
2138 |
+
if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") {
|
2139 |
+
tmp.icon = true;
|
2140 |
+
}
|
2141 |
+
if(d && d.data) {
|
2142 |
+
tmp.data = d.data;
|
2143 |
+
if(d.data.jstree) {
|
2144 |
+
for(i in d.data.jstree) {
|
2145 |
+
if(d.data.jstree.hasOwnProperty(i)) {
|
2146 |
+
tmp.state[i] = d.data.jstree[i];
|
2147 |
+
}
|
2148 |
+
}
|
2149 |
+
}
|
2150 |
+
}
|
2151 |
+
if(d && typeof d.state === 'object') {
|
2152 |
+
for (i in d.state) {
|
2153 |
+
if(d.state.hasOwnProperty(i)) {
|
2154 |
+
tmp.state[i] = d.state[i];
|
2155 |
+
}
|
2156 |
+
}
|
2157 |
+
}
|
2158 |
+
if(d && typeof d.li_attr === 'object') {
|
2159 |
+
for (i in d.li_attr) {
|
2160 |
+
if(d.li_attr.hasOwnProperty(i)) {
|
2161 |
+
tmp.li_attr[i] = d.li_attr[i];
|
2162 |
+
}
|
2163 |
+
}
|
2164 |
+
}
|
2165 |
+
if(!tmp.li_attr.id) {
|
2166 |
+
tmp.li_attr.id = tid;
|
2167 |
+
}
|
2168 |
+
if(d && typeof d.a_attr === 'object') {
|
2169 |
+
for (i in d.a_attr) {
|
2170 |
+
if(d.a_attr.hasOwnProperty(i)) {
|
2171 |
+
tmp.a_attr[i] = d.a_attr[i];
|
2172 |
+
}
|
2173 |
+
}
|
2174 |
+
}
|
2175 |
+
if(d && d.children && d.children === true) {
|
2176 |
+
tmp.state.loaded = false;
|
2177 |
+
tmp.children = [];
|
2178 |
+
tmp.children_d = [];
|
2179 |
+
}
|
2180 |
+
m[tmp.id] = tmp;
|
2181 |
+
for(i = 0, j = tmp.children.length; i < j; i++) {
|
2182 |
+
c = this._parse_model_from_flat_json(m[tmp.children[i]], tmp.id, ps);
|
2183 |
+
e = m[c];
|
2184 |
+
tmp.children_d.push(c);
|
2185 |
+
if(e.children_d.length) {
|
2186 |
+
tmp.children_d = tmp.children_d.concat(e.children_d);
|
2187 |
+
}
|
2188 |
+
}
|
2189 |
+
delete d.data;
|
2190 |
+
delete d.children;
|
2191 |
+
m[tmp.id].original = d;
|
2192 |
+
if(tmp.state.selected) {
|
2193 |
+
this._data.core.selected.push(tmp.id);
|
2194 |
+
}
|
2195 |
+
return tmp.id;
|
2196 |
+
},
|
2197 |
+
/**
|
2198 |
+
* parses a node from a JSON object and appends it to the in memory tree model. Used internally.
|
2199 |
+
* @private
|
2200 |
+
* @name _parse_model_from_json(d [, p, ps])
|
2201 |
+
* @param {Object} d the JSON object to parse
|
2202 |
+
* @param {String} p the parent ID
|
2203 |
+
* @param {Array} ps list of all parents
|
2204 |
+
* @return {String} the ID of the object added to the model
|
2205 |
+
*/
|
2206 |
+
_parse_model_from_json : function (d, p, ps) {
|
2207 |
+
if(!ps) { ps = []; }
|
2208 |
+
else { ps = ps.concat(); }
|
2209 |
+
if(p) { ps.unshift(p); }
|
2210 |
+
var tid = false, i, j, c, e, m = this._model.data, df = this._model.default_state, tmp;
|
2211 |
+
do {
|
2212 |
+
tid = 'j' + this._id + '_' + (++this._cnt);
|
2213 |
+
} while(m[tid]);
|
2214 |
+
|
2215 |
+
tmp = {
|
2216 |
+
id : false,
|
2217 |
+
text : typeof d === 'string' ? d : '',
|
2218 |
+
icon : typeof d === 'object' && d.icon !== undefined ? d.icon : true,
|
2219 |
+
parent : p,
|
2220 |
+
parents : ps,
|
2221 |
+
children : [],
|
2222 |
+
children_d : [],
|
2223 |
+
data : null,
|
2224 |
+
state : { },
|
2225 |
+
li_attr : { id : false },
|
2226 |
+
a_attr : { href : '#' },
|
2227 |
+
original : false
|
2228 |
+
};
|
2229 |
+
for(i in df) {
|
2230 |
+
if(df.hasOwnProperty(i)) {
|
2231 |
+
tmp.state[i] = df[i];
|
2232 |
+
}
|
2233 |
+
}
|
2234 |
+
if(d && d.id) { tmp.id = d.id.toString(); }
|
2235 |
+
if(d && d.text) { tmp.text = d.text; }
|
2236 |
+
if(d && d.data && d.data.jstree && d.data.jstree.icon) {
|
2237 |
+
tmp.icon = d.data.jstree.icon;
|
2238 |
+
}
|
2239 |
+
if(tmp.icon === undefined || tmp.icon === null || tmp.icon === "") {
|
2240 |
+
tmp.icon = true;
|
2241 |
+
}
|
2242 |
+
if(d && d.data) {
|
2243 |
+
tmp.data = d.data;
|
2244 |
+
if(d.data.jstree) {
|
2245 |
+
for(i in d.data.jstree) {
|
2246 |
+
if(d.data.jstree.hasOwnProperty(i)) {
|
2247 |
+
tmp.state[i] = d.data.jstree[i];
|
2248 |
+
}
|
2249 |
+
}
|
2250 |
+
}
|
2251 |
+
}
|
2252 |
+
if(d && typeof d.state === 'object') {
|
2253 |
+
for (i in d.state) {
|
2254 |
+
if(d.state.hasOwnProperty(i)) {
|
2255 |
+
tmp.state[i] = d.state[i];
|
2256 |
+
}
|
2257 |
+
}
|
2258 |
+
}
|
2259 |
+
if(d && typeof d.li_attr === 'object') {
|
2260 |
+
for (i in d.li_attr) {
|
2261 |
+
if(d.li_attr.hasOwnProperty(i)) {
|
2262 |
+
tmp.li_attr[i] = d.li_attr[i];
|
2263 |
+
}
|
2264 |
+
}
|
2265 |
+
}
|
2266 |
+
if(tmp.li_attr.id && !tmp.id) {
|
2267 |
+
tmp.id = tmp.li_attr.id.toString();
|
2268 |
+
}
|
2269 |
+
if(!tmp.id) {
|
2270 |
+
tmp.id = tid;
|
2271 |
+
}
|
2272 |
+
if(!tmp.li_attr.id) {
|
2273 |
+
tmp.li_attr.id = tmp.id;
|
2274 |
+
}
|
2275 |
+
if(d && typeof d.a_attr === 'object') {
|
2276 |
+
for (i in d.a_attr) {
|
2277 |
+
if(d.a_attr.hasOwnProperty(i)) {
|
2278 |
+
tmp.a_attr[i] = d.a_attr[i];
|
2279 |
+
}
|
2280 |
+
}
|
2281 |
+
}
|
2282 |
+
if(d && d.children && d.children.length) {
|
2283 |
+
for(i = 0, j = d.children.length; i < j; i++) {
|
2284 |
+
c = this._parse_model_from_json(d.children[i], tmp.id, ps);
|
2285 |
+
e = m[c];
|
2286 |
+
tmp.children.push(c);
|
2287 |
+
if(e.children_d.length) {
|
2288 |
+
tmp.children_d = tmp.children_d.concat(e.children_d);
|
2289 |
+
}
|
2290 |
+
}
|
2291 |
+
tmp.children_d = tmp.children_d.concat(tmp.children);
|
2292 |
+
}
|
2293 |
+
if(d && d.children && d.children === true) {
|
2294 |
+
tmp.state.loaded = false;
|
2295 |
+
tmp.children = [];
|
2296 |
+
tmp.children_d = [];
|
2297 |
+
}
|
2298 |
+
delete d.data;
|
2299 |
+
delete d.children;
|
2300 |
+
tmp.original = d;
|
2301 |
+
m[tmp.id] = tmp;
|
2302 |
+
if(tmp.state.selected) {
|
2303 |
+
this._data.core.selected.push(tmp.id);
|
2304 |
+
}
|
2305 |
+
return tmp.id;
|
2306 |
+
},
|
2307 |
+
/**
|
2308 |
+
* redraws all nodes that need to be redrawn. Used internally.
|
2309 |
+
* @private
|
2310 |
+
* @name _redraw()
|
2311 |
+
* @trigger redraw.jstree
|
2312 |
+
*/
|
2313 |
+
_redraw : function () {
|
2314 |
+
var nodes = this._model.force_full_redraw ? this._model.data[$.jstree.root].children.concat([]) : this._model.changed.concat([]),
|
2315 |
+
f = document.createElement('UL'), tmp, i, j, fe = this._data.core.focused;
|
2316 |
+
for(i = 0, j = nodes.length; i < j; i++) {
|
2317 |
+
tmp = this.redraw_node(nodes[i], true, this._model.force_full_redraw);
|
2318 |
+
if(tmp && this._model.force_full_redraw) {
|
2319 |
+
f.appendChild(tmp);
|
2320 |
+
}
|
2321 |
+
}
|
2322 |
+
if(this._model.force_full_redraw) {
|
2323 |
+
f.className = this.get_container_ul()[0].className;
|
2324 |
+
f.setAttribute('role','group');
|
2325 |
+
this.element.empty().append(f);
|
2326 |
+
//this.get_container_ul()[0].appendChild(f);
|
2327 |
+
}
|
2328 |
+
if(fe !== null) {
|
2329 |
+
tmp = this.get_node(fe, true);
|
2330 |
+
if(tmp && tmp.length && tmp.children('.jstree-anchor')[0] !== document.activeElement) {
|
2331 |
+
tmp.children('.jstree-anchor').focus();
|
2332 |
+
}
|
2333 |
+
else {
|
2334 |
+
this._data.core.focused = null;
|
2335 |
+
}
|
2336 |
+
}
|
2337 |
+
this._model.force_full_redraw = false;
|
2338 |
+
this._model.changed = [];
|
2339 |
+
/**
|
2340 |
+
* triggered after nodes are redrawn
|
2341 |
+
* @event
|
2342 |
+
* @name redraw.jstree
|
2343 |
+
* @param {array} nodes the redrawn nodes
|
2344 |
+
*/
|
2345 |
+
this.trigger('redraw', { "nodes" : nodes });
|
2346 |
+
},
|
2347 |
+
/**
|
2348 |
+
* redraws all nodes that need to be redrawn or optionally - the whole tree
|
2349 |
+
* @name redraw([full])
|
2350 |
+
* @param {Boolean} full if set to `true` all nodes are redrawn.
|
2351 |
+
*/
|
2352 |
+
redraw : function (full) {
|
2353 |
+
if(full) {
|
2354 |
+
this._model.force_full_redraw = true;
|
2355 |
+
}
|
2356 |
+
//if(this._model.redraw_timeout) {
|
2357 |
+
// clearTimeout(this._model.redraw_timeout);
|
2358 |
+
//}
|
2359 |
+
//this._model.redraw_timeout = setTimeout($.proxy(this._redraw, this),0);
|
2360 |
+
this._redraw();
|
2361 |
+
},
|
2362 |
+
/**
|
2363 |
+
* redraws a single node's children. Used internally.
|
2364 |
+
* @private
|
2365 |
+
* @name draw_children(node)
|
2366 |
+
* @param {mixed} node the node whose children will be redrawn
|
2367 |
+
*/
|
2368 |
+
draw_children : function (node) {
|
2369 |
+
var obj = this.get_node(node),
|
2370 |
+
i = false,
|
2371 |
+
j = false,
|
2372 |
+
k = false,
|
2373 |
+
d = document;
|
2374 |
+
if(!obj) { return false; }
|
2375 |
+
if(obj.id === $.jstree.root) { return this.redraw(true); }
|
2376 |
+
node = this.get_node(node, true);
|
2377 |
+
if(!node || !node.length) { return false; } // TODO: quick toggle
|
2378 |
+
|
2379 |
+
node.children('.jstree-children').remove();
|
2380 |
+
node = node[0];
|
2381 |
+
if(obj.children.length && obj.state.loaded) {
|
2382 |
+
k = d.createElement('UL');
|
2383 |
+
k.setAttribute('role', 'group');
|
2384 |
+
k.className = 'jstree-children';
|
2385 |
+
for(i = 0, j = obj.children.length; i < j; i++) {
|
2386 |
+
k.appendChild(this.redraw_node(obj.children[i], true, true));
|
2387 |
+
}
|
2388 |
+
node.appendChild(k);
|
2389 |
+
}
|
2390 |
+
},
|
2391 |
+
/**
|
2392 |
+
* redraws a single node. Used internally.
|
2393 |
+
* @private
|
2394 |
+
* @name redraw_node(node, deep, is_callback, force_render)
|
2395 |
+
* @param {mixed} node the node to redraw
|
2396 |
+
* @param {Boolean} deep should child nodes be redrawn too
|
2397 |
+
* @param {Boolean} is_callback is this a recursion call
|
2398 |
+
* @param {Boolean} force_render should children of closed parents be drawn anyway
|
2399 |
+
*/
|
2400 |
+
redraw_node : function (node, deep, is_callback, force_render) {
|
2401 |
+
var obj = this.get_node(node),
|
2402 |
+
par = false,
|
2403 |
+
ind = false,
|
2404 |
+
old = false,
|
2405 |
+
i = false,
|
2406 |
+
j = false,
|
2407 |
+
k = false,
|
2408 |
+
c = '',
|
2409 |
+
d = document,
|
2410 |
+
m = this._model.data,
|
2411 |
+
f = false,
|
2412 |
+
s = false,
|
2413 |
+
tmp = null,
|
2414 |
+
t = 0,
|
2415 |
+
l = 0,
|
2416 |
+
has_children = false,
|
2417 |
+
last_sibling = false;
|
2418 |
+
if(!obj) { return false; }
|
2419 |
+
if(obj.id === $.jstree.root) { return this.redraw(true); }
|
2420 |
+
deep = deep || obj.children.length === 0;
|
2421 |
+
node = !document.querySelector ? document.getElementById(obj.id) : this.element[0].querySelector('#' + ("0123456789".indexOf(obj.id[0]) !== -1 ? '\\3' + obj.id[0] + ' ' + obj.id.substr(1).replace($.jstree.idregex,'\\$&') : obj.id.replace($.jstree.idregex,'\\$&')) ); //, this.element);
|
2422 |
+
if(!node) {
|
2423 |
+
deep = true;
|
2424 |
+
//node = d.createElement('LI');
|
2425 |
+
if(!is_callback) {
|
2426 |
+
par = obj.parent !== $.jstree.root ? $('#' + obj.parent.replace($.jstree.idregex,'\\$&'), this.element)[0] : null;
|
2427 |
+
if(par !== null && (!par || !m[obj.parent].state.opened)) {
|
2428 |
+
return false;
|
2429 |
+
}
|
2430 |
+
ind = $.inArray(obj.id, par === null ? m[$.jstree.root].children : m[obj.parent].children);
|
2431 |
+
}
|
2432 |
+
}
|
2433 |
+
else {
|
2434 |
+
node = $(node);
|
2435 |
+
if(!is_callback) {
|
2436 |
+
par = node.parent().parent()[0];
|
2437 |
+
if(par === this.element[0]) {
|
2438 |
+
par = null;
|
2439 |
+
}
|
2440 |
+
ind = node.index();
|
2441 |
+
}
|
2442 |
+
// m[obj.id].data = node.data(); // use only node's data, no need to touch jquery storage
|
2443 |
+
if(!deep && obj.children.length && !node.children('.jstree-children').length) {
|
2444 |
+
deep = true;
|
2445 |
+
}
|
2446 |
+
if(!deep) {
|
2447 |
+
old = node.children('.jstree-children')[0];
|
2448 |
+
}
|
2449 |
+
f = node.children('.jstree-anchor')[0] === document.activeElement;
|
2450 |
+
node.remove();
|
2451 |
+
//node = d.createElement('LI');
|
2452 |
+
//node = node[0];
|
2453 |
+
}
|
2454 |
+
node = this._data.core.node.cloneNode(true);
|
2455 |
+
// node is DOM, deep is boolean
|
2456 |
+
|
2457 |
+
c = 'jstree-node ';
|
2458 |
+
for(i in obj.li_attr) {
|
2459 |
+
if(obj.li_attr.hasOwnProperty(i)) {
|
2460 |
+
if(i === 'id') { continue; }
|
2461 |
+
if(i !== 'class') {
|
2462 |
+
node.setAttribute(i, obj.li_attr[i]);
|
2463 |
+
}
|
2464 |
+
else {
|
2465 |
+
c += obj.li_attr[i];
|
2466 |
+
}
|
2467 |
+
}
|
2468 |
+
}
|
2469 |
+
if(!obj.a_attr.id) {
|
2470 |
+
obj.a_attr.id = obj.id + '_anchor';
|
2471 |
+
}
|
2472 |
+
node.setAttribute('aria-selected', !!obj.state.selected);
|
2473 |
+
node.setAttribute('aria-level', obj.parents.length);
|
2474 |
+
node.setAttribute('aria-labelledby', obj.a_attr.id);
|
2475 |
+
if(obj.state.disabled) {
|
2476 |
+
node.setAttribute('aria-disabled', true);
|
2477 |
+
}
|
2478 |
+
|
2479 |
+
for(i = 0, j = obj.children.length; i < j; i++) {
|
2480 |
+
if(!m[obj.children[i]].state.hidden) {
|
2481 |
+
has_children = true;
|
2482 |
+
break;
|
2483 |
+
}
|
2484 |
+
}
|
2485 |
+
if(obj.parent !== null && m[obj.parent] && !obj.state.hidden) {
|
2486 |
+
i = $.inArray(obj.id, m[obj.parent].children);
|
2487 |
+
last_sibling = obj.id;
|
2488 |
+
if(i !== -1) {
|
2489 |
+
i++;
|
2490 |
+
for(j = m[obj.parent].children.length; i < j; i++) {
|
2491 |
+
if(!m[m[obj.parent].children[i]].state.hidden) {
|
2492 |
+
last_sibling = m[obj.parent].children[i];
|
2493 |
+
}
|
2494 |
+
if(last_sibling !== obj.id) {
|
2495 |
+
break;
|
2496 |
+
}
|
2497 |
+
}
|
2498 |
+
}
|
2499 |
+
}
|
2500 |
+
|
2501 |
+
if(obj.state.hidden) {
|
2502 |
+
c += ' jstree-hidden';
|
2503 |
+
}
|
2504 |
+
if (obj.state.loading) {
|
2505 |
+
c += ' jstree-loading';
|
2506 |
+
}
|
2507 |
+
if(obj.state.loaded && !has_children) {
|
2508 |
+
c += ' jstree-leaf';
|
2509 |
+
}
|
2510 |
+
else {
|
2511 |
+
c += obj.state.opened && obj.state.loaded ? ' jstree-open' : ' jstree-closed';
|
2512 |
+
node.setAttribute('aria-expanded', (obj.state.opened && obj.state.loaded) );
|
2513 |
+
}
|
2514 |
+
if(last_sibling === obj.id) {
|
2515 |
+
c += ' jstree-last';
|
2516 |
+
}
|
2517 |
+
node.id = obj.id;
|
2518 |
+
node.className = c;
|
2519 |
+
c = ( obj.state.selected ? ' jstree-clicked' : '') + ( obj.state.disabled ? ' jstree-disabled' : '');
|
2520 |
+
for(j in obj.a_attr) {
|
2521 |
+
if(obj.a_attr.hasOwnProperty(j)) {
|
2522 |
+
if(j === 'href' && obj.a_attr[j] === '#') { continue; }
|
2523 |
+
if(j !== 'class') {
|
2524 |
+
node.childNodes[1].setAttribute(j, obj.a_attr[j]);
|
2525 |
+
}
|
2526 |
+
else {
|
2527 |
+
c += ' ' + obj.a_attr[j];
|
2528 |
+
}
|
2529 |
+
}
|
2530 |
+
}
|
2531 |
+
if(c.length) {
|
2532 |
+
node.childNodes[1].className = 'jstree-anchor ' + c;
|
2533 |
+
}
|
2534 |
+
if((obj.icon && obj.icon !== true) || obj.icon === false) {
|
2535 |
+
if(obj.icon === false) {
|
2536 |
+
node.childNodes[1].childNodes[0].className += ' jstree-themeicon-hidden';
|
2537 |
+
}
|
2538 |
+
else if(obj.icon.indexOf('/') === -1 && obj.icon.indexOf('.') === -1) {
|
2539 |
+
node.childNodes[1].childNodes[0].className += ' ' + obj.icon + ' jstree-themeicon-custom';
|
2540 |
+
}
|
2541 |
+
else {
|
2542 |
+
node.childNodes[1].childNodes[0].style.backgroundImage = 'url("'+obj.icon+'")';
|
2543 |
+
node.childNodes[1].childNodes[0].style.backgroundPosition = 'center center';
|
2544 |
+
node.childNodes[1].childNodes[0].style.backgroundSize = 'auto';
|
2545 |
+
node.childNodes[1].childNodes[0].className += ' jstree-themeicon-custom';
|
2546 |
+
}
|
2547 |
+
}
|
2548 |
+
|
2549 |
+
if(this.settings.core.force_text) {
|
2550 |
+
node.childNodes[1].appendChild(d.createTextNode(obj.text));
|
2551 |
+
}
|
2552 |
+
else {
|
2553 |
+
node.childNodes[1].innerHTML += obj.text;
|
2554 |
+
}
|
2555 |
+
|
2556 |
+
|
2557 |
+
if(deep && obj.children.length && (obj.state.opened || force_render) && obj.state.loaded) {
|
2558 |
+
k = d.createElement('UL');
|
2559 |
+
k.setAttribute('role', 'group');
|
2560 |
+
k.className = 'jstree-children';
|
2561 |
+
for(i = 0, j = obj.children.length; i < j; i++) {
|
2562 |
+
k.appendChild(this.redraw_node(obj.children[i], deep, true));
|
2563 |
+
}
|
2564 |
+
node.appendChild(k);
|
2565 |
+
}
|
2566 |
+
if(old) {
|
2567 |
+
node.appendChild(old);
|
2568 |
+
}
|
2569 |
+
if(!is_callback) {
|
2570 |
+
// append back using par / ind
|
2571 |
+
if(!par) {
|
2572 |
+
par = this.element[0];
|
2573 |
+
}
|
2574 |
+
for(i = 0, j = par.childNodes.length; i < j; i++) {
|
2575 |
+
if(par.childNodes[i] && par.childNodes[i].className && par.childNodes[i].className.indexOf('jstree-children') !== -1) {
|
2576 |
+
tmp = par.childNodes[i];
|
2577 |
+
break;
|
2578 |
+
}
|
2579 |
+
}
|
2580 |
+
if(!tmp) {
|
2581 |
+
tmp = d.createElement('UL');
|
2582 |
+
tmp.setAttribute('role', 'group');
|
2583 |
+
tmp.className = 'jstree-children';
|
2584 |
+
par.appendChild(tmp);
|
2585 |
+
}
|
2586 |
+
par = tmp;
|
2587 |
+
|
2588 |
+
if(ind < par.childNodes.length) {
|
2589 |
+
par.insertBefore(node, par.childNodes[ind]);
|
2590 |
+
}
|
2591 |
+
else {
|
2592 |
+
par.appendChild(node);
|
2593 |
+
}
|
2594 |
+
if(f) {
|
2595 |
+
t = this.element[0].scrollTop;
|
2596 |
+
l = this.element[0].scrollLeft;
|
2597 |
+
node.childNodes[1].focus();
|
2598 |
+
this.element[0].scrollTop = t;
|
2599 |
+
this.element[0].scrollLeft = l;
|
2600 |
+
}
|
2601 |
+
}
|
2602 |
+
if(obj.state.opened && !obj.state.loaded) {
|
2603 |
+
obj.state.opened = false;
|
2604 |
+
setTimeout($.proxy(function () {
|
2605 |
+
this.open_node(obj.id, false, 0);
|
2606 |
+
}, this), 0);
|
2607 |
+
}
|
2608 |
+
return node;
|
2609 |
+
},
|
2610 |
+
/**
|
2611 |
+
* opens a node, revaling its children. If the node is not loaded it will be loaded and opened once ready.
|
2612 |
+
* @name open_node(obj [, callback, animation])
|
2613 |
+
* @param {mixed} obj the node to open
|
2614 |
+
* @param {Function} callback a function to execute once the node is opened
|
2615 |
+
* @param {Number} animation the animation duration in milliseconds when opening the node (overrides the `core.animation` setting). Use `false` for no animation.
|
2616 |
+
* @trigger open_node.jstree, after_open.jstree, before_open.jstree
|
2617 |
+
*/
|
2618 |
+
open_node : function (obj, callback, animation) {
|
2619 |
+
var t1, t2, d, t;
|
2620 |
+
if($.isArray(obj)) {
|
2621 |
+
obj = obj.slice();
|
2622 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
2623 |
+
this.open_node(obj[t1], callback, animation);
|
2624 |
+
}
|
2625 |
+
return true;
|
2626 |
+
}
|
2627 |
+
obj = this.get_node(obj);
|
2628 |
+
if(!obj || obj.id === $.jstree.root) {
|
2629 |
+
return false;
|
2630 |
+
}
|
2631 |
+
animation = animation === undefined ? this.settings.core.animation : animation;
|
2632 |
+
if(!this.is_closed(obj)) {
|
2633 |
+
if(callback) {
|
2634 |
+
callback.call(this, obj, false);
|
2635 |
+
}
|
2636 |
+
return false;
|
2637 |
+
}
|
2638 |
+
if(!this.is_loaded(obj)) {
|
2639 |
+
if(this.is_loading(obj)) {
|
2640 |
+
return setTimeout($.proxy(function () {
|
2641 |
+
this.open_node(obj, callback, animation);
|
2642 |
+
}, this), 500);
|
2643 |
+
}
|
2644 |
+
this.load_node(obj, function (o, ok) {
|
2645 |
+
return ok ? this.open_node(o, callback, animation) : (callback ? callback.call(this, o, false) : false);
|
2646 |
+
});
|
2647 |
+
}
|
2648 |
+
else {
|
2649 |
+
d = this.get_node(obj, true);
|
2650 |
+
t = this;
|
2651 |
+
if(d.length) {
|
2652 |
+
if(animation && d.children(".jstree-children").length) {
|
2653 |
+
d.children(".jstree-children").stop(true, true);
|
2654 |
+
}
|
2655 |
+
if(obj.children.length && !this._firstChild(d.children('.jstree-children')[0])) {
|
2656 |
+
this.draw_children(obj);
|
2657 |
+
//d = this.get_node(obj, true);
|
2658 |
+
}
|
2659 |
+
if(!animation) {
|
2660 |
+
this.trigger('before_open', { "node" : obj });
|
2661 |
+
d[0].className = d[0].className.replace('jstree-closed', 'jstree-open');
|
2662 |
+
d[0].setAttribute("aria-expanded", true);
|
2663 |
+
}
|
2664 |
+
else {
|
2665 |
+
this.trigger('before_open', { "node" : obj });
|
2666 |
+
d
|
2667 |
+
.children(".jstree-children").css("display","none").end()
|
2668 |
+
.removeClass("jstree-closed").addClass("jstree-open").attr("aria-expanded", true)
|
2669 |
+
.children(".jstree-children").stop(true, true)
|
2670 |
+
.slideDown(animation, function () {
|
2671 |
+
this.style.display = "";
|
2672 |
+
if (t.element) {
|
2673 |
+
t.trigger("after_open", { "node" : obj });
|
2674 |
+
}
|
2675 |
+
});
|
2676 |
+
}
|
2677 |
+
}
|
2678 |
+
obj.state.opened = true;
|
2679 |
+
if(callback) {
|
2680 |
+
callback.call(this, obj, true);
|
2681 |
+
}
|
2682 |
+
if(!d.length) {
|
2683 |
+
/**
|
2684 |
+
* triggered when a node is about to be opened (if the node is supposed to be in the DOM, it will be, but it won't be visible yet)
|
2685 |
+
* @event
|
2686 |
+
* @name before_open.jstree
|
2687 |
+
* @param {Object} node the opened node
|
2688 |
+
*/
|
2689 |
+
this.trigger('before_open', { "node" : obj });
|
2690 |
+
}
|
2691 |
+
/**
|
2692 |
+
* triggered when a node is opened (if there is an animation it will not be completed yet)
|
2693 |
+
* @event
|
2694 |
+
* @name open_node.jstree
|
2695 |
+
* @param {Object} node the opened node
|
2696 |
+
*/
|
2697 |
+
this.trigger('open_node', { "node" : obj });
|
2698 |
+
if(!animation || !d.length) {
|
2699 |
+
/**
|
2700 |
+
* triggered when a node is opened and the animation is complete
|
2701 |
+
* @event
|
2702 |
+
* @name after_open.jstree
|
2703 |
+
* @param {Object} node the opened node
|
2704 |
+
*/
|
2705 |
+
this.trigger("after_open", { "node" : obj });
|
2706 |
+
}
|
2707 |
+
return true;
|
2708 |
+
}
|
2709 |
+
},
|
2710 |
+
/**
|
2711 |
+
* opens every parent of a node (node should be loaded)
|
2712 |
+
* @name _open_to(obj)
|
2713 |
+
* @param {mixed} obj the node to reveal
|
2714 |
+
* @private
|
2715 |
+
*/
|
2716 |
+
_open_to : function (obj) {
|
2717 |
+
obj = this.get_node(obj);
|
2718 |
+
if(!obj || obj.id === $.jstree.root) {
|
2719 |
+
return false;
|
2720 |
+
}
|
2721 |
+
var i, j, p = obj.parents;
|
2722 |
+
for(i = 0, j = p.length; i < j; i+=1) {
|
2723 |
+
if(i !== $.jstree.root) {
|
2724 |
+
this.open_node(p[i], false, 0);
|
2725 |
+
}
|
2726 |
+
}
|
2727 |
+
return $('#' + obj.id.replace($.jstree.idregex,'\\$&'), this.element);
|
2728 |
+
},
|
2729 |
+
/**
|
2730 |
+
* closes a node, hiding its children
|
2731 |
+
* @name close_node(obj [, animation])
|
2732 |
+
* @param {mixed} obj the node to close
|
2733 |
+
* @param {Number} animation the animation duration in milliseconds when closing the node (overrides the `core.animation` setting). Use `false` for no animation.
|
2734 |
+
* @trigger close_node.jstree, after_close.jstree
|
2735 |
+
*/
|
2736 |
+
close_node : function (obj, animation) {
|
2737 |
+
var t1, t2, t, d;
|
2738 |
+
if($.isArray(obj)) {
|
2739 |
+
obj = obj.slice();
|
2740 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
2741 |
+
this.close_node(obj[t1], animation);
|
2742 |
+
}
|
2743 |
+
return true;
|
2744 |
+
}
|
2745 |
+
obj = this.get_node(obj);
|
2746 |
+
if(!obj || obj.id === $.jstree.root) {
|
2747 |
+
return false;
|
2748 |
+
}
|
2749 |
+
if(this.is_closed(obj)) {
|
2750 |
+
return false;
|
2751 |
+
}
|
2752 |
+
animation = animation === undefined ? this.settings.core.animation : animation;
|
2753 |
+
t = this;
|
2754 |
+
d = this.get_node(obj, true);
|
2755 |
+
|
2756 |
+
obj.state.opened = false;
|
2757 |
+
/**
|
2758 |
+
* triggered when a node is closed (if there is an animation it will not be complete yet)
|
2759 |
+
* @event
|
2760 |
+
* @name close_node.jstree
|
2761 |
+
* @param {Object} node the closed node
|
2762 |
+
*/
|
2763 |
+
this.trigger('close_node',{ "node" : obj });
|
2764 |
+
if(!d.length) {
|
2765 |
+
/**
|
2766 |
+
* triggered when a node is closed and the animation is complete
|
2767 |
+
* @event
|
2768 |
+
* @name after_close.jstree
|
2769 |
+
* @param {Object} node the closed node
|
2770 |
+
*/
|
2771 |
+
this.trigger("after_close", { "node" : obj });
|
2772 |
+
}
|
2773 |
+
else {
|
2774 |
+
if(!animation) {
|
2775 |
+
d[0].className = d[0].className.replace('jstree-open', 'jstree-closed');
|
2776 |
+
d.attr("aria-expanded", false).children('.jstree-children').remove();
|
2777 |
+
this.trigger("after_close", { "node" : obj });
|
2778 |
+
}
|
2779 |
+
else {
|
2780 |
+
d
|
2781 |
+
.children(".jstree-children").attr("style","display:block !important").end()
|
2782 |
+
.removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded", false)
|
2783 |
+
.children(".jstree-children").stop(true, true).slideUp(animation, function () {
|
2784 |
+
this.style.display = "";
|
2785 |
+
d.children('.jstree-children').remove();
|
2786 |
+
if (t.element) {
|
2787 |
+
t.trigger("after_close", { "node" : obj });
|
2788 |
+
}
|
2789 |
+
});
|
2790 |
+
}
|
2791 |
+
}
|
2792 |
+
},
|
2793 |
+
/**
|
2794 |
+
* toggles a node - closing it if it is open, opening it if it is closed
|
2795 |
+
* @name toggle_node(obj)
|
2796 |
+
* @param {mixed} obj the node to toggle
|
2797 |
+
*/
|
2798 |
+
toggle_node : function (obj) {
|
2799 |
+
var t1, t2;
|
2800 |
+
if($.isArray(obj)) {
|
2801 |
+
obj = obj.slice();
|
2802 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
2803 |
+
this.toggle_node(obj[t1]);
|
2804 |
+
}
|
2805 |
+
return true;
|
2806 |
+
}
|
2807 |
+
if(this.is_closed(obj)) {
|
2808 |
+
return this.open_node(obj);
|
2809 |
+
}
|
2810 |
+
if(this.is_open(obj)) {
|
2811 |
+
return this.close_node(obj);
|
2812 |
+
}
|
2813 |
+
},
|
2814 |
+
/**
|
2815 |
+
* opens all nodes within a node (or the tree), revaling their children. If the node is not loaded it will be loaded and opened once ready.
|
2816 |
+
* @name open_all([obj, animation, original_obj])
|
2817 |
+
* @param {mixed} obj the node to open recursively, omit to open all nodes in the tree
|
2818 |
+
* @param {Number} animation the animation duration in milliseconds when opening the nodes, the default is no animation
|
2819 |
+
* @param {jQuery} reference to the node that started the process (internal use)
|
2820 |
+
* @trigger open_all.jstree
|
2821 |
+
*/
|
2822 |
+
open_all : function (obj, animation, original_obj) {
|
2823 |
+
if(!obj) { obj = $.jstree.root; }
|
2824 |
+
obj = this.get_node(obj);
|
2825 |
+
if(!obj) { return false; }
|
2826 |
+
var dom = obj.id === $.jstree.root ? this.get_container_ul() : this.get_node(obj, true), i, j, _this;
|
2827 |
+
if(!dom.length) {
|
2828 |
+
for(i = 0, j = obj.children_d.length; i < j; i++) {
|
2829 |
+
if(this.is_closed(this._model.data[obj.children_d[i]])) {
|
2830 |
+
this._model.data[obj.children_d[i]].state.opened = true;
|
2831 |
+
}
|
2832 |
+
}
|
2833 |
+
return this.trigger('open_all', { "node" : obj });
|
2834 |
+
}
|
2835 |
+
original_obj = original_obj || dom;
|
2836 |
+
_this = this;
|
2837 |
+
dom = this.is_closed(obj) ? dom.find('.jstree-closed').addBack() : dom.find('.jstree-closed');
|
2838 |
+
dom.each(function () {
|
2839 |
+
_this.open_node(
|
2840 |
+
this,
|
2841 |
+
function(node, status) { if(status && this.is_parent(node)) { this.open_all(node, animation, original_obj); } },
|
2842 |
+
animation || 0
|
2843 |
+
);
|
2844 |
+
});
|
2845 |
+
if(original_obj.find('.jstree-closed').length === 0) {
|
2846 |
+
/**
|
2847 |
+
* triggered when an `open_all` call completes
|
2848 |
+
* @event
|
2849 |
+
* @name open_all.jstree
|
2850 |
+
* @param {Object} node the opened node
|
2851 |
+
*/
|
2852 |
+
this.trigger('open_all', { "node" : this.get_node(original_obj) });
|
2853 |
+
}
|
2854 |
+
},
|
2855 |
+
/**
|
2856 |
+
* closes all nodes within a node (or the tree), revaling their children
|
2857 |
+
* @name close_all([obj, animation])
|
2858 |
+
* @param {mixed} obj the node to close recursively, omit to close all nodes in the tree
|
2859 |
+
* @param {Number} animation the animation duration in milliseconds when closing the nodes, the default is no animation
|
2860 |
+
* @trigger close_all.jstree
|
2861 |
+
*/
|
2862 |
+
close_all : function (obj, animation) {
|
2863 |
+
if(!obj) { obj = $.jstree.root; }
|
2864 |
+
obj = this.get_node(obj);
|
2865 |
+
if(!obj) { return false; }
|
2866 |
+
var dom = obj.id === $.jstree.root ? this.get_container_ul() : this.get_node(obj, true),
|
2867 |
+
_this = this, i, j;
|
2868 |
+
if(dom.length) {
|
2869 |
+
dom = this.is_open(obj) ? dom.find('.jstree-open').addBack() : dom.find('.jstree-open');
|
2870 |
+
$(dom.get().reverse()).each(function () { _this.close_node(this, animation || 0); });
|
2871 |
+
}
|
2872 |
+
for(i = 0, j = obj.children_d.length; i < j; i++) {
|
2873 |
+
this._model.data[obj.children_d[i]].state.opened = false;
|
2874 |
+
}
|
2875 |
+
/**
|
2876 |
+
* triggered when an `close_all` call completes
|
2877 |
+
* @event
|
2878 |
+
* @name close_all.jstree
|
2879 |
+
* @param {Object} node the closed node
|
2880 |
+
*/
|
2881 |
+
this.trigger('close_all', { "node" : obj });
|
2882 |
+
},
|
2883 |
+
/**
|
2884 |
+
* checks if a node is disabled (not selectable)
|
2885 |
+
* @name is_disabled(obj)
|
2886 |
+
* @param {mixed} obj
|
2887 |
+
* @return {Boolean}
|
2888 |
+
*/
|
2889 |
+
is_disabled : function (obj) {
|
2890 |
+
obj = this.get_node(obj);
|
2891 |
+
return obj && obj.state && obj.state.disabled;
|
2892 |
+
},
|
2893 |
+
/**
|
2894 |
+
* enables a node - so that it can be selected
|
2895 |
+
* @name enable_node(obj)
|
2896 |
+
* @param {mixed} obj the node to enable
|
2897 |
+
* @trigger enable_node.jstree
|
2898 |
+
*/
|
2899 |
+
enable_node : function (obj) {
|
2900 |
+
var t1, t2;
|
2901 |
+
if($.isArray(obj)) {
|
2902 |
+
obj = obj.slice();
|
2903 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
2904 |
+
this.enable_node(obj[t1]);
|
2905 |
+
}
|
2906 |
+
return true;
|
2907 |
+
}
|
2908 |
+
obj = this.get_node(obj);
|
2909 |
+
if(!obj || obj.id === $.jstree.root) {
|
2910 |
+
return false;
|
2911 |
+
}
|
2912 |
+
obj.state.disabled = false;
|
2913 |
+
this.get_node(obj,true).children('.jstree-anchor').removeClass('jstree-disabled').attr('aria-disabled', false);
|
2914 |
+
/**
|
2915 |
+
* triggered when an node is enabled
|
2916 |
+
* @event
|
2917 |
+
* @name enable_node.jstree
|
2918 |
+
* @param {Object} node the enabled node
|
2919 |
+
*/
|
2920 |
+
this.trigger('enable_node', { 'node' : obj });
|
2921 |
+
},
|
2922 |
+
/**
|
2923 |
+
* disables a node - so that it can not be selected
|
2924 |
+
* @name disable_node(obj)
|
2925 |
+
* @param {mixed} obj the node to disable
|
2926 |
+
* @trigger disable_node.jstree
|
2927 |
+
*/
|
2928 |
+
disable_node : function (obj) {
|
2929 |
+
var t1, t2;
|
2930 |
+
if($.isArray(obj)) {
|
2931 |
+
obj = obj.slice();
|
2932 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
2933 |
+
this.disable_node(obj[t1]);
|
2934 |
+
}
|
2935 |
+
return true;
|
2936 |
+
}
|
2937 |
+
obj = this.get_node(obj);
|
2938 |
+
if(!obj || obj.id === $.jstree.root) {
|
2939 |
+
return false;
|
2940 |
+
}
|
2941 |
+
obj.state.disabled = true;
|
2942 |
+
this.get_node(obj,true).children('.jstree-anchor').addClass('jstree-disabled').attr('aria-disabled', true);
|
2943 |
+
/**
|
2944 |
+
* triggered when an node is disabled
|
2945 |
+
* @event
|
2946 |
+
* @name disable_node.jstree
|
2947 |
+
* @param {Object} node the disabled node
|
2948 |
+
*/
|
2949 |
+
this.trigger('disable_node', { 'node' : obj });
|
2950 |
+
},
|
2951 |
+
/**
|
2952 |
+
* determines if a node is hidden
|
2953 |
+
* @name is_hidden(obj)
|
2954 |
+
* @param {mixed} obj the node
|
2955 |
+
*/
|
2956 |
+
is_hidden : function (obj) {
|
2957 |
+
obj = this.get_node(obj);
|
2958 |
+
return obj.state.hidden === true;
|
2959 |
+
},
|
2960 |
+
/**
|
2961 |
+
* hides a node - it is still in the structure but will not be visible
|
2962 |
+
* @name hide_node(obj)
|
2963 |
+
* @param {mixed} obj the node to hide
|
2964 |
+
* @param {Boolean} skip_redraw internal parameter controlling if redraw is called
|
2965 |
+
* @trigger hide_node.jstree
|
2966 |
+
*/
|
2967 |
+
hide_node : function (obj, skip_redraw) {
|
2968 |
+
var t1, t2;
|
2969 |
+
if($.isArray(obj)) {
|
2970 |
+
obj = obj.slice();
|
2971 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
2972 |
+
this.hide_node(obj[t1], true);
|
2973 |
+
}
|
2974 |
+
if (!skip_redraw) {
|
2975 |
+
this.redraw();
|
2976 |
+
}
|
2977 |
+
return true;
|
2978 |
+
}
|
2979 |
+
obj = this.get_node(obj);
|
2980 |
+
if(!obj || obj.id === $.jstree.root) {
|
2981 |
+
return false;
|
2982 |
+
}
|
2983 |
+
if(!obj.state.hidden) {
|
2984 |
+
obj.state.hidden = true;
|
2985 |
+
this._node_changed(obj.parent);
|
2986 |
+
if(!skip_redraw) {
|
2987 |
+
this.redraw();
|
2988 |
+
}
|
2989 |
+
/**
|
2990 |
+
* triggered when an node is hidden
|
2991 |
+
* @event
|
2992 |
+
* @name hide_node.jstree
|
2993 |
+
* @param {Object} node the hidden node
|
2994 |
+
*/
|
2995 |
+
this.trigger('hide_node', { 'node' : obj });
|
2996 |
+
}
|
2997 |
+
},
|
2998 |
+
/**
|
2999 |
+
* shows a node
|
3000 |
+
* @name show_node(obj)
|
3001 |
+
* @param {mixed} obj the node to show
|
3002 |
+
* @param {Boolean} skip_redraw internal parameter controlling if redraw is called
|
3003 |
+
* @trigger show_node.jstree
|
3004 |
+
*/
|
3005 |
+
show_node : function (obj, skip_redraw) {
|
3006 |
+
var t1, t2;
|
3007 |
+
if($.isArray(obj)) {
|
3008 |
+
obj = obj.slice();
|
3009 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
3010 |
+
this.show_node(obj[t1], true);
|
3011 |
+
}
|
3012 |
+
if (!skip_redraw) {
|
3013 |
+
this.redraw();
|
3014 |
+
}
|
3015 |
+
return true;
|
3016 |
+
}
|
3017 |
+
obj = this.get_node(obj);
|
3018 |
+
if(!obj || obj.id === $.jstree.root) {
|
3019 |
+
return false;
|
3020 |
+
}
|
3021 |
+
if(obj.state.hidden) {
|
3022 |
+
obj.state.hidden = false;
|
3023 |
+
this._node_changed(obj.parent);
|
3024 |
+
if(!skip_redraw) {
|
3025 |
+
this.redraw();
|
3026 |
+
}
|
3027 |
+
/**
|
3028 |
+
* triggered when an node is shown
|
3029 |
+
* @event
|
3030 |
+
* @name show_node.jstree
|
3031 |
+
* @param {Object} node the shown node
|
3032 |
+
*/
|
3033 |
+
this.trigger('show_node', { 'node' : obj });
|
3034 |
+
}
|
3035 |
+
},
|
3036 |
+
/**
|
3037 |
+
* hides all nodes
|
3038 |
+
* @name hide_all()
|
3039 |
+
* @trigger hide_all.jstree
|
3040 |
+
*/
|
3041 |
+
hide_all : function (skip_redraw) {
|
3042 |
+
var i, m = this._model.data, ids = [];
|
3043 |
+
for(i in m) {
|
3044 |
+
if(m.hasOwnProperty(i) && i !== $.jstree.root && !m[i].state.hidden) {
|
3045 |
+
m[i].state.hidden = true;
|
3046 |
+
ids.push(i);
|
3047 |
+
}
|
3048 |
+
}
|
3049 |
+
this._model.force_full_redraw = true;
|
3050 |
+
if(!skip_redraw) {
|
3051 |
+
this.redraw();
|
3052 |
+
}
|
3053 |
+
/**
|
3054 |
+
* triggered when all nodes are hidden
|
3055 |
+
* @event
|
3056 |
+
* @name hide_all.jstree
|
3057 |
+
* @param {Array} nodes the IDs of all hidden nodes
|
3058 |
+
*/
|
3059 |
+
this.trigger('hide_all', { 'nodes' : ids });
|
3060 |
+
return ids;
|
3061 |
+
},
|
3062 |
+
/**
|
3063 |
+
* shows all nodes
|
3064 |
+
* @name show_all()
|
3065 |
+
* @trigger show_all.jstree
|
3066 |
+
*/
|
3067 |
+
show_all : function (skip_redraw) {
|
3068 |
+
var i, m = this._model.data, ids = [];
|
3069 |
+
for(i in m) {
|
3070 |
+
if(m.hasOwnProperty(i) && i !== $.jstree.root && m[i].state.hidden) {
|
3071 |
+
m[i].state.hidden = false;
|
3072 |
+
ids.push(i);
|
3073 |
+
}
|
3074 |
+
}
|
3075 |
+
this._model.force_full_redraw = true;
|
3076 |
+
if(!skip_redraw) {
|
3077 |
+
this.redraw();
|
3078 |
+
}
|
3079 |
+
/**
|
3080 |
+
* triggered when all nodes are shown
|
3081 |
+
* @event
|
3082 |
+
* @name show_all.jstree
|
3083 |
+
* @param {Array} nodes the IDs of all shown nodes
|
3084 |
+
*/
|
3085 |
+
this.trigger('show_all', { 'nodes' : ids });
|
3086 |
+
return ids;
|
3087 |
+
},
|
3088 |
+
/**
|
3089 |
+
* called when a node is selected by the user. Used internally.
|
3090 |
+
* @private
|
3091 |
+
* @name activate_node(obj, e)
|
3092 |
+
* @param {mixed} obj the node
|
3093 |
+
* @param {Object} e the related event
|
3094 |
+
* @trigger activate_node.jstree, changed.jstree
|
3095 |
+
*/
|
3096 |
+
activate_node : function (obj, e) {
|
3097 |
+
if(this.is_disabled(obj)) {
|
3098 |
+
return false;
|
3099 |
+
}
|
3100 |
+
if(!e || typeof e !== 'object') {
|
3101 |
+
e = {};
|
3102 |
+
}
|
3103 |
+
|
3104 |
+
// ensure last_clicked is still in the DOM, make it fresh (maybe it was moved?) and make sure it is still selected, if not - make last_clicked the last selected node
|
3105 |
+
this._data.core.last_clicked = this._data.core.last_clicked && this._data.core.last_clicked.id !== undefined ? this.get_node(this._data.core.last_clicked.id) : null;
|
3106 |
+
if(this._data.core.last_clicked && !this._data.core.last_clicked.state.selected) { this._data.core.last_clicked = null; }
|
3107 |
+
if(!this._data.core.last_clicked && this._data.core.selected.length) { this._data.core.last_clicked = this.get_node(this._data.core.selected[this._data.core.selected.length - 1]); }
|
3108 |
+
|
3109 |
+
if(!this.settings.core.multiple || (!e.metaKey && !e.ctrlKey && !e.shiftKey) || (e.shiftKey && (!this._data.core.last_clicked || !this.get_parent(obj) || this.get_parent(obj) !== this._data.core.last_clicked.parent ) )) {
|
3110 |
+
if(!this.settings.core.multiple && (e.metaKey || e.ctrlKey || e.shiftKey) && this.is_selected(obj)) {
|
3111 |
+
this.deselect_node(obj, false, e);
|
3112 |
+
}
|
3113 |
+
else {
|
3114 |
+
this.deselect_all(true);
|
3115 |
+
this.select_node(obj, false, false, e);
|
3116 |
+
this._data.core.last_clicked = this.get_node(obj);
|
3117 |
+
}
|
3118 |
+
}
|
3119 |
+
else {
|
3120 |
+
if(e.shiftKey) {
|
3121 |
+
var o = this.get_node(obj).id,
|
3122 |
+
l = this._data.core.last_clicked.id,
|
3123 |
+
p = this.get_node(this._data.core.last_clicked.parent).children,
|
3124 |
+
c = false,
|
3125 |
+
i, j;
|
3126 |
+
for(i = 0, j = p.length; i < j; i += 1) {
|
3127 |
+
// separate IFs work whem o and l are the same
|
3128 |
+
if(p[i] === o) {
|
3129 |
+
c = !c;
|
3130 |
+
}
|
3131 |
+
if(p[i] === l) {
|
3132 |
+
c = !c;
|
3133 |
+
}
|
3134 |
+
if(!this.is_disabled(p[i]) && (c || p[i] === o || p[i] === l)) {
|
3135 |
+
if (!this.is_hidden(p[i])) {
|
3136 |
+
this.select_node(p[i], true, false, e);
|
3137 |
+
}
|
3138 |
+
}
|
3139 |
+
else {
|
3140 |
+
this.deselect_node(p[i], true, e);
|
3141 |
+
}
|
3142 |
+
}
|
3143 |
+
this.trigger('changed', { 'action' : 'select_node', 'node' : this.get_node(obj), 'selected' : this._data.core.selected, 'event' : e });
|
3144 |
+
}
|
3145 |
+
else {
|
3146 |
+
if(!this.is_selected(obj)) {
|
3147 |
+
this.select_node(obj, false, false, e);
|
3148 |
+
}
|
3149 |
+
else {
|
3150 |
+
this.deselect_node(obj, false, e);
|
3151 |
+
}
|
3152 |
+
}
|
3153 |
+
}
|
3154 |
+
/**
|
3155 |
+
* triggered when an node is clicked or intercated with by the user
|
3156 |
+
* @event
|
3157 |
+
* @name activate_node.jstree
|
3158 |
+
* @param {Object} node
|
3159 |
+
* @param {Object} event the ooriginal event (if any) which triggered the call (may be an empty object)
|
3160 |
+
*/
|
3161 |
+
this.trigger('activate_node', { 'node' : this.get_node(obj), 'event' : e });
|
3162 |
+
},
|
3163 |
+
/**
|
3164 |
+
* applies the hover state on a node, called when a node is hovered by the user. Used internally.
|
3165 |
+
* @private
|
3166 |
+
* @name hover_node(obj)
|
3167 |
+
* @param {mixed} obj
|
3168 |
+
* @trigger hover_node.jstree
|
3169 |
+
*/
|
3170 |
+
hover_node : function (obj) {
|
3171 |
+
obj = this.get_node(obj, true);
|
3172 |
+
if(!obj || !obj.length || obj.children('.jstree-hovered').length) {
|
3173 |
+
return false;
|
3174 |
+
}
|
3175 |
+
var o = this.element.find('.jstree-hovered'), t = this.element;
|
3176 |
+
if(o && o.length) { this.dehover_node(o); }
|
3177 |
+
|
3178 |
+
obj.children('.jstree-anchor').addClass('jstree-hovered');
|
3179 |
+
/**
|
3180 |
+
* triggered when an node is hovered
|
3181 |
+
* @event
|
3182 |
+
* @name hover_node.jstree
|
3183 |
+
* @param {Object} node
|
3184 |
+
*/
|
3185 |
+
this.trigger('hover_node', { 'node' : this.get_node(obj) });
|
3186 |
+
setTimeout(function () { t.attr('aria-activedescendant', obj[0].id); }, 0);
|
3187 |
+
},
|
3188 |
+
/**
|
3189 |
+
* removes the hover state from a nodecalled when a node is no longer hovered by the user. Used internally.
|
3190 |
+
* @private
|
3191 |
+
* @name dehover_node(obj)
|
3192 |
+
* @param {mixed} obj
|
3193 |
+
* @trigger dehover_node.jstree
|
3194 |
+
*/
|
3195 |
+
dehover_node : function (obj) {
|
3196 |
+
obj = this.get_node(obj, true);
|
3197 |
+
if(!obj || !obj.length || !obj.children('.jstree-hovered').length) {
|
3198 |
+
return false;
|
3199 |
+
}
|
3200 |
+
obj.children('.jstree-anchor').removeClass('jstree-hovered');
|
3201 |
+
/**
|
3202 |
+
* triggered when an node is no longer hovered
|
3203 |
+
* @event
|
3204 |
+
* @name dehover_node.jstree
|
3205 |
+
* @param {Object} node
|
3206 |
+
*/
|
3207 |
+
this.trigger('dehover_node', { 'node' : this.get_node(obj) });
|
3208 |
+
},
|
3209 |
+
/**
|
3210 |
+
* select a node
|
3211 |
+
* @name select_node(obj [, supress_event, prevent_open])
|
3212 |
+
* @param {mixed} obj an array can be used to select multiple nodes
|
3213 |
+
* @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered
|
3214 |
+
* @param {Boolean} prevent_open if set to `true` parents of the selected node won't be opened
|
3215 |
+
* @trigger select_node.jstree, changed.jstree
|
3216 |
+
*/
|
3217 |
+
select_node : function (obj, supress_event, prevent_open, e) {
|
3218 |
+
var dom, t1, t2, th;
|
3219 |
+
if($.isArray(obj)) {
|
3220 |
+
obj = obj.slice();
|
3221 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
3222 |
+
this.select_node(obj[t1], supress_event, prevent_open, e);
|
3223 |
+
}
|
3224 |
+
return true;
|
3225 |
+
}
|
3226 |
+
obj = this.get_node(obj);
|
3227 |
+
if(!obj || obj.id === $.jstree.root) {
|
3228 |
+
return false;
|
3229 |
+
}
|
3230 |
+
dom = this.get_node(obj, true);
|
3231 |
+
if(!obj.state.selected) {
|
3232 |
+
obj.state.selected = true;
|
3233 |
+
this._data.core.selected.push(obj.id);
|
3234 |
+
if(!prevent_open) {
|
3235 |
+
dom = this._open_to(obj);
|
3236 |
+
}
|
3237 |
+
if(dom && dom.length) {
|
3238 |
+
dom.attr('aria-selected', true).children('.jstree-anchor').addClass('jstree-clicked');
|
3239 |
+
}
|
3240 |
+
/**
|
3241 |
+
* triggered when an node is selected
|
3242 |
+
* @event
|
3243 |
+
* @name select_node.jstree
|
3244 |
+
* @param {Object} node
|
3245 |
+
* @param {Array} selected the current selection
|
3246 |
+
* @param {Object} event the event (if any) that triggered this select_node
|
3247 |
+
*/
|
3248 |
+
this.trigger('select_node', { 'node' : obj, 'selected' : this._data.core.selected, 'event' : e });
|
3249 |
+
if(!supress_event) {
|
3250 |
+
/**
|
3251 |
+
* triggered when selection changes
|
3252 |
+
* @event
|
3253 |
+
* @name changed.jstree
|
3254 |
+
* @param {Object} node
|
3255 |
+
* @param {Object} action the action that caused the selection to change
|
3256 |
+
* @param {Array} selected the current selection
|
3257 |
+
* @param {Object} event the event (if any) that triggered this changed event
|
3258 |
+
*/
|
3259 |
+
this.trigger('changed', { 'action' : 'select_node', 'node' : obj, 'selected' : this._data.core.selected, 'event' : e });
|
3260 |
+
}
|
3261 |
+
}
|
3262 |
+
},
|
3263 |
+
/**
|
3264 |
+
* deselect a node
|
3265 |
+
* @name deselect_node(obj [, supress_event])
|
3266 |
+
* @param {mixed} obj an array can be used to deselect multiple nodes
|
3267 |
+
* @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered
|
3268 |
+
* @trigger deselect_node.jstree, changed.jstree
|
3269 |
+
*/
|
3270 |
+
deselect_node : function (obj, supress_event, e) {
|
3271 |
+
var t1, t2, dom;
|
3272 |
+
if($.isArray(obj)) {
|
3273 |
+
obj = obj.slice();
|
3274 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
3275 |
+
this.deselect_node(obj[t1], supress_event, e);
|
3276 |
+
}
|
3277 |
+
return true;
|
3278 |
+
}
|
3279 |
+
obj = this.get_node(obj);
|
3280 |
+
if(!obj || obj.id === $.jstree.root) {
|
3281 |
+
return false;
|
3282 |
+
}
|
3283 |
+
dom = this.get_node(obj, true);
|
3284 |
+
if(obj.state.selected) {
|
3285 |
+
obj.state.selected = false;
|
3286 |
+
this._data.core.selected = $.vakata.array_remove_item(this._data.core.selected, obj.id);
|
3287 |
+
if(dom.length) {
|
3288 |
+
dom.attr('aria-selected', false).children('.jstree-anchor').removeClass('jstree-clicked');
|
3289 |
+
}
|
3290 |
+
/**
|
3291 |
+
* triggered when an node is deselected
|
3292 |
+
* @event
|
3293 |
+
* @name deselect_node.jstree
|
3294 |
+
* @param {Object} node
|
3295 |
+
* @param {Array} selected the current selection
|
3296 |
+
* @param {Object} event the event (if any) that triggered this deselect_node
|
3297 |
+
*/
|
3298 |
+
this.trigger('deselect_node', { 'node' : obj, 'selected' : this._data.core.selected, 'event' : e });
|
3299 |
+
if(!supress_event) {
|
3300 |
+
this.trigger('changed', { 'action' : 'deselect_node', 'node' : obj, 'selected' : this._data.core.selected, 'event' : e });
|
3301 |
+
}
|
3302 |
+
}
|
3303 |
+
},
|
3304 |
+
/**
|
3305 |
+
* select all nodes in the tree
|
3306 |
+
* @name select_all([supress_event])
|
3307 |
+
* @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered
|
3308 |
+
* @trigger select_all.jstree, changed.jstree
|
3309 |
+
*/
|
3310 |
+
select_all : function (supress_event) {
|
3311 |
+
var tmp = this._data.core.selected.concat([]), i, j;
|
3312 |
+
this._data.core.selected = this._model.data[$.jstree.root].children_d.concat();
|
3313 |
+
for(i = 0, j = this._data.core.selected.length; i < j; i++) {
|
3314 |
+
if(this._model.data[this._data.core.selected[i]]) {
|
3315 |
+
this._model.data[this._data.core.selected[i]].state.selected = true;
|
3316 |
+
}
|
3317 |
+
}
|
3318 |
+
this.redraw(true);
|
3319 |
+
/**
|
3320 |
+
* triggered when all nodes are selected
|
3321 |
+
* @event
|
3322 |
+
* @name select_all.jstree
|
3323 |
+
* @param {Array} selected the current selection
|
3324 |
+
*/
|
3325 |
+
this.trigger('select_all', { 'selected' : this._data.core.selected });
|
3326 |
+
if(!supress_event) {
|
3327 |
+
this.trigger('changed', { 'action' : 'select_all', 'selected' : this._data.core.selected, 'old_selection' : tmp });
|
3328 |
+
}
|
3329 |
+
},
|
3330 |
+
/**
|
3331 |
+
* deselect all selected nodes
|
3332 |
+
* @name deselect_all([supress_event])
|
3333 |
+
* @param {Boolean} supress_event if set to `true` the `changed.jstree` event won't be triggered
|
3334 |
+
* @trigger deselect_all.jstree, changed.jstree
|
3335 |
+
*/
|
3336 |
+
deselect_all : function (supress_event) {
|
3337 |
+
var tmp = this._data.core.selected.concat([]), i, j;
|
3338 |
+
for(i = 0, j = this._data.core.selected.length; i < j; i++) {
|
3339 |
+
if(this._model.data[this._data.core.selected[i]]) {
|
3340 |
+
this._model.data[this._data.core.selected[i]].state.selected = false;
|
3341 |
+
}
|
3342 |
+
}
|
3343 |
+
this._data.core.selected = [];
|
3344 |
+
this.element.find('.jstree-clicked').removeClass('jstree-clicked').parent().attr('aria-selected', false);
|
3345 |
+
/**
|
3346 |
+
* triggered when all nodes are deselected
|
3347 |
+
* @event
|
3348 |
+
* @name deselect_all.jstree
|
3349 |
+
* @param {Object} node the previous selection
|
3350 |
+
* @param {Array} selected the current selection
|
3351 |
+
*/
|
3352 |
+
this.trigger('deselect_all', { 'selected' : this._data.core.selected, 'node' : tmp });
|
3353 |
+
if(!supress_event) {
|
3354 |
+
this.trigger('changed', { 'action' : 'deselect_all', 'selected' : this._data.core.selected, 'old_selection' : tmp });
|
3355 |
+
}
|
3356 |
+
},
|
3357 |
+
/**
|
3358 |
+
* checks if a node is selected
|
3359 |
+
* @name is_selected(obj)
|
3360 |
+
* @param {mixed} obj
|
3361 |
+
* @return {Boolean}
|
3362 |
+
*/
|
3363 |
+
is_selected : function (obj) {
|
3364 |
+
obj = this.get_node(obj);
|
3365 |
+
if(!obj || obj.id === $.jstree.root) {
|
3366 |
+
return false;
|
3367 |
+
}
|
3368 |
+
return obj.state.selected;
|
3369 |
+
},
|
3370 |
+
/**
|
3371 |
+
* get an array of all selected nodes
|
3372 |
+
* @name get_selected([full])
|
3373 |
+
* @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned
|
3374 |
+
* @return {Array}
|
3375 |
+
*/
|
3376 |
+
get_selected : function (full) {
|
3377 |
+
return full ? $.map(this._data.core.selected, $.proxy(function (i) { return this.get_node(i); }, this)) : this._data.core.selected.slice();
|
3378 |
+
},
|
3379 |
+
/**
|
3380 |
+
* get an array of all top level selected nodes (ignoring children of selected nodes)
|
3381 |
+
* @name get_top_selected([full])
|
3382 |
+
* @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned
|
3383 |
+
* @return {Array}
|
3384 |
+
*/
|
3385 |
+
get_top_selected : function (full) {
|
3386 |
+
var tmp = this.get_selected(true),
|
3387 |
+
obj = {}, i, j, k, l;
|
3388 |
+
for(i = 0, j = tmp.length; i < j; i++) {
|
3389 |
+
obj[tmp[i].id] = tmp[i];
|
3390 |
+
}
|
3391 |
+
for(i = 0, j = tmp.length; i < j; i++) {
|
3392 |
+
for(k = 0, l = tmp[i].children_d.length; k < l; k++) {
|
3393 |
+
if(obj[tmp[i].children_d[k]]) {
|
3394 |
+
delete obj[tmp[i].children_d[k]];
|
3395 |
+
}
|
3396 |
+
}
|
3397 |
+
}
|
3398 |
+
tmp = [];
|
3399 |
+
for(i in obj) {
|
3400 |
+
if(obj.hasOwnProperty(i)) {
|
3401 |
+
tmp.push(i);
|
3402 |
+
}
|
3403 |
+
}
|
3404 |
+
return full ? $.map(tmp, $.proxy(function (i) { return this.get_node(i); }, this)) : tmp;
|
3405 |
+
},
|
3406 |
+
/**
|
3407 |
+
* get an array of all bottom level selected nodes (ignoring selected parents)
|
3408 |
+
* @name get_bottom_selected([full])
|
3409 |
+
* @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned
|
3410 |
+
* @return {Array}
|
3411 |
+
*/
|
3412 |
+
get_bottom_selected : function (full) {
|
3413 |
+
var tmp = this.get_selected(true),
|
3414 |
+
obj = [], i, j;
|
3415 |
+
for(i = 0, j = tmp.length; i < j; i++) {
|
3416 |
+
if(!tmp[i].children.length) {
|
3417 |
+
obj.push(tmp[i].id);
|
3418 |
+
}
|
3419 |
+
}
|
3420 |
+
return full ? $.map(obj, $.proxy(function (i) { return this.get_node(i); }, this)) : obj;
|
3421 |
+
},
|
3422 |
+
/**
|
3423 |
+
* gets the current state of the tree so that it can be restored later with `set_state(state)`. Used internally.
|
3424 |
+
* @name get_state()
|
3425 |
+
* @private
|
3426 |
+
* @return {Object}
|
3427 |
+
*/
|
3428 |
+
get_state : function () {
|
3429 |
+
var state = {
|
3430 |
+
'core' : {
|
3431 |
+
'open' : [],
|
3432 |
+
'loaded' : [],
|
3433 |
+
'scroll' : {
|
3434 |
+
'left' : this.element.scrollLeft(),
|
3435 |
+
'top' : this.element.scrollTop()
|
3436 |
+
},
|
3437 |
+
/*!
|
3438 |
+
'themes' : {
|
3439 |
+
'name' : this.get_theme(),
|
3440 |
+
'icons' : this._data.core.themes.icons,
|
3441 |
+
'dots' : this._data.core.themes.dots
|
3442 |
+
},
|
3443 |
+
*/
|
3444 |
+
'selected' : []
|
3445 |
+
}
|
3446 |
+
}, i;
|
3447 |
+
for(i in this._model.data) {
|
3448 |
+
if(this._model.data.hasOwnProperty(i)) {
|
3449 |
+
if(i !== $.jstree.root) {
|
3450 |
+
if(this._model.data[i].state.loaded && this.settings.core.loaded_state) {
|
3451 |
+
state.core.loaded.push(i);
|
3452 |
+
}
|
3453 |
+
if(this._model.data[i].state.opened) {
|
3454 |
+
state.core.open.push(i);
|
3455 |
+
}
|
3456 |
+
if(this._model.data[i].state.selected) {
|
3457 |
+
state.core.selected.push(i);
|
3458 |
+
}
|
3459 |
+
}
|
3460 |
+
}
|
3461 |
+
}
|
3462 |
+
return state;
|
3463 |
+
},
|
3464 |
+
/**
|
3465 |
+
* sets the state of the tree. Used internally.
|
3466 |
+
* @name set_state(state [, callback])
|
3467 |
+
* @private
|
3468 |
+
* @param {Object} state the state to restore. Keep in mind this object is passed by reference and jstree will modify it.
|
3469 |
+
* @param {Function} callback an optional function to execute once the state is restored.
|
3470 |
+
* @trigger set_state.jstree
|
3471 |
+
*/
|
3472 |
+
set_state : function (state, callback) {
|
3473 |
+
if(state) {
|
3474 |
+
if(state.core && state.core.selected && state.core.initial_selection === undefined) {
|
3475 |
+
state.core.initial_selection = this._data.core.selected.concat([]).sort().join(',');
|
3476 |
+
}
|
3477 |
+
if(state.core) {
|
3478 |
+
var res, n, t, _this, i;
|
3479 |
+
if(state.core.loaded) {
|
3480 |
+
if(!this.settings.core.loaded_state || !$.isArray(state.core.loaded) || !state.core.loaded.length) {
|
3481 |
+
delete state.core.loaded;
|
3482 |
+
this.set_state(state, callback);
|
3483 |
+
}
|
3484 |
+
else {
|
3485 |
+
this._load_nodes(state.core.loaded, function (nodes) {
|
3486 |
+
delete state.core.loaded;
|
3487 |
+
this.set_state(state, callback);
|
3488 |
+
});
|
3489 |
+
}
|
3490 |
+
return false;
|
3491 |
+
}
|
3492 |
+
if(state.core.open) {
|
3493 |
+
if(!$.isArray(state.core.open) || !state.core.open.length) {
|
3494 |
+
delete state.core.open;
|
3495 |
+
this.set_state(state, callback);
|
3496 |
+
}
|
3497 |
+
else {
|
3498 |
+
this._load_nodes(state.core.open, function (nodes) {
|
3499 |
+
this.open_node(nodes, false, 0);
|
3500 |
+
delete state.core.open;
|
3501 |
+
this.set_state(state, callback);
|
3502 |
+
});
|
3503 |
+
}
|
3504 |
+
return false;
|
3505 |
+
}
|
3506 |
+
if(state.core.scroll) {
|
3507 |
+
if(state.core.scroll && state.core.scroll.left !== undefined) {
|
3508 |
+
this.element.scrollLeft(state.core.scroll.left);
|
3509 |
+
}
|
3510 |
+
if(state.core.scroll && state.core.scroll.top !== undefined) {
|
3511 |
+
this.element.scrollTop(state.core.scroll.top);
|
3512 |
+
}
|
3513 |
+
delete state.core.scroll;
|
3514 |
+
this.set_state(state, callback);
|
3515 |
+
return false;
|
3516 |
+
}
|
3517 |
+
if(state.core.selected) {
|
3518 |
+
_this = this;
|
3519 |
+
if (state.core.initial_selection === undefined ||
|
3520 |
+
state.core.initial_selection === this._data.core.selected.concat([]).sort().join(',')
|
3521 |
+
) {
|
3522 |
+
this.deselect_all();
|
3523 |
+
$.each(state.core.selected, function (i, v) {
|
3524 |
+
_this.select_node(v, false, true);
|
3525 |
+
});
|
3526 |
+
}
|
3527 |
+
delete state.core.initial_selection;
|
3528 |
+
delete state.core.selected;
|
3529 |
+
this.set_state(state, callback);
|
3530 |
+
return false;
|
3531 |
+
}
|
3532 |
+
for(i in state) {
|
3533 |
+
if(state.hasOwnProperty(i) && i !== "core" && $.inArray(i, this.settings.plugins) === -1) {
|
3534 |
+
delete state[i];
|
3535 |
+
}
|
3536 |
+
}
|
3537 |
+
if($.isEmptyObject(state.core)) {
|
3538 |
+
delete state.core;
|
3539 |
+
this.set_state(state, callback);
|
3540 |
+
return false;
|
3541 |
+
}
|
3542 |
+
}
|
3543 |
+
if($.isEmptyObject(state)) {
|
3544 |
+
state = null;
|
3545 |
+
if(callback) { callback.call(this); }
|
3546 |
+
/**
|
3547 |
+
* triggered when a `set_state` call completes
|
3548 |
+
* @event
|
3549 |
+
* @name set_state.jstree
|
3550 |
+
*/
|
3551 |
+
this.trigger('set_state');
|
3552 |
+
return false;
|
3553 |
+
}
|
3554 |
+
return true;
|
3555 |
+
}
|
3556 |
+
return false;
|
3557 |
+
},
|
3558 |
+
/**
|
3559 |
+
* refreshes the tree - all nodes are reloaded with calls to `load_node`.
|
3560 |
+
* @name refresh()
|
3561 |
+
* @param {Boolean} skip_loading an option to skip showing the loading indicator
|
3562 |
+
* @param {Mixed} forget_state if set to `true` state will not be reapplied, if set to a function (receiving the current state as argument) the result of that function will be used as state
|
3563 |
+
* @trigger refresh.jstree
|
3564 |
+
*/
|
3565 |
+
refresh : function (skip_loading, forget_state) {
|
3566 |
+
this._data.core.state = forget_state === true ? {} : this.get_state();
|
3567 |
+
if(forget_state && $.isFunction(forget_state)) { this._data.core.state = forget_state.call(this, this._data.core.state); }
|
3568 |
+
this._cnt = 0;
|
3569 |
+
this._model.data = {};
|
3570 |
+
this._model.data[$.jstree.root] = {
|
3571 |
+
id : $.jstree.root,
|
3572 |
+
parent : null,
|
3573 |
+
parents : [],
|
3574 |
+
children : [],
|
3575 |
+
children_d : [],
|
3576 |
+
state : { loaded : false }
|
3577 |
+
};
|
3578 |
+
this._data.core.selected = [];
|
3579 |
+
this._data.core.last_clicked = null;
|
3580 |
+
this._data.core.focused = null;
|
3581 |
+
|
3582 |
+
var c = this.get_container_ul()[0].className;
|
3583 |
+
if(!skip_loading) {
|
3584 |
+
this.element.html("<"+"ul class='"+c+"' role='group'><"+"li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='treeitem' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><"+"a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>" + this.get_string("Loading ...") + "</a></li></ul>");
|
3585 |
+
this.element.attr('aria-activedescendant','j'+this._id+'_loading');
|
3586 |
+
}
|
3587 |
+
this.load_node($.jstree.root, function (o, s) {
|
3588 |
+
if(s) {
|
3589 |
+
this.get_container_ul()[0].className = c;
|
3590 |
+
if(this._firstChild(this.get_container_ul()[0])) {
|
3591 |
+
this.element.attr('aria-activedescendant',this._firstChild(this.get_container_ul()[0]).id);
|
3592 |
+
}
|
3593 |
+
this.set_state($.extend(true, {}, this._data.core.state), function () {
|
3594 |
+
/**
|
3595 |
+
* triggered when a `refresh` call completes
|
3596 |
+
* @event
|
3597 |
+
* @name refresh.jstree
|
3598 |
+
*/
|
3599 |
+
this.trigger('refresh');
|
3600 |
+
});
|
3601 |
+
}
|
3602 |
+
this._data.core.state = null;
|
3603 |
+
});
|
3604 |
+
},
|
3605 |
+
/**
|
3606 |
+
* refreshes a node in the tree (reload its children) all opened nodes inside that node are reloaded with calls to `load_node`.
|
3607 |
+
* @name refresh_node(obj)
|
3608 |
+
* @param {mixed} obj the node
|
3609 |
+
* @trigger refresh_node.jstree
|
3610 |
+
*/
|
3611 |
+
refresh_node : function (obj) {
|
3612 |
+
obj = this.get_node(obj);
|
3613 |
+
if(!obj || obj.id === $.jstree.root) { return false; }
|
3614 |
+
var opened = [], to_load = [], s = this._data.core.selected.concat([]);
|
3615 |
+
to_load.push(obj.id);
|
3616 |
+
if(obj.state.opened === true) { opened.push(obj.id); }
|
3617 |
+
this.get_node(obj, true).find('.jstree-open').each(function() { to_load.push(this.id); opened.push(this.id); });
|
3618 |
+
this._load_nodes(to_load, $.proxy(function (nodes) {
|
3619 |
+
this.open_node(opened, false, 0);
|
3620 |
+
this.select_node(s);
|
3621 |
+
/**
|
3622 |
+
* triggered when a node is refreshed
|
3623 |
+
* @event
|
3624 |
+
* @name refresh_node.jstree
|
3625 |
+
* @param {Object} node - the refreshed node
|
3626 |
+
* @param {Array} nodes - an array of the IDs of the nodes that were reloaded
|
3627 |
+
*/
|
3628 |
+
this.trigger('refresh_node', { 'node' : obj, 'nodes' : nodes });
|
3629 |
+
}, this), false, true);
|
3630 |
+
},
|
3631 |
+
/**
|
3632 |
+
* set (change) the ID of a node
|
3633 |
+
* @name set_id(obj, id)
|
3634 |
+
* @param {mixed} obj the node
|
3635 |
+
* @param {String} id the new ID
|
3636 |
+
* @return {Boolean}
|
3637 |
+
* @trigger set_id.jstree
|
3638 |
+
*/
|
3639 |
+
set_id : function (obj, id) {
|
3640 |
+
obj = this.get_node(obj);
|
3641 |
+
if(!obj || obj.id === $.jstree.root) { return false; }
|
3642 |
+
var i, j, m = this._model.data, old = obj.id;
|
3643 |
+
id = id.toString();
|
3644 |
+
// update parents (replace current ID with new one in children and children_d)
|
3645 |
+
m[obj.parent].children[$.inArray(obj.id, m[obj.parent].children)] = id;
|
3646 |
+
for(i = 0, j = obj.parents.length; i < j; i++) {
|
3647 |
+
m[obj.parents[i]].children_d[$.inArray(obj.id, m[obj.parents[i]].children_d)] = id;
|
3648 |
+
}
|
3649 |
+
// update children (replace current ID with new one in parent and parents)
|
3650 |
+
for(i = 0, j = obj.children.length; i < j; i++) {
|
3651 |
+
m[obj.children[i]].parent = id;
|
3652 |
+
}
|
3653 |
+
for(i = 0, j = obj.children_d.length; i < j; i++) {
|
3654 |
+
m[obj.children_d[i]].parents[$.inArray(obj.id, m[obj.children_d[i]].parents)] = id;
|
3655 |
+
}
|
3656 |
+
i = $.inArray(obj.id, this._data.core.selected);
|
3657 |
+
if(i !== -1) { this._data.core.selected[i] = id; }
|
3658 |
+
// update model and obj itself (obj.id, this._model.data[KEY])
|
3659 |
+
i = this.get_node(obj.id, true);
|
3660 |
+
if(i) {
|
3661 |
+
i.attr('id', id); //.children('.jstree-anchor').attr('id', id + '_anchor').end().attr('aria-labelledby', id + '_anchor');
|
3662 |
+
if(this.element.attr('aria-activedescendant') === obj.id) {
|
3663 |
+
this.element.attr('aria-activedescendant', id);
|
3664 |
+
}
|
3665 |
+
}
|
3666 |
+
delete m[obj.id];
|
3667 |
+
obj.id = id;
|
3668 |
+
obj.li_attr.id = id;
|
3669 |
+
m[id] = obj;
|
3670 |
+
/**
|
3671 |
+
* triggered when a node id value is changed
|
3672 |
+
* @event
|
3673 |
+
* @name set_id.jstree
|
3674 |
+
* @param {Object} node
|
3675 |
+
* @param {String} old the old id
|
3676 |
+
*/
|
3677 |
+
this.trigger('set_id',{ "node" : obj, "new" : obj.id, "old" : old });
|
3678 |
+
return true;
|
3679 |
+
},
|
3680 |
+
/**
|
3681 |
+
* get the text value of a node
|
3682 |
+
* @name get_text(obj)
|
3683 |
+
* @param {mixed} obj the node
|
3684 |
+
* @return {String}
|
3685 |
+
*/
|
3686 |
+
get_text : function (obj) {
|
3687 |
+
obj = this.get_node(obj);
|
3688 |
+
return (!obj || obj.id === $.jstree.root) ? false : obj.text;
|
3689 |
+
},
|
3690 |
+
/**
|
3691 |
+
* set the text value of a node. Used internally, please use `rename_node(obj, val)`.
|
3692 |
+
* @private
|
3693 |
+
* @name set_text(obj, val)
|
3694 |
+
* @param {mixed} obj the node, you can pass an array to set the text on multiple nodes
|
3695 |
+
* @param {String} val the new text value
|
3696 |
+
* @return {Boolean}
|
3697 |
+
* @trigger set_text.jstree
|
3698 |
+
*/
|
3699 |
+
set_text : function (obj, val) {
|
3700 |
+
var t1, t2;
|
3701 |
+
if($.isArray(obj)) {
|
3702 |
+
obj = obj.slice();
|
3703 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
3704 |
+
this.set_text(obj[t1], val);
|
3705 |
+
}
|
3706 |
+
return true;
|
3707 |
+
}
|
3708 |
+
obj = this.get_node(obj);
|
3709 |
+
if(!obj || obj.id === $.jstree.root) { return false; }
|
3710 |
+
obj.text = val;
|
3711 |
+
if(this.get_node(obj, true).length) {
|
3712 |
+
this.redraw_node(obj.id);
|
3713 |
+
}
|
3714 |
+
/**
|
3715 |
+
* triggered when a node text value is changed
|
3716 |
+
* @event
|
3717 |
+
* @name set_text.jstree
|
3718 |
+
* @param {Object} obj
|
3719 |
+
* @param {String} text the new value
|
3720 |
+
*/
|
3721 |
+
this.trigger('set_text',{ "obj" : obj, "text" : val });
|
3722 |
+
return true;
|
3723 |
+
},
|
3724 |
+
/**
|
3725 |
+
* gets a JSON representation of a node (or the whole tree)
|
3726 |
+
* @name get_json([obj, options])
|
3727 |
+
* @param {mixed} obj
|
3728 |
+
* @param {Object} options
|
3729 |
+
* @param {Boolean} options.no_state do not return state information
|
3730 |
+
* @param {Boolean} options.no_id do not return ID
|
3731 |
+
* @param {Boolean} options.no_children do not include children
|
3732 |
+
* @param {Boolean} options.no_data do not include node data
|
3733 |
+
* @param {Boolean} options.no_li_attr do not include LI attributes
|
3734 |
+
* @param {Boolean} options.no_a_attr do not include A attributes
|
3735 |
+
* @param {Boolean} options.flat return flat JSON instead of nested
|
3736 |
+
* @return {Object}
|
3737 |
+
*/
|
3738 |
+
get_json : function (obj, options, flat) {
|
3739 |
+
obj = this.get_node(obj || $.jstree.root);
|
3740 |
+
if(!obj) { return false; }
|
3741 |
+
if(options && options.flat && !flat) { flat = []; }
|
3742 |
+
var tmp = {
|
3743 |
+
'id' : obj.id,
|
3744 |
+
'text' : obj.text,
|
3745 |
+
'icon' : this.get_icon(obj),
|
3746 |
+
'li_attr' : $.extend(true, {}, obj.li_attr),
|
3747 |
+
'a_attr' : $.extend(true, {}, obj.a_attr),
|
3748 |
+
'state' : {},
|
3749 |
+
'data' : options && options.no_data ? false : $.extend(true, $.isArray(obj.data)?[]:{}, obj.data)
|
3750 |
+
//( this.get_node(obj, true).length ? this.get_node(obj, true).data() : obj.data ),
|
3751 |
+
}, i, j;
|
3752 |
+
if(options && options.flat) {
|
3753 |
+
tmp.parent = obj.parent;
|
3754 |
+
}
|
3755 |
+
else {
|
3756 |
+
tmp.children = [];
|
3757 |
+
}
|
3758 |
+
if(!options || !options.no_state) {
|
3759 |
+
for(i in obj.state) {
|
3760 |
+
if(obj.state.hasOwnProperty(i)) {
|
3761 |
+
tmp.state[i] = obj.state[i];
|
3762 |
+
}
|
3763 |
+
}
|
3764 |
+
} else {
|
3765 |
+
delete tmp.state;
|
3766 |
+
}
|
3767 |
+
if(options && options.no_li_attr) {
|
3768 |
+
delete tmp.li_attr;
|
3769 |
+
}
|
3770 |
+
if(options && options.no_a_attr) {
|
3771 |
+
delete tmp.a_attr;
|
3772 |
+
}
|
3773 |
+
if(options && options.no_id) {
|
3774 |
+
delete tmp.id;
|
3775 |
+
if(tmp.li_attr && tmp.li_attr.id) {
|
3776 |
+
delete tmp.li_attr.id;
|
3777 |
+
}
|
3778 |
+
if(tmp.a_attr && tmp.a_attr.id) {
|
3779 |
+
delete tmp.a_attr.id;
|
3780 |
+
}
|
3781 |
+
}
|
3782 |
+
if(options && options.flat && obj.id !== $.jstree.root) {
|
3783 |
+
flat.push(tmp);
|
3784 |
+
}
|
3785 |
+
if(!options || !options.no_children) {
|
3786 |
+
for(i = 0, j = obj.children.length; i < j; i++) {
|
3787 |
+
if(options && options.flat) {
|
3788 |
+
this.get_json(obj.children[i], options, flat);
|
3789 |
+
}
|
3790 |
+
else {
|
3791 |
+
tmp.children.push(this.get_json(obj.children[i], options));
|
3792 |
+
}
|
3793 |
+
}
|
3794 |
+
}
|
3795 |
+
return options && options.flat ? flat : (obj.id === $.jstree.root ? tmp.children : tmp);
|
3796 |
+
},
|
3797 |
+
/**
|
3798 |
+
* create a new node (do not confuse with load_node)
|
3799 |
+
* @name create_node([par, node, pos, callback, is_loaded])
|
3800 |
+
* @param {mixed} par the parent node (to create a root node use either "#" (string) or `null`)
|
3801 |
+
* @param {mixed} node the data for the new node (a valid JSON object, or a simple string with the name)
|
3802 |
+
* @param {mixed} pos the index at which to insert the node, "first" and "last" are also supported, default is "last"
|
3803 |
+
* @param {Function} callback a function to be called once the node is created
|
3804 |
+
* @param {Boolean} is_loaded internal argument indicating if the parent node was succesfully loaded
|
3805 |
+
* @return {String} the ID of the newly create node
|
3806 |
+
* @trigger model.jstree, create_node.jstree
|
3807 |
+
*/
|
3808 |
+
create_node : function (par, node, pos, callback, is_loaded) {
|
3809 |
+
if(par === null) { par = $.jstree.root; }
|
3810 |
+
par = this.get_node(par);
|
3811 |
+
if(!par) { return false; }
|
3812 |
+
pos = pos === undefined ? "last" : pos;
|
3813 |
+
if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) {
|
3814 |
+
return this.load_node(par, function () { this.create_node(par, node, pos, callback, true); });
|
3815 |
+
}
|
3816 |
+
if(!node) { node = { "text" : this.get_string('New node') }; }
|
3817 |
+
if(typeof node === "string") {
|
3818 |
+
node = { "text" : node };
|
3819 |
+
} else {
|
3820 |
+
node = $.extend(true, {}, node);
|
3821 |
+
}
|
3822 |
+
if(node.text === undefined) { node.text = this.get_string('New node'); }
|
3823 |
+
var tmp, dpc, i, j;
|
3824 |
+
|
3825 |
+
if(par.id === $.jstree.root) {
|
3826 |
+
if(pos === "before") { pos = "first"; }
|
3827 |
+
if(pos === "after") { pos = "last"; }
|
3828 |
+
}
|
3829 |
+
switch(pos) {
|
3830 |
+
case "before":
|
3831 |
+
tmp = this.get_node(par.parent);
|
3832 |
+
pos = $.inArray(par.id, tmp.children);
|
3833 |
+
par = tmp;
|
3834 |
+
break;
|
3835 |
+
case "after" :
|
3836 |
+
tmp = this.get_node(par.parent);
|
3837 |
+
pos = $.inArray(par.id, tmp.children) + 1;
|
3838 |
+
par = tmp;
|
3839 |
+
break;
|
3840 |
+
case "inside":
|
3841 |
+
case "first":
|
3842 |
+
pos = 0;
|
3843 |
+
break;
|
3844 |
+
case "last":
|
3845 |
+
pos = par.children.length;
|
3846 |
+
break;
|
3847 |
+
default:
|
3848 |
+
if(!pos) { pos = 0; }
|
3849 |
+
break;
|
3850 |
+
}
|
3851 |
+
if(pos > par.children.length) { pos = par.children.length; }
|
3852 |
+
if(!node.id) { node.id = true; }
|
3853 |
+
if(!this.check("create_node", node, par, pos)) {
|
3854 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
3855 |
+
return false;
|
3856 |
+
}
|
3857 |
+
if(node.id === true) { delete node.id; }
|
3858 |
+
node = this._parse_model_from_json(node, par.id, par.parents.concat());
|
3859 |
+
if(!node) { return false; }
|
3860 |
+
tmp = this.get_node(node);
|
3861 |
+
dpc = [];
|
3862 |
+
dpc.push(node);
|
3863 |
+
dpc = dpc.concat(tmp.children_d);
|
3864 |
+
this.trigger('model', { "nodes" : dpc, "parent" : par.id });
|
3865 |
+
|
3866 |
+
par.children_d = par.children_d.concat(dpc);
|
3867 |
+
for(i = 0, j = par.parents.length; i < j; i++) {
|
3868 |
+
this._model.data[par.parents[i]].children_d = this._model.data[par.parents[i]].children_d.concat(dpc);
|
3869 |
+
}
|
3870 |
+
node = tmp;
|
3871 |
+
tmp = [];
|
3872 |
+
for(i = 0, j = par.children.length; i < j; i++) {
|
3873 |
+
tmp[i >= pos ? i+1 : i] = par.children[i];
|
3874 |
+
}
|
3875 |
+
tmp[pos] = node.id;
|
3876 |
+
par.children = tmp;
|
3877 |
+
|
3878 |
+
this.redraw_node(par, true);
|
3879 |
+
/**
|
3880 |
+
* triggered when a node is created
|
3881 |
+
* @event
|
3882 |
+
* @name create_node.jstree
|
3883 |
+
* @param {Object} node
|
3884 |
+
* @param {String} parent the parent's ID
|
3885 |
+
* @param {Number} position the position of the new node among the parent's children
|
3886 |
+
*/
|
3887 |
+
this.trigger('create_node', { "node" : this.get_node(node), "parent" : par.id, "position" : pos });
|
3888 |
+
if(callback) { callback.call(this, this.get_node(node)); }
|
3889 |
+
return node.id;
|
3890 |
+
},
|
3891 |
+
/**
|
3892 |
+
* set the text value of a node
|
3893 |
+
* @name rename_node(obj, val)
|
3894 |
+
* @param {mixed} obj the node, you can pass an array to rename multiple nodes to the same name
|
3895 |
+
* @param {String} val the new text value
|
3896 |
+
* @return {Boolean}
|
3897 |
+
* @trigger rename_node.jstree
|
3898 |
+
*/
|
3899 |
+
rename_node : function (obj, val) {
|
3900 |
+
var t1, t2, old;
|
3901 |
+
if($.isArray(obj)) {
|
3902 |
+
obj = obj.slice();
|
3903 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
3904 |
+
this.rename_node(obj[t1], val);
|
3905 |
+
}
|
3906 |
+
return true;
|
3907 |
+
}
|
3908 |
+
obj = this.get_node(obj);
|
3909 |
+
if(!obj || obj.id === $.jstree.root) { return false; }
|
3910 |
+
old = obj.text;
|
3911 |
+
if(!this.check("rename_node", obj, this.get_parent(obj), val)) {
|
3912 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
3913 |
+
return false;
|
3914 |
+
}
|
3915 |
+
this.set_text(obj, val); // .apply(this, Array.prototype.slice.call(arguments))
|
3916 |
+
/**
|
3917 |
+
* triggered when a node is renamed
|
3918 |
+
* @event
|
3919 |
+
* @name rename_node.jstree
|
3920 |
+
* @param {Object} node
|
3921 |
+
* @param {String} text the new value
|
3922 |
+
* @param {String} old the old value
|
3923 |
+
*/
|
3924 |
+
this.trigger('rename_node', { "node" : obj, "text" : val, "old" : old });
|
3925 |
+
return true;
|
3926 |
+
},
|
3927 |
+
/**
|
3928 |
+
* remove a node
|
3929 |
+
* @name delete_node(obj)
|
3930 |
+
* @param {mixed} obj the node, you can pass an array to delete multiple nodes
|
3931 |
+
* @return {Boolean}
|
3932 |
+
* @trigger delete_node.jstree, changed.jstree
|
3933 |
+
*/
|
3934 |
+
delete_node : function (obj) {
|
3935 |
+
var t1, t2, par, pos, tmp, i, j, k, l, c, top, lft;
|
3936 |
+
if($.isArray(obj)) {
|
3937 |
+
obj = obj.slice();
|
3938 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
3939 |
+
this.delete_node(obj[t1]);
|
3940 |
+
}
|
3941 |
+
return true;
|
3942 |
+
}
|
3943 |
+
obj = this.get_node(obj);
|
3944 |
+
if(!obj || obj.id === $.jstree.root) { return false; }
|
3945 |
+
par = this.get_node(obj.parent);
|
3946 |
+
pos = $.inArray(obj.id, par.children);
|
3947 |
+
c = false;
|
3948 |
+
if(!this.check("delete_node", obj, par, pos)) {
|
3949 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
3950 |
+
return false;
|
3951 |
+
}
|
3952 |
+
if(pos !== -1) {
|
3953 |
+
par.children = $.vakata.array_remove(par.children, pos);
|
3954 |
+
}
|
3955 |
+
tmp = obj.children_d.concat([]);
|
3956 |
+
tmp.push(obj.id);
|
3957 |
+
for(i = 0, j = obj.parents.length; i < j; i++) {
|
3958 |
+
this._model.data[obj.parents[i]].children_d = $.vakata.array_filter(this._model.data[obj.parents[i]].children_d, function (v) {
|
3959 |
+
return $.inArray(v, tmp) === -1;
|
3960 |
+
});
|
3961 |
+
}
|
3962 |
+
for(k = 0, l = tmp.length; k < l; k++) {
|
3963 |
+
if(this._model.data[tmp[k]].state.selected) {
|
3964 |
+
c = true;
|
3965 |
+
break;
|
3966 |
+
}
|
3967 |
+
}
|
3968 |
+
if (c) {
|
3969 |
+
this._data.core.selected = $.vakata.array_filter(this._data.core.selected, function (v) {
|
3970 |
+
return $.inArray(v, tmp) === -1;
|
3971 |
+
});
|
3972 |
+
}
|
3973 |
+
/**
|
3974 |
+
* triggered when a node is deleted
|
3975 |
+
* @event
|
3976 |
+
* @name delete_node.jstree
|
3977 |
+
* @param {Object} node
|
3978 |
+
* @param {String} parent the parent's ID
|
3979 |
+
*/
|
3980 |
+
this.trigger('delete_node', { "node" : obj, "parent" : par.id });
|
3981 |
+
if(c) {
|
3982 |
+
this.trigger('changed', { 'action' : 'delete_node', 'node' : obj, 'selected' : this._data.core.selected, 'parent' : par.id });
|
3983 |
+
}
|
3984 |
+
for(k = 0, l = tmp.length; k < l; k++) {
|
3985 |
+
delete this._model.data[tmp[k]];
|
3986 |
+
}
|
3987 |
+
if($.inArray(this._data.core.focused, tmp) !== -1) {
|
3988 |
+
this._data.core.focused = null;
|
3989 |
+
top = this.element[0].scrollTop;
|
3990 |
+
lft = this.element[0].scrollLeft;
|
3991 |
+
if(par.id === $.jstree.root) {
|
3992 |
+
if (this._model.data[$.jstree.root].children[0]) {
|
3993 |
+
this.get_node(this._model.data[$.jstree.root].children[0], true).children('.jstree-anchor').focus();
|
3994 |
+
}
|
3995 |
+
}
|
3996 |
+
else {
|
3997 |
+
this.get_node(par, true).children('.jstree-anchor').focus();
|
3998 |
+
}
|
3999 |
+
this.element[0].scrollTop = top;
|
4000 |
+
this.element[0].scrollLeft = lft;
|
4001 |
+
}
|
4002 |
+
this.redraw_node(par, true);
|
4003 |
+
return true;
|
4004 |
+
},
|
4005 |
+
/**
|
4006 |
+
* check if an operation is premitted on the tree. Used internally.
|
4007 |
+
* @private
|
4008 |
+
* @name check(chk, obj, par, pos)
|
4009 |
+
* @param {String} chk the operation to check, can be "create_node", "rename_node", "delete_node", "copy_node" or "move_node"
|
4010 |
+
* @param {mixed} obj the node
|
4011 |
+
* @param {mixed} par the parent
|
4012 |
+
* @param {mixed} pos the position to insert at, or if "rename_node" - the new name
|
4013 |
+
* @param {mixed} more some various additional information, for example if a "move_node" operations is triggered by DND this will be the hovered node
|
4014 |
+
* @return {Boolean}
|
4015 |
+
*/
|
4016 |
+
check : function (chk, obj, par, pos, more) {
|
4017 |
+
obj = obj && obj.id ? obj : this.get_node(obj);
|
4018 |
+
par = par && par.id ? par : this.get_node(par);
|
4019 |
+
var tmp = chk.match(/^move_node|copy_node|create_node$/i) ? par : obj,
|
4020 |
+
chc = this.settings.core.check_callback;
|
4021 |
+
if(chk === "move_node" || chk === "copy_node") {
|
4022 |
+
if((!more || !more.is_multi) && (obj.id === par.id || (chk === "move_node" && $.inArray(obj.id, par.children) === pos) || $.inArray(par.id, obj.children_d) !== -1)) {
|
4023 |
+
this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_01', 'reason' : 'Moving parent inside child', 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };
|
4024 |
+
return false;
|
4025 |
+
}
|
4026 |
+
}
|
4027 |
+
if(tmp && tmp.data) { tmp = tmp.data; }
|
4028 |
+
if(tmp && tmp.functions && (tmp.functions[chk] === false || tmp.functions[chk] === true)) {
|
4029 |
+
if(tmp.functions[chk] === false) {
|
4030 |
+
this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_02', 'reason' : 'Node data prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };
|
4031 |
+
}
|
4032 |
+
return tmp.functions[chk];
|
4033 |
+
}
|
4034 |
+
if(chc === false || ($.isFunction(chc) && chc.call(this, chk, obj, par, pos, more) === false) || (chc && chc[chk] === false)) {
|
4035 |
+
this._data.core.last_error = { 'error' : 'check', 'plugin' : 'core', 'id' : 'core_03', 'reason' : 'User config for core.check_callback prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };
|
4036 |
+
return false;
|
4037 |
+
}
|
4038 |
+
return true;
|
4039 |
+
},
|
4040 |
+
/**
|
4041 |
+
* get the last error
|
4042 |
+
* @name last_error()
|
4043 |
+
* @return {Object}
|
4044 |
+
*/
|
4045 |
+
last_error : function () {
|
4046 |
+
return this._data.core.last_error;
|
4047 |
+
},
|
4048 |
+
/**
|
4049 |
+
* move a node to a new parent
|
4050 |
+
* @name move_node(obj, par [, pos, callback, is_loaded])
|
4051 |
+
* @param {mixed} obj the node to move, pass an array to move multiple nodes
|
4052 |
+
* @param {mixed} par the new parent
|
4053 |
+
* @param {mixed} pos the position to insert at (besides integer values, "first" and "last" are supported, as well as "before" and "after"), defaults to integer `0`
|
4054 |
+
* @param {function} callback a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position
|
4055 |
+
* @param {Boolean} is_loaded internal parameter indicating if the parent node has been loaded
|
4056 |
+
* @param {Boolean} skip_redraw internal parameter indicating if the tree should be redrawn
|
4057 |
+
* @param {Boolean} instance internal parameter indicating if the node comes from another instance
|
4058 |
+
* @trigger move_node.jstree
|
4059 |
+
*/
|
4060 |
+
move_node : function (obj, par, pos, callback, is_loaded, skip_redraw, origin) {
|
4061 |
+
var t1, t2, old_par, old_pos, new_par, old_ins, is_multi, dpc, tmp, i, j, k, l, p;
|
4062 |
+
|
4063 |
+
par = this.get_node(par);
|
4064 |
+
pos = pos === undefined ? 0 : pos;
|
4065 |
+
if(!par) { return false; }
|
4066 |
+
if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) {
|
4067 |
+
return this.load_node(par, function () { this.move_node(obj, par, pos, callback, true, false, origin); });
|
4068 |
+
}
|
4069 |
+
|
4070 |
+
if($.isArray(obj)) {
|
4071 |
+
if(obj.length === 1) {
|
4072 |
+
obj = obj[0];
|
4073 |
+
}
|
4074 |
+
else {
|
4075 |
+
//obj = obj.slice();
|
4076 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
4077 |
+
if((tmp = this.move_node(obj[t1], par, pos, callback, is_loaded, false, origin))) {
|
4078 |
+
par = tmp;
|
4079 |
+
pos = "after";
|
4080 |
+
}
|
4081 |
+
}
|
4082 |
+
this.redraw();
|
4083 |
+
return true;
|
4084 |
+
}
|
4085 |
+
}
|
4086 |
+
obj = obj && obj.id ? obj : this.get_node(obj);
|
4087 |
+
|
4088 |
+
if(!obj || obj.id === $.jstree.root) { return false; }
|
4089 |
+
|
4090 |
+
old_par = (obj.parent || $.jstree.root).toString();
|
4091 |
+
new_par = (!pos.toString().match(/^(before|after)$/) || par.id === $.jstree.root) ? par : this.get_node(par.parent);
|
4092 |
+
old_ins = origin ? origin : (this._model.data[obj.id] ? this : $.jstree.reference(obj.id));
|
4093 |
+
is_multi = !old_ins || !old_ins._id || (this._id !== old_ins._id);
|
4094 |
+
old_pos = old_ins && old_ins._id && old_par && old_ins._model.data[old_par] && old_ins._model.data[old_par].children ? $.inArray(obj.id, old_ins._model.data[old_par].children) : -1;
|
4095 |
+
if(old_ins && old_ins._id) {
|
4096 |
+
obj = old_ins._model.data[obj.id];
|
4097 |
+
}
|
4098 |
+
|
4099 |
+
if(is_multi) {
|
4100 |
+
if((tmp = this.copy_node(obj, par, pos, callback, is_loaded, false, origin))) {
|
4101 |
+
if(old_ins) { old_ins.delete_node(obj); }
|
4102 |
+
return tmp;
|
4103 |
+
}
|
4104 |
+
return false;
|
4105 |
+
}
|
4106 |
+
//var m = this._model.data;
|
4107 |
+
if(par.id === $.jstree.root) {
|
4108 |
+
if(pos === "before") { pos = "first"; }
|
4109 |
+
if(pos === "after") { pos = "last"; }
|
4110 |
+
}
|
4111 |
+
switch(pos) {
|
4112 |
+
case "before":
|
4113 |
+
pos = $.inArray(par.id, new_par.children);
|
4114 |
+
break;
|
4115 |
+
case "after" :
|
4116 |
+
pos = $.inArray(par.id, new_par.children) + 1;
|
4117 |
+
break;
|
4118 |
+
case "inside":
|
4119 |
+
case "first":
|
4120 |
+
pos = 0;
|
4121 |
+
break;
|
4122 |
+
case "last":
|
4123 |
+
pos = new_par.children.length;
|
4124 |
+
break;
|
4125 |
+
default:
|
4126 |
+
if(!pos) { pos = 0; }
|
4127 |
+
break;
|
4128 |
+
}
|
4129 |
+
if(pos > new_par.children.length) { pos = new_par.children.length; }
|
4130 |
+
if(!this.check("move_node", obj, new_par, pos, { 'core' : true, 'origin' : origin, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id) })) {
|
4131 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
4132 |
+
return false;
|
4133 |
+
}
|
4134 |
+
if(obj.parent === new_par.id) {
|
4135 |
+
dpc = new_par.children.concat();
|
4136 |
+
tmp = $.inArray(obj.id, dpc);
|
4137 |
+
if(tmp !== -1) {
|
4138 |
+
dpc = $.vakata.array_remove(dpc, tmp);
|
4139 |
+
if(pos > tmp) { pos--; }
|
4140 |
+
}
|
4141 |
+
tmp = [];
|
4142 |
+
for(i = 0, j = dpc.length; i < j; i++) {
|
4143 |
+
tmp[i >= pos ? i+1 : i] = dpc[i];
|
4144 |
+
}
|
4145 |
+
tmp[pos] = obj.id;
|
4146 |
+
new_par.children = tmp;
|
4147 |
+
this._node_changed(new_par.id);
|
4148 |
+
this.redraw(new_par.id === $.jstree.root);
|
4149 |
+
}
|
4150 |
+
else {
|
4151 |
+
// clean old parent and up
|
4152 |
+
tmp = obj.children_d.concat();
|
4153 |
+
tmp.push(obj.id);
|
4154 |
+
for(i = 0, j = obj.parents.length; i < j; i++) {
|
4155 |
+
dpc = [];
|
4156 |
+
p = old_ins._model.data[obj.parents[i]].children_d;
|
4157 |
+
for(k = 0, l = p.length; k < l; k++) {
|
4158 |
+
if($.inArray(p[k], tmp) === -1) {
|
4159 |
+
dpc.push(p[k]);
|
4160 |
+
}
|
4161 |
+
}
|
4162 |
+
old_ins._model.data[obj.parents[i]].children_d = dpc;
|
4163 |
+
}
|
4164 |
+
old_ins._model.data[old_par].children = $.vakata.array_remove_item(old_ins._model.data[old_par].children, obj.id);
|
4165 |
+
|
4166 |
+
// insert into new parent and up
|
4167 |
+
for(i = 0, j = new_par.parents.length; i < j; i++) {
|
4168 |
+
this._model.data[new_par.parents[i]].children_d = this._model.data[new_par.parents[i]].children_d.concat(tmp);
|
4169 |
+
}
|
4170 |
+
dpc = [];
|
4171 |
+
for(i = 0, j = new_par.children.length; i < j; i++) {
|
4172 |
+
dpc[i >= pos ? i+1 : i] = new_par.children[i];
|
4173 |
+
}
|
4174 |
+
dpc[pos] = obj.id;
|
4175 |
+
new_par.children = dpc;
|
4176 |
+
new_par.children_d.push(obj.id);
|
4177 |
+
new_par.children_d = new_par.children_d.concat(obj.children_d);
|
4178 |
+
|
4179 |
+
// update object
|
4180 |
+
obj.parent = new_par.id;
|
4181 |
+
tmp = new_par.parents.concat();
|
4182 |
+
tmp.unshift(new_par.id);
|
4183 |
+
p = obj.parents.length;
|
4184 |
+
obj.parents = tmp;
|
4185 |
+
|
4186 |
+
// update object children
|
4187 |
+
tmp = tmp.concat();
|
4188 |
+
for(i = 0, j = obj.children_d.length; i < j; i++) {
|
4189 |
+
this._model.data[obj.children_d[i]].parents = this._model.data[obj.children_d[i]].parents.slice(0,p*-1);
|
4190 |
+
Array.prototype.push.apply(this._model.data[obj.children_d[i]].parents, tmp);
|
4191 |
+
}
|
4192 |
+
|
4193 |
+
if(old_par === $.jstree.root || new_par.id === $.jstree.root) {
|
4194 |
+
this._model.force_full_redraw = true;
|
4195 |
+
}
|
4196 |
+
if(!this._model.force_full_redraw) {
|
4197 |
+
this._node_changed(old_par);
|
4198 |
+
this._node_changed(new_par.id);
|
4199 |
+
}
|
4200 |
+
if(!skip_redraw) {
|
4201 |
+
this.redraw();
|
4202 |
+
}
|
4203 |
+
}
|
4204 |
+
if(callback) { callback.call(this, obj, new_par, pos); }
|
4205 |
+
/**
|
4206 |
+
* triggered when a node is moved
|
4207 |
+
* @event
|
4208 |
+
* @name move_node.jstree
|
4209 |
+
* @param {Object} node
|
4210 |
+
* @param {String} parent the parent's ID
|
4211 |
+
* @param {Number} position the position of the node among the parent's children
|
4212 |
+
* @param {String} old_parent the old parent of the node
|
4213 |
+
* @param {Number} old_position the old position of the node
|
4214 |
+
* @param {Boolean} is_multi do the node and new parent belong to different instances
|
4215 |
+
* @param {jsTree} old_instance the instance the node came from
|
4216 |
+
* @param {jsTree} new_instance the instance of the new parent
|
4217 |
+
*/
|
4218 |
+
this.trigger('move_node', { "node" : obj, "parent" : new_par.id, "position" : pos, "old_parent" : old_par, "old_position" : old_pos, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id), 'old_instance' : old_ins, 'new_instance' : this });
|
4219 |
+
return obj.id;
|
4220 |
+
},
|
4221 |
+
/**
|
4222 |
+
* copy a node to a new parent
|
4223 |
+
* @name copy_node(obj, par [, pos, callback, is_loaded])
|
4224 |
+
* @param {mixed} obj the node to copy, pass an array to copy multiple nodes
|
4225 |
+
* @param {mixed} par the new parent
|
4226 |
+
* @param {mixed} pos the position to insert at (besides integer values, "first" and "last" are supported, as well as "before" and "after"), defaults to integer `0`
|
4227 |
+
* @param {function} callback a function to call once the move is completed, receives 3 arguments - the node, the new parent and the position
|
4228 |
+
* @param {Boolean} is_loaded internal parameter indicating if the parent node has been loaded
|
4229 |
+
* @param {Boolean} skip_redraw internal parameter indicating if the tree should be redrawn
|
4230 |
+
* @param {Boolean} instance internal parameter indicating if the node comes from another instance
|
4231 |
+
* @trigger model.jstree copy_node.jstree
|
4232 |
+
*/
|
4233 |
+
copy_node : function (obj, par, pos, callback, is_loaded, skip_redraw, origin) {
|
4234 |
+
var t1, t2, dpc, tmp, i, j, node, old_par, new_par, old_ins, is_multi;
|
4235 |
+
|
4236 |
+
par = this.get_node(par);
|
4237 |
+
pos = pos === undefined ? 0 : pos;
|
4238 |
+
if(!par) { return false; }
|
4239 |
+
if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) {
|
4240 |
+
return this.load_node(par, function () { this.copy_node(obj, par, pos, callback, true, false, origin); });
|
4241 |
+
}
|
4242 |
+
|
4243 |
+
if($.isArray(obj)) {
|
4244 |
+
if(obj.length === 1) {
|
4245 |
+
obj = obj[0];
|
4246 |
+
}
|
4247 |
+
else {
|
4248 |
+
//obj = obj.slice();
|
4249 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
4250 |
+
if((tmp = this.copy_node(obj[t1], par, pos, callback, is_loaded, true, origin))) {
|
4251 |
+
par = tmp;
|
4252 |
+
pos = "after";
|
4253 |
+
}
|
4254 |
+
}
|
4255 |
+
this.redraw();
|
4256 |
+
return true;
|
4257 |
+
}
|
4258 |
+
}
|
4259 |
+
obj = obj && obj.id ? obj : this.get_node(obj);
|
4260 |
+
if(!obj || obj.id === $.jstree.root) { return false; }
|
4261 |
+
|
4262 |
+
old_par = (obj.parent || $.jstree.root).toString();
|
4263 |
+
new_par = (!pos.toString().match(/^(before|after)$/) || par.id === $.jstree.root) ? par : this.get_node(par.parent);
|
4264 |
+
old_ins = origin ? origin : (this._model.data[obj.id] ? this : $.jstree.reference(obj.id));
|
4265 |
+
is_multi = !old_ins || !old_ins._id || (this._id !== old_ins._id);
|
4266 |
+
|
4267 |
+
if(old_ins && old_ins._id) {
|
4268 |
+
obj = old_ins._model.data[obj.id];
|
4269 |
+
}
|
4270 |
+
|
4271 |
+
if(par.id === $.jstree.root) {
|
4272 |
+
if(pos === "before") { pos = "first"; }
|
4273 |
+
if(pos === "after") { pos = "last"; }
|
4274 |
+
}
|
4275 |
+
switch(pos) {
|
4276 |
+
case "before":
|
4277 |
+
pos = $.inArray(par.id, new_par.children);
|
4278 |
+
break;
|
4279 |
+
case "after" :
|
4280 |
+
pos = $.inArray(par.id, new_par.children) + 1;
|
4281 |
+
break;
|
4282 |
+
case "inside":
|
4283 |
+
case "first":
|
4284 |
+
pos = 0;
|
4285 |
+
break;
|
4286 |
+
case "last":
|
4287 |
+
pos = new_par.children.length;
|
4288 |
+
break;
|
4289 |
+
default:
|
4290 |
+
if(!pos) { pos = 0; }
|
4291 |
+
break;
|
4292 |
+
}
|
4293 |
+
if(pos > new_par.children.length) { pos = new_par.children.length; }
|
4294 |
+
if(!this.check("copy_node", obj, new_par, pos, { 'core' : true, 'origin' : origin, 'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id) })) {
|
4295 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
4296 |
+
return false;
|
4297 |
+
}
|
4298 |
+
node = old_ins ? old_ins.get_json(obj, { no_id : true, no_data : true, no_state : true }) : obj;
|
4299 |
+
if(!node) { return false; }
|
4300 |
+
if(node.id === true) { delete node.id; }
|
4301 |
+
node = this._parse_model_from_json(node, new_par.id, new_par.parents.concat());
|
4302 |
+
if(!node) { return false; }
|
4303 |
+
tmp = this.get_node(node);
|
4304 |
+
if(obj && obj.state && obj.state.loaded === false) { tmp.state.loaded = false; }
|
4305 |
+
dpc = [];
|
4306 |
+
dpc.push(node);
|
4307 |
+
dpc = dpc.concat(tmp.children_d);
|
4308 |
+
this.trigger('model', { "nodes" : dpc, "parent" : new_par.id });
|
4309 |
+
|
4310 |
+
// insert into new parent and up
|
4311 |
+
for(i = 0, j = new_par.parents.length; i < j; i++) {
|
4312 |
+
this._model.data[new_par.parents[i]].children_d = this._model.data[new_par.parents[i]].children_d.concat(dpc);
|
4313 |
+
}
|
4314 |
+
dpc = [];
|
4315 |
+
for(i = 0, j = new_par.children.length; i < j; i++) {
|
4316 |
+
dpc[i >= pos ? i+1 : i] = new_par.children[i];
|
4317 |
+
}
|
4318 |
+
dpc[pos] = tmp.id;
|
4319 |
+
new_par.children = dpc;
|
4320 |
+
new_par.children_d.push(tmp.id);
|
4321 |
+
new_par.children_d = new_par.children_d.concat(tmp.children_d);
|
4322 |
+
|
4323 |
+
if(new_par.id === $.jstree.root) {
|
4324 |
+
this._model.force_full_redraw = true;
|
4325 |
+
}
|
4326 |
+
if(!this._model.force_full_redraw) {
|
4327 |
+
this._node_changed(new_par.id);
|
4328 |
+
}
|
4329 |
+
if(!skip_redraw) {
|
4330 |
+
this.redraw(new_par.id === $.jstree.root);
|
4331 |
+
}
|
4332 |
+
if(callback) { callback.call(this, tmp, new_par, pos); }
|
4333 |
+
/**
|
4334 |
+
* triggered when a node is copied
|
4335 |
+
* @event
|
4336 |
+
* @name copy_node.jstree
|
4337 |
+
* @param {Object} node the copied node
|
4338 |
+
* @param {Object} original the original node
|
4339 |
+
* @param {String} parent the parent's ID
|
4340 |
+
* @param {Number} position the position of the node among the parent's children
|
4341 |
+
* @param {String} old_parent the old parent of the node
|
4342 |
+
* @param {Number} old_position the position of the original node
|
4343 |
+
* @param {Boolean} is_multi do the node and new parent belong to different instances
|
4344 |
+
* @param {jsTree} old_instance the instance the node came from
|
4345 |
+
* @param {jsTree} new_instance the instance of the new parent
|
4346 |
+
*/
|
4347 |
+
this.trigger('copy_node', { "node" : tmp, "original" : obj, "parent" : new_par.id, "position" : pos, "old_parent" : old_par, "old_position" : old_ins && old_ins._id && old_par && old_ins._model.data[old_par] && old_ins._model.data[old_par].children ? $.inArray(obj.id, old_ins._model.data[old_par].children) : -1,'is_multi' : (old_ins && old_ins._id && old_ins._id !== this._id), 'is_foreign' : (!old_ins || !old_ins._id), 'old_instance' : old_ins, 'new_instance' : this });
|
4348 |
+
return tmp.id;
|
4349 |
+
},
|
4350 |
+
/**
|
4351 |
+
* cut a node (a later call to `paste(obj)` would move the node)
|
4352 |
+
* @name cut(obj)
|
4353 |
+
* @param {mixed} obj multiple objects can be passed using an array
|
4354 |
+
* @trigger cut.jstree
|
4355 |
+
*/
|
4356 |
+
cut : function (obj) {
|
4357 |
+
if(!obj) { obj = this._data.core.selected.concat(); }
|
4358 |
+
if(!$.isArray(obj)) { obj = [obj]; }
|
4359 |
+
if(!obj.length) { return false; }
|
4360 |
+
var tmp = [], o, t1, t2;
|
4361 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
4362 |
+
o = this.get_node(obj[t1]);
|
4363 |
+
if(o && o.id && o.id !== $.jstree.root) { tmp.push(o); }
|
4364 |
+
}
|
4365 |
+
if(!tmp.length) { return false; }
|
4366 |
+
ccp_node = tmp;
|
4367 |
+
ccp_inst = this;
|
4368 |
+
ccp_mode = 'move_node';
|
4369 |
+
/**
|
4370 |
+
* triggered when nodes are added to the buffer for moving
|
4371 |
+
* @event
|
4372 |
+
* @name cut.jstree
|
4373 |
+
* @param {Array} node
|
4374 |
+
*/
|
4375 |
+
this.trigger('cut', { "node" : obj });
|
4376 |
+
},
|
4377 |
+
/**
|
4378 |
+
* copy a node (a later call to `paste(obj)` would copy the node)
|
4379 |
+
* @name copy(obj)
|
4380 |
+
* @param {mixed} obj multiple objects can be passed using an array
|
4381 |
+
* @trigger copy.jstree
|
4382 |
+
*/
|
4383 |
+
copy : function (obj) {
|
4384 |
+
if(!obj) { obj = this._data.core.selected.concat(); }
|
4385 |
+
if(!$.isArray(obj)) { obj = [obj]; }
|
4386 |
+
if(!obj.length) { return false; }
|
4387 |
+
var tmp = [], o, t1, t2;
|
4388 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
4389 |
+
o = this.get_node(obj[t1]);
|
4390 |
+
if(o && o.id && o.id !== $.jstree.root) { tmp.push(o); }
|
4391 |
+
}
|
4392 |
+
if(!tmp.length) { return false; }
|
4393 |
+
ccp_node = tmp;
|
4394 |
+
ccp_inst = this;
|
4395 |
+
ccp_mode = 'copy_node';
|
4396 |
+
/**
|
4397 |
+
* triggered when nodes are added to the buffer for copying
|
4398 |
+
* @event
|
4399 |
+
* @name copy.jstree
|
4400 |
+
* @param {Array} node
|
4401 |
+
*/
|
4402 |
+
this.trigger('copy', { "node" : obj });
|
4403 |
+
},
|
4404 |
+
/**
|
4405 |
+
* get the current buffer (any nodes that are waiting for a paste operation)
|
4406 |
+
* @name get_buffer()
|
4407 |
+
* @return {Object} an object consisting of `mode` ("copy_node" or "move_node"), `node` (an array of objects) and `inst` (the instance)
|
4408 |
+
*/
|
4409 |
+
get_buffer : function () {
|
4410 |
+
return { 'mode' : ccp_mode, 'node' : ccp_node, 'inst' : ccp_inst };
|
4411 |
+
},
|
4412 |
+
/**
|
4413 |
+
* check if there is something in the buffer to paste
|
4414 |
+
* @name can_paste()
|
4415 |
+
* @return {Boolean}
|
4416 |
+
*/
|
4417 |
+
can_paste : function () {
|
4418 |
+
return ccp_mode !== false && ccp_node !== false; // && ccp_inst._model.data[ccp_node];
|
4419 |
+
},
|
4420 |
+
/**
|
4421 |
+
* copy or move the previously cut or copied nodes to a new parent
|
4422 |
+
* @name paste(obj [, pos])
|
4423 |
+
* @param {mixed} obj the new parent
|
4424 |
+
* @param {mixed} pos the position to insert at (besides integer, "first" and "last" are supported), defaults to integer `0`
|
4425 |
+
* @trigger paste.jstree
|
4426 |
+
*/
|
4427 |
+
paste : function (obj, pos) {
|
4428 |
+
obj = this.get_node(obj);
|
4429 |
+
if(!obj || !ccp_mode || !ccp_mode.match(/^(copy_node|move_node)$/) || !ccp_node) { return false; }
|
4430 |
+
if(this[ccp_mode](ccp_node, obj, pos, false, false, false, ccp_inst)) {
|
4431 |
+
/**
|
4432 |
+
* triggered when paste is invoked
|
4433 |
+
* @event
|
4434 |
+
* @name paste.jstree
|
4435 |
+
* @param {String} parent the ID of the receiving node
|
4436 |
+
* @param {Array} node the nodes in the buffer
|
4437 |
+
* @param {String} mode the performed operation - "copy_node" or "move_node"
|
4438 |
+
*/
|
4439 |
+
this.trigger('paste', { "parent" : obj.id, "node" : ccp_node, "mode" : ccp_mode });
|
4440 |
+
}
|
4441 |
+
ccp_node = false;
|
4442 |
+
ccp_mode = false;
|
4443 |
+
ccp_inst = false;
|
4444 |
+
},
|
4445 |
+
/**
|
4446 |
+
* clear the buffer of previously copied or cut nodes
|
4447 |
+
* @name clear_buffer()
|
4448 |
+
* @trigger clear_buffer.jstree
|
4449 |
+
*/
|
4450 |
+
clear_buffer : function () {
|
4451 |
+
ccp_node = false;
|
4452 |
+
ccp_mode = false;
|
4453 |
+
ccp_inst = false;
|
4454 |
+
/**
|
4455 |
+
* triggered when the copy / cut buffer is cleared
|
4456 |
+
* @event
|
4457 |
+
* @name clear_buffer.jstree
|
4458 |
+
*/
|
4459 |
+
this.trigger('clear_buffer');
|
4460 |
+
},
|
4461 |
+
/**
|
4462 |
+
* put a node in edit mode (input field to rename the node)
|
4463 |
+
* @name edit(obj [, default_text, callback])
|
4464 |
+
* @param {mixed} obj
|
4465 |
+
* @param {String} default_text the text to populate the input with (if omitted or set to a non-string value the node's text value is used)
|
4466 |
+
* @param {Function} callback a function to be called once the text box is blurred, it is called in the instance's scope and receives the node, a status parameter (true if the rename is successful, false otherwise) and a boolean indicating if the user cancelled the edit. You can access the node's title using .text
|
4467 |
+
*/
|
4468 |
+
edit : function (obj, default_text, callback) {
|
4469 |
+
var rtl, w, a, s, t, h1, h2, fn, tmp, cancel = false;
|
4470 |
+
obj = this.get_node(obj);
|
4471 |
+
if(!obj) { return false; }
|
4472 |
+
if(!this.check("edit", obj, this.get_parent(obj))) {
|
4473 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
4474 |
+
return false;
|
4475 |
+
}
|
4476 |
+
tmp = obj;
|
4477 |
+
default_text = typeof default_text === 'string' ? default_text : obj.text;
|
4478 |
+
this.set_text(obj, "");
|
4479 |
+
obj = this._open_to(obj);
|
4480 |
+
tmp.text = default_text;
|
4481 |
+
|
4482 |
+
rtl = this._data.core.rtl;
|
4483 |
+
w = this.element.width();
|
4484 |
+
this._data.core.focused = tmp.id;
|
4485 |
+
a = obj.children('.jstree-anchor').focus();
|
4486 |
+
s = $('<span>');
|
4487 |
+
/*!
|
4488 |
+
oi = obj.children("i:visible"),
|
4489 |
+
ai = a.children("i:visible"),
|
4490 |
+
w1 = oi.width() * oi.length,
|
4491 |
+
w2 = ai.width() * ai.length,
|
4492 |
+
*/
|
4493 |
+
t = default_text;
|
4494 |
+
h1 = $("<"+"div />", { css : { "position" : "absolute", "top" : "-200px", "left" : (rtl ? "0px" : "-1000px"), "visibility" : "hidden" } }).appendTo("body");
|
4495 |
+
h2 = $("<"+"input />", {
|
4496 |
+
"value" : t,
|
4497 |
+
"class" : "jstree-rename-input",
|
4498 |
+
// "size" : t.length,
|
4499 |
+
"css" : {
|
4500 |
+
"padding" : "0",
|
4501 |
+
"border" : "1px solid silver",
|
4502 |
+
"box-sizing" : "border-box",
|
4503 |
+
"display" : "inline-block",
|
4504 |
+
"height" : (this._data.core.li_height) + "px",
|
4505 |
+
"lineHeight" : (this._data.core.li_height) + "px",
|
4506 |
+
"width" : "150px" // will be set a bit further down
|
4507 |
+
},
|
4508 |
+
"blur" : $.proxy(function (e) {
|
4509 |
+
e.stopImmediatePropagation();
|
4510 |
+
e.preventDefault();
|
4511 |
+
var i = s.children(".jstree-rename-input"),
|
4512 |
+
v = i.val(),
|
4513 |
+
f = this.settings.core.force_text,
|
4514 |
+
nv;
|
4515 |
+
if(v === "") { v = t; }
|
4516 |
+
h1.remove();
|
4517 |
+
s.replaceWith(a);
|
4518 |
+
s.remove();
|
4519 |
+
t = f ? t : $('<div></div>').append($.parseHTML(t)).html();
|
4520 |
+
this.set_text(obj, t);
|
4521 |
+
nv = !!this.rename_node(obj, f ? $('<div></div>').text(v).text() : $('<div></div>').append($.parseHTML(v)).html());
|
4522 |
+
if(!nv) {
|
4523 |
+
this.set_text(obj, t); // move this up? and fix #483
|
4524 |
+
}
|
4525 |
+
this._data.core.focused = tmp.id;
|
4526 |
+
setTimeout($.proxy(function () {
|
4527 |
+
var node = this.get_node(tmp.id, true);
|
4528 |
+
if(node.length) {
|
4529 |
+
this._data.core.focused = tmp.id;
|
4530 |
+
node.children('.jstree-anchor').focus();
|
4531 |
+
}
|
4532 |
+
}, this), 0);
|
4533 |
+
if(callback) {
|
4534 |
+
callback.call(this, tmp, nv, cancel);
|
4535 |
+
}
|
4536 |
+
h2 = null;
|
4537 |
+
}, this),
|
4538 |
+
"keydown" : function (e) {
|
4539 |
+
var key = e.which;
|
4540 |
+
if(key === 27) {
|
4541 |
+
cancel = true;
|
4542 |
+
this.value = t;
|
4543 |
+
}
|
4544 |
+
if(key === 27 || key === 13 || key === 37 || key === 38 || key === 39 || key === 40 || key === 32) {
|
4545 |
+
e.stopImmediatePropagation();
|
4546 |
+
}
|
4547 |
+
if(key === 27 || key === 13) {
|
4548 |
+
e.preventDefault();
|
4549 |
+
this.blur();
|
4550 |
+
}
|
4551 |
+
},
|
4552 |
+
"click" : function (e) { e.stopImmediatePropagation(); },
|
4553 |
+
"mousedown" : function (e) { e.stopImmediatePropagation(); },
|
4554 |
+
"keyup" : function (e) {
|
4555 |
+
h2.width(Math.min(h1.text("pW" + this.value).width(),w));
|
4556 |
+
},
|
4557 |
+
"keypress" : function(e) {
|
4558 |
+
if(e.which === 13) { return false; }
|
4559 |
+
}
|
4560 |
+
});
|
4561 |
+
fn = {
|
4562 |
+
fontFamily : a.css('fontFamily') || '',
|
4563 |
+
fontSize : a.css('fontSize') || '',
|
4564 |
+
fontWeight : a.css('fontWeight') || '',
|
4565 |
+
fontStyle : a.css('fontStyle') || '',
|
4566 |
+
fontStretch : a.css('fontStretch') || '',
|
4567 |
+
fontVariant : a.css('fontVariant') || '',
|
4568 |
+
letterSpacing : a.css('letterSpacing') || '',
|
4569 |
+
wordSpacing : a.css('wordSpacing') || ''
|
4570 |
+
};
|
4571 |
+
s.attr('class', a.attr('class')).append(a.contents().clone()).append(h2);
|
4572 |
+
a.replaceWith(s);
|
4573 |
+
h1.css(fn);
|
4574 |
+
h2.css(fn).width(Math.min(h1.text("pW" + h2[0].value).width(),w))[0].select();
|
4575 |
+
$(document).one('mousedown.jstree touchstart.jstree dnd_start.vakata', function (e) {
|
4576 |
+
if (h2 && e.target !== h2) {
|
4577 |
+
$(h2).blur();
|
4578 |
+
}
|
4579 |
+
});
|
4580 |
+
},
|
4581 |
+
|
4582 |
+
|
4583 |
+
/**
|
4584 |
+
* changes the theme
|
4585 |
+
* @name set_theme(theme_name [, theme_url])
|
4586 |
+
* @param {String} theme_name the name of the new theme to apply
|
4587 |
+
* @param {mixed} theme_url the location of the CSS file for this theme. Omit or set to `false` if you manually included the file. Set to `true` to autoload from the `core.themes.dir` directory.
|
4588 |
+
* @trigger set_theme.jstree
|
4589 |
+
*/
|
4590 |
+
set_theme : function (theme_name, theme_url) {
|
4591 |
+
if(!theme_name) { return false; }
|
4592 |
+
if(theme_url === true) {
|
4593 |
+
var dir = this.settings.core.themes.dir;
|
4594 |
+
if(!dir) { dir = $.jstree.path + '/themes'; }
|
4595 |
+
theme_url = dir + '/' + theme_name + '/style.css';
|
4596 |
+
}
|
4597 |
+
if(theme_url && $.inArray(theme_url, themes_loaded) === -1) {
|
4598 |
+
$('head').append('<'+'link rel="stylesheet" href="' + theme_url + '" type="text/css" />');
|
4599 |
+
themes_loaded.push(theme_url);
|
4600 |
+
}
|
4601 |
+
if(this._data.core.themes.name) {
|
4602 |
+
this.element.removeClass('jstree-' + this._data.core.themes.name);
|
4603 |
+
}
|
4604 |
+
this._data.core.themes.name = theme_name;
|
4605 |
+
this.element.addClass('jstree-' + theme_name);
|
4606 |
+
this.element[this.settings.core.themes.responsive ? 'addClass' : 'removeClass' ]('jstree-' + theme_name + '-responsive');
|
4607 |
+
/**
|
4608 |
+
* triggered when a theme is set
|
4609 |
+
* @event
|
4610 |
+
* @name set_theme.jstree
|
4611 |
+
* @param {String} theme the new theme
|
4612 |
+
*/
|
4613 |
+
this.trigger('set_theme', { 'theme' : theme_name });
|
4614 |
+
},
|
4615 |
+
/**
|
4616 |
+
* gets the name of the currently applied theme name
|
4617 |
+
* @name get_theme()
|
4618 |
+
* @return {String}
|
4619 |
+
*/
|
4620 |
+
get_theme : function () { return this._data.core.themes.name; },
|
4621 |
+
/**
|
4622 |
+
* changes the theme variant (if the theme has variants)
|
4623 |
+
* @name set_theme_variant(variant_name)
|
4624 |
+
* @param {String|Boolean} variant_name the variant to apply (if `false` is used the current variant is removed)
|
4625 |
+
*/
|
4626 |
+
set_theme_variant : function (variant_name) {
|
4627 |
+
if(this._data.core.themes.variant) {
|
4628 |
+
this.element.removeClass('jstree-' + this._data.core.themes.name + '-' + this._data.core.themes.variant);
|
4629 |
+
}
|
4630 |
+
this._data.core.themes.variant = variant_name;
|
4631 |
+
if(variant_name) {
|
4632 |
+
this.element.addClass('jstree-' + this._data.core.themes.name + '-' + this._data.core.themes.variant);
|
4633 |
+
}
|
4634 |
+
},
|
4635 |
+
/**
|
4636 |
+
* gets the name of the currently applied theme variant
|
4637 |
+
* @name get_theme()
|
4638 |
+
* @return {String}
|
4639 |
+
*/
|
4640 |
+
get_theme_variant : function () { return this._data.core.themes.variant; },
|
4641 |
+
/**
|
4642 |
+
* shows a striped background on the container (if the theme supports it)
|
4643 |
+
* @name show_stripes()
|
4644 |
+
*/
|
4645 |
+
show_stripes : function () {
|
4646 |
+
this._data.core.themes.stripes = true;
|
4647 |
+
this.get_container_ul().addClass("jstree-striped");
|
4648 |
+
/**
|
4649 |
+
* triggered when stripes are shown
|
4650 |
+
* @event
|
4651 |
+
* @name show_stripes.jstree
|
4652 |
+
*/
|
4653 |
+
this.trigger('show_stripes');
|
4654 |
+
},
|
4655 |
+
/**
|
4656 |
+
* hides the striped background on the container
|
4657 |
+
* @name hide_stripes()
|
4658 |
+
*/
|
4659 |
+
hide_stripes : function () {
|
4660 |
+
this._data.core.themes.stripes = false;
|
4661 |
+
this.get_container_ul().removeClass("jstree-striped");
|
4662 |
+
/**
|
4663 |
+
* triggered when stripes are hidden
|
4664 |
+
* @event
|
4665 |
+
* @name hide_stripes.jstree
|
4666 |
+
*/
|
4667 |
+
this.trigger('hide_stripes');
|
4668 |
+
},
|
4669 |
+
/**
|
4670 |
+
* toggles the striped background on the container
|
4671 |
+
* @name toggle_stripes()
|
4672 |
+
*/
|
4673 |
+
toggle_stripes : function () { if(this._data.core.themes.stripes) { this.hide_stripes(); } else { this.show_stripes(); } },
|
4674 |
+
/**
|
4675 |
+
* shows the connecting dots (if the theme supports it)
|
4676 |
+
* @name show_dots()
|
4677 |
+
*/
|
4678 |
+
show_dots : function () {
|
4679 |
+
this._data.core.themes.dots = true;
|
4680 |
+
this.get_container_ul().removeClass("jstree-no-dots");
|
4681 |
+
/**
|
4682 |
+
* triggered when dots are shown
|
4683 |
+
* @event
|
4684 |
+
* @name show_dots.jstree
|
4685 |
+
*/
|
4686 |
+
this.trigger('show_dots');
|
4687 |
+
},
|
4688 |
+
/**
|
4689 |
+
* hides the connecting dots
|
4690 |
+
* @name hide_dots()
|
4691 |
+
*/
|
4692 |
+
hide_dots : function () {
|
4693 |
+
this._data.core.themes.dots = false;
|
4694 |
+
this.get_container_ul().addClass("jstree-no-dots");
|
4695 |
+
/**
|
4696 |
+
* triggered when dots are hidden
|
4697 |
+
* @event
|
4698 |
+
* @name hide_dots.jstree
|
4699 |
+
*/
|
4700 |
+
this.trigger('hide_dots');
|
4701 |
+
},
|
4702 |
+
/**
|
4703 |
+
* toggles the connecting dots
|
4704 |
+
* @name toggle_dots()
|
4705 |
+
*/
|
4706 |
+
toggle_dots : function () { if(this._data.core.themes.dots) { this.hide_dots(); } else { this.show_dots(); } },
|
4707 |
+
/**
|
4708 |
+
* show the node icons
|
4709 |
+
* @name show_icons()
|
4710 |
+
*/
|
4711 |
+
show_icons : function () {
|
4712 |
+
this._data.core.themes.icons = true;
|
4713 |
+
this.get_container_ul().removeClass("jstree-no-icons");
|
4714 |
+
/**
|
4715 |
+
* triggered when icons are shown
|
4716 |
+
* @event
|
4717 |
+
* @name show_icons.jstree
|
4718 |
+
*/
|
4719 |
+
this.trigger('show_icons');
|
4720 |
+
},
|
4721 |
+
/**
|
4722 |
+
* hide the node icons
|
4723 |
+
* @name hide_icons()
|
4724 |
+
*/
|
4725 |
+
hide_icons : function () {
|
4726 |
+
this._data.core.themes.icons = false;
|
4727 |
+
this.get_container_ul().addClass("jstree-no-icons");
|
4728 |
+
/**
|
4729 |
+
* triggered when icons are hidden
|
4730 |
+
* @event
|
4731 |
+
* @name hide_icons.jstree
|
4732 |
+
*/
|
4733 |
+
this.trigger('hide_icons');
|
4734 |
+
},
|
4735 |
+
/**
|
4736 |
+
* toggle the node icons
|
4737 |
+
* @name toggle_icons()
|
4738 |
+
*/
|
4739 |
+
toggle_icons : function () { if(this._data.core.themes.icons) { this.hide_icons(); } else { this.show_icons(); } },
|
4740 |
+
/**
|
4741 |
+
* show the node ellipsis
|
4742 |
+
* @name show_icons()
|
4743 |
+
*/
|
4744 |
+
show_ellipsis : function () {
|
4745 |
+
this._data.core.themes.ellipsis = true;
|
4746 |
+
this.get_container_ul().addClass("jstree-ellipsis");
|
4747 |
+
/**
|
4748 |
+
* triggered when ellisis is shown
|
4749 |
+
* @event
|
4750 |
+
* @name show_ellipsis.jstree
|
4751 |
+
*/
|
4752 |
+
this.trigger('show_ellipsis');
|
4753 |
+
},
|
4754 |
+
/**
|
4755 |
+
* hide the node ellipsis
|
4756 |
+
* @name hide_ellipsis()
|
4757 |
+
*/
|
4758 |
+
hide_ellipsis : function () {
|
4759 |
+
this._data.core.themes.ellipsis = false;
|
4760 |
+
this.get_container_ul().removeClass("jstree-ellipsis");
|
4761 |
+
/**
|
4762 |
+
* triggered when ellisis is hidden
|
4763 |
+
* @event
|
4764 |
+
* @name hide_ellipsis.jstree
|
4765 |
+
*/
|
4766 |
+
this.trigger('hide_ellipsis');
|
4767 |
+
},
|
4768 |
+
/**
|
4769 |
+
* toggle the node ellipsis
|
4770 |
+
* @name toggle_icons()
|
4771 |
+
*/
|
4772 |
+
toggle_ellipsis : function () { if(this._data.core.themes.ellipsis) { this.hide_ellipsis(); } else { this.show_ellipsis(); } },
|
4773 |
+
/**
|
4774 |
+
* set the node icon for a node
|
4775 |
+
* @name set_icon(obj, icon)
|
4776 |
+
* @param {mixed} obj
|
4777 |
+
* @param {String} icon the new icon - can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class
|
4778 |
+
*/
|
4779 |
+
set_icon : function (obj, icon) {
|
4780 |
+
var t1, t2, dom, old;
|
4781 |
+
if($.isArray(obj)) {
|
4782 |
+
obj = obj.slice();
|
4783 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
4784 |
+
this.set_icon(obj[t1], icon);
|
4785 |
+
}
|
4786 |
+
return true;
|
4787 |
+
}
|
4788 |
+
obj = this.get_node(obj);
|
4789 |
+
if(!obj || obj.id === $.jstree.root) { return false; }
|
4790 |
+
old = obj.icon;
|
4791 |
+
obj.icon = icon === true || icon === null || icon === undefined || icon === '' ? true : icon;
|
4792 |
+
dom = this.get_node(obj, true).children(".jstree-anchor").children(".jstree-themeicon");
|
4793 |
+
if(icon === false) {
|
4794 |
+
dom.removeClass('jstree-themeicon-custom ' + old).css("background","").removeAttr("rel");
|
4795 |
+
this.hide_icon(obj);
|
4796 |
+
}
|
4797 |
+
else if(icon === true || icon === null || icon === undefined || icon === '') {
|
4798 |
+
dom.removeClass('jstree-themeicon-custom ' + old).css("background","").removeAttr("rel");
|
4799 |
+
if(old === false) { this.show_icon(obj); }
|
4800 |
+
}
|
4801 |
+
else if(icon.indexOf("/") === -1 && icon.indexOf(".") === -1) {
|
4802 |
+
dom.removeClass(old).css("background","");
|
4803 |
+
dom.addClass(icon + ' jstree-themeicon-custom').attr("rel",icon);
|
4804 |
+
if(old === false) { this.show_icon(obj); }
|
4805 |
+
}
|
4806 |
+
else {
|
4807 |
+
dom.removeClass(old).css("background","");
|
4808 |
+
dom.addClass('jstree-themeicon-custom').css("background", "url('" + icon + "') center center no-repeat").attr("rel",icon);
|
4809 |
+
if(old === false) { this.show_icon(obj); }
|
4810 |
+
}
|
4811 |
+
return true;
|
4812 |
+
},
|
4813 |
+
/**
|
4814 |
+
* get the node icon for a node
|
4815 |
+
* @name get_icon(obj)
|
4816 |
+
* @param {mixed} obj
|
4817 |
+
* @return {String}
|
4818 |
+
*/
|
4819 |
+
get_icon : function (obj) {
|
4820 |
+
obj = this.get_node(obj);
|
4821 |
+
return (!obj || obj.id === $.jstree.root) ? false : obj.icon;
|
4822 |
+
},
|
4823 |
+
/**
|
4824 |
+
* hide the icon on an individual node
|
4825 |
+
* @name hide_icon(obj)
|
4826 |
+
* @param {mixed} obj
|
4827 |
+
*/
|
4828 |
+
hide_icon : function (obj) {
|
4829 |
+
var t1, t2;
|
4830 |
+
if($.isArray(obj)) {
|
4831 |
+
obj = obj.slice();
|
4832 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
4833 |
+
this.hide_icon(obj[t1]);
|
4834 |
+
}
|
4835 |
+
return true;
|
4836 |
+
}
|
4837 |
+
obj = this.get_node(obj);
|
4838 |
+
if(!obj || obj === $.jstree.root) { return false; }
|
4839 |
+
obj.icon = false;
|
4840 |
+
this.get_node(obj, true).children(".jstree-anchor").children(".jstree-themeicon").addClass('jstree-themeicon-hidden');
|
4841 |
+
return true;
|
4842 |
+
},
|
4843 |
+
/**
|
4844 |
+
* show the icon on an individual node
|
4845 |
+
* @name show_icon(obj)
|
4846 |
+
* @param {mixed} obj
|
4847 |
+
*/
|
4848 |
+
show_icon : function (obj) {
|
4849 |
+
var t1, t2, dom;
|
4850 |
+
if($.isArray(obj)) {
|
4851 |
+
obj = obj.slice();
|
4852 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
4853 |
+
this.show_icon(obj[t1]);
|
4854 |
+
}
|
4855 |
+
return true;
|
4856 |
+
}
|
4857 |
+
obj = this.get_node(obj);
|
4858 |
+
if(!obj || obj === $.jstree.root) { return false; }
|
4859 |
+
dom = this.get_node(obj, true);
|
4860 |
+
obj.icon = dom.length ? dom.children(".jstree-anchor").children(".jstree-themeicon").attr('rel') : true;
|
4861 |
+
if(!obj.icon) { obj.icon = true; }
|
4862 |
+
dom.children(".jstree-anchor").children(".jstree-themeicon").removeClass('jstree-themeicon-hidden');
|
4863 |
+
return true;
|
4864 |
+
}
|
4865 |
+
};
|
4866 |
+
|
4867 |
+
// helpers
|
4868 |
+
$.vakata = {};
|
4869 |
+
// collect attributes
|
4870 |
+
$.vakata.attributes = function(node, with_values) {
|
4871 |
+
node = $(node)[0];
|
4872 |
+
var attr = with_values ? {} : [];
|
4873 |
+
if(node && node.attributes) {
|
4874 |
+
$.each(node.attributes, function (i, v) {
|
4875 |
+
if($.inArray(v.name.toLowerCase(),['style','contenteditable','hasfocus','tabindex']) !== -1) { return; }
|
4876 |
+
if(v.value !== null && $.trim(v.value) !== '') {
|
4877 |
+
if(with_values) { attr[v.name] = v.value; }
|
4878 |
+
else { attr.push(v.name); }
|
4879 |
+
}
|
4880 |
+
});
|
4881 |
+
}
|
4882 |
+
return attr;
|
4883 |
+
};
|
4884 |
+
$.vakata.array_unique = function(array) {
|
4885 |
+
var a = [], i, j, l, o = {};
|
4886 |
+
for(i = 0, l = array.length; i < l; i++) {
|
4887 |
+
if(o[array[i]] === undefined) {
|
4888 |
+
a.push(array[i]);
|
4889 |
+
o[array[i]] = true;
|
4890 |
+
}
|
4891 |
+
}
|
4892 |
+
return a;
|
4893 |
+
};
|
4894 |
+
// remove item from array
|
4895 |
+
$.vakata.array_remove = function(array, from) {
|
4896 |
+
array.splice(from, 1);
|
4897 |
+
return array;
|
4898 |
+
//var rest = array.slice((to || from) + 1 || array.length);
|
4899 |
+
//array.length = from < 0 ? array.length + from : from;
|
4900 |
+
//array.push.apply(array, rest);
|
4901 |
+
//return array;
|
4902 |
+
};
|
4903 |
+
// remove item from array
|
4904 |
+
$.vakata.array_remove_item = function(array, item) {
|
4905 |
+
var tmp = $.inArray(item, array);
|
4906 |
+
return tmp !== -1 ? $.vakata.array_remove(array, tmp) : array;
|
4907 |
+
};
|
4908 |
+
$.vakata.array_filter = function(c,a,b,d,e) {
|
4909 |
+
if (c.filter) {
|
4910 |
+
return c.filter(a, b);
|
4911 |
+
}
|
4912 |
+
d=[];
|
4913 |
+
for (e in c) {
|
4914 |
+
if (~~e+''===e+'' && e>=0 && a.call(b,c[e],+e,c)) {
|
4915 |
+
d.push(c[e]);
|
4916 |
+
}
|
4917 |
+
}
|
4918 |
+
return d;
|
4919 |
+
};
|
4920 |
+
|
4921 |
+
|
4922 |
+
/**
|
4923 |
+
* ### Changed plugin
|
4924 |
+
*
|
4925 |
+
* This plugin adds more information to the `changed.jstree` event. The new data is contained in the `changed` event data property, and contains a lists of `selected` and `deselected` nodes.
|
4926 |
+
*/
|
4927 |
+
|
4928 |
+
$.jstree.plugins.changed = function (options, parent) {
|
4929 |
+
var last = [];
|
4930 |
+
this.trigger = function (ev, data) {
|
4931 |
+
var i, j;
|
4932 |
+
if(!data) {
|
4933 |
+
data = {};
|
4934 |
+
}
|
4935 |
+
if(ev.replace('.jstree','') === 'changed') {
|
4936 |
+
data.changed = { selected : [], deselected : [] };
|
4937 |
+
var tmp = {};
|
4938 |
+
for(i = 0, j = last.length; i < j; i++) {
|
4939 |
+
tmp[last[i]] = 1;
|
4940 |
+
}
|
4941 |
+
for(i = 0, j = data.selected.length; i < j; i++) {
|
4942 |
+
if(!tmp[data.selected[i]]) {
|
4943 |
+
data.changed.selected.push(data.selected[i]);
|
4944 |
+
}
|
4945 |
+
else {
|
4946 |
+
tmp[data.selected[i]] = 2;
|
4947 |
+
}
|
4948 |
+
}
|
4949 |
+
for(i = 0, j = last.length; i < j; i++) {
|
4950 |
+
if(tmp[last[i]] === 1) {
|
4951 |
+
data.changed.deselected.push(last[i]);
|
4952 |
+
}
|
4953 |
+
}
|
4954 |
+
last = data.selected.slice();
|
4955 |
+
}
|
4956 |
+
/**
|
4957 |
+
* triggered when selection changes (the "changed" plugin enhances the original event with more data)
|
4958 |
+
* @event
|
4959 |
+
* @name changed.jstree
|
4960 |
+
* @param {Object} node
|
4961 |
+
* @param {Object} action the action that caused the selection to change
|
4962 |
+
* @param {Array} selected the current selection
|
4963 |
+
* @param {Object} changed an object containing two properties `selected` and `deselected` - both arrays of node IDs, which were selected or deselected since the last changed event
|
4964 |
+
* @param {Object} event the event (if any) that triggered this changed event
|
4965 |
+
* @plugin changed
|
4966 |
+
*/
|
4967 |
+
parent.trigger.call(this, ev, data);
|
4968 |
+
};
|
4969 |
+
this.refresh = function (skip_loading, forget_state) {
|
4970 |
+
last = [];
|
4971 |
+
return parent.refresh.apply(this, arguments);
|
4972 |
+
};
|
4973 |
+
};
|
4974 |
+
|
4975 |
+
/**
|
4976 |
+
* ### Checkbox plugin
|
4977 |
+
*
|
4978 |
+
* This plugin renders checkbox icons in front of each node, making multiple selection much easier.
|
4979 |
+
* It also supports tri-state behavior, meaning that if a node has a few of its children checked it will be rendered as undetermined, and state will be propagated up.
|
4980 |
+
*/
|
4981 |
+
|
4982 |
+
var _i = document.createElement('I');
|
4983 |
+
_i.className = 'jstree-icon jstree-checkbox';
|
4984 |
+
_i.setAttribute('role', 'presentation');
|
4985 |
+
/**
|
4986 |
+
* stores all defaults for the checkbox plugin
|
4987 |
+
* @name $.jstree.defaults.checkbox
|
4988 |
+
* @plugin checkbox
|
4989 |
+
*/
|
4990 |
+
$.jstree.defaults.checkbox = {
|
4991 |
+
/**
|
4992 |
+
* a boolean indicating if checkboxes should be visible (can be changed at a later time using `show_checkboxes()` and `hide_checkboxes`). Defaults to `true`.
|
4993 |
+
* @name $.jstree.defaults.checkbox.visible
|
4994 |
+
* @plugin checkbox
|
4995 |
+
*/
|
4996 |
+
visible : true,
|
4997 |
+
/**
|
4998 |
+
* a boolean indicating if checkboxes should cascade down and have an undetermined state. Defaults to `true`.
|
4999 |
+
* @name $.jstree.defaults.checkbox.three_state
|
5000 |
+
* @plugin checkbox
|
5001 |
+
*/
|
5002 |
+
three_state : true,
|
5003 |
+
/**
|
5004 |
+
* a boolean indicating if clicking anywhere on the node should act as clicking on the checkbox. Defaults to `true`.
|
5005 |
+
* @name $.jstree.defaults.checkbox.whole_node
|
5006 |
+
* @plugin checkbox
|
5007 |
+
*/
|
5008 |
+
whole_node : true,
|
5009 |
+
/**
|
5010 |
+
* a boolean indicating if the selected style of a node should be kept, or removed. Defaults to `true`.
|
5011 |
+
* @name $.jstree.defaults.checkbox.keep_selected_style
|
5012 |
+
* @plugin checkbox
|
5013 |
+
*/
|
5014 |
+
keep_selected_style : true,
|
5015 |
+
/**
|
5016 |
+
* This setting controls how cascading and undetermined nodes are applied.
|
5017 |
+
* If 'up' is in the string - cascading up is enabled, if 'down' is in the string - cascading down is enabled, if 'undetermined' is in the string - undetermined nodes will be used.
|
5018 |
+
* If `three_state` is set to `true` this setting is automatically set to 'up+down+undetermined'. Defaults to ''.
|
5019 |
+
* @name $.jstree.defaults.checkbox.cascade
|
5020 |
+
* @plugin checkbox
|
5021 |
+
*/
|
5022 |
+
cascade : '',
|
5023 |
+
/**
|
5024 |
+
* This setting controls if checkbox are bound to the general tree selection or to an internal array maintained by the checkbox plugin. Defaults to `true`, only set to `false` if you know exactly what you are doing.
|
5025 |
+
* @name $.jstree.defaults.checkbox.tie_selection
|
5026 |
+
* @plugin checkbox
|
5027 |
+
*/
|
5028 |
+
tie_selection : true,
|
5029 |
+
|
5030 |
+
/**
|
5031 |
+
* This setting controls if cascading down affects disabled checkboxes
|
5032 |
+
* @name $.jstree.defaults.checkbox.cascade_to_disabled
|
5033 |
+
* @plugin checkbox
|
5034 |
+
*/
|
5035 |
+
cascade_to_disabled : true,
|
5036 |
+
|
5037 |
+
/**
|
5038 |
+
* This setting controls if cascading down affects hidden checkboxes
|
5039 |
+
* @name $.jstree.defaults.checkbox.cascade_to_hidden
|
5040 |
+
* @plugin checkbox
|
5041 |
+
*/
|
5042 |
+
cascade_to_hidden : true
|
5043 |
+
};
|
5044 |
+
$.jstree.plugins.checkbox = function (options, parent) {
|
5045 |
+
this.bind = function () {
|
5046 |
+
parent.bind.call(this);
|
5047 |
+
this._data.checkbox.uto = false;
|
5048 |
+
this._data.checkbox.selected = [];
|
5049 |
+
if(this.settings.checkbox.three_state) {
|
5050 |
+
this.settings.checkbox.cascade = 'up+down+undetermined';
|
5051 |
+
}
|
5052 |
+
this.element
|
5053 |
+
.on("init.jstree", $.proxy(function () {
|
5054 |
+
this._data.checkbox.visible = this.settings.checkbox.visible;
|
5055 |
+
if(!this.settings.checkbox.keep_selected_style) {
|
5056 |
+
this.element.addClass('jstree-checkbox-no-clicked');
|
5057 |
+
}
|
5058 |
+
if(this.settings.checkbox.tie_selection) {
|
5059 |
+
this.element.addClass('jstree-checkbox-selection');
|
5060 |
+
}
|
5061 |
+
}, this))
|
5062 |
+
.on("loading.jstree", $.proxy(function () {
|
5063 |
+
this[ this._data.checkbox.visible ? 'show_checkboxes' : 'hide_checkboxes' ]();
|
5064 |
+
}, this));
|
5065 |
+
if(this.settings.checkbox.cascade.indexOf('undetermined') !== -1) {
|
5066 |
+
this.element
|
5067 |
+
.on('changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree', $.proxy(function () {
|
5068 |
+
// only if undetermined is in setting
|
5069 |
+
if(this._data.checkbox.uto) { clearTimeout(this._data.checkbox.uto); }
|
5070 |
+
this._data.checkbox.uto = setTimeout($.proxy(this._undetermined, this), 50);
|
5071 |
+
}, this));
|
5072 |
+
}
|
5073 |
+
if(!this.settings.checkbox.tie_selection) {
|
5074 |
+
this.element
|
5075 |
+
.on('model.jstree', $.proxy(function (e, data) {
|
5076 |
+
var m = this._model.data,
|
5077 |
+
p = m[data.parent],
|
5078 |
+
dpc = data.nodes,
|
5079 |
+
i, j;
|
5080 |
+
for(i = 0, j = dpc.length; i < j; i++) {
|
5081 |
+
m[dpc[i]].state.checked = m[dpc[i]].state.checked || (m[dpc[i]].original && m[dpc[i]].original.state && m[dpc[i]].original.state.checked);
|
5082 |
+
if(m[dpc[i]].state.checked) {
|
5083 |
+
this._data.checkbox.selected.push(dpc[i]);
|
5084 |
+
}
|
5085 |
+
}
|
5086 |
+
}, this));
|
5087 |
+
}
|
5088 |
+
if(this.settings.checkbox.cascade.indexOf('up') !== -1 || this.settings.checkbox.cascade.indexOf('down') !== -1) {
|
5089 |
+
this.element
|
5090 |
+
.on('model.jstree', $.proxy(function (e, data) {
|
5091 |
+
var m = this._model.data,
|
5092 |
+
p = m[data.parent],
|
5093 |
+
dpc = data.nodes,
|
5094 |
+
chd = [],
|
5095 |
+
c, i, j, k, l, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection;
|
5096 |
+
|
5097 |
+
if(s.indexOf('down') !== -1) {
|
5098 |
+
// apply down
|
5099 |
+
if(p.state[ t ? 'selected' : 'checked' ]) {
|
5100 |
+
for(i = 0, j = dpc.length; i < j; i++) {
|
5101 |
+
m[dpc[i]].state[ t ? 'selected' : 'checked' ] = true;
|
5102 |
+
}
|
5103 |
+
|
5104 |
+
this._data[ t ? 'core' : 'checkbox' ].selected = this._data[ t ? 'core' : 'checkbox' ].selected.concat(dpc);
|
5105 |
+
}
|
5106 |
+
else {
|
5107 |
+
for(i = 0, j = dpc.length; i < j; i++) {
|
5108 |
+
if(m[dpc[i]].state[ t ? 'selected' : 'checked' ]) {
|
5109 |
+
for(k = 0, l = m[dpc[i]].children_d.length; k < l; k++) {
|
5110 |
+
m[m[dpc[i]].children_d[k]].state[ t ? 'selected' : 'checked' ] = true;
|
5111 |
+
}
|
5112 |
+
this._data[ t ? 'core' : 'checkbox' ].selected = this._data[ t ? 'core' : 'checkbox' ].selected.concat(m[dpc[i]].children_d);
|
5113 |
+
}
|
5114 |
+
}
|
5115 |
+
}
|
5116 |
+
}
|
5117 |
+
|
5118 |
+
if(s.indexOf('up') !== -1) {
|
5119 |
+
// apply up
|
5120 |
+
for(i = 0, j = p.children_d.length; i < j; i++) {
|
5121 |
+
if(!m[p.children_d[i]].children.length) {
|
5122 |
+
chd.push(m[p.children_d[i]].parent);
|
5123 |
+
}
|
5124 |
+
}
|
5125 |
+
chd = $.vakata.array_unique(chd);
|
5126 |
+
for(k = 0, l = chd.length; k < l; k++) {
|
5127 |
+
p = m[chd[k]];
|
5128 |
+
while(p && p.id !== $.jstree.root) {
|
5129 |
+
c = 0;
|
5130 |
+
for(i = 0, j = p.children.length; i < j; i++) {
|
5131 |
+
c += m[p.children[i]].state[ t ? 'selected' : 'checked' ];
|
5132 |
+
}
|
5133 |
+
if(c === j) {
|
5134 |
+
p.state[ t ? 'selected' : 'checked' ] = true;
|
5135 |
+
this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id);
|
5136 |
+
tmp = this.get_node(p, true);
|
5137 |
+
if(tmp && tmp.length) {
|
5138 |
+
tmp.attr('aria-selected', true).children('.jstree-anchor').addClass( t ? 'jstree-clicked' : 'jstree-checked');
|
5139 |
+
}
|
5140 |
+
}
|
5141 |
+
else {
|
5142 |
+
break;
|
5143 |
+
}
|
5144 |
+
p = this.get_node(p.parent);
|
5145 |
+
}
|
5146 |
+
}
|
5147 |
+
}
|
5148 |
+
|
5149 |
+
this._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_unique(this._data[ t ? 'core' : 'checkbox' ].selected);
|
5150 |
+
}, this))
|
5151 |
+
.on(this.settings.checkbox.tie_selection ? 'select_node.jstree' : 'check_node.jstree', $.proxy(function (e, data) {
|
5152 |
+
var self = this,
|
5153 |
+
obj = data.node,
|
5154 |
+
m = this._model.data,
|
5155 |
+
par = this.get_node(obj.parent),
|
5156 |
+
i, j, c, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection,
|
5157 |
+
sel = {}, cur = this._data[ t ? 'core' : 'checkbox' ].selected;
|
5158 |
+
|
5159 |
+
for (i = 0, j = cur.length; i < j; i++) {
|
5160 |
+
sel[cur[i]] = true;
|
5161 |
+
}
|
5162 |
+
|
5163 |
+
// apply down
|
5164 |
+
if(s.indexOf('down') !== -1) {
|
5165 |
+
//this._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_unique(this._data[ t ? 'core' : 'checkbox' ].selected.concat(obj.children_d));
|
5166 |
+
var selectedIds = this._cascade_new_checked_state(obj.id, true);
|
5167 |
+
var temp = obj.children_d.concat(obj.id);
|
5168 |
+
for (i = 0, j = temp.length; i < j; i++) {
|
5169 |
+
if (selectedIds.indexOf(temp[i]) > -1) {
|
5170 |
+
sel[temp[i]] = true;
|
5171 |
+
}
|
5172 |
+
else {
|
5173 |
+
delete sel[temp[i]];
|
5174 |
+
}
|
5175 |
+
}
|
5176 |
+
}
|
5177 |
+
|
5178 |
+
// apply up
|
5179 |
+
if(s.indexOf('up') !== -1) {
|
5180 |
+
while(par && par.id !== $.jstree.root) {
|
5181 |
+
c = 0;
|
5182 |
+
for(i = 0, j = par.children.length; i < j; i++) {
|
5183 |
+
c += m[par.children[i]].state[ t ? 'selected' : 'checked' ];
|
5184 |
+
}
|
5185 |
+
if(c === j) {
|
5186 |
+
par.state[ t ? 'selected' : 'checked' ] = true;
|
5187 |
+
sel[par.id] = true;
|
5188 |
+
//this._data[ t ? 'core' : 'checkbox' ].selected.push(par.id);
|
5189 |
+
tmp = this.get_node(par, true);
|
5190 |
+
if(tmp && tmp.length) {
|
5191 |
+
tmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked');
|
5192 |
+
}
|
5193 |
+
}
|
5194 |
+
else {
|
5195 |
+
break;
|
5196 |
+
}
|
5197 |
+
par = this.get_node(par.parent);
|
5198 |
+
}
|
5199 |
+
}
|
5200 |
+
|
5201 |
+
cur = [];
|
5202 |
+
for (i in sel) {
|
5203 |
+
if (sel.hasOwnProperty(i)) {
|
5204 |
+
cur.push(i);
|
5205 |
+
}
|
5206 |
+
}
|
5207 |
+
this._data[ t ? 'core' : 'checkbox' ].selected = cur;
|
5208 |
+
}, this))
|
5209 |
+
.on(this.settings.checkbox.tie_selection ? 'deselect_all.jstree' : 'uncheck_all.jstree', $.proxy(function (e, data) {
|
5210 |
+
var obj = this.get_node($.jstree.root),
|
5211 |
+
m = this._model.data,
|
5212 |
+
i, j, tmp;
|
5213 |
+
for(i = 0, j = obj.children_d.length; i < j; i++) {
|
5214 |
+
tmp = m[obj.children_d[i]];
|
5215 |
+
if(tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) {
|
5216 |
+
tmp.original.state.undetermined = false;
|
5217 |
+
}
|
5218 |
+
}
|
5219 |
+
}, this))
|
5220 |
+
.on(this.settings.checkbox.tie_selection ? 'deselect_node.jstree' : 'uncheck_node.jstree', $.proxy(function (e, data) {
|
5221 |
+
var self = this,
|
5222 |
+
obj = data.node,
|
5223 |
+
dom = this.get_node(obj, true),
|
5224 |
+
i, j, tmp, s = this.settings.checkbox.cascade, t = this.settings.checkbox.tie_selection,
|
5225 |
+
cur = this._data[ t ? 'core' : 'checkbox' ].selected, sel = {},
|
5226 |
+
stillSelectedIds = [],
|
5227 |
+
allIds = obj.children_d.concat(obj.id);
|
5228 |
+
|
5229 |
+
// apply down
|
5230 |
+
if(s.indexOf('down') !== -1) {
|
5231 |
+
var selectedIds = this._cascade_new_checked_state(obj.id, false);
|
5232 |
+
|
5233 |
+
cur = cur.filter(function(id) {
|
5234 |
+
return allIds.indexOf(id) === -1 || selectedIds.indexOf(id) > -1;
|
5235 |
+
});
|
5236 |
+
}
|
5237 |
+
|
5238 |
+
// only apply up if cascade up is enabled and if this node is not selected
|
5239 |
+
// (if all child nodes are disabled and cascade_to_disabled === false then this node will till be selected).
|
5240 |
+
if(s.indexOf('up') !== -1 && cur.indexOf(obj.id) === -1) {
|
5241 |
+
for(i = 0, j = obj.parents.length; i < j; i++) {
|
5242 |
+
tmp = this._model.data[obj.parents[i]];
|
5243 |
+
tmp.state[ t ? 'selected' : 'checked' ] = false;
|
5244 |
+
if(tmp && tmp.original && tmp.original.state && tmp.original.state.undetermined) {
|
5245 |
+
tmp.original.state.undetermined = false;
|
5246 |
+
}
|
5247 |
+
tmp = this.get_node(obj.parents[i], true);
|
5248 |
+
if(tmp && tmp.length) {
|
5249 |
+
tmp.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked');
|
5250 |
+
}
|
5251 |
+
}
|
5252 |
+
|
5253 |
+
cur = cur.filter(function(id) {
|
5254 |
+
return obj.parents.indexOf(id) === -1;
|
5255 |
+
});
|
5256 |
+
}
|
5257 |
+
|
5258 |
+
this._data[ t ? 'core' : 'checkbox' ].selected = cur;
|
5259 |
+
}, this));
|
5260 |
+
}
|
5261 |
+
if(this.settings.checkbox.cascade.indexOf('up') !== -1) {
|
5262 |
+
this.element
|
5263 |
+
.on('delete_node.jstree', $.proxy(function (e, data) {
|
5264 |
+
// apply up (whole handler)
|
5265 |
+
var p = this.get_node(data.parent),
|
5266 |
+
m = this._model.data,
|
5267 |
+
i, j, c, tmp, t = this.settings.checkbox.tie_selection;
|
5268 |
+
while(p && p.id !== $.jstree.root && !p.state[ t ? 'selected' : 'checked' ]) {
|
5269 |
+
c = 0;
|
5270 |
+
for(i = 0, j = p.children.length; i < j; i++) {
|
5271 |
+
c += m[p.children[i]].state[ t ? 'selected' : 'checked' ];
|
5272 |
+
}
|
5273 |
+
if(j > 0 && c === j) {
|
5274 |
+
p.state[ t ? 'selected' : 'checked' ] = true;
|
5275 |
+
this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id);
|
5276 |
+
tmp = this.get_node(p, true);
|
5277 |
+
if(tmp && tmp.length) {
|
5278 |
+
tmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked');
|
5279 |
+
}
|
5280 |
+
}
|
5281 |
+
else {
|
5282 |
+
break;
|
5283 |
+
}
|
5284 |
+
p = this.get_node(p.parent);
|
5285 |
+
}
|
5286 |
+
}, this))
|
5287 |
+
.on('move_node.jstree', $.proxy(function (e, data) {
|
5288 |
+
// apply up (whole handler)
|
5289 |
+
var is_multi = data.is_multi,
|
5290 |
+
old_par = data.old_parent,
|
5291 |
+
new_par = this.get_node(data.parent),
|
5292 |
+
m = this._model.data,
|
5293 |
+
p, c, i, j, tmp, t = this.settings.checkbox.tie_selection;
|
5294 |
+
if(!is_multi) {
|
5295 |
+
p = this.get_node(old_par);
|
5296 |
+
while(p && p.id !== $.jstree.root && !p.state[ t ? 'selected' : 'checked' ]) {
|
5297 |
+
c = 0;
|
5298 |
+
for(i = 0, j = p.children.length; i < j; i++) {
|
5299 |
+
c += m[p.children[i]].state[ t ? 'selected' : 'checked' ];
|
5300 |
+
}
|
5301 |
+
if(j > 0 && c === j) {
|
5302 |
+
p.state[ t ? 'selected' : 'checked' ] = true;
|
5303 |
+
this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id);
|
5304 |
+
tmp = this.get_node(p, true);
|
5305 |
+
if(tmp && tmp.length) {
|
5306 |
+
tmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked');
|
5307 |
+
}
|
5308 |
+
}
|
5309 |
+
else {
|
5310 |
+
break;
|
5311 |
+
}
|
5312 |
+
p = this.get_node(p.parent);
|
5313 |
+
}
|
5314 |
+
}
|
5315 |
+
p = new_par;
|
5316 |
+
while(p && p.id !== $.jstree.root) {
|
5317 |
+
c = 0;
|
5318 |
+
for(i = 0, j = p.children.length; i < j; i++) {
|
5319 |
+
c += m[p.children[i]].state[ t ? 'selected' : 'checked' ];
|
5320 |
+
}
|
5321 |
+
if(c === j) {
|
5322 |
+
if(!p.state[ t ? 'selected' : 'checked' ]) {
|
5323 |
+
p.state[ t ? 'selected' : 'checked' ] = true;
|
5324 |
+
this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id);
|
5325 |
+
tmp = this.get_node(p, true);
|
5326 |
+
if(tmp && tmp.length) {
|
5327 |
+
tmp.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked');
|
5328 |
+
}
|
5329 |
+
}
|
5330 |
+
}
|
5331 |
+
else {
|
5332 |
+
if(p.state[ t ? 'selected' : 'checked' ]) {
|
5333 |
+
p.state[ t ? 'selected' : 'checked' ] = false;
|
5334 |
+
this._data[ t ? 'core' : 'checkbox' ].selected = $.vakata.array_remove_item(this._data[ t ? 'core' : 'checkbox' ].selected, p.id);
|
5335 |
+
tmp = this.get_node(p, true);
|
5336 |
+
if(tmp && tmp.length) {
|
5337 |
+
tmp.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked');
|
5338 |
+
}
|
5339 |
+
}
|
5340 |
+
else {
|
5341 |
+
break;
|
5342 |
+
}
|
5343 |
+
}
|
5344 |
+
p = this.get_node(p.parent);
|
5345 |
+
}
|
5346 |
+
}, this));
|
5347 |
+
}
|
5348 |
+
};
|
5349 |
+
/**
|
5350 |
+
* get an array of all nodes whose state is "undetermined"
|
5351 |
+
* @name get_undetermined([full])
|
5352 |
+
* @param {boolean} full: if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned
|
5353 |
+
* @return {Array}
|
5354 |
+
* @plugin checkbox
|
5355 |
+
*/
|
5356 |
+
this.get_undetermined = function (full) {
|
5357 |
+
if (this.settings.checkbox.cascade.indexOf('undetermined') === -1) {
|
5358 |
+
return [];
|
5359 |
+
}
|
5360 |
+
var i, j, k, l, o = {}, m = this._model.data, t = this.settings.checkbox.tie_selection, s = this._data[ t ? 'core' : 'checkbox' ].selected, p = [], tt = this, r = [];
|
5361 |
+
for(i = 0, j = s.length; i < j; i++) {
|
5362 |
+
if(m[s[i]] && m[s[i]].parents) {
|
5363 |
+
for(k = 0, l = m[s[i]].parents.length; k < l; k++) {
|
5364 |
+
if(o[m[s[i]].parents[k]] !== undefined) {
|
5365 |
+
break;
|
5366 |
+
}
|
5367 |
+
if(m[s[i]].parents[k] !== $.jstree.root) {
|
5368 |
+
o[m[s[i]].parents[k]] = true;
|
5369 |
+
p.push(m[s[i]].parents[k]);
|
5370 |
+
}
|
5371 |
+
}
|
5372 |
+
}
|
5373 |
+
}
|
5374 |
+
// attempt for server side undetermined state
|
5375 |
+
this.element.find('.jstree-closed').not(':has(.jstree-children)')
|
5376 |
+
.each(function () {
|
5377 |
+
var tmp = tt.get_node(this), tmp2;
|
5378 |
+
|
5379 |
+
if(!tmp) { return; }
|
5380 |
+
|
5381 |
+
if(!tmp.state.loaded) {
|
5382 |
+
if(tmp.original && tmp.original.state && tmp.original.state.undetermined && tmp.original.state.undetermined === true) {
|
5383 |
+
if(o[tmp.id] === undefined && tmp.id !== $.jstree.root) {
|
5384 |
+
o[tmp.id] = true;
|
5385 |
+
p.push(tmp.id);
|
5386 |
+
}
|
5387 |
+
for(k = 0, l = tmp.parents.length; k < l; k++) {
|
5388 |
+
if(o[tmp.parents[k]] === undefined && tmp.parents[k] !== $.jstree.root) {
|
5389 |
+
o[tmp.parents[k]] = true;
|
5390 |
+
p.push(tmp.parents[k]);
|
5391 |
+
}
|
5392 |
+
}
|
5393 |
+
}
|
5394 |
+
}
|
5395 |
+
else {
|
5396 |
+
for(i = 0, j = tmp.children_d.length; i < j; i++) {
|
5397 |
+
tmp2 = m[tmp.children_d[i]];
|
5398 |
+
if(!tmp2.state.loaded && tmp2.original && tmp2.original.state && tmp2.original.state.undetermined && tmp2.original.state.undetermined === true) {
|
5399 |
+
if(o[tmp2.id] === undefined && tmp2.id !== $.jstree.root) {
|
5400 |
+
o[tmp2.id] = true;
|
5401 |
+
p.push(tmp2.id);
|
5402 |
+
}
|
5403 |
+
for(k = 0, l = tmp2.parents.length; k < l; k++) {
|
5404 |
+
if(o[tmp2.parents[k]] === undefined && tmp2.parents[k] !== $.jstree.root) {
|
5405 |
+
o[tmp2.parents[k]] = true;
|
5406 |
+
p.push(tmp2.parents[k]);
|
5407 |
+
}
|
5408 |
+
}
|
5409 |
+
}
|
5410 |
+
}
|
5411 |
+
}
|
5412 |
+
});
|
5413 |
+
for (i = 0, j = p.length; i < j; i++) {
|
5414 |
+
if(!m[p[i]].state[ t ? 'selected' : 'checked' ]) {
|
5415 |
+
r.push(full ? m[p[i]] : p[i]);
|
5416 |
+
}
|
5417 |
+
}
|
5418 |
+
return r;
|
5419 |
+
};
|
5420 |
+
/**
|
5421 |
+
* set the undetermined state where and if necessary. Used internally.
|
5422 |
+
* @private
|
5423 |
+
* @name _undetermined()
|
5424 |
+
* @plugin checkbox
|
5425 |
+
*/
|
5426 |
+
this._undetermined = function () {
|
5427 |
+
if(this.element === null) { return; }
|
5428 |
+
var p = this.get_undetermined(false), i, j, s;
|
5429 |
+
|
5430 |
+
this.element.find('.jstree-undetermined').removeClass('jstree-undetermined');
|
5431 |
+
for (i = 0, j = p.length; i < j; i++) {
|
5432 |
+
s = this.get_node(p[i], true);
|
5433 |
+
if(s && s.length) {
|
5434 |
+
s.children('.jstree-anchor').children('.jstree-checkbox').addClass('jstree-undetermined');
|
5435 |
+
}
|
5436 |
+
}
|
5437 |
+
};
|
5438 |
+
this.redraw_node = function(obj, deep, is_callback, force_render) {
|
5439 |
+
obj = parent.redraw_node.apply(this, arguments);
|
5440 |
+
if(obj) {
|
5441 |
+
var i, j, tmp = null, icon = null;
|
5442 |
+
for(i = 0, j = obj.childNodes.length; i < j; i++) {
|
5443 |
+
if(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf("jstree-anchor") !== -1) {
|
5444 |
+
tmp = obj.childNodes[i];
|
5445 |
+
break;
|
5446 |
+
}
|
5447 |
+
}
|
5448 |
+
if(tmp) {
|
5449 |
+
if(!this.settings.checkbox.tie_selection && this._model.data[obj.id].state.checked) { tmp.className += ' jstree-checked'; }
|
5450 |
+
icon = _i.cloneNode(false);
|
5451 |
+
if(this._model.data[obj.id].state.checkbox_disabled) { icon.className += ' jstree-checkbox-disabled'; }
|
5452 |
+
tmp.insertBefore(icon, tmp.childNodes[0]);
|
5453 |
+
}
|
5454 |
+
}
|
5455 |
+
if(!is_callback && this.settings.checkbox.cascade.indexOf('undetermined') !== -1) {
|
5456 |
+
if(this._data.checkbox.uto) { clearTimeout(this._data.checkbox.uto); }
|
5457 |
+
this._data.checkbox.uto = setTimeout($.proxy(this._undetermined, this), 50);
|
5458 |
+
}
|
5459 |
+
return obj;
|
5460 |
+
};
|
5461 |
+
/**
|
5462 |
+
* show the node checkbox icons
|
5463 |
+
* @name show_checkboxes()
|
5464 |
+
* @plugin checkbox
|
5465 |
+
*/
|
5466 |
+
this.show_checkboxes = function () { this._data.core.themes.checkboxes = true; this.get_container_ul().removeClass("jstree-no-checkboxes"); };
|
5467 |
+
/**
|
5468 |
+
* hide the node checkbox icons
|
5469 |
+
* @name hide_checkboxes()
|
5470 |
+
* @plugin checkbox
|
5471 |
+
*/
|
5472 |
+
this.hide_checkboxes = function () { this._data.core.themes.checkboxes = false; this.get_container_ul().addClass("jstree-no-checkboxes"); };
|
5473 |
+
/**
|
5474 |
+
* toggle the node icons
|
5475 |
+
* @name toggle_checkboxes()
|
5476 |
+
* @plugin checkbox
|
5477 |
+
*/
|
5478 |
+
this.toggle_checkboxes = function () { if(this._data.core.themes.checkboxes) { this.hide_checkboxes(); } else { this.show_checkboxes(); } };
|
5479 |
+
/**
|
5480 |
+
* checks if a node is in an undetermined state
|
5481 |
+
* @name is_undetermined(obj)
|
5482 |
+
* @param {mixed} obj
|
5483 |
+
* @return {Boolean}
|
5484 |
+
*/
|
5485 |
+
this.is_undetermined = function (obj) {
|
5486 |
+
obj = this.get_node(obj);
|
5487 |
+
var s = this.settings.checkbox.cascade, i, j, t = this.settings.checkbox.tie_selection, d = this._data[ t ? 'core' : 'checkbox' ].selected, m = this._model.data;
|
5488 |
+
if(!obj || obj.state[ t ? 'selected' : 'checked' ] === true || s.indexOf('undetermined') === -1 || (s.indexOf('down') === -1 && s.indexOf('up') === -1)) {
|
5489 |
+
return false;
|
5490 |
+
}
|
5491 |
+
if(!obj.state.loaded && obj.original.state.undetermined === true) {
|
5492 |
+
return true;
|
5493 |
+
}
|
5494 |
+
for(i = 0, j = obj.children_d.length; i < j; i++) {
|
5495 |
+
if($.inArray(obj.children_d[i], d) !== -1 || (!m[obj.children_d[i]].state.loaded && m[obj.children_d[i]].original.state.undetermined)) {
|
5496 |
+
return true;
|
5497 |
+
}
|
5498 |
+
}
|
5499 |
+
return false;
|
5500 |
+
};
|
5501 |
+
/**
|
5502 |
+
* disable a node's checkbox
|
5503 |
+
* @name disable_checkbox(obj)
|
5504 |
+
* @param {mixed} obj an array can be used too
|
5505 |
+
* @trigger disable_checkbox.jstree
|
5506 |
+
* @plugin checkbox
|
5507 |
+
*/
|
5508 |
+
this.disable_checkbox = function (obj) {
|
5509 |
+
var t1, t2, dom;
|
5510 |
+
if($.isArray(obj)) {
|
5511 |
+
obj = obj.slice();
|
5512 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
5513 |
+
this.disable_checkbox(obj[t1]);
|
5514 |
+
}
|
5515 |
+
return true;
|
5516 |
+
}
|
5517 |
+
obj = this.get_node(obj);
|
5518 |
+
if(!obj || obj.id === $.jstree.root) {
|
5519 |
+
return false;
|
5520 |
+
}
|
5521 |
+
dom = this.get_node(obj, true);
|
5522 |
+
if(!obj.state.checkbox_disabled) {
|
5523 |
+
obj.state.checkbox_disabled = true;
|
5524 |
+
if(dom && dom.length) {
|
5525 |
+
dom.children('.jstree-anchor').children('.jstree-checkbox').addClass('jstree-checkbox-disabled');
|
5526 |
+
}
|
5527 |
+
/**
|
5528 |
+
* triggered when an node's checkbox is disabled
|
5529 |
+
* @event
|
5530 |
+
* @name disable_checkbox.jstree
|
5531 |
+
* @param {Object} node
|
5532 |
+
* @plugin checkbox
|
5533 |
+
*/
|
5534 |
+
this.trigger('disable_checkbox', { 'node' : obj });
|
5535 |
+
}
|
5536 |
+
};
|
5537 |
+
/**
|
5538 |
+
* enable a node's checkbox
|
5539 |
+
* @name disable_checkbox(obj)
|
5540 |
+
* @param {mixed} obj an array can be used too
|
5541 |
+
* @trigger enable_checkbox.jstree
|
5542 |
+
* @plugin checkbox
|
5543 |
+
*/
|
5544 |
+
this.enable_checkbox = function (obj) {
|
5545 |
+
var t1, t2, dom;
|
5546 |
+
if($.isArray(obj)) {
|
5547 |
+
obj = obj.slice();
|
5548 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
5549 |
+
this.enable_checkbox(obj[t1]);
|
5550 |
+
}
|
5551 |
+
return true;
|
5552 |
+
}
|
5553 |
+
obj = this.get_node(obj);
|
5554 |
+
if(!obj || obj.id === $.jstree.root) {
|
5555 |
+
return false;
|
5556 |
+
}
|
5557 |
+
dom = this.get_node(obj, true);
|
5558 |
+
if(obj.state.checkbox_disabled) {
|
5559 |
+
obj.state.checkbox_disabled = false;
|
5560 |
+
if(dom && dom.length) {
|
5561 |
+
dom.children('.jstree-anchor').children('.jstree-checkbox').removeClass('jstree-checkbox-disabled');
|
5562 |
+
}
|
5563 |
+
/**
|
5564 |
+
* triggered when an node's checkbox is enabled
|
5565 |
+
* @event
|
5566 |
+
* @name enable_checkbox.jstree
|
5567 |
+
* @param {Object} node
|
5568 |
+
* @plugin checkbox
|
5569 |
+
*/
|
5570 |
+
this.trigger('enable_checkbox', { 'node' : obj });
|
5571 |
+
}
|
5572 |
+
};
|
5573 |
+
|
5574 |
+
this.activate_node = function (obj, e) {
|
5575 |
+
if($(e.target).hasClass('jstree-checkbox-disabled')) {
|
5576 |
+
return false;
|
5577 |
+
}
|
5578 |
+
if(this.settings.checkbox.tie_selection && (this.settings.checkbox.whole_node || $(e.target).hasClass('jstree-checkbox'))) {
|
5579 |
+
e.ctrlKey = true;
|
5580 |
+
}
|
5581 |
+
if(this.settings.checkbox.tie_selection || (!this.settings.checkbox.whole_node && !$(e.target).hasClass('jstree-checkbox'))) {
|
5582 |
+
return parent.activate_node.call(this, obj, e);
|
5583 |
+
}
|
5584 |
+
if(this.is_disabled(obj)) {
|
5585 |
+
return false;
|
5586 |
+
}
|
5587 |
+
if(this.is_checked(obj)) {
|
5588 |
+
this.uncheck_node(obj, e);
|
5589 |
+
}
|
5590 |
+
else {
|
5591 |
+
this.check_node(obj, e);
|
5592 |
+
}
|
5593 |
+
this.trigger('activate_node', { 'node' : this.get_node(obj) });
|
5594 |
+
};
|
5595 |
+
|
5596 |
+
/**
|
5597 |
+
* Cascades checked state to a node and all its descendants. This function does NOT affect hidden and disabled nodes (or their descendants).
|
5598 |
+
* However if these unaffected nodes are already selected their ids will be included in the returned array.
|
5599 |
+
* @private
|
5600 |
+
* @param {string} id the node ID
|
5601 |
+
* @param {bool} checkedState should the nodes be checked or not
|
5602 |
+
* @returns {Array} Array of all node id's (in this tree branch) that are checked.
|
5603 |
+
*/
|
5604 |
+
this._cascade_new_checked_state = function (id, checkedState) {
|
5605 |
+
var self = this;
|
5606 |
+
var t = this.settings.checkbox.tie_selection;
|
5607 |
+
var node = this._model.data[id];
|
5608 |
+
var selectedNodeIds = [];
|
5609 |
+
var selectedChildrenIds = [], i, j, selectedChildIds;
|
5610 |
+
|
5611 |
+
if (
|
5612 |
+
(this.settings.checkbox.cascade_to_disabled || !node.state.disabled) &&
|
5613 |
+
(this.settings.checkbox.cascade_to_hidden || !node.state.hidden)
|
5614 |
+
) {
|
5615 |
+
//First try and check/uncheck the children
|
5616 |
+
if (node.children) {
|
5617 |
+
for (i = 0, j = node.children.length; i < j; i++) {
|
5618 |
+
var childId = node.children[i];
|
5619 |
+
selectedChildIds = self._cascade_new_checked_state(childId, checkedState);
|
5620 |
+
selectedNodeIds = selectedNodeIds.concat(selectedChildIds);
|
5621 |
+
if (selectedChildIds.indexOf(childId) > -1) {
|
5622 |
+
selectedChildrenIds.push(childId);
|
5623 |
+
}
|
5624 |
+
}
|
5625 |
+
}
|
5626 |
+
|
5627 |
+
var dom = self.get_node(node, true);
|
5628 |
+
|
5629 |
+
//A node's state is undetermined if some but not all of it's children are checked/selected .
|
5630 |
+
var undetermined = selectedChildrenIds.length > 0 && selectedChildrenIds.length < node.children.length;
|
5631 |
+
|
5632 |
+
if(node.original && node.original.state && node.original.state.undetermined) {
|
5633 |
+
node.original.state.undetermined = undetermined;
|
5634 |
+
}
|
5635 |
+
|
5636 |
+
//If a node is undetermined then remove selected class
|
5637 |
+
if (undetermined) {
|
5638 |
+
node.state[ t ? 'selected' : 'checked' ] = false;
|
5639 |
+
dom.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked');
|
5640 |
+
}
|
5641 |
+
//Otherwise, if the checkedState === true (i.e. the node is being checked now) and all of the node's children are checked (if it has any children),
|
5642 |
+
//check the node and style it correctly.
|
5643 |
+
else if (checkedState && selectedChildrenIds.length === node.children.length) {
|
5644 |
+
node.state[ t ? 'selected' : 'checked' ] = checkedState;
|
5645 |
+
selectedNodeIds.push(node.id);
|
5646 |
+
|
5647 |
+
dom.attr('aria-selected', true).children('.jstree-anchor').addClass(t ? 'jstree-clicked' : 'jstree-checked');
|
5648 |
+
}
|
5649 |
+
else {
|
5650 |
+
node.state[ t ? 'selected' : 'checked' ] = false;
|
5651 |
+
dom.attr('aria-selected', false).children('.jstree-anchor').removeClass(t ? 'jstree-clicked' : 'jstree-checked');
|
5652 |
+
}
|
5653 |
+
}
|
5654 |
+
else {
|
5655 |
+
selectedChildIds = this.get_checked_descendants(id);
|
5656 |
+
|
5657 |
+
if (node.state[ t ? 'selected' : 'checked' ]) {
|
5658 |
+
selectedChildIds.push(node.id);
|
5659 |
+
}
|
5660 |
+
|
5661 |
+
selectedNodeIds = selectedNodeIds.concat(selectedChildIds);
|
5662 |
+
}
|
5663 |
+
|
5664 |
+
return selectedNodeIds;
|
5665 |
+
};
|
5666 |
+
|
5667 |
+
/**
|
5668 |
+
* Gets ids of nodes selected in branch (of tree) specified by id (does not include the node specified by id)
|
5669 |
+
* @name get_checked_descendants(obj)
|
5670 |
+
* @param {string} id the node ID
|
5671 |
+
* @return {Array} array of IDs
|
5672 |
+
* @plugin checkbox
|
5673 |
+
*/
|
5674 |
+
this.get_checked_descendants = function (id) {
|
5675 |
+
var self = this;
|
5676 |
+
var t = self.settings.checkbox.tie_selection;
|
5677 |
+
var node = self._model.data[id];
|
5678 |
+
|
5679 |
+
return node.children_d.filter(function(_id) {
|
5680 |
+
return self._model.data[_id].state[ t ? 'selected' : 'checked' ];
|
5681 |
+
});
|
5682 |
+
};
|
5683 |
+
|
5684 |
+
/**
|
5685 |
+
* check a node (only if tie_selection in checkbox settings is false, otherwise select_node will be called internally)
|
5686 |
+
* @name check_node(obj)
|
5687 |
+
* @param {mixed} obj an array can be used to check multiple nodes
|
5688 |
+
* @trigger check_node.jstree
|
5689 |
+
* @plugin checkbox
|
5690 |
+
*/
|
5691 |
+
this.check_node = function (obj, e) {
|
5692 |
+
if(this.settings.checkbox.tie_selection) { return this.select_node(obj, false, true, e); }
|
5693 |
+
var dom, t1, t2, th;
|
5694 |
+
if($.isArray(obj)) {
|
5695 |
+
obj = obj.slice();
|
5696 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
5697 |
+
this.check_node(obj[t1], e);
|
5698 |
+
}
|
5699 |
+
return true;
|
5700 |
+
}
|
5701 |
+
obj = this.get_node(obj);
|
5702 |
+
if(!obj || obj.id === $.jstree.root) {
|
5703 |
+
return false;
|
5704 |
+
}
|
5705 |
+
dom = this.get_node(obj, true);
|
5706 |
+
if(!obj.state.checked) {
|
5707 |
+
obj.state.checked = true;
|
5708 |
+
this._data.checkbox.selected.push(obj.id);
|
5709 |
+
if(dom && dom.length) {
|
5710 |
+
dom.children('.jstree-anchor').addClass('jstree-checked');
|
5711 |
+
}
|
5712 |
+
/**
|
5713 |
+
* triggered when an node is checked (only if tie_selection in checkbox settings is false)
|
5714 |
+
* @event
|
5715 |
+
* @name check_node.jstree
|
5716 |
+
* @param {Object} node
|
5717 |
+
* @param {Array} selected the current selection
|
5718 |
+
* @param {Object} event the event (if any) that triggered this check_node
|
5719 |
+
* @plugin checkbox
|
5720 |
+
*/
|
5721 |
+
this.trigger('check_node', { 'node' : obj, 'selected' : this._data.checkbox.selected, 'event' : e });
|
5722 |
+
}
|
5723 |
+
};
|
5724 |
+
/**
|
5725 |
+
* uncheck a node (only if tie_selection in checkbox settings is false, otherwise deselect_node will be called internally)
|
5726 |
+
* @name uncheck_node(obj)
|
5727 |
+
* @param {mixed} obj an array can be used to uncheck multiple nodes
|
5728 |
+
* @trigger uncheck_node.jstree
|
5729 |
+
* @plugin checkbox
|
5730 |
+
*/
|
5731 |
+
this.uncheck_node = function (obj, e) {
|
5732 |
+
if(this.settings.checkbox.tie_selection) { return this.deselect_node(obj, false, e); }
|
5733 |
+
var t1, t2, dom;
|
5734 |
+
if($.isArray(obj)) {
|
5735 |
+
obj = obj.slice();
|
5736 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
5737 |
+
this.uncheck_node(obj[t1], e);
|
5738 |
+
}
|
5739 |
+
return true;
|
5740 |
+
}
|
5741 |
+
obj = this.get_node(obj);
|
5742 |
+
if(!obj || obj.id === $.jstree.root) {
|
5743 |
+
return false;
|
5744 |
+
}
|
5745 |
+
dom = this.get_node(obj, true);
|
5746 |
+
if(obj.state.checked) {
|
5747 |
+
obj.state.checked = false;
|
5748 |
+
this._data.checkbox.selected = $.vakata.array_remove_item(this._data.checkbox.selected, obj.id);
|
5749 |
+
if(dom.length) {
|
5750 |
+
dom.children('.jstree-anchor').removeClass('jstree-checked');
|
5751 |
+
}
|
5752 |
+
/**
|
5753 |
+
* triggered when an node is unchecked (only if tie_selection in checkbox settings is false)
|
5754 |
+
* @event
|
5755 |
+
* @name uncheck_node.jstree
|
5756 |
+
* @param {Object} node
|
5757 |
+
* @param {Array} selected the current selection
|
5758 |
+
* @param {Object} event the event (if any) that triggered this uncheck_node
|
5759 |
+
* @plugin checkbox
|
5760 |
+
*/
|
5761 |
+
this.trigger('uncheck_node', { 'node' : obj, 'selected' : this._data.checkbox.selected, 'event' : e });
|
5762 |
+
}
|
5763 |
+
};
|
5764 |
+
|
5765 |
+
/**
|
5766 |
+
* checks all nodes in the tree (only if tie_selection in checkbox settings is false, otherwise select_all will be called internally)
|
5767 |
+
* @name check_all()
|
5768 |
+
* @trigger check_all.jstree, changed.jstree
|
5769 |
+
* @plugin checkbox
|
5770 |
+
*/
|
5771 |
+
this.check_all = function () {
|
5772 |
+
if(this.settings.checkbox.tie_selection) { return this.select_all(); }
|
5773 |
+
var tmp = this._data.checkbox.selected.concat([]), i, j;
|
5774 |
+
this._data.checkbox.selected = this._model.data[$.jstree.root].children_d.concat();
|
5775 |
+
for(i = 0, j = this._data.checkbox.selected.length; i < j; i++) {
|
5776 |
+
if(this._model.data[this._data.checkbox.selected[i]]) {
|
5777 |
+
this._model.data[this._data.checkbox.selected[i]].state.checked = true;
|
5778 |
+
}
|
5779 |
+
}
|
5780 |
+
this.redraw(true);
|
5781 |
+
/**
|
5782 |
+
* triggered when all nodes are checked (only if tie_selection in checkbox settings is false)
|
5783 |
+
* @event
|
5784 |
+
* @name check_all.jstree
|
5785 |
+
* @param {Array} selected the current selection
|
5786 |
+
* @plugin checkbox
|
5787 |
+
*/
|
5788 |
+
this.trigger('check_all', { 'selected' : this._data.checkbox.selected });
|
5789 |
+
};
|
5790 |
+
/**
|
5791 |
+
* uncheck all checked nodes (only if tie_selection in checkbox settings is false, otherwise deselect_all will be called internally)
|
5792 |
+
* @name uncheck_all()
|
5793 |
+
* @trigger uncheck_all.jstree
|
5794 |
+
* @plugin checkbox
|
5795 |
+
*/
|
5796 |
+
this.uncheck_all = function () {
|
5797 |
+
if(this.settings.checkbox.tie_selection) { return this.deselect_all(); }
|
5798 |
+
var tmp = this._data.checkbox.selected.concat([]), i, j;
|
5799 |
+
for(i = 0, j = this._data.checkbox.selected.length; i < j; i++) {
|
5800 |
+
if(this._model.data[this._data.checkbox.selected[i]]) {
|
5801 |
+
this._model.data[this._data.checkbox.selected[i]].state.checked = false;
|
5802 |
+
}
|
5803 |
+
}
|
5804 |
+
this._data.checkbox.selected = [];
|
5805 |
+
this.element.find('.jstree-checked').removeClass('jstree-checked');
|
5806 |
+
/**
|
5807 |
+
* triggered when all nodes are unchecked (only if tie_selection in checkbox settings is false)
|
5808 |
+
* @event
|
5809 |
+
* @name uncheck_all.jstree
|
5810 |
+
* @param {Object} node the previous selection
|
5811 |
+
* @param {Array} selected the current selection
|
5812 |
+
* @plugin checkbox
|
5813 |
+
*/
|
5814 |
+
this.trigger('uncheck_all', { 'selected' : this._data.checkbox.selected, 'node' : tmp });
|
5815 |
+
};
|
5816 |
+
/**
|
5817 |
+
* checks if a node is checked (if tie_selection is on in the settings this function will return the same as is_selected)
|
5818 |
+
* @name is_checked(obj)
|
5819 |
+
* @param {mixed} obj
|
5820 |
+
* @return {Boolean}
|
5821 |
+
* @plugin checkbox
|
5822 |
+
*/
|
5823 |
+
this.is_checked = function (obj) {
|
5824 |
+
if(this.settings.checkbox.tie_selection) { return this.is_selected(obj); }
|
5825 |
+
obj = this.get_node(obj);
|
5826 |
+
if(!obj || obj.id === $.jstree.root) { return false; }
|
5827 |
+
return obj.state.checked;
|
5828 |
+
};
|
5829 |
+
/**
|
5830 |
+
* get an array of all checked nodes (if tie_selection is on in the settings this function will return the same as get_selected)
|
5831 |
+
* @name get_checked([full])
|
5832 |
+
* @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned
|
5833 |
+
* @return {Array}
|
5834 |
+
* @plugin checkbox
|
5835 |
+
*/
|
5836 |
+
this.get_checked = function (full) {
|
5837 |
+
if(this.settings.checkbox.tie_selection) { return this.get_selected(full); }
|
5838 |
+
return full ? $.map(this._data.checkbox.selected, $.proxy(function (i) { return this.get_node(i); }, this)) : this._data.checkbox.selected;
|
5839 |
+
};
|
5840 |
+
/**
|
5841 |
+
* get an array of all top level checked nodes (ignoring children of checked nodes) (if tie_selection is on in the settings this function will return the same as get_top_selected)
|
5842 |
+
* @name get_top_checked([full])
|
5843 |
+
* @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned
|
5844 |
+
* @return {Array}
|
5845 |
+
* @plugin checkbox
|
5846 |
+
*/
|
5847 |
+
this.get_top_checked = function (full) {
|
5848 |
+
if(this.settings.checkbox.tie_selection) { return this.get_top_selected(full); }
|
5849 |
+
var tmp = this.get_checked(true),
|
5850 |
+
obj = {}, i, j, k, l;
|
5851 |
+
for(i = 0, j = tmp.length; i < j; i++) {
|
5852 |
+
obj[tmp[i].id] = tmp[i];
|
5853 |
+
}
|
5854 |
+
for(i = 0, j = tmp.length; i < j; i++) {
|
5855 |
+
for(k = 0, l = tmp[i].children_d.length; k < l; k++) {
|
5856 |
+
if(obj[tmp[i].children_d[k]]) {
|
5857 |
+
delete obj[tmp[i].children_d[k]];
|
5858 |
+
}
|
5859 |
+
}
|
5860 |
+
}
|
5861 |
+
tmp = [];
|
5862 |
+
for(i in obj) {
|
5863 |
+
if(obj.hasOwnProperty(i)) {
|
5864 |
+
tmp.push(i);
|
5865 |
+
}
|
5866 |
+
}
|
5867 |
+
return full ? $.map(tmp, $.proxy(function (i) { return this.get_node(i); }, this)) : tmp;
|
5868 |
+
};
|
5869 |
+
/**
|
5870 |
+
* get an array of all bottom level checked nodes (ignoring selected parents) (if tie_selection is on in the settings this function will return the same as get_bottom_selected)
|
5871 |
+
* @name get_bottom_checked([full])
|
5872 |
+
* @param {mixed} full if set to `true` the returned array will consist of the full node objects, otherwise - only IDs will be returned
|
5873 |
+
* @return {Array}
|
5874 |
+
* @plugin checkbox
|
5875 |
+
*/
|
5876 |
+
this.get_bottom_checked = function (full) {
|
5877 |
+
if(this.settings.checkbox.tie_selection) { return this.get_bottom_selected(full); }
|
5878 |
+
var tmp = this.get_checked(true),
|
5879 |
+
obj = [], i, j;
|
5880 |
+
for(i = 0, j = tmp.length; i < j; i++) {
|
5881 |
+
if(!tmp[i].children.length) {
|
5882 |
+
obj.push(tmp[i].id);
|
5883 |
+
}
|
5884 |
+
}
|
5885 |
+
return full ? $.map(obj, $.proxy(function (i) { return this.get_node(i); }, this)) : obj;
|
5886 |
+
};
|
5887 |
+
this.load_node = function (obj, callback) {
|
5888 |
+
var k, l, i, j, c, tmp;
|
5889 |
+
if(!$.isArray(obj) && !this.settings.checkbox.tie_selection) {
|
5890 |
+
tmp = this.get_node(obj);
|
5891 |
+
if(tmp && tmp.state.loaded) {
|
5892 |
+
for(k = 0, l = tmp.children_d.length; k < l; k++) {
|
5893 |
+
if(this._model.data[tmp.children_d[k]].state.checked) {
|
5894 |
+
c = true;
|
5895 |
+
this._data.checkbox.selected = $.vakata.array_remove_item(this._data.checkbox.selected, tmp.children_d[k]);
|
5896 |
+
}
|
5897 |
+
}
|
5898 |
+
}
|
5899 |
+
}
|
5900 |
+
return parent.load_node.apply(this, arguments);
|
5901 |
+
};
|
5902 |
+
this.get_state = function () {
|
5903 |
+
var state = parent.get_state.apply(this, arguments);
|
5904 |
+
if(this.settings.checkbox.tie_selection) { return state; }
|
5905 |
+
state.checkbox = this._data.checkbox.selected.slice();
|
5906 |
+
return state;
|
5907 |
+
};
|
5908 |
+
this.set_state = function (state, callback) {
|
5909 |
+
var res = parent.set_state.apply(this, arguments);
|
5910 |
+
if(res && state.checkbox) {
|
5911 |
+
if(!this.settings.checkbox.tie_selection) {
|
5912 |
+
this.uncheck_all();
|
5913 |
+
var _this = this;
|
5914 |
+
$.each(state.checkbox, function (i, v) {
|
5915 |
+
_this.check_node(v);
|
5916 |
+
});
|
5917 |
+
}
|
5918 |
+
delete state.checkbox;
|
5919 |
+
this.set_state(state, callback);
|
5920 |
+
return false;
|
5921 |
+
}
|
5922 |
+
return res;
|
5923 |
+
};
|
5924 |
+
this.refresh = function (skip_loading, forget_state) {
|
5925 |
+
if(!this.settings.checkbox.tie_selection) {
|
5926 |
+
this._data.checkbox.selected = [];
|
5927 |
+
}
|
5928 |
+
return parent.refresh.apply(this, arguments);
|
5929 |
+
};
|
5930 |
+
};
|
5931 |
+
|
5932 |
+
// include the checkbox plugin by default
|
5933 |
+
// $.jstree.defaults.plugins.push("checkbox");
|
5934 |
+
|
5935 |
+
|
5936 |
+
/**
|
5937 |
+
* ### Conditionalselect plugin
|
5938 |
+
*
|
5939 |
+
* This plugin allows defining a callback to allow or deny node selection by user input (activate node method).
|
5940 |
+
*/
|
5941 |
+
|
5942 |
+
/**
|
5943 |
+
* a callback (function) which is invoked in the instance's scope and receives two arguments - the node and the event that triggered the `activate_node` call. Returning false prevents working with the node, returning true allows invoking activate_node. Defaults to returning `true`.
|
5944 |
+
* @name $.jstree.defaults.checkbox.visible
|
5945 |
+
* @plugin checkbox
|
5946 |
+
*/
|
5947 |
+
$.jstree.defaults.conditionalselect = function () { return true; };
|
5948 |
+
$.jstree.plugins.conditionalselect = function (options, parent) {
|
5949 |
+
// own function
|
5950 |
+
this.activate_node = function (obj, e) {
|
5951 |
+
if(this.settings.conditionalselect.call(this, this.get_node(obj), e)) {
|
5952 |
+
return parent.activate_node.call(this, obj, e);
|
5953 |
+
}
|
5954 |
+
};
|
5955 |
+
};
|
5956 |
+
|
5957 |
+
|
5958 |
+
/**
|
5959 |
+
* ### Contextmenu plugin
|
5960 |
+
*
|
5961 |
+
* Shows a context menu when a node is right-clicked.
|
5962 |
+
*/
|
5963 |
+
|
5964 |
+
/**
|
5965 |
+
* stores all defaults for the contextmenu plugin
|
5966 |
+
* @name $.jstree.defaults.contextmenu
|
5967 |
+
* @plugin contextmenu
|
5968 |
+
*/
|
5969 |
+
$.jstree.defaults.contextmenu = {
|
5970 |
+
/**
|
5971 |
+
* a boolean indicating if the node should be selected when the context menu is invoked on it. Defaults to `true`.
|
5972 |
+
* @name $.jstree.defaults.contextmenu.select_node
|
5973 |
+
* @plugin contextmenu
|
5974 |
+
*/
|
5975 |
+
select_node : true,
|
5976 |
+
/**
|
5977 |
+
* a boolean indicating if the menu should be shown aligned with the node. Defaults to `true`, otherwise the mouse coordinates are used.
|
5978 |
+
* @name $.jstree.defaults.contextmenu.show_at_node
|
5979 |
+
* @plugin contextmenu
|
5980 |
+
*/
|
5981 |
+
show_at_node : true,
|
5982 |
+
/**
|
5983 |
+
* an object of actions, or a function that accepts a node and a callback function and calls the callback function with an object of actions available for that node (you can also return the items too).
|
5984 |
+
*
|
5985 |
+
* Each action consists of a key (a unique name) and a value which is an object with the following properties (only label and action are required). Once a menu item is activated the `action` function will be invoked with an object containing the following keys: item - the contextmenu item definition as seen below, reference - the DOM node that was used (the tree node), element - the contextmenu DOM element, position - an object with x/y properties indicating the position of the menu.
|
5986 |
+
*
|
5987 |
+
* * `separator_before` - a boolean indicating if there should be a separator before this item
|
5988 |
+
* * `separator_after` - a boolean indicating if there should be a separator after this item
|
5989 |
+
* * `_disabled` - a boolean indicating if this action should be disabled
|
5990 |
+
* * `label` - a string - the name of the action (could be a function returning a string)
|
5991 |
+
* * `title` - a string - an optional tooltip for the item
|
5992 |
+
* * `action` - a function to be executed if this item is chosen, the function will receive
|
5993 |
+
* * `icon` - a string, can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class
|
5994 |
+
* * `shortcut` - keyCode which will trigger the action if the menu is open (for example `113` for rename, which equals F2)
|
5995 |
+
* * `shortcut_label` - shortcut label (like for example `F2` for rename)
|
5996 |
+
* * `submenu` - an object with the same structure as $.jstree.defaults.contextmenu.items which can be used to create a submenu - each key will be rendered as a separate option in a submenu that will appear once the current item is hovered
|
5997 |
+
*
|
5998 |
+
* @name $.jstree.defaults.contextmenu.items
|
5999 |
+
* @plugin contextmenu
|
6000 |
+
*/
|
6001 |
+
items : function (o, cb) { // Could be an object directly
|
6002 |
+
return {
|
6003 |
+
"create" : {
|
6004 |
+
"separator_before" : false,
|
6005 |
+
"separator_after" : true,
|
6006 |
+
"_disabled" : false, //(this.check("create_node", data.reference, {}, "last")),
|
6007 |
+
"label" : "Create",
|
6008 |
+
"action" : function (data) {
|
6009 |
+
var inst = $.jstree.reference(data.reference),
|
6010 |
+
obj = inst.get_node(data.reference);
|
6011 |
+
inst.create_node(obj, {}, "last", function (new_node) {
|
6012 |
+
try {
|
6013 |
+
inst.edit(new_node);
|
6014 |
+
} catch (ex) {
|
6015 |
+
setTimeout(function () { inst.edit(new_node); },0);
|
6016 |
+
}
|
6017 |
+
});
|
6018 |
+
}
|
6019 |
+
},
|
6020 |
+
"rename" : {
|
6021 |
+
"separator_before" : false,
|
6022 |
+
"separator_after" : false,
|
6023 |
+
"_disabled" : false, //(this.check("rename_node", data.reference, this.get_parent(data.reference), "")),
|
6024 |
+
"label" : "Rename",
|
6025 |
+
/*!
|
6026 |
+
"shortcut" : 113,
|
6027 |
+
"shortcut_label" : 'F2',
|
6028 |
+
"icon" : "glyphicon glyphicon-leaf",
|
6029 |
+
*/
|
6030 |
+
"action" : function (data) {
|
6031 |
+
var inst = $.jstree.reference(data.reference),
|
6032 |
+
obj = inst.get_node(data.reference);
|
6033 |
+
inst.edit(obj);
|
6034 |
+
}
|
6035 |
+
},
|
6036 |
+
"remove" : {
|
6037 |
+
"separator_before" : false,
|
6038 |
+
"icon" : false,
|
6039 |
+
"separator_after" : false,
|
6040 |
+
"_disabled" : false, //(this.check("delete_node", data.reference, this.get_parent(data.reference), "")),
|
6041 |
+
"label" : "Delete",
|
6042 |
+
"action" : function (data) {
|
6043 |
+
var inst = $.jstree.reference(data.reference),
|
6044 |
+
obj = inst.get_node(data.reference);
|
6045 |
+
if(inst.is_selected(obj)) {
|
6046 |
+
inst.delete_node(inst.get_selected());
|
6047 |
+
}
|
6048 |
+
else {
|
6049 |
+
inst.delete_node(obj);
|
6050 |
+
}
|
6051 |
+
}
|
6052 |
+
},
|
6053 |
+
"ccp" : {
|
6054 |
+
"separator_before" : true,
|
6055 |
+
"icon" : false,
|
6056 |
+
"separator_after" : false,
|
6057 |
+
"label" : "Edit",
|
6058 |
+
"action" : false,
|
6059 |
+
"submenu" : {
|
6060 |
+
"cut" : {
|
6061 |
+
"separator_before" : false,
|
6062 |
+
"separator_after" : false,
|
6063 |
+
"label" : "Cut",
|
6064 |
+
"action" : function (data) {
|
6065 |
+
var inst = $.jstree.reference(data.reference),
|
6066 |
+
obj = inst.get_node(data.reference);
|
6067 |
+
if(inst.is_selected(obj)) {
|
6068 |
+
inst.cut(inst.get_top_selected());
|
6069 |
+
}
|
6070 |
+
else {
|
6071 |
+
inst.cut(obj);
|
6072 |
+
}
|
6073 |
+
}
|
6074 |
+
},
|
6075 |
+
"copy" : {
|
6076 |
+
"separator_before" : false,
|
6077 |
+
"icon" : false,
|
6078 |
+
"separator_after" : false,
|
6079 |
+
"label" : "Copy",
|
6080 |
+
"action" : function (data) {
|
6081 |
+
var inst = $.jstree.reference(data.reference),
|
6082 |
+
obj = inst.get_node(data.reference);
|
6083 |
+
if(inst.is_selected(obj)) {
|
6084 |
+
inst.copy(inst.get_top_selected());
|
6085 |
+
}
|
6086 |
+
else {
|
6087 |
+
inst.copy(obj);
|
6088 |
+
}
|
6089 |
+
}
|
6090 |
+
},
|
6091 |
+
"paste" : {
|
6092 |
+
"separator_before" : false,
|
6093 |
+
"icon" : false,
|
6094 |
+
"_disabled" : function (data) {
|
6095 |
+
return !$.jstree.reference(data.reference).can_paste();
|
6096 |
+
},
|
6097 |
+
"separator_after" : false,
|
6098 |
+
"label" : "Paste",
|
6099 |
+
"action" : function (data) {
|
6100 |
+
var inst = $.jstree.reference(data.reference),
|
6101 |
+
obj = inst.get_node(data.reference);
|
6102 |
+
inst.paste(obj);
|
6103 |
+
}
|
6104 |
+
}
|
6105 |
+
}
|
6106 |
+
}
|
6107 |
+
};
|
6108 |
+
}
|
6109 |
+
};
|
6110 |
+
|
6111 |
+
$.jstree.plugins.contextmenu = function (options, parent) {
|
6112 |
+
this.bind = function () {
|
6113 |
+
parent.bind.call(this);
|
6114 |
+
|
6115 |
+
var last_ts = 0, cto = null, ex, ey;
|
6116 |
+
this.element
|
6117 |
+
.on("init.jstree loading.jstree ready.jstree", $.proxy(function () {
|
6118 |
+
this.get_container_ul().addClass('jstree-contextmenu');
|
6119 |
+
}, this))
|
6120 |
+
.on("contextmenu.jstree", ".jstree-anchor", $.proxy(function (e, data) {
|
6121 |
+
if (e.target.tagName.toLowerCase() === 'input') {
|
6122 |
+
return;
|
6123 |
+
}
|
6124 |
+
e.preventDefault();
|
6125 |
+
last_ts = e.ctrlKey ? +new Date() : 0;
|
6126 |
+
if(data || cto) {
|
6127 |
+
last_ts = (+new Date()) + 10000;
|
6128 |
+
}
|
6129 |
+
if(cto) {
|
6130 |
+
clearTimeout(cto);
|
6131 |
+
}
|
6132 |
+
if(!this.is_loading(e.currentTarget)) {
|
6133 |
+
this.show_contextmenu(e.currentTarget, e.pageX, e.pageY, e);
|
6134 |
+
}
|
6135 |
+
}, this))
|
6136 |
+
.on("click.jstree", ".jstree-anchor", $.proxy(function (e) {
|
6137 |
+
if(this._data.contextmenu.visible && (!last_ts || (+new Date()) - last_ts > 250)) { // work around safari & macOS ctrl+click
|
6138 |
+
$.vakata.context.hide();
|
6139 |
+
}
|
6140 |
+
last_ts = 0;
|
6141 |
+
}, this))
|
6142 |
+
.on("touchstart.jstree", ".jstree-anchor", function (e) {
|
6143 |
+
if(!e.originalEvent || !e.originalEvent.changedTouches || !e.originalEvent.changedTouches[0]) {
|
6144 |
+
return;
|
6145 |
+
}
|
6146 |
+
ex = e.originalEvent.changedTouches[0].clientX;
|
6147 |
+
ey = e.originalEvent.changedTouches[0].clientY;
|
6148 |
+
cto = setTimeout(function () {
|
6149 |
+
$(e.currentTarget).trigger('contextmenu', true);
|
6150 |
+
}, 750);
|
6151 |
+
})
|
6152 |
+
.on('touchmove.vakata.jstree', function (e) {
|
6153 |
+
if(cto && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0] && (Math.abs(ex - e.originalEvent.changedTouches[0].clientX) > 10 || Math.abs(ey - e.originalEvent.changedTouches[0].clientY) > 10)) {
|
6154 |
+
clearTimeout(cto);
|
6155 |
+
$.vakata.context.hide();
|
6156 |
+
}
|
6157 |
+
})
|
6158 |
+
.on('touchend.vakata.jstree', function (e) {
|
6159 |
+
if(cto) {
|
6160 |
+
clearTimeout(cto);
|
6161 |
+
}
|
6162 |
+
});
|
6163 |
+
|
6164 |
+
/*!
|
6165 |
+
if(!('oncontextmenu' in document.body) && ('ontouchstart' in document.body)) {
|
6166 |
+
var el = null, tm = null;
|
6167 |
+
this.element
|
6168 |
+
.on("touchstart", ".jstree-anchor", function (e) {
|
6169 |
+
el = e.currentTarget;
|
6170 |
+
tm = +new Date();
|
6171 |
+
$(document).one("touchend", function (e) {
|
6172 |
+
e.target = document.elementFromPoint(e.originalEvent.targetTouches[0].pageX - window.pageXOffset, e.originalEvent.targetTouches[0].pageY - window.pageYOffset);
|
6173 |
+
e.currentTarget = e.target;
|
6174 |
+
tm = ((+(new Date())) - tm);
|
6175 |
+
if(e.target === el && tm > 600 && tm < 1000) {
|
6176 |
+
e.preventDefault();
|
6177 |
+
$(el).trigger('contextmenu', e);
|
6178 |
+
}
|
6179 |
+
el = null;
|
6180 |
+
tm = null;
|
6181 |
+
});
|
6182 |
+
});
|
6183 |
+
}
|
6184 |
+
*/
|
6185 |
+
$(document).on("context_hide.vakata.jstree", $.proxy(function (e, data) {
|
6186 |
+
this._data.contextmenu.visible = false;
|
6187 |
+
$(data.reference).removeClass('jstree-context');
|
6188 |
+
}, this));
|
6189 |
+
};
|
6190 |
+
this.teardown = function () {
|
6191 |
+
if(this._data.contextmenu.visible) {
|
6192 |
+
$.vakata.context.hide();
|
6193 |
+
}
|
6194 |
+
parent.teardown.call(this);
|
6195 |
+
};
|
6196 |
+
|
6197 |
+
/**
|
6198 |
+
* prepare and show the context menu for a node
|
6199 |
+
* @name show_contextmenu(obj [, x, y])
|
6200 |
+
* @param {mixed} obj the node
|
6201 |
+
* @param {Number} x the x-coordinate relative to the document to show the menu at
|
6202 |
+
* @param {Number} y the y-coordinate relative to the document to show the menu at
|
6203 |
+
* @param {Object} e the event if available that triggered the contextmenu
|
6204 |
+
* @plugin contextmenu
|
6205 |
+
* @trigger show_contextmenu.jstree
|
6206 |
+
*/
|
6207 |
+
this.show_contextmenu = function (obj, x, y, e) {
|
6208 |
+
obj = this.get_node(obj);
|
6209 |
+
if(!obj || obj.id === $.jstree.root) { return false; }
|
6210 |
+
var s = this.settings.contextmenu,
|
6211 |
+
d = this.get_node(obj, true),
|
6212 |
+
a = d.children(".jstree-anchor"),
|
6213 |
+
o = false,
|
6214 |
+
i = false;
|
6215 |
+
if(s.show_at_node || x === undefined || y === undefined) {
|
6216 |
+
o = a.offset();
|
6217 |
+
x = o.left;
|
6218 |
+
y = o.top + this._data.core.li_height;
|
6219 |
+
}
|
6220 |
+
if(this.settings.contextmenu.select_node && !this.is_selected(obj)) {
|
6221 |
+
this.activate_node(obj, e);
|
6222 |
+
}
|
6223 |
+
|
6224 |
+
i = s.items;
|
6225 |
+
if($.isFunction(i)) {
|
6226 |
+
i = i.call(this, obj, $.proxy(function (i) {
|
6227 |
+
this._show_contextmenu(obj, x, y, i);
|
6228 |
+
}, this));
|
6229 |
+
}
|
6230 |
+
if($.isPlainObject(i)) {
|
6231 |
+
this._show_contextmenu(obj, x, y, i);
|
6232 |
+
}
|
6233 |
+
};
|
6234 |
+
/**
|
6235 |
+
* show the prepared context menu for a node
|
6236 |
+
* @name _show_contextmenu(obj, x, y, i)
|
6237 |
+
* @param {mixed} obj the node
|
6238 |
+
* @param {Number} x the x-coordinate relative to the document to show the menu at
|
6239 |
+
* @param {Number} y the y-coordinate relative to the document to show the menu at
|
6240 |
+
* @param {Number} i the object of items to show
|
6241 |
+
* @plugin contextmenu
|
6242 |
+
* @trigger show_contextmenu.jstree
|
6243 |
+
* @private
|
6244 |
+
*/
|
6245 |
+
this._show_contextmenu = function (obj, x, y, i) {
|
6246 |
+
var d = this.get_node(obj, true),
|
6247 |
+
a = d.children(".jstree-anchor");
|
6248 |
+
$(document).one("context_show.vakata.jstree", $.proxy(function (e, data) {
|
6249 |
+
var cls = 'jstree-contextmenu jstree-' + this.get_theme() + '-contextmenu';
|
6250 |
+
$(data.element).addClass(cls);
|
6251 |
+
a.addClass('jstree-context');
|
6252 |
+
}, this));
|
6253 |
+
this._data.contextmenu.visible = true;
|
6254 |
+
$.vakata.context.show(a, { 'x' : x, 'y' : y }, i);
|
6255 |
+
/**
|
6256 |
+
* triggered when the contextmenu is shown for a node
|
6257 |
+
* @event
|
6258 |
+
* @name show_contextmenu.jstree
|
6259 |
+
* @param {Object} node the node
|
6260 |
+
* @param {Number} x the x-coordinate of the menu relative to the document
|
6261 |
+
* @param {Number} y the y-coordinate of the menu relative to the document
|
6262 |
+
* @plugin contextmenu
|
6263 |
+
*/
|
6264 |
+
this.trigger('show_contextmenu', { "node" : obj, "x" : x, "y" : y });
|
6265 |
+
};
|
6266 |
+
};
|
6267 |
+
|
6268 |
+
// contextmenu helper
|
6269 |
+
(function ($) {
|
6270 |
+
var right_to_left = false,
|
6271 |
+
vakata_context = {
|
6272 |
+
element : false,
|
6273 |
+
reference : false,
|
6274 |
+
position_x : 0,
|
6275 |
+
position_y : 0,
|
6276 |
+
items : [],
|
6277 |
+
html : "",
|
6278 |
+
is_visible : false
|
6279 |
+
};
|
6280 |
+
|
6281 |
+
$.vakata.context = {
|
6282 |
+
settings : {
|
6283 |
+
hide_onmouseleave : 0,
|
6284 |
+
icons : true
|
6285 |
+
},
|
6286 |
+
_trigger : function (event_name) {
|
6287 |
+
$(document).triggerHandler("context_" + event_name + ".vakata", {
|
6288 |
+
"reference" : vakata_context.reference,
|
6289 |
+
"element" : vakata_context.element,
|
6290 |
+
"position" : {
|
6291 |
+
"x" : vakata_context.position_x,
|
6292 |
+
"y" : vakata_context.position_y
|
6293 |
+
}
|
6294 |
+
});
|
6295 |
+
},
|
6296 |
+
_execute : function (i) {
|
6297 |
+
i = vakata_context.items[i];
|
6298 |
+
return i && (!i._disabled || ($.isFunction(i._disabled) && !i._disabled({ "item" : i, "reference" : vakata_context.reference, "element" : vakata_context.element }))) && i.action ? i.action.call(null, {
|
6299 |
+
"item" : i,
|
6300 |
+
"reference" : vakata_context.reference,
|
6301 |
+
"element" : vakata_context.element,
|
6302 |
+
"position" : {
|
6303 |
+
"x" : vakata_context.position_x,
|
6304 |
+
"y" : vakata_context.position_y
|
6305 |
+
}
|
6306 |
+
}) : false;
|
6307 |
+
},
|
6308 |
+
_parse : function (o, is_callback) {
|
6309 |
+
if(!o) { return false; }
|
6310 |
+
if(!is_callback) {
|
6311 |
+
vakata_context.html = "";
|
6312 |
+
vakata_context.items = [];
|
6313 |
+
}
|
6314 |
+
var str = "",
|
6315 |
+
sep = false,
|
6316 |
+
tmp;
|
6317 |
+
|
6318 |
+
if(is_callback) { str += "<"+"ul>"; }
|
6319 |
+
$.each(o, function (i, val) {
|
6320 |
+
if(!val) { return true; }
|
6321 |
+
vakata_context.items.push(val);
|
6322 |
+
if(!sep && val.separator_before) {
|
6323 |
+
str += "<"+"li class='vakata-context-separator'><"+"a href='#' " + ($.vakata.context.settings.icons ? '' : 'style="margin-left:0px;"') + "> <"+"/a><"+"/li>";
|
6324 |
+
}
|
6325 |
+
sep = false;
|
6326 |
+
str += "<"+"li class='" + (val._class || "") + (val._disabled === true || ($.isFunction(val._disabled) && val._disabled({ "item" : val, "reference" : vakata_context.reference, "element" : vakata_context.element })) ? " vakata-contextmenu-disabled " : "") + "' "+(val.shortcut?" data-shortcut='"+val.shortcut+"' ":'')+">";
|
6327 |
+
str += "<"+"a href='#' rel='" + (vakata_context.items.length - 1) + "' " + (val.title ? "title='" + val.title + "'" : "") + ">";
|
6328 |
+
if($.vakata.context.settings.icons) {
|
6329 |
+
str += "<"+"i ";
|
6330 |
+
if(val.icon) {
|
6331 |
+
if(val.icon.indexOf("/") !== -1 || val.icon.indexOf(".") !== -1) { str += " style='background:url(\"" + val.icon + "\") center center no-repeat' "; }
|
6332 |
+
else { str += " class='" + val.icon + "' "; }
|
6333 |
+
}
|
6334 |
+
str += "><"+"/i><"+"span class='vakata-contextmenu-sep'> <"+"/span>";
|
6335 |
+
}
|
6336 |
+
str += ($.isFunction(val.label) ? val.label({ "item" : i, "reference" : vakata_context.reference, "element" : vakata_context.element }) : val.label) + (val.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+val.shortcut+'">'+ (val.shortcut_label || '') +'</span>':'') + "<"+"/a>";
|
6337 |
+
if(val.submenu) {
|
6338 |
+
tmp = $.vakata.context._parse(val.submenu, true);
|
6339 |
+
if(tmp) { str += tmp; }
|
6340 |
+
}
|
6341 |
+
str += "<"+"/li>";
|
6342 |
+
if(val.separator_after) {
|
6343 |
+
str += "<"+"li class='vakata-context-separator'><"+"a href='#' " + ($.vakata.context.settings.icons ? '' : 'style="margin-left:0px;"') + "> <"+"/a><"+"/li>";
|
6344 |
+
sep = true;
|
6345 |
+
}
|
6346 |
+
});
|
6347 |
+
str = str.replace(/<li class\='vakata-context-separator'\><\/li\>$/,"");
|
6348 |
+
if(is_callback) { str += "</ul>"; }
|
6349 |
+
/**
|
6350 |
+
* triggered on the document when the contextmenu is parsed (HTML is built)
|
6351 |
+
* @event
|
6352 |
+
* @plugin contextmenu
|
6353 |
+
* @name context_parse.vakata
|
6354 |
+
* @param {jQuery} reference the element that was right clicked
|
6355 |
+
* @param {jQuery} element the DOM element of the menu itself
|
6356 |
+
* @param {Object} position the x & y coordinates of the menu
|
6357 |
+
*/
|
6358 |
+
if(!is_callback) { vakata_context.html = str; $.vakata.context._trigger("parse"); }
|
6359 |
+
return str.length > 10 ? str : false;
|
6360 |
+
},
|
6361 |
+
_show_submenu : function (o) {
|
6362 |
+
o = $(o);
|
6363 |
+
if(!o.length || !o.children("ul").length) { return; }
|
6364 |
+
var e = o.children("ul"),
|
6365 |
+
xl = o.offset().left,
|
6366 |
+
x = xl + o.outerWidth(),
|
6367 |
+
y = o.offset().top,
|
6368 |
+
w = e.width(),
|
6369 |
+
h = e.height(),
|
6370 |
+
dw = $(window).width() + $(window).scrollLeft(),
|
6371 |
+
dh = $(window).height() + $(window).scrollTop();
|
6372 |
+
// може да се спести е една проверка - дали няма някой от класовете вече нагоре
|
6373 |
+
if(right_to_left) {
|
6374 |
+
o[x - (w + 10 + o.outerWidth()) < 0 ? "addClass" : "removeClass"]("vakata-context-left");
|
6375 |
+
}
|
6376 |
+
else {
|
6377 |
+
o[x + w > dw && xl > dw - x ? "addClass" : "removeClass"]("vakata-context-right");
|
6378 |
+
}
|
6379 |
+
if(y + h + 10 > dh) {
|
6380 |
+
e.css("bottom","-1px");
|
6381 |
+
}
|
6382 |
+
|
6383 |
+
//if does not fit - stick it to the side
|
6384 |
+
if (o.hasClass('vakata-context-right')) {
|
6385 |
+
if (xl < w) {
|
6386 |
+
e.css("margin-right", xl - w);
|
6387 |
+
}
|
6388 |
+
} else {
|
6389 |
+
if (dw - x < w) {
|
6390 |
+
e.css("margin-left", dw - x - w);
|
6391 |
+
}
|
6392 |
+
}
|
6393 |
+
|
6394 |
+
e.show();
|
6395 |
+
},
|
6396 |
+
show : function (reference, position, data) {
|
6397 |
+
var o, e, x, y, w, h, dw, dh, cond = true;
|
6398 |
+
if(vakata_context.element && vakata_context.element.length) {
|
6399 |
+
vakata_context.element.width('');
|
6400 |
+
}
|
6401 |
+
switch(cond) {
|
6402 |
+
case (!position && !reference):
|
6403 |
+
return false;
|
6404 |
+
case (!!position && !!reference):
|
6405 |
+
vakata_context.reference = reference;
|
6406 |
+
vakata_context.position_x = position.x;
|
6407 |
+
vakata_context.position_y = position.y;
|
6408 |
+
break;
|
6409 |
+
case (!position && !!reference):
|
6410 |
+
vakata_context.reference = reference;
|
6411 |
+
o = reference.offset();
|
6412 |
+
vakata_context.position_x = o.left + reference.outerHeight();
|
6413 |
+
vakata_context.position_y = o.top;
|
6414 |
+
break;
|
6415 |
+
case (!!position && !reference):
|
6416 |
+
vakata_context.position_x = position.x;
|
6417 |
+
vakata_context.position_y = position.y;
|
6418 |
+
break;
|
6419 |
+
}
|
6420 |
+
if(!!reference && !data && $(reference).data('vakata_contextmenu')) {
|
6421 |
+
data = $(reference).data('vakata_contextmenu');
|
6422 |
+
}
|
6423 |
+
if($.vakata.context._parse(data)) {
|
6424 |
+
vakata_context.element.html(vakata_context.html);
|
6425 |
+
}
|
6426 |
+
if(vakata_context.items.length) {
|
6427 |
+
vakata_context.element.appendTo("body");
|
6428 |
+
e = vakata_context.element;
|
6429 |
+
x = vakata_context.position_x;
|
6430 |
+
y = vakata_context.position_y;
|
6431 |
+
w = e.width();
|
6432 |
+
h = e.height();
|
6433 |
+
dw = $(window).width() + $(window).scrollLeft();
|
6434 |
+
dh = $(window).height() + $(window).scrollTop();
|
6435 |
+
if(right_to_left) {
|
6436 |
+
x -= (e.outerWidth() - $(reference).outerWidth());
|
6437 |
+
if(x < $(window).scrollLeft() + 20) {
|
6438 |
+
x = $(window).scrollLeft() + 20;
|
6439 |
+
}
|
6440 |
+
}
|
6441 |
+
if(x + w + 20 > dw) {
|
6442 |
+
x = dw - (w + 20);
|
6443 |
+
}
|
6444 |
+
if(y + h + 20 > dh) {
|
6445 |
+
y = dh - (h + 20);
|
6446 |
+
}
|
6447 |
+
|
6448 |
+
vakata_context.element
|
6449 |
+
.css({ "left" : x, "top" : y })
|
6450 |
+
.show()
|
6451 |
+
.find('a').first().focus().parent().addClass("vakata-context-hover");
|
6452 |
+
vakata_context.is_visible = true;
|
6453 |
+
/**
|
6454 |
+
* triggered on the document when the contextmenu is shown
|
6455 |
+
* @event
|
6456 |
+
* @plugin contextmenu
|
6457 |
+
* @name context_show.vakata
|
6458 |
+
* @param {jQuery} reference the element that was right clicked
|
6459 |
+
* @param {jQuery} element the DOM element of the menu itself
|
6460 |
+
* @param {Object} position the x & y coordinates of the menu
|
6461 |
+
*/
|
6462 |
+
$.vakata.context._trigger("show");
|
6463 |
+
}
|
6464 |
+
},
|
6465 |
+
hide : function () {
|
6466 |
+
if(vakata_context.is_visible) {
|
6467 |
+
vakata_context.element.hide().find("ul").hide().end().find(':focus').blur().end().detach();
|
6468 |
+
vakata_context.is_visible = false;
|
6469 |
+
/**
|
6470 |
+
* triggered on the document when the contextmenu is hidden
|
6471 |
+
* @event
|
6472 |
+
* @plugin contextmenu
|
6473 |
+
* @name context_hide.vakata
|
6474 |
+
* @param {jQuery} reference the element that was right clicked
|
6475 |
+
* @param {jQuery} element the DOM element of the menu itself
|
6476 |
+
* @param {Object} position the x & y coordinates of the menu
|
6477 |
+
*/
|
6478 |
+
$.vakata.context._trigger("hide");
|
6479 |
+
}
|
6480 |
+
}
|
6481 |
+
};
|
6482 |
+
$(function () {
|
6483 |
+
right_to_left = $("body").css("direction") === "rtl";
|
6484 |
+
var to = false;
|
6485 |
+
|
6486 |
+
vakata_context.element = $("<ul class='vakata-context'></ul>");
|
6487 |
+
vakata_context.element
|
6488 |
+
.on("mouseenter", "li", function (e) {
|
6489 |
+
e.stopImmediatePropagation();
|
6490 |
+
|
6491 |
+
if($.contains(this, e.relatedTarget)) {
|
6492 |
+
// премахнато заради delegate mouseleave по-долу
|
6493 |
+
// $(this).find(".vakata-context-hover").removeClass("vakata-context-hover");
|
6494 |
+
return;
|
6495 |
+
}
|
6496 |
+
|
6497 |
+
if(to) { clearTimeout(to); }
|
6498 |
+
vakata_context.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end();
|
6499 |
+
|
6500 |
+
$(this)
|
6501 |
+
.siblings().find("ul").hide().end().end()
|
6502 |
+
.parentsUntil(".vakata-context", "li").addBack().addClass("vakata-context-hover");
|
6503 |
+
$.vakata.context._show_submenu(this);
|
6504 |
+
})
|
6505 |
+
// тестово - дали не натоварва?
|
6506 |
+
.on("mouseleave", "li", function (e) {
|
6507 |
+
if($.contains(this, e.relatedTarget)) { return; }
|
6508 |
+
$(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover");
|
6509 |
+
})
|
6510 |
+
.on("mouseleave", function (e) {
|
6511 |
+
$(this).find(".vakata-context-hover").removeClass("vakata-context-hover");
|
6512 |
+
if($.vakata.context.settings.hide_onmouseleave) {
|
6513 |
+
to = setTimeout(
|
6514 |
+
(function (t) {
|
6515 |
+
return function () { $.vakata.context.hide(); };
|
6516 |
+
}(this)), $.vakata.context.settings.hide_onmouseleave);
|
6517 |
+
}
|
6518 |
+
})
|
6519 |
+
.on("click", "a", function (e) {
|
6520 |
+
e.preventDefault();
|
6521 |
+
//})
|
6522 |
+
//.on("mouseup", "a", function (e) {
|
6523 |
+
if(!$(this).blur().parent().hasClass("vakata-context-disabled") && $.vakata.context._execute($(this).attr("rel")) !== false) {
|
6524 |
+
$.vakata.context.hide();
|
6525 |
+
}
|
6526 |
+
})
|
6527 |
+
.on('keydown', 'a', function (e) {
|
6528 |
+
var o = null;
|
6529 |
+
switch(e.which) {
|
6530 |
+
case 13:
|
6531 |
+
case 32:
|
6532 |
+
e.type = "click";
|
6533 |
+
e.preventDefault();
|
6534 |
+
$(e.currentTarget).trigger(e);
|
6535 |
+
break;
|
6536 |
+
case 37:
|
6537 |
+
if(vakata_context.is_visible) {
|
6538 |
+
vakata_context.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children('a').focus();
|
6539 |
+
e.stopImmediatePropagation();
|
6540 |
+
e.preventDefault();
|
6541 |
+
}
|
6542 |
+
break;
|
6543 |
+
case 38:
|
6544 |
+
if(vakata_context.is_visible) {
|
6545 |
+
o = vakata_context.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first();
|
6546 |
+
if(!o.length) { o = vakata_context.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last(); }
|
6547 |
+
o.addClass("vakata-context-hover").children('a').focus();
|
6548 |
+
e.stopImmediatePropagation();
|
6549 |
+
e.preventDefault();
|
6550 |
+
}
|
6551 |
+
break;
|
6552 |
+
case 39:
|
6553 |
+
if(vakata_context.is_visible) {
|
6554 |
+
vakata_context.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children('a').focus();
|
6555 |
+
e.stopImmediatePropagation();
|
6556 |
+
e.preventDefault();
|
6557 |
+
}
|
6558 |
+
break;
|
6559 |
+
case 40:
|
6560 |
+
if(vakata_context.is_visible) {
|
6561 |
+
o = vakata_context.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first();
|
6562 |
+
if(!o.length) { o = vakata_context.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first(); }
|
6563 |
+
o.addClass("vakata-context-hover").children('a').focus();
|
6564 |
+
e.stopImmediatePropagation();
|
6565 |
+
e.preventDefault();
|
6566 |
+
}
|
6567 |
+
break;
|
6568 |
+
case 27:
|
6569 |
+
$.vakata.context.hide();
|
6570 |
+
e.preventDefault();
|
6571 |
+
break;
|
6572 |
+
default:
|
6573 |
+
//console.log(e.which);
|
6574 |
+
break;
|
6575 |
+
}
|
6576 |
+
})
|
6577 |
+
.on('keydown', function (e) {
|
6578 |
+
e.preventDefault();
|
6579 |
+
var a = vakata_context.element.find('.vakata-contextmenu-shortcut-' + e.which).parent();
|
6580 |
+
if(a.parent().not('.vakata-context-disabled')) {
|
6581 |
+
a.click();
|
6582 |
+
}
|
6583 |
+
});
|
6584 |
+
|
6585 |
+
$(document)
|
6586 |
+
.on("mousedown.vakata.jstree", function (e) {
|
6587 |
+
if(vakata_context.is_visible && vakata_context.element[0] !== e.target && !$.contains(vakata_context.element[0], e.target)) {
|
6588 |
+
$.vakata.context.hide();
|
6589 |
+
}
|
6590 |
+
})
|
6591 |
+
.on("context_show.vakata.jstree", function (e, data) {
|
6592 |
+
vakata_context.element.find("li:has(ul)").children("a").addClass("vakata-context-parent");
|
6593 |
+
if(right_to_left) {
|
6594 |
+
vakata_context.element.addClass("vakata-context-rtl").css("direction", "rtl");
|
6595 |
+
}
|
6596 |
+
// also apply a RTL class?
|
6597 |
+
vakata_context.element.find("ul").hide().end();
|
6598 |
+
});
|
6599 |
+
});
|
6600 |
+
}($));
|
6601 |
+
// $.jstree.defaults.plugins.push("contextmenu");
|
6602 |
+
|
6603 |
+
|
6604 |
+
/**
|
6605 |
+
* ### Drag'n'drop plugin
|
6606 |
+
*
|
6607 |
+
* Enables dragging and dropping of nodes in the tree, resulting in a move or copy operations.
|
6608 |
+
*/
|
6609 |
+
|
6610 |
+
/**
|
6611 |
+
* stores all defaults for the drag'n'drop plugin
|
6612 |
+
* @name $.jstree.defaults.dnd
|
6613 |
+
* @plugin dnd
|
6614 |
+
*/
|
6615 |
+
$.jstree.defaults.dnd = {
|
6616 |
+
/**
|
6617 |
+
* a boolean indicating if a copy should be possible while dragging (by pressint the meta key or Ctrl). Defaults to `true`.
|
6618 |
+
* @name $.jstree.defaults.dnd.copy
|
6619 |
+
* @plugin dnd
|
6620 |
+
*/
|
6621 |
+
copy : true,
|
6622 |
+
/**
|
6623 |
+
* a number indicating how long a node should remain hovered while dragging to be opened. Defaults to `500`.
|
6624 |
+
* @name $.jstree.defaults.dnd.open_timeout
|
6625 |
+
* @plugin dnd
|
6626 |
+
*/
|
6627 |
+
open_timeout : 500,
|
6628 |
+
/**
|
6629 |
+
* a function invoked each time a node is about to be dragged, invoked in the tree's scope and receives the nodes about to be dragged as an argument (array) and the event that started the drag - return `false` to prevent dragging
|
6630 |
+
* @name $.jstree.defaults.dnd.is_draggable
|
6631 |
+
* @plugin dnd
|
6632 |
+
*/
|
6633 |
+
is_draggable : true,
|
6634 |
+
/**
|
6635 |
+
* a boolean indicating if checks should constantly be made while the user is dragging the node (as opposed to checking only on drop), default is `true`
|
6636 |
+
* @name $.jstree.defaults.dnd.check_while_dragging
|
6637 |
+
* @plugin dnd
|
6638 |
+
*/
|
6639 |
+
check_while_dragging : true,
|
6640 |
+
/**
|
6641 |
+
* a boolean indicating if nodes from this tree should only be copied with dnd (as opposed to moved), default is `false`
|
6642 |
+
* @name $.jstree.defaults.dnd.always_copy
|
6643 |
+
* @plugin dnd
|
6644 |
+
*/
|
6645 |
+
always_copy : false,
|
6646 |
+
/**
|
6647 |
+
* when dropping a node "inside", this setting indicates the position the node should go to - it can be an integer or a string: "first" (same as 0) or "last", default is `0`
|
6648 |
+
* @name $.jstree.defaults.dnd.inside_pos
|
6649 |
+
* @plugin dnd
|
6650 |
+
*/
|
6651 |
+
inside_pos : 0,
|
6652 |
+
/**
|
6653 |
+
* when starting the drag on a node that is selected this setting controls if all selected nodes are dragged or only the single node, default is `true`, which means all selected nodes are dragged when the drag is started on a selected node
|
6654 |
+
* @name $.jstree.defaults.dnd.drag_selection
|
6655 |
+
* @plugin dnd
|
6656 |
+
*/
|
6657 |
+
drag_selection : true,
|
6658 |
+
/**
|
6659 |
+
* controls whether dnd works on touch devices. If left as boolean true dnd will work the same as in desktop browsers, which in some cases may impair scrolling. If set to boolean false dnd will not work on touch devices. There is a special third option - string "selected" which means only selected nodes can be dragged on touch devices.
|
6660 |
+
* @name $.jstree.defaults.dnd.touch
|
6661 |
+
* @plugin dnd
|
6662 |
+
*/
|
6663 |
+
touch : true,
|
6664 |
+
/**
|
6665 |
+
* controls whether items can be dropped anywhere on the node, not just on the anchor, by default only the node anchor is a valid drop target. Works best with the wholerow plugin. If enabled on mobile depending on the interface it might be hard for the user to cancel the drop, since the whole tree container will be a valid drop target.
|
6666 |
+
* @name $.jstree.defaults.dnd.large_drop_target
|
6667 |
+
* @plugin dnd
|
6668 |
+
*/
|
6669 |
+
large_drop_target : false,
|
6670 |
+
/**
|
6671 |
+
* controls whether a drag can be initiated from any part of the node and not just the text/icon part, works best with the wholerow plugin. Keep in mind it can cause problems with tree scrolling on mobile depending on the interface - in that case set the touch option to "selected".
|
6672 |
+
* @name $.jstree.defaults.dnd.large_drag_target
|
6673 |
+
* @plugin dnd
|
6674 |
+
*/
|
6675 |
+
large_drag_target : false,
|
6676 |
+
/**
|
6677 |
+
* controls whether use HTML5 dnd api instead of classical. That will allow better integration of dnd events with other HTML5 controls.
|
6678 |
+
* @reference http://caniuse.com/#feat=dragndrop
|
6679 |
+
* @name $.jstree.defaults.dnd.use_html5
|
6680 |
+
* @plugin dnd
|
6681 |
+
*/
|
6682 |
+
use_html5: false
|
6683 |
+
};
|
6684 |
+
var drg, elm;
|
6685 |
+
// TODO: now check works by checking for each node individually, how about max_children, unique, etc?
|
6686 |
+
$.jstree.plugins.dnd = function (options, parent) {
|
6687 |
+
this.init = function (el, options) {
|
6688 |
+
parent.init.call(this, el, options);
|
6689 |
+
this.settings.dnd.use_html5 = this.settings.dnd.use_html5 && ('draggable' in document.createElement('span'));
|
6690 |
+
};
|
6691 |
+
this.bind = function () {
|
6692 |
+
parent.bind.call(this);
|
6693 |
+
|
6694 |
+
this.element
|
6695 |
+
.on(this.settings.dnd.use_html5 ? 'dragstart.jstree' : 'mousedown.jstree touchstart.jstree', this.settings.dnd.large_drag_target ? '.jstree-node' : '.jstree-anchor', $.proxy(function (e) {
|
6696 |
+
if(this.settings.dnd.large_drag_target && $(e.target).closest('.jstree-node')[0] !== e.currentTarget) {
|
6697 |
+
return true;
|
6698 |
+
}
|
6699 |
+
if(e.type === "touchstart" && (!this.settings.dnd.touch || (this.settings.dnd.touch === 'selected' && !$(e.currentTarget).closest('.jstree-node').children('.jstree-anchor').hasClass('jstree-clicked')))) {
|
6700 |
+
return true;
|
6701 |
+
}
|
6702 |
+
var obj = this.get_node(e.target),
|
6703 |
+
mlt = this.is_selected(obj) && this.settings.dnd.drag_selection ? this.get_top_selected().length : 1,
|
6704 |
+
txt = (mlt > 1 ? mlt + ' ' + this.get_string('nodes') : this.get_text(e.currentTarget));
|
6705 |
+
if(this.settings.core.force_text) {
|
6706 |
+
txt = $.vakata.html.escape(txt);
|
6707 |
+
}
|
6708 |
+
if(obj && obj.id && obj.id !== $.jstree.root && (e.which === 1 || e.type === "touchstart" || e.type === "dragstart") &&
|
6709 |
+
(this.settings.dnd.is_draggable === true || ($.isFunction(this.settings.dnd.is_draggable) && this.settings.dnd.is_draggable.call(this, (mlt > 1 ? this.get_top_selected(true) : [obj]), e)))
|
6710 |
+
) {
|
6711 |
+
drg = { 'jstree' : true, 'origin' : this, 'obj' : this.get_node(obj,true), 'nodes' : mlt > 1 ? this.get_top_selected() : [obj.id] };
|
6712 |
+
elm = e.currentTarget;
|
6713 |
+
if (this.settings.dnd.use_html5) {
|
6714 |
+
$.vakata.dnd._trigger('start', e, { 'helper': $(), 'element': elm, 'data': drg });
|
6715 |
+
} else {
|
6716 |
+
this.element.trigger('mousedown.jstree');
|
6717 |
+
return $.vakata.dnd.start(e, drg, '<div id="jstree-dnd" class="jstree-' + this.get_theme() + ' jstree-' + this.get_theme() + '-' + this.get_theme_variant() + ' ' + ( this.settings.core.themes.responsive ? ' jstree-dnd-responsive' : '' ) + '"><i class="jstree-icon jstree-er"></i>' + txt + '<ins class="jstree-copy" style="display:none;">+</ins></div>');
|
6718 |
+
}
|
6719 |
+
}
|
6720 |
+
}, this));
|
6721 |
+
if (this.settings.dnd.use_html5) {
|
6722 |
+
this.element
|
6723 |
+
.on('dragover.jstree', function (e) {
|
6724 |
+
e.preventDefault();
|
6725 |
+
$.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg });
|
6726 |
+
return false;
|
6727 |
+
})
|
6728 |
+
//.on('dragenter.jstree', this.settings.dnd.large_drop_target ? '.jstree-node' : '.jstree-anchor', $.proxy(function (e) {
|
6729 |
+
// e.preventDefault();
|
6730 |
+
// $.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg });
|
6731 |
+
// return false;
|
6732 |
+
// }, this))
|
6733 |
+
.on('drop.jstree', $.proxy(function (e) {
|
6734 |
+
e.preventDefault();
|
6735 |
+
$.vakata.dnd._trigger('stop', e, { 'helper': $(), 'element': elm, 'data': drg });
|
6736 |
+
return false;
|
6737 |
+
}, this));
|
6738 |
+
}
|
6739 |
+
};
|
6740 |
+
this.redraw_node = function(obj, deep, callback, force_render) {
|
6741 |
+
obj = parent.redraw_node.apply(this, arguments);
|
6742 |
+
if (obj && this.settings.dnd.use_html5) {
|
6743 |
+
if (this.settings.dnd.large_drag_target) {
|
6744 |
+
obj.setAttribute('draggable', true);
|
6745 |
+
} else {
|
6746 |
+
var i, j, tmp = null;
|
6747 |
+
for(i = 0, j = obj.childNodes.length; i < j; i++) {
|
6748 |
+
if(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf("jstree-anchor") !== -1) {
|
6749 |
+
tmp = obj.childNodes[i];
|
6750 |
+
break;
|
6751 |
+
}
|
6752 |
+
}
|
6753 |
+
if(tmp) {
|
6754 |
+
tmp.setAttribute('draggable', true);
|
6755 |
+
}
|
6756 |
+
}
|
6757 |
+
}
|
6758 |
+
return obj;
|
6759 |
+
};
|
6760 |
+
};
|
6761 |
+
|
6762 |
+
$(function() {
|
6763 |
+
// bind only once for all instances
|
6764 |
+
var lastmv = false,
|
6765 |
+
laster = false,
|
6766 |
+
lastev = false,
|
6767 |
+
opento = false,
|
6768 |
+
marker = $('<div id="jstree-marker"> </div>').hide(); //.appendTo('body');
|
6769 |
+
|
6770 |
+
$(document)
|
6771 |
+
.on('dnd_start.vakata.jstree', function (e, data) {
|
6772 |
+
lastmv = false;
|
6773 |
+
lastev = false;
|
6774 |
+
if(!data || !data.data || !data.data.jstree) { return; }
|
6775 |
+
marker.appendTo('body'); //.show();
|
6776 |
+
})
|
6777 |
+
.on('dnd_move.vakata.jstree', function (e, data) {
|
6778 |
+
var isDifferentNode = data.event.target !== lastev.target;
|
6779 |
+
if(opento) {
|
6780 |
+
if (!data.event || data.event.type !== 'dragover' || isDifferentNode) {
|
6781 |
+
clearTimeout(opento);
|
6782 |
+
}
|
6783 |
+
}
|
6784 |
+
if(!data || !data.data || !data.data.jstree) { return; }
|
6785 |
+
|
6786 |
+
// if we are hovering the marker image do nothing (can happen on "inside" drags)
|
6787 |
+
if(data.event.target.id && data.event.target.id === 'jstree-marker') {
|
6788 |
+
return;
|
6789 |
+
}
|
6790 |
+
lastev = data.event;
|
6791 |
+
|
6792 |
+
var ins = $.jstree.reference(data.event.target),
|
6793 |
+
ref = false,
|
6794 |
+
off = false,
|
6795 |
+
rel = false,
|
6796 |
+
tmp, l, t, h, p, i, o, ok, t1, t2, op, ps, pr, ip, tm, is_copy, pn;
|
6797 |
+
// if we are over an instance
|
6798 |
+
if(ins && ins._data && ins._data.dnd) {
|
6799 |
+
marker.attr('class', 'jstree-' + ins.get_theme() + ( ins.settings.core.themes.responsive ? ' jstree-dnd-responsive' : '' ));
|
6800 |
+
is_copy = data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey)));
|
6801 |
+
data.helper
|
6802 |
+
.children().attr('class', 'jstree-' + ins.get_theme() + ' jstree-' + ins.get_theme() + '-' + ins.get_theme_variant() + ' ' + ( ins.settings.core.themes.responsive ? ' jstree-dnd-responsive' : '' ))
|
6803 |
+
.find('.jstree-copy').first()[ is_copy ? 'show' : 'hide' ]();
|
6804 |
+
|
6805 |
+
// if are hovering the container itself add a new root node
|
6806 |
+
//console.log(data.event);
|
6807 |
+
if( (data.event.target === ins.element[0] || data.event.target === ins.get_container_ul()[0]) && ins.get_container_ul().children().length === 0) {
|
6808 |
+
ok = true;
|
6809 |
+
for(t1 = 0, t2 = data.data.nodes.length; t1 < t2; t1++) {
|
6810 |
+
ok = ok && ins.check( (data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey)) ) ? "copy_node" : "move_node"), (data.data.origin && data.data.origin !== ins ? data.data.origin.get_node(data.data.nodes[t1]) : data.data.nodes[t1]), $.jstree.root, 'last', { 'dnd' : true, 'ref' : ins.get_node($.jstree.root), 'pos' : 'i', 'origin' : data.data.origin, 'is_multi' : (data.data.origin && data.data.origin !== ins), 'is_foreign' : (!data.data.origin) });
|
6811 |
+
if(!ok) { break; }
|
6812 |
+
}
|
6813 |
+
if(ok) {
|
6814 |
+
lastmv = { 'ins' : ins, 'par' : $.jstree.root, 'pos' : 'last' };
|
6815 |
+
marker.hide();
|
6816 |
+
data.helper.find('.jstree-icon').first().removeClass('jstree-er').addClass('jstree-ok');
|
6817 |
+
if (data.event.originalEvent && data.event.originalEvent.dataTransfer) {
|
6818 |
+
data.event.originalEvent.dataTransfer.dropEffect = is_copy ? 'copy' : 'move';
|
6819 |
+
}
|
6820 |
+
return;
|
6821 |
+
}
|
6822 |
+
}
|
6823 |
+
else {
|
6824 |
+
// if we are hovering a tree node
|
6825 |
+
ref = ins.settings.dnd.large_drop_target ? $(data.event.target).closest('.jstree-node').children('.jstree-anchor') : $(data.event.target).closest('.jstree-anchor');
|
6826 |
+
if(ref && ref.length && ref.parent().is('.jstree-closed, .jstree-open, .jstree-leaf')) {
|
6827 |
+
off = ref.offset();
|
6828 |
+
rel = (data.event.pageY !== undefined ? data.event.pageY : data.event.originalEvent.pageY) - off.top;
|
6829 |
+
h = ref.outerHeight();
|
6830 |
+
if(rel < h / 3) {
|
6831 |
+
o = ['b', 'i', 'a'];
|
6832 |
+
}
|
6833 |
+
else if(rel > h - h / 3) {
|
6834 |
+
o = ['a', 'i', 'b'];
|
6835 |
+
}
|
6836 |
+
else {
|
6837 |
+
o = rel > h / 2 ? ['i', 'a', 'b'] : ['i', 'b', 'a'];
|
6838 |
+
}
|
6839 |
+
$.each(o, function (j, v) {
|
6840 |
+
switch(v) {
|
6841 |
+
case 'b':
|
6842 |
+
l = off.left - 6;
|
6843 |
+
t = off.top;
|
6844 |
+
p = ins.get_parent(ref);
|
6845 |
+
i = ref.parent().index();
|
6846 |
+
break;
|
6847 |
+
case 'i':
|
6848 |
+
ip = ins.settings.dnd.inside_pos;
|
6849 |
+
tm = ins.get_node(ref.parent());
|
6850 |
+
l = off.left - 2;
|
6851 |
+
t = off.top + h / 2 + 1;
|
6852 |
+
p = tm.id;
|
6853 |
+
i = ip === 'first' ? 0 : (ip === 'last' ? tm.children.length : Math.min(ip, tm.children.length));
|
6854 |
+
break;
|
6855 |
+
case 'a':
|
6856 |
+
l = off.left - 6;
|
6857 |
+
t = off.top + h;
|
6858 |
+
p = ins.get_parent(ref);
|
6859 |
+
i = ref.parent().index() + 1;
|
6860 |
+
break;
|
6861 |
+
}
|
6862 |
+
ok = true;
|
6863 |
+
for(t1 = 0, t2 = data.data.nodes.length; t1 < t2; t1++) {
|
6864 |
+
op = data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey))) ? "copy_node" : "move_node";
|
6865 |
+
ps = i;
|
6866 |
+
if(op === "move_node" && v === 'a' && (data.data.origin && data.data.origin === ins) && p === ins.get_parent(data.data.nodes[t1])) {
|
6867 |
+
pr = ins.get_node(p);
|
6868 |
+
if(ps > $.inArray(data.data.nodes[t1], pr.children)) {
|
6869 |
+
ps -= 1;
|
6870 |
+
}
|
6871 |
+
}
|
6872 |
+
ok = ok && ( (ins && ins.settings && ins.settings.dnd && ins.settings.dnd.check_while_dragging === false) || ins.check(op, (data.data.origin && data.data.origin !== ins ? data.data.origin.get_node(data.data.nodes[t1]) : data.data.nodes[t1]), p, ps, { 'dnd' : true, 'ref' : ins.get_node(ref.parent()), 'pos' : v, 'origin' : data.data.origin, 'is_multi' : (data.data.origin && data.data.origin !== ins), 'is_foreign' : (!data.data.origin) }) );
|
6873 |
+
if(!ok) {
|
6874 |
+
if(ins && ins.last_error) { laster = ins.last_error(); }
|
6875 |
+
break;
|
6876 |
+
}
|
6877 |
+
}
|
6878 |
+
if(v === 'i' && ref.parent().is('.jstree-closed') && ins.settings.dnd.open_timeout) {
|
6879 |
+
if (!data.event || data.event.type !== 'dragover' || isDifferentNode) {
|
6880 |
+
if (opento) { clearTimeout(opento); }
|
6881 |
+
opento = setTimeout((function (x, z) { return function () { x.open_node(z); }; }(ins, ref)), ins.settings.dnd.open_timeout);
|
6882 |
+
}
|
6883 |
+
}
|
6884 |
+
if(ok) {
|
6885 |
+
pn = ins.get_node(p, true);
|
6886 |
+
if (!pn.hasClass('.jstree-dnd-parent')) {
|
6887 |
+
$('.jstree-dnd-parent').removeClass('jstree-dnd-parent');
|
6888 |
+
pn.addClass('jstree-dnd-parent');
|
6889 |
+
}
|
6890 |
+
lastmv = { 'ins' : ins, 'par' : p, 'pos' : v === 'i' && ip === 'last' && i === 0 && !ins.is_loaded(tm) ? 'last' : i };
|
6891 |
+
marker.css({ 'left' : l + 'px', 'top' : t + 'px' }).show();
|
6892 |
+
data.helper.find('.jstree-icon').first().removeClass('jstree-er').addClass('jstree-ok');
|
6893 |
+
if (data.event.originalEvent && data.event.originalEvent.dataTransfer) {
|
6894 |
+
data.event.originalEvent.dataTransfer.dropEffect = is_copy ? 'copy' : 'move';
|
6895 |
+
}
|
6896 |
+
laster = {};
|
6897 |
+
o = true;
|
6898 |
+
return false;
|
6899 |
+
}
|
6900 |
+
});
|
6901 |
+
if(o === true) { return; }
|
6902 |
+
}
|
6903 |
+
}
|
6904 |
+
}
|
6905 |
+
$('.jstree-dnd-parent').removeClass('jstree-dnd-parent');
|
6906 |
+
lastmv = false;
|
6907 |
+
data.helper.find('.jstree-icon').removeClass('jstree-ok').addClass('jstree-er');
|
6908 |
+
if (data.event.originalEvent && data.event.originalEvent.dataTransfer) {
|
6909 |
+
data.event.originalEvent.dataTransfer.dropEffect = 'none';
|
6910 |
+
}
|
6911 |
+
marker.hide();
|
6912 |
+
})
|
6913 |
+
.on('dnd_scroll.vakata.jstree', function (e, data) {
|
6914 |
+
if(!data || !data.data || !data.data.jstree) { return; }
|
6915 |
+
marker.hide();
|
6916 |
+
lastmv = false;
|
6917 |
+
lastev = false;
|
6918 |
+
data.helper.find('.jstree-icon').first().removeClass('jstree-ok').addClass('jstree-er');
|
6919 |
+
})
|
6920 |
+
.on('dnd_stop.vakata.jstree', function (e, data) {
|
6921 |
+
$('.jstree-dnd-parent').removeClass('jstree-dnd-parent');
|
6922 |
+
if(opento) { clearTimeout(opento); }
|
6923 |
+
if(!data || !data.data || !data.data.jstree) { return; }
|
6924 |
+
marker.hide().detach();
|
6925 |
+
var i, j, nodes = [];
|
6926 |
+
if(lastmv) {
|
6927 |
+
for(i = 0, j = data.data.nodes.length; i < j; i++) {
|
6928 |
+
nodes[i] = data.data.origin ? data.data.origin.get_node(data.data.nodes[i]) : data.data.nodes[i];
|
6929 |
+
}
|
6930 |
+
lastmv.ins[ data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey))) ? 'copy_node' : 'move_node' ](nodes, lastmv.par, lastmv.pos, false, false, false, data.data.origin);
|
6931 |
+
}
|
6932 |
+
else {
|
6933 |
+
i = $(data.event.target).closest('.jstree');
|
6934 |
+
if(i.length && laster && laster.error && laster.error === 'check') {
|
6935 |
+
i = i.jstree(true);
|
6936 |
+
if(i) {
|
6937 |
+
i.settings.core.error.call(this, laster);
|
6938 |
+
}
|
6939 |
+
}
|
6940 |
+
}
|
6941 |
+
lastev = false;
|
6942 |
+
lastmv = false;
|
6943 |
+
})
|
6944 |
+
.on('keyup.jstree keydown.jstree', function (e, data) {
|
6945 |
+
data = $.vakata.dnd._get();
|
6946 |
+
if(data && data.data && data.data.jstree) {
|
6947 |
+
if (e.type === "keyup" && e.which === 27) {
|
6948 |
+
if (opento) { clearTimeout(opento); }
|
6949 |
+
lastmv = false;
|
6950 |
+
laster = false;
|
6951 |
+
lastev = false;
|
6952 |
+
opento = false;
|
6953 |
+
marker.hide().detach();
|
6954 |
+
$.vakata.dnd._clean();
|
6955 |
+
} else {
|
6956 |
+
data.helper.find('.jstree-copy').first()[ data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (e.metaKey || e.ctrlKey))) ? 'show' : 'hide' ]();
|
6957 |
+
if(lastev) {
|
6958 |
+
lastev.metaKey = e.metaKey;
|
6959 |
+
lastev.ctrlKey = e.ctrlKey;
|
6960 |
+
$.vakata.dnd._trigger('move', lastev);
|
6961 |
+
}
|
6962 |
+
}
|
6963 |
+
}
|
6964 |
+
});
|
6965 |
+
});
|
6966 |
+
|
6967 |
+
// helpers
|
6968 |
+
(function ($) {
|
6969 |
+
$.vakata.html = {
|
6970 |
+
div : $('<div />'),
|
6971 |
+
escape : function (str) {
|
6972 |
+
return $.vakata.html.div.text(str).html();
|
6973 |
+
},
|
6974 |
+
strip : function (str) {
|
6975 |
+
return $.vakata.html.div.empty().append($.parseHTML(str)).text();
|
6976 |
+
}
|
6977 |
+
};
|
6978 |
+
// private variable
|
6979 |
+
var vakata_dnd = {
|
6980 |
+
element : false,
|
6981 |
+
target : false,
|
6982 |
+
is_down : false,
|
6983 |
+
is_drag : false,
|
6984 |
+
helper : false,
|
6985 |
+
helper_w: 0,
|
6986 |
+
data : false,
|
6987 |
+
init_x : 0,
|
6988 |
+
init_y : 0,
|
6989 |
+
scroll_l: 0,
|
6990 |
+
scroll_t: 0,
|
6991 |
+
scroll_e: false,
|
6992 |
+
scroll_i: false,
|
6993 |
+
is_touch: false
|
6994 |
+
};
|
6995 |
+
$.vakata.dnd = {
|
6996 |
+
settings : {
|
6997 |
+
scroll_speed : 10,
|
6998 |
+
scroll_proximity : 20,
|
6999 |
+
helper_left : 5,
|
7000 |
+
helper_top : 10,
|
7001 |
+
threshold : 5,
|
7002 |
+
threshold_touch : 10
|
7003 |
+
},
|
7004 |
+
_trigger : function (event_name, e, data) {
|
7005 |
+
if (data === undefined) {
|
7006 |
+
data = $.vakata.dnd._get();
|
7007 |
+
}
|
7008 |
+
data.event = e;
|
7009 |
+
$(document).triggerHandler("dnd_" + event_name + ".vakata", data);
|
7010 |
+
},
|
7011 |
+
_get : function () {
|
7012 |
+
return {
|
7013 |
+
"data" : vakata_dnd.data,
|
7014 |
+
"element" : vakata_dnd.element,
|
7015 |
+
"helper" : vakata_dnd.helper
|
7016 |
+
};
|
7017 |
+
},
|
7018 |
+
_clean : function () {
|
7019 |
+
if(vakata_dnd.helper) { vakata_dnd.helper.remove(); }
|
7020 |
+
if(vakata_dnd.scroll_i) { clearInterval(vakata_dnd.scroll_i); vakata_dnd.scroll_i = false; }
|
7021 |
+
vakata_dnd = {
|
7022 |
+
element : false,
|
7023 |
+
target : false,
|
7024 |
+
is_down : false,
|
7025 |
+
is_drag : false,
|
7026 |
+
helper : false,
|
7027 |
+
helper_w: 0,
|
7028 |
+
data : false,
|
7029 |
+
init_x : 0,
|
7030 |
+
init_y : 0,
|
7031 |
+
scroll_l: 0,
|
7032 |
+
scroll_t: 0,
|
7033 |
+
scroll_e: false,
|
7034 |
+
scroll_i: false,
|
7035 |
+
is_touch: false
|
7036 |
+
};
|
7037 |
+
$(document).off("mousemove.vakata.jstree touchmove.vakata.jstree", $.vakata.dnd.drag);
|
7038 |
+
$(document).off("mouseup.vakata.jstree touchend.vakata.jstree", $.vakata.dnd.stop);
|
7039 |
+
},
|
7040 |
+
_scroll : function (init_only) {
|
7041 |
+
if(!vakata_dnd.scroll_e || (!vakata_dnd.scroll_l && !vakata_dnd.scroll_t)) {
|
7042 |
+
if(vakata_dnd.scroll_i) { clearInterval(vakata_dnd.scroll_i); vakata_dnd.scroll_i = false; }
|
7043 |
+
return false;
|
7044 |
+
}
|
7045 |
+
if(!vakata_dnd.scroll_i) {
|
7046 |
+
vakata_dnd.scroll_i = setInterval($.vakata.dnd._scroll, 100);
|
7047 |
+
return false;
|
7048 |
+
}
|
7049 |
+
if(init_only === true) { return false; }
|
7050 |
+
|
7051 |
+
var i = vakata_dnd.scroll_e.scrollTop(),
|
7052 |
+
j = vakata_dnd.scroll_e.scrollLeft();
|
7053 |
+
vakata_dnd.scroll_e.scrollTop(i + vakata_dnd.scroll_t * $.vakata.dnd.settings.scroll_speed);
|
7054 |
+
vakata_dnd.scroll_e.scrollLeft(j + vakata_dnd.scroll_l * $.vakata.dnd.settings.scroll_speed);
|
7055 |
+
if(i !== vakata_dnd.scroll_e.scrollTop() || j !== vakata_dnd.scroll_e.scrollLeft()) {
|
7056 |
+
/**
|
7057 |
+
* triggered on the document when a drag causes an element to scroll
|
7058 |
+
* @event
|
7059 |
+
* @plugin dnd
|
7060 |
+
* @name dnd_scroll.vakata
|
7061 |
+
* @param {Mixed} data any data supplied with the call to $.vakata.dnd.start
|
7062 |
+
* @param {DOM} element the DOM element being dragged
|
7063 |
+
* @param {jQuery} helper the helper shown next to the mouse
|
7064 |
+
* @param {jQuery} event the element that is scrolling
|
7065 |
+
*/
|
7066 |
+
$.vakata.dnd._trigger("scroll", vakata_dnd.scroll_e);
|
7067 |
+
}
|
7068 |
+
},
|
7069 |
+
start : function (e, data, html) {
|
7070 |
+
if(e.type === "touchstart" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) {
|
7071 |
+
e.pageX = e.originalEvent.changedTouches[0].pageX;
|
7072 |
+
e.pageY = e.originalEvent.changedTouches[0].pageY;
|
7073 |
+
e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset);
|
7074 |
+
}
|
7075 |
+
if(vakata_dnd.is_drag) { $.vakata.dnd.stop({}); }
|
7076 |
+
try {
|
7077 |
+
e.currentTarget.unselectable = "on";
|
7078 |
+
e.currentTarget.onselectstart = function() { return false; };
|
7079 |
+
if(e.currentTarget.style) {
|
7080 |
+
e.currentTarget.style.touchAction = "none";
|
7081 |
+
e.currentTarget.style.msTouchAction = "none";
|
7082 |
+
e.currentTarget.style.MozUserSelect = "none";
|
7083 |
+
}
|
7084 |
+
} catch(ignore) { }
|
7085 |
+
vakata_dnd.init_x = e.pageX;
|
7086 |
+
vakata_dnd.init_y = e.pageY;
|
7087 |
+
vakata_dnd.data = data;
|
7088 |
+
vakata_dnd.is_down = true;
|
7089 |
+
vakata_dnd.element = e.currentTarget;
|
7090 |
+
vakata_dnd.target = e.target;
|
7091 |
+
vakata_dnd.is_touch = e.type === "touchstart";
|
7092 |
+
if(html !== false) {
|
7093 |
+
vakata_dnd.helper = $("<div id='vakata-dnd'></div>").html(html).css({
|
7094 |
+
"display" : "block",
|
7095 |
+
"margin" : "0",
|
7096 |
+
"padding" : "0",
|
7097 |
+
"position" : "absolute",
|
7098 |
+
"top" : "-2000px",
|
7099 |
+
"lineHeight" : "16px",
|
7100 |
+
"zIndex" : "10000"
|
7101 |
+
});
|
7102 |
+
}
|
7103 |
+
$(document).on("mousemove.vakata.jstree touchmove.vakata.jstree", $.vakata.dnd.drag);
|
7104 |
+
$(document).on("mouseup.vakata.jstree touchend.vakata.jstree", $.vakata.dnd.stop);
|
7105 |
+
return false;
|
7106 |
+
},
|
7107 |
+
drag : function (e) {
|
7108 |
+
if(e.type === "touchmove" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) {
|
7109 |
+
e.pageX = e.originalEvent.changedTouches[0].pageX;
|
7110 |
+
e.pageY = e.originalEvent.changedTouches[0].pageY;
|
7111 |
+
e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset);
|
7112 |
+
}
|
7113 |
+
if(!vakata_dnd.is_down) { return; }
|
7114 |
+
if(!vakata_dnd.is_drag) {
|
7115 |
+
if(
|
7116 |
+
Math.abs(e.pageX - vakata_dnd.init_x) > (vakata_dnd.is_touch ? $.vakata.dnd.settings.threshold_touch : $.vakata.dnd.settings.threshold) ||
|
7117 |
+
Math.abs(e.pageY - vakata_dnd.init_y) > (vakata_dnd.is_touch ? $.vakata.dnd.settings.threshold_touch : $.vakata.dnd.settings.threshold)
|
7118 |
+
) {
|
7119 |
+
if(vakata_dnd.helper) {
|
7120 |
+
vakata_dnd.helper.appendTo("body");
|
7121 |
+
vakata_dnd.helper_w = vakata_dnd.helper.outerWidth();
|
7122 |
+
}
|
7123 |
+
vakata_dnd.is_drag = true;
|
7124 |
+
$(vakata_dnd.target).one('click.vakata', false);
|
7125 |
+
/**
|
7126 |
+
* triggered on the document when a drag starts
|
7127 |
+
* @event
|
7128 |
+
* @plugin dnd
|
7129 |
+
* @name dnd_start.vakata
|
7130 |
+
* @param {Mixed} data any data supplied with the call to $.vakata.dnd.start
|
7131 |
+
* @param {DOM} element the DOM element being dragged
|
7132 |
+
* @param {jQuery} helper the helper shown next to the mouse
|
7133 |
+
* @param {Object} event the event that caused the start (probably mousemove)
|
7134 |
+
*/
|
7135 |
+
$.vakata.dnd._trigger("start", e);
|
7136 |
+
}
|
7137 |
+
else { return; }
|
7138 |
+
}
|
7139 |
+
|
7140 |
+
var d = false, w = false,
|
7141 |
+
dh = false, wh = false,
|
7142 |
+
dw = false, ww = false,
|
7143 |
+
dt = false, dl = false,
|
7144 |
+
ht = false, hl = false;
|
7145 |
+
|
7146 |
+
vakata_dnd.scroll_t = 0;
|
7147 |
+
vakata_dnd.scroll_l = 0;
|
7148 |
+
vakata_dnd.scroll_e = false;
|
7149 |
+
$($(e.target).parentsUntil("body").addBack().get().reverse())
|
7150 |
+
.filter(function () {
|
7151 |
+
return (/^auto|scroll$/).test($(this).css("overflow")) &&
|
7152 |
+
(this.scrollHeight > this.offsetHeight || this.scrollWidth > this.offsetWidth);
|
7153 |
+
})
|
7154 |
+
.each(function () {
|
7155 |
+
var t = $(this), o = t.offset();
|
7156 |
+
if(this.scrollHeight > this.offsetHeight) {
|
7157 |
+
if(o.top + t.height() - e.pageY < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = 1; }
|
7158 |
+
if(e.pageY - o.top < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = -1; }
|
7159 |
+
}
|
7160 |
+
if(this.scrollWidth > this.offsetWidth) {
|
7161 |
+
if(o.left + t.width() - e.pageX < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = 1; }
|
7162 |
+
if(e.pageX - o.left < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = -1; }
|
7163 |
+
}
|
7164 |
+
if(vakata_dnd.scroll_t || vakata_dnd.scroll_l) {
|
7165 |
+
vakata_dnd.scroll_e = $(this);
|
7166 |
+
return false;
|
7167 |
+
}
|
7168 |
+
});
|
7169 |
+
|
7170 |
+
if(!vakata_dnd.scroll_e) {
|
7171 |
+
d = $(document); w = $(window);
|
7172 |
+
dh = d.height(); wh = w.height();
|
7173 |
+
dw = d.width(); ww = w.width();
|
7174 |
+
dt = d.scrollTop(); dl = d.scrollLeft();
|
7175 |
+
if(dh > wh && e.pageY - dt < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = -1; }
|
7176 |
+
if(dh > wh && wh - (e.pageY - dt) < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_t = 1; }
|
7177 |
+
if(dw > ww && e.pageX - dl < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = -1; }
|
7178 |
+
if(dw > ww && ww - (e.pageX - dl) < $.vakata.dnd.settings.scroll_proximity) { vakata_dnd.scroll_l = 1; }
|
7179 |
+
if(vakata_dnd.scroll_t || vakata_dnd.scroll_l) {
|
7180 |
+
vakata_dnd.scroll_e = d;
|
7181 |
+
}
|
7182 |
+
}
|
7183 |
+
if(vakata_dnd.scroll_e) { $.vakata.dnd._scroll(true); }
|
7184 |
+
|
7185 |
+
if(vakata_dnd.helper) {
|
7186 |
+
ht = parseInt(e.pageY + $.vakata.dnd.settings.helper_top, 10);
|
7187 |
+
hl = parseInt(e.pageX + $.vakata.dnd.settings.helper_left, 10);
|
7188 |
+
if(dh && ht + 25 > dh) { ht = dh - 50; }
|
7189 |
+
if(dw && hl + vakata_dnd.helper_w > dw) { hl = dw - (vakata_dnd.helper_w + 2); }
|
7190 |
+
vakata_dnd.helper.css({
|
7191 |
+
left : hl + "px",
|
7192 |
+
top : ht + "px"
|
7193 |
+
});
|
7194 |
+
}
|
7195 |
+
/**
|
7196 |
+
* triggered on the document when a drag is in progress
|
7197 |
+
* @event
|
7198 |
+
* @plugin dnd
|
7199 |
+
* @name dnd_move.vakata
|
7200 |
+
* @param {Mixed} data any data supplied with the call to $.vakata.dnd.start
|
7201 |
+
* @param {DOM} element the DOM element being dragged
|
7202 |
+
* @param {jQuery} helper the helper shown next to the mouse
|
7203 |
+
* @param {Object} event the event that caused this to trigger (most likely mousemove)
|
7204 |
+
*/
|
7205 |
+
$.vakata.dnd._trigger("move", e);
|
7206 |
+
return false;
|
7207 |
+
},
|
7208 |
+
stop : function (e) {
|
7209 |
+
if(e.type === "touchend" && e.originalEvent && e.originalEvent.changedTouches && e.originalEvent.changedTouches[0]) {
|
7210 |
+
e.pageX = e.originalEvent.changedTouches[0].pageX;
|
7211 |
+
e.pageY = e.originalEvent.changedTouches[0].pageY;
|
7212 |
+
e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].pageX - window.pageXOffset, e.originalEvent.changedTouches[0].pageY - window.pageYOffset);
|
7213 |
+
}
|
7214 |
+
if(vakata_dnd.is_drag) {
|
7215 |
+
/**
|
7216 |
+
* triggered on the document when a drag stops (the dragged element is dropped)
|
7217 |
+
* @event
|
7218 |
+
* @plugin dnd
|
7219 |
+
* @name dnd_stop.vakata
|
7220 |
+
* @param {Mixed} data any data supplied with the call to $.vakata.dnd.start
|
7221 |
+
* @param {DOM} element the DOM element being dragged
|
7222 |
+
* @param {jQuery} helper the helper shown next to the mouse
|
7223 |
+
* @param {Object} event the event that caused the stop
|
7224 |
+
*/
|
7225 |
+
if (e.target !== vakata_dnd.target) {
|
7226 |
+
$(vakata_dnd.target).off('click.vakata');
|
7227 |
+
}
|
7228 |
+
$.vakata.dnd._trigger("stop", e);
|
7229 |
+
}
|
7230 |
+
else {
|
7231 |
+
if(e.type === "touchend" && e.target === vakata_dnd.target) {
|
7232 |
+
var to = setTimeout(function () { $(e.target).click(); }, 100);
|
7233 |
+
$(e.target).one('click', function() { if(to) { clearTimeout(to); } });
|
7234 |
+
}
|
7235 |
+
}
|
7236 |
+
$.vakata.dnd._clean();
|
7237 |
+
return false;
|
7238 |
+
}
|
7239 |
+
};
|
7240 |
+
}($));
|
7241 |
+
|
7242 |
+
// include the dnd plugin by default
|
7243 |
+
// $.jstree.defaults.plugins.push("dnd");
|
7244 |
+
|
7245 |
+
|
7246 |
+
/**
|
7247 |
+
* ### Massload plugin
|
7248 |
+
*
|
7249 |
+
* Adds massload functionality to jsTree, so that multiple nodes can be loaded in a single request (only useful with lazy loading).
|
7250 |
+
*/
|
7251 |
+
|
7252 |
+
/**
|
7253 |
+
* massload configuration
|
7254 |
+
*
|
7255 |
+
* It is possible to set this to a standard jQuery-like AJAX config.
|
7256 |
+
* In addition to the standard jQuery ajax options here you can supply functions for `data` and `url`, the functions will be run in the current instance's scope and a param will be passed indicating which node IDs need to be loaded, the return value of those functions will be used.
|
7257 |
+
*
|
7258 |
+
* You can also set this to a function, that function will receive the node IDs being loaded as argument and a second param which is a function (callback) which should be called with the result.
|
7259 |
+
*
|
7260 |
+
* Both the AJAX and the function approach rely on the same return value - an object where the keys are the node IDs, and the value is the children of that node as an array.
|
7261 |
+
*
|
7262 |
+
* {
|
7263 |
+
* "id1" : [{ "text" : "Child of ID1", "id" : "c1" }, { "text" : "Another child of ID1", "id" : "c2" }],
|
7264 |
+
* "id2" : [{ "text" : "Child of ID2", "id" : "c3" }]
|
7265 |
+
* }
|
7266 |
+
*
|
7267 |
+
* @name $.jstree.defaults.massload
|
7268 |
+
* @plugin massload
|
7269 |
+
*/
|
7270 |
+
$.jstree.defaults.massload = null;
|
7271 |
+
$.jstree.plugins.massload = function (options, parent) {
|
7272 |
+
this.init = function (el, options) {
|
7273 |
+
this._data.massload = {};
|
7274 |
+
parent.init.call(this, el, options);
|
7275 |
+
};
|
7276 |
+
this._load_nodes = function (nodes, callback, is_callback, force_reload) {
|
7277 |
+
var s = this.settings.massload,
|
7278 |
+
nodesString = JSON.stringify(nodes),
|
7279 |
+
toLoad = [],
|
7280 |
+
m = this._model.data,
|
7281 |
+
i, j, dom;
|
7282 |
+
if (!is_callback) {
|
7283 |
+
for(i = 0, j = nodes.length; i < j; i++) {
|
7284 |
+
if(!m[nodes[i]] || ( (!m[nodes[i]].state.loaded && !m[nodes[i]].state.failed) || force_reload) ) {
|
7285 |
+
toLoad.push(nodes[i]);
|
7286 |
+
dom = this.get_node(nodes[i], true);
|
7287 |
+
if (dom && dom.length) {
|
7288 |
+
dom.addClass("jstree-loading").attr('aria-busy',true);
|
7289 |
+
}
|
7290 |
+
}
|
7291 |
+
}
|
7292 |
+
this._data.massload = {};
|
7293 |
+
if (toLoad.length) {
|
7294 |
+
if($.isFunction(s)) {
|
7295 |
+
return s.call(this, toLoad, $.proxy(function (data) {
|
7296 |
+
var i, j;
|
7297 |
+
if(data) {
|
7298 |
+
for(i in data) {
|
7299 |
+
if(data.hasOwnProperty(i)) {
|
7300 |
+
this._data.massload[i] = data[i];
|
7301 |
+
}
|
7302 |
+
}
|
7303 |
+
}
|
7304 |
+
for(i = 0, j = nodes.length; i < j; i++) {
|
7305 |
+
dom = this.get_node(nodes[i], true);
|
7306 |
+
if (dom && dom.length) {
|
7307 |
+
dom.removeClass("jstree-loading").attr('aria-busy',false);
|
7308 |
+
}
|
7309 |
+
}
|
7310 |
+
parent._load_nodes.call(this, nodes, callback, is_callback, force_reload);
|
7311 |
+
}, this));
|
7312 |
+
}
|
7313 |
+
if(typeof s === 'object' && s && s.url) {
|
7314 |
+
s = $.extend(true, {}, s);
|
7315 |
+
if($.isFunction(s.url)) {
|
7316 |
+
s.url = s.url.call(this, toLoad);
|
7317 |
+
}
|
7318 |
+
if($.isFunction(s.data)) {
|
7319 |
+
s.data = s.data.call(this, toLoad);
|
7320 |
+
}
|
7321 |
+
return $.ajax(s)
|
7322 |
+
.done($.proxy(function (data,t,x) {
|
7323 |
+
var i, j;
|
7324 |
+
if(data) {
|
7325 |
+
for(i in data) {
|
7326 |
+
if(data.hasOwnProperty(i)) {
|
7327 |
+
this._data.massload[i] = data[i];
|
7328 |
+
}
|
7329 |
+
}
|
7330 |
+
}
|
7331 |
+
for(i = 0, j = nodes.length; i < j; i++) {
|
7332 |
+
dom = this.get_node(nodes[i], true);
|
7333 |
+
if (dom && dom.length) {
|
7334 |
+
dom.removeClass("jstree-loading").attr('aria-busy',false);
|
7335 |
+
}
|
7336 |
+
}
|
7337 |
+
parent._load_nodes.call(this, nodes, callback, is_callback, force_reload);
|
7338 |
+
}, this))
|
7339 |
+
.fail($.proxy(function (f) {
|
7340 |
+
parent._load_nodes.call(this, nodes, callback, is_callback, force_reload);
|
7341 |
+
}, this));
|
7342 |
+
}
|
7343 |
+
}
|
7344 |
+
}
|
7345 |
+
return parent._load_nodes.call(this, nodes, callback, is_callback, force_reload);
|
7346 |
+
};
|
7347 |
+
this._load_node = function (obj, callback) {
|
7348 |
+
var data = this._data.massload[obj.id],
|
7349 |
+
rslt = null, dom;
|
7350 |
+
if(data) {
|
7351 |
+
rslt = this[typeof data === 'string' ? '_append_html_data' : '_append_json_data'](
|
7352 |
+
obj,
|
7353 |
+
typeof data === 'string' ? $($.parseHTML(data)).filter(function () { return this.nodeType !== 3; }) : data,
|
7354 |
+
function (status) { callback.call(this, status); }
|
7355 |
+
);
|
7356 |
+
dom = this.get_node(obj.id, true);
|
7357 |
+
if (dom && dom.length) {
|
7358 |
+
dom.removeClass("jstree-loading").attr('aria-busy',false);
|
7359 |
+
}
|
7360 |
+
delete this._data.massload[obj.id];
|
7361 |
+
return rslt;
|
7362 |
+
}
|
7363 |
+
return parent._load_node.call(this, obj, callback);
|
7364 |
+
};
|
7365 |
+
};
|
7366 |
+
|
7367 |
+
/**
|
7368 |
+
* ### Search plugin
|
7369 |
+
*
|
7370 |
+
* Adds search functionality to jsTree.
|
7371 |
+
*/
|
7372 |
+
|
7373 |
+
/**
|
7374 |
+
* stores all defaults for the search plugin
|
7375 |
+
* @name $.jstree.defaults.search
|
7376 |
+
* @plugin search
|
7377 |
+
*/
|
7378 |
+
$.jstree.defaults.search = {
|
7379 |
+
/**
|
7380 |
+
* a jQuery-like AJAX config, which jstree uses if a server should be queried for results.
|
7381 |
+
*
|
7382 |
+
* A `str` (which is the search string) parameter will be added with the request, an optional `inside` parameter will be added if the search is limited to a node id. The expected result is a JSON array with nodes that need to be opened so that matching nodes will be revealed.
|
7383 |
+
* Leave this setting as `false` to not query the server. You can also set this to a function, which will be invoked in the instance's scope and receive 3 parameters - the search string, the callback to call with the array of nodes to load, and the optional node ID to limit the search to
|
7384 |
+
* @name $.jstree.defaults.search.ajax
|
7385 |
+
* @plugin search
|
7386 |
+
*/
|
7387 |
+
ajax : false,
|
7388 |
+
/**
|
7389 |
+
* Indicates if the search should be fuzzy or not (should `chnd3` match `child node 3`). Default is `false`.
|
7390 |
+
* @name $.jstree.defaults.search.fuzzy
|
7391 |
+
* @plugin search
|
7392 |
+
*/
|
7393 |
+
fuzzy : false,
|
7394 |
+
/**
|
7395 |
+
* Indicates if the search should be case sensitive. Default is `false`.
|
7396 |
+
* @name $.jstree.defaults.search.case_sensitive
|
7397 |
+
* @plugin search
|
7398 |
+
*/
|
7399 |
+
case_sensitive : false,
|
7400 |
+
/**
|
7401 |
+
* Indicates if the tree should be filtered (by default) to show only matching nodes (keep in mind this can be a heavy on large trees in old browsers).
|
7402 |
+
* This setting can be changed at runtime when calling the search method. Default is `false`.
|
7403 |
+
* @name $.jstree.defaults.search.show_only_matches
|
7404 |
+
* @plugin search
|
7405 |
+
*/
|
7406 |
+
show_only_matches : false,
|
7407 |
+
/**
|
7408 |
+
* Indicates if the children of matched element are shown (when show_only_matches is true)
|
7409 |
+
* This setting can be changed at runtime when calling the search method. Default is `false`.
|
7410 |
+
* @name $.jstree.defaults.search.show_only_matches_children
|
7411 |
+
* @plugin search
|
7412 |
+
*/
|
7413 |
+
show_only_matches_children : false,
|
7414 |
+
/**
|
7415 |
+
* Indicates if all nodes opened to reveal the search result, should be closed when the search is cleared or a new search is performed. Default is `true`.
|
7416 |
+
* @name $.jstree.defaults.search.close_opened_onclear
|
7417 |
+
* @plugin search
|
7418 |
+
*/
|
7419 |
+
close_opened_onclear : true,
|
7420 |
+
/**
|
7421 |
+
* Indicates if only leaf nodes should be included in search results. Default is `false`.
|
7422 |
+
* @name $.jstree.defaults.search.search_leaves_only
|
7423 |
+
* @plugin search
|
7424 |
+
*/
|
7425 |
+
search_leaves_only : false,
|
7426 |
+
/**
|
7427 |
+
* If set to a function it wil be called in the instance's scope with two arguments - search string and node (where node will be every node in the structure, so use with caution).
|
7428 |
+
* If the function returns a truthy value the node will be considered a match (it might not be displayed if search_only_leaves is set to true and the node is not a leaf). Default is `false`.
|
7429 |
+
* @name $.jstree.defaults.search.search_callback
|
7430 |
+
* @plugin search
|
7431 |
+
*/
|
7432 |
+
search_callback : false
|
7433 |
+
};
|
7434 |
+
|
7435 |
+
$.jstree.plugins.search = function (options, parent) {
|
7436 |
+
this.bind = function () {
|
7437 |
+
parent.bind.call(this);
|
7438 |
+
|
7439 |
+
this._data.search.str = "";
|
7440 |
+
this._data.search.dom = $();
|
7441 |
+
this._data.search.res = [];
|
7442 |
+
this._data.search.opn = [];
|
7443 |
+
this._data.search.som = false;
|
7444 |
+
this._data.search.smc = false;
|
7445 |
+
this._data.search.hdn = [];
|
7446 |
+
|
7447 |
+
this.element
|
7448 |
+
.on("search.jstree", $.proxy(function (e, data) {
|
7449 |
+
if(this._data.search.som && data.res.length) {
|
7450 |
+
var m = this._model.data, i, j, p = [], k, l;
|
7451 |
+
for(i = 0, j = data.res.length; i < j; i++) {
|
7452 |
+
if(m[data.res[i]] && !m[data.res[i]].state.hidden) {
|
7453 |
+
p.push(data.res[i]);
|
7454 |
+
p = p.concat(m[data.res[i]].parents);
|
7455 |
+
if(this._data.search.smc) {
|
7456 |
+
for (k = 0, l = m[data.res[i]].children_d.length; k < l; k++) {
|
7457 |
+
if (m[m[data.res[i]].children_d[k]] && !m[m[data.res[i]].children_d[k]].state.hidden) {
|
7458 |
+
p.push(m[data.res[i]].children_d[k]);
|
7459 |
+
}
|
7460 |
+
}
|
7461 |
+
}
|
7462 |
+
}
|
7463 |
+
}
|
7464 |
+
p = $.vakata.array_remove_item($.vakata.array_unique(p), $.jstree.root);
|
7465 |
+
this._data.search.hdn = this.hide_all(true);
|
7466 |
+
this.show_node(p, true);
|
7467 |
+
this.redraw(true);
|
7468 |
+
}
|
7469 |
+
}, this))
|
7470 |
+
.on("clear_search.jstree", $.proxy(function (e, data) {
|
7471 |
+
if(this._data.search.som && data.res.length) {
|
7472 |
+
this.show_node(this._data.search.hdn, true);
|
7473 |
+
this.redraw(true);
|
7474 |
+
}
|
7475 |
+
}, this));
|
7476 |
+
};
|
7477 |
+
/**
|
7478 |
+
* used to search the tree nodes for a given string
|
7479 |
+
* @name search(str [, skip_async])
|
7480 |
+
* @param {String} str the search string
|
7481 |
+
* @param {Boolean} skip_async if set to true server will not be queried even if configured
|
7482 |
+
* @param {Boolean} show_only_matches if set to true only matching nodes will be shown (keep in mind this can be very slow on large trees or old browsers)
|
7483 |
+
* @param {mixed} inside an optional node to whose children to limit the search
|
7484 |
+
* @param {Boolean} append if set to true the results of this search are appended to the previous search
|
7485 |
+
* @plugin search
|
7486 |
+
* @trigger search.jstree
|
7487 |
+
*/
|
7488 |
+
this.search = function (str, skip_async, show_only_matches, inside, append, show_only_matches_children) {
|
7489 |
+
if(str === false || $.trim(str.toString()) === "") {
|
7490 |
+
return this.clear_search();
|
7491 |
+
}
|
7492 |
+
inside = this.get_node(inside);
|
7493 |
+
inside = inside && inside.id ? inside.id : null;
|
7494 |
+
str = str.toString();
|
7495 |
+
var s = this.settings.search,
|
7496 |
+
a = s.ajax ? s.ajax : false,
|
7497 |
+
m = this._model.data,
|
7498 |
+
f = null,
|
7499 |
+
r = [],
|
7500 |
+
p = [], i, j;
|
7501 |
+
if(this._data.search.res.length && !append) {
|
7502 |
+
this.clear_search();
|
7503 |
+
}
|
7504 |
+
if(show_only_matches === undefined) {
|
7505 |
+
show_only_matches = s.show_only_matches;
|
7506 |
+
}
|
7507 |
+
if(show_only_matches_children === undefined) {
|
7508 |
+
show_only_matches_children = s.show_only_matches_children;
|
7509 |
+
}
|
7510 |
+
if(!skip_async && a !== false) {
|
7511 |
+
if($.isFunction(a)) {
|
7512 |
+
return a.call(this, str, $.proxy(function (d) {
|
7513 |
+
if(d && d.d) { d = d.d; }
|
7514 |
+
this._load_nodes(!$.isArray(d) ? [] : $.vakata.array_unique(d), function () {
|
7515 |
+
this.search(str, true, show_only_matches, inside, append, show_only_matches_children);
|
7516 |
+
});
|
7517 |
+
}, this), inside);
|
7518 |
+
}
|
7519 |
+
else {
|
7520 |
+
a = $.extend({}, a);
|
7521 |
+
if(!a.data) { a.data = {}; }
|
7522 |
+
a.data.str = str;
|
7523 |
+
if(inside) {
|
7524 |
+
a.data.inside = inside;
|
7525 |
+
}
|
7526 |
+
if (this._data.search.lastRequest) {
|
7527 |
+
this._data.search.lastRequest.abort();
|
7528 |
+
}
|
7529 |
+
this._data.search.lastRequest = $.ajax(a)
|
7530 |
+
.fail($.proxy(function () {
|
7531 |
+
this._data.core.last_error = { 'error' : 'ajax', 'plugin' : 'search', 'id' : 'search_01', 'reason' : 'Could not load search parents', 'data' : JSON.stringify(a) };
|
7532 |
+
this.settings.core.error.call(this, this._data.core.last_error);
|
7533 |
+
}, this))
|
7534 |
+
.done($.proxy(function (d) {
|
7535 |
+
if(d && d.d) { d = d.d; }
|
7536 |
+
this._load_nodes(!$.isArray(d) ? [] : $.vakata.array_unique(d), function () {
|
7537 |
+
this.search(str, true, show_only_matches, inside, append, show_only_matches_children);
|
7538 |
+
});
|
7539 |
+
}, this));
|
7540 |
+
return this._data.search.lastRequest;
|
7541 |
+
}
|
7542 |
+
}
|
7543 |
+
if(!append) {
|
7544 |
+
this._data.search.str = str;
|
7545 |
+
this._data.search.dom = $();
|
7546 |
+
this._data.search.res = [];
|
7547 |
+
this._data.search.opn = [];
|
7548 |
+
this._data.search.som = show_only_matches;
|
7549 |
+
this._data.search.smc = show_only_matches_children;
|
7550 |
+
}
|
7551 |
+
|
7552 |
+
f = new $.vakata.search(str, true, { caseSensitive : s.case_sensitive, fuzzy : s.fuzzy });
|
7553 |
+
$.each(m[inside ? inside : $.jstree.root].children_d, function (ii, i) {
|
7554 |
+
var v = m[i];
|
7555 |
+
if(v.text && !v.state.hidden && (!s.search_leaves_only || (v.state.loaded && v.children.length === 0)) && ( (s.search_callback && s.search_callback.call(this, str, v)) || (!s.search_callback && f.search(v.text).isMatch) ) ) {
|
7556 |
+
r.push(i);
|
7557 |
+
p = p.concat(v.parents);
|
7558 |
+
}
|
7559 |
+
});
|
7560 |
+
if(r.length) {
|
7561 |
+
p = $.vakata.array_unique(p);
|
7562 |
+
for(i = 0, j = p.length; i < j; i++) {
|
7563 |
+
if(p[i] !== $.jstree.root && m[p[i]] && this.open_node(p[i], null, 0) === true) {
|
7564 |
+
this._data.search.opn.push(p[i]);
|
7565 |
+
}
|
7566 |
+
}
|
7567 |
+
if(!append) {
|
7568 |
+
this._data.search.dom = $(this.element[0].querySelectorAll('#' + $.map(r, function (v) { return "0123456789".indexOf(v[0]) !== -1 ? '\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\$&') : v.replace($.jstree.idregex,'\\$&'); }).join(', #')));
|
7569 |
+
this._data.search.res = r;
|
7570 |
+
}
|
7571 |
+
else {
|
7572 |
+
this._data.search.dom = this._data.search.dom.add($(this.element[0].querySelectorAll('#' + $.map(r, function (v) { return "0123456789".indexOf(v[0]) !== -1 ? '\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\$&') : v.replace($.jstree.idregex,'\\$&'); }).join(', #'))));
|
7573 |
+
this._data.search.res = $.vakata.array_unique(this._data.search.res.concat(r));
|
7574 |
+
}
|
7575 |
+
this._data.search.dom.children(".jstree-anchor").addClass('jstree-search');
|
7576 |
+
}
|
7577 |
+
/**
|
7578 |
+
* triggered after search is complete
|
7579 |
+
* @event
|
7580 |
+
* @name search.jstree
|
7581 |
+
* @param {jQuery} nodes a jQuery collection of matching nodes
|
7582 |
+
* @param {String} str the search string
|
7583 |
+
* @param {Array} res a collection of objects represeing the matching nodes
|
7584 |
+
* @plugin search
|
7585 |
+
*/
|
7586 |
+
this.trigger('search', { nodes : this._data.search.dom, str : str, res : this._data.search.res, show_only_matches : show_only_matches });
|
7587 |
+
};
|
7588 |
+
/**
|
7589 |
+
* used to clear the last search (removes classes and shows all nodes if filtering is on)
|
7590 |
+
* @name clear_search()
|
7591 |
+
* @plugin search
|
7592 |
+
* @trigger clear_search.jstree
|
7593 |
+
*/
|
7594 |
+
this.clear_search = function () {
|
7595 |
+
if(this.settings.search.close_opened_onclear) {
|
7596 |
+
this.close_node(this._data.search.opn, 0);
|
7597 |
+
}
|
7598 |
+
/**
|
7599 |
+
* triggered after search is complete
|
7600 |
+
* @event
|
7601 |
+
* @name clear_search.jstree
|
7602 |
+
* @param {jQuery} nodes a jQuery collection of matching nodes (the result from the last search)
|
7603 |
+
* @param {String} str the search string (the last search string)
|
7604 |
+
* @param {Array} res a collection of objects represeing the matching nodes (the result from the last search)
|
7605 |
+
* @plugin search
|
7606 |
+
*/
|
7607 |
+
this.trigger('clear_search', { 'nodes' : this._data.search.dom, str : this._data.search.str, res : this._data.search.res });
|
7608 |
+
if(this._data.search.res.length) {
|
7609 |
+
this._data.search.dom = $(this.element[0].querySelectorAll('#' + $.map(this._data.search.res, function (v) {
|
7610 |
+
return "0123456789".indexOf(v[0]) !== -1 ? '\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\$&') : v.replace($.jstree.idregex,'\\$&');
|
7611 |
+
}).join(', #')));
|
7612 |
+
this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search");
|
7613 |
+
}
|
7614 |
+
this._data.search.str = "";
|
7615 |
+
this._data.search.res = [];
|
7616 |
+
this._data.search.opn = [];
|
7617 |
+
this._data.search.dom = $();
|
7618 |
+
};
|
7619 |
+
|
7620 |
+
this.redraw_node = function(obj, deep, callback, force_render) {
|
7621 |
+
obj = parent.redraw_node.apply(this, arguments);
|
7622 |
+
if(obj) {
|
7623 |
+
if($.inArray(obj.id, this._data.search.res) !== -1) {
|
7624 |
+
var i, j, tmp = null;
|
7625 |
+
for(i = 0, j = obj.childNodes.length; i < j; i++) {
|
7626 |
+
if(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf("jstree-anchor") !== -1) {
|
7627 |
+
tmp = obj.childNodes[i];
|
7628 |
+
break;
|
7629 |
+
}
|
7630 |
+
}
|
7631 |
+
if(tmp) {
|
7632 |
+
tmp.className += ' jstree-search';
|
7633 |
+
}
|
7634 |
+
}
|
7635 |
+
}
|
7636 |
+
return obj;
|
7637 |
+
};
|
7638 |
+
};
|
7639 |
+
|
7640 |
+
// helpers
|
7641 |
+
(function ($) {
|
7642 |
+
// from http://kiro.me/projects/fuse.html
|
7643 |
+
$.vakata.search = function(pattern, txt, options) {
|
7644 |
+
options = options || {};
|
7645 |
+
options = $.extend({}, $.vakata.search.defaults, options);
|
7646 |
+
if(options.fuzzy !== false) {
|
7647 |
+
options.fuzzy = true;
|
7648 |
+
}
|
7649 |
+
pattern = options.caseSensitive ? pattern : pattern.toLowerCase();
|
7650 |
+
var MATCH_LOCATION = options.location,
|
7651 |
+
MATCH_DISTANCE = options.distance,
|
7652 |
+
MATCH_THRESHOLD = options.threshold,
|
7653 |
+
patternLen = pattern.length,
|
7654 |
+
matchmask, pattern_alphabet, match_bitapScore, search;
|
7655 |
+
if(patternLen > 32) {
|
7656 |
+
options.fuzzy = false;
|
7657 |
+
}
|
7658 |
+
if(options.fuzzy) {
|
7659 |
+
matchmask = 1 << (patternLen - 1);
|
7660 |
+
pattern_alphabet = (function () {
|
7661 |
+
var mask = {},
|
7662 |
+
i = 0;
|
7663 |
+
for (i = 0; i < patternLen; i++) {
|
7664 |
+
mask[pattern.charAt(i)] = 0;
|
7665 |
+
}
|
7666 |
+
for (i = 0; i < patternLen; i++) {
|
7667 |
+
mask[pattern.charAt(i)] |= 1 << (patternLen - i - 1);
|
7668 |
+
}
|
7669 |
+
return mask;
|
7670 |
+
}());
|
7671 |
+
match_bitapScore = function (e, x) {
|
7672 |
+
var accuracy = e / patternLen,
|
7673 |
+
proximity = Math.abs(MATCH_LOCATION - x);
|
7674 |
+
if(!MATCH_DISTANCE) {
|
7675 |
+
return proximity ? 1.0 : accuracy;
|
7676 |
+
}
|
7677 |
+
return accuracy + (proximity / MATCH_DISTANCE);
|
7678 |
+
};
|
7679 |
+
}
|
7680 |
+
search = function (text) {
|
7681 |
+
text = options.caseSensitive ? text : text.toLowerCase();
|
7682 |
+
if(pattern === text || text.indexOf(pattern) !== -1) {
|
7683 |
+
return {
|
7684 |
+
isMatch: true,
|
7685 |
+
score: 0
|
7686 |
+
};
|
7687 |
+
}
|
7688 |
+
if(!options.fuzzy) {
|
7689 |
+
return {
|
7690 |
+
isMatch: false,
|
7691 |
+
score: 1
|
7692 |
+
};
|
7693 |
+
}
|
7694 |
+
var i, j,
|
7695 |
+
textLen = text.length,
|
7696 |
+
scoreThreshold = MATCH_THRESHOLD,
|
7697 |
+
bestLoc = text.indexOf(pattern, MATCH_LOCATION),
|
7698 |
+
binMin, binMid,
|
7699 |
+
binMax = patternLen + textLen,
|
7700 |
+
lastRd, start, finish, rd, charMatch,
|
7701 |
+
score = 1,
|
7702 |
+
locations = [];
|
7703 |
+
if (bestLoc !== -1) {
|
7704 |
+
scoreThreshold = Math.min(match_bitapScore(0, bestLoc), scoreThreshold);
|
7705 |
+
bestLoc = text.lastIndexOf(pattern, MATCH_LOCATION + patternLen);
|
7706 |
+
if (bestLoc !== -1) {
|
7707 |
+
scoreThreshold = Math.min(match_bitapScore(0, bestLoc), scoreThreshold);
|
7708 |
+
}
|
7709 |
+
}
|
7710 |
+
bestLoc = -1;
|
7711 |
+
for (i = 0; i < patternLen; i++) {
|
7712 |
+
binMin = 0;
|
7713 |
+
binMid = binMax;
|
7714 |
+
while (binMin < binMid) {
|
7715 |
+
if (match_bitapScore(i, MATCH_LOCATION + binMid) <= scoreThreshold) {
|
7716 |
+
binMin = binMid;
|
7717 |
+
} else {
|
7718 |
+
binMax = binMid;
|
7719 |
+
}
|
7720 |
+
binMid = Math.floor((binMax - binMin) / 2 + binMin);
|
7721 |
+
}
|
7722 |
+
binMax = binMid;
|
7723 |
+
start = Math.max(1, MATCH_LOCATION - binMid + 1);
|
7724 |
+
finish = Math.min(MATCH_LOCATION + binMid, textLen) + patternLen;
|
7725 |
+
rd = new Array(finish + 2);
|
7726 |
+
rd[finish + 1] = (1 << i) - 1;
|
7727 |
+
for (j = finish; j >= start; j--) {
|
7728 |
+
charMatch = pattern_alphabet[text.charAt(j - 1)];
|
7729 |
+
if (i === 0) {
|
7730 |
+
rd[j] = ((rd[j + 1] << 1) | 1) & charMatch;
|
7731 |
+
} else {
|
7732 |
+
rd[j] = ((rd[j + 1] << 1) | 1) & charMatch | (((lastRd[j + 1] | lastRd[j]) << 1) | 1) | lastRd[j + 1];
|
7733 |
+
}
|
7734 |
+
if (rd[j] & matchmask) {
|
7735 |
+
score = match_bitapScore(i, j - 1);
|
7736 |
+
if (score <= scoreThreshold) {
|
7737 |
+
scoreThreshold = score;
|
7738 |
+
bestLoc = j - 1;
|
7739 |
+
locations.push(bestLoc);
|
7740 |
+
if (bestLoc > MATCH_LOCATION) {
|
7741 |
+
start = Math.max(1, 2 * MATCH_LOCATION - bestLoc);
|
7742 |
+
} else {
|
7743 |
+
break;
|
7744 |
+
}
|
7745 |
+
}
|
7746 |
+
}
|
7747 |
+
}
|
7748 |
+
if (match_bitapScore(i + 1, MATCH_LOCATION) > scoreThreshold) {
|
7749 |
+
break;
|
7750 |
+
}
|
7751 |
+
lastRd = rd;
|
7752 |
+
}
|
7753 |
+
return {
|
7754 |
+
isMatch: bestLoc >= 0,
|
7755 |
+
score: score
|
7756 |
+
};
|
7757 |
+
};
|
7758 |
+
return txt === true ? { 'search' : search } : search(txt);
|
7759 |
+
};
|
7760 |
+
$.vakata.search.defaults = {
|
7761 |
+
location : 0,
|
7762 |
+
distance : 100,
|
7763 |
+
threshold : 0.6,
|
7764 |
+
fuzzy : false,
|
7765 |
+
caseSensitive : false
|
7766 |
+
};
|
7767 |
+
}($));
|
7768 |
+
|
7769 |
+
// include the search plugin by default
|
7770 |
+
// $.jstree.defaults.plugins.push("search");
|
7771 |
+
|
7772 |
+
|
7773 |
+
/**
|
7774 |
+
* ### Sort plugin
|
7775 |
+
*
|
7776 |
+
* Automatically sorts all siblings in the tree according to a sorting function.
|
7777 |
+
*/
|
7778 |
+
|
7779 |
+
/**
|
7780 |
+
* the settings function used to sort the nodes.
|
7781 |
+
* It is executed in the tree's context, accepts two nodes as arguments and should return `1` or `-1`.
|
7782 |
+
* @name $.jstree.defaults.sort
|
7783 |
+
* @plugin sort
|
7784 |
+
*/
|
7785 |
+
$.jstree.defaults.sort = function (a, b) {
|
7786 |
+
//return this.get_type(a) === this.get_type(b) ? (this.get_text(a) > this.get_text(b) ? 1 : -1) : this.get_type(a) >= this.get_type(b);
|
7787 |
+
return this.get_text(a) > this.get_text(b) ? 1 : -1;
|
7788 |
+
};
|
7789 |
+
$.jstree.plugins.sort = function (options, parent) {
|
7790 |
+
this.bind = function () {
|
7791 |
+
parent.bind.call(this);
|
7792 |
+
this.element
|
7793 |
+
.on("model.jstree", $.proxy(function (e, data) {
|
7794 |
+
this.sort(data.parent, true);
|
7795 |
+
}, this))
|
7796 |
+
.on("rename_node.jstree create_node.jstree", $.proxy(function (e, data) {
|
7797 |
+
this.sort(data.parent || data.node.parent, false);
|
7798 |
+
this.redraw_node(data.parent || data.node.parent, true);
|
7799 |
+
}, this))
|
7800 |
+
.on("move_node.jstree copy_node.jstree", $.proxy(function (e, data) {
|
7801 |
+
this.sort(data.parent, false);
|
7802 |
+
this.redraw_node(data.parent, true);
|
7803 |
+
}, this));
|
7804 |
+
};
|
7805 |
+
/**
|
7806 |
+
* used to sort a node's children
|
7807 |
+
* @private
|
7808 |
+
* @name sort(obj [, deep])
|
7809 |
+
* @param {mixed} obj the node
|
7810 |
+
* @param {Boolean} deep if set to `true` nodes are sorted recursively.
|
7811 |
+
* @plugin sort
|
7812 |
+
* @trigger search.jstree
|
7813 |
+
*/
|
7814 |
+
this.sort = function (obj, deep) {
|
7815 |
+
var i, j;
|
7816 |
+
obj = this.get_node(obj);
|
7817 |
+
if(obj && obj.children && obj.children.length) {
|
7818 |
+
obj.children.sort($.proxy(this.settings.sort, this));
|
7819 |
+
if(deep) {
|
7820 |
+
for(i = 0, j = obj.children_d.length; i < j; i++) {
|
7821 |
+
this.sort(obj.children_d[i], false);
|
7822 |
+
}
|
7823 |
+
}
|
7824 |
+
}
|
7825 |
+
};
|
7826 |
+
};
|
7827 |
+
|
7828 |
+
// include the sort plugin by default
|
7829 |
+
// $.jstree.defaults.plugins.push("sort");
|
7830 |
+
|
7831 |
+
/**
|
7832 |
+
* ### State plugin
|
7833 |
+
*
|
7834 |
+
* Saves the state of the tree (selected nodes, opened nodes) on the user's computer using available options (localStorage, cookies, etc)
|
7835 |
+
*/
|
7836 |
+
|
7837 |
+
var to = false;
|
7838 |
+
/**
|
7839 |
+
* stores all defaults for the state plugin
|
7840 |
+
* @name $.jstree.defaults.state
|
7841 |
+
* @plugin state
|
7842 |
+
*/
|
7843 |
+
$.jstree.defaults.state = {
|
7844 |
+
/**
|
7845 |
+
* A string for the key to use when saving the current tree (change if using multiple trees in your project). Defaults to `jstree`.
|
7846 |
+
* @name $.jstree.defaults.state.key
|
7847 |
+
* @plugin state
|
7848 |
+
*/
|
7849 |
+
key : 'jstree',
|
7850 |
+
/**
|
7851 |
+
* A space separated list of events that trigger a state save. Defaults to `changed.jstree open_node.jstree close_node.jstree`.
|
7852 |
+
* @name $.jstree.defaults.state.events
|
7853 |
+
* @plugin state
|
7854 |
+
*/
|
7855 |
+
events : 'changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree',
|
7856 |
+
/**
|
7857 |
+
* Time in milliseconds after which the state will expire. Defaults to 'false' meaning - no expire.
|
7858 |
+
* @name $.jstree.defaults.state.ttl
|
7859 |
+
* @plugin state
|
7860 |
+
*/
|
7861 |
+
ttl : false,
|
7862 |
+
/**
|
7863 |
+
* A function that will be executed prior to restoring state with one argument - the state object. Can be used to clear unwanted parts of the state.
|
7864 |
+
* @name $.jstree.defaults.state.filter
|
7865 |
+
* @plugin state
|
7866 |
+
*/
|
7867 |
+
filter : false,
|
7868 |
+
/**
|
7869 |
+
* Should loaded nodes be restored (setting this to true means that it is possible that the whole tree will be loaded for some users - use with caution). Defaults to `false`
|
7870 |
+
* @name $.jstree.defaults.state.preserve_loaded
|
7871 |
+
* @plugin state
|
7872 |
+
*/
|
7873 |
+
preserve_loaded : false
|
7874 |
+
};
|
7875 |
+
$.jstree.plugins.state = function (options, parent) {
|
7876 |
+
this.bind = function () {
|
7877 |
+
parent.bind.call(this);
|
7878 |
+
var bind = $.proxy(function () {
|
7879 |
+
this.element.on(this.settings.state.events, $.proxy(function () {
|
7880 |
+
if(to) { clearTimeout(to); }
|
7881 |
+
to = setTimeout($.proxy(function () { this.save_state(); }, this), 100);
|
7882 |
+
}, this));
|
7883 |
+
/**
|
7884 |
+
* triggered when the state plugin is finished restoring the state (and immediately after ready if there is no state to restore).
|
7885 |
+
* @event
|
7886 |
+
* @name state_ready.jstree
|
7887 |
+
* @plugin state
|
7888 |
+
*/
|
7889 |
+
this.trigger('state_ready');
|
7890 |
+
}, this);
|
7891 |
+
this.element
|
7892 |
+
.on("ready.jstree", $.proxy(function (e, data) {
|
7893 |
+
this.element.one("restore_state.jstree", bind);
|
7894 |
+
if(!this.restore_state()) { bind(); }
|
7895 |
+
}, this));
|
7896 |
+
};
|
7897 |
+
/**
|
7898 |
+
* save the state
|
7899 |
+
* @name save_state()
|
7900 |
+
* @plugin state
|
7901 |
+
*/
|
7902 |
+
this.save_state = function () {
|
7903 |
+
var tm = this.get_state();
|
7904 |
+
if (!this.settings.state.preserve_loaded) {
|
7905 |
+
delete tm.core.loaded;
|
7906 |
+
}
|
7907 |
+
var st = { 'state' : tm, 'ttl' : this.settings.state.ttl, 'sec' : +(new Date()) };
|
7908 |
+
$.vakata.storage.set(this.settings.state.key, JSON.stringify(st));
|
7909 |
+
};
|
7910 |
+
/**
|
7911 |
+
* restore the state from the user's computer
|
7912 |
+
* @name restore_state()
|
7913 |
+
* @plugin state
|
7914 |
+
*/
|
7915 |
+
this.restore_state = function () {
|
7916 |
+
var k = $.vakata.storage.get(this.settings.state.key);
|
7917 |
+
if(!!k) { try { k = JSON.parse(k); } catch(ex) { return false; } }
|
7918 |
+
if(!!k && k.ttl && k.sec && +(new Date()) - k.sec > k.ttl) { return false; }
|
7919 |
+
if(!!k && k.state) { k = k.state; }
|
7920 |
+
if(!!k && $.isFunction(this.settings.state.filter)) { k = this.settings.state.filter.call(this, k); }
|
7921 |
+
if(!!k) {
|
7922 |
+
if (!this.settings.state.preserve_loaded) {
|
7923 |
+
delete k.core.loaded;
|
7924 |
+
}
|
7925 |
+
this.element.one("set_state.jstree", function (e, data) { data.instance.trigger('restore_state', { 'state' : $.extend(true, {}, k) }); });
|
7926 |
+
this.set_state(k);
|
7927 |
+
return true;
|
7928 |
+
}
|
7929 |
+
return false;
|
7930 |
+
};
|
7931 |
+
/**
|
7932 |
+
* clear the state on the user's computer
|
7933 |
+
* @name clear_state()
|
7934 |
+
* @plugin state
|
7935 |
+
*/
|
7936 |
+
this.clear_state = function () {
|
7937 |
+
return $.vakata.storage.del(this.settings.state.key);
|
7938 |
+
};
|
7939 |
+
};
|
7940 |
+
|
7941 |
+
(function ($, undefined) {
|
7942 |
+
$.vakata.storage = {
|
7943 |
+
// simply specifying the functions in FF throws an error
|
7944 |
+
set : function (key, val) { return window.localStorage.setItem(key, val); },
|
7945 |
+
get : function (key) { return window.localStorage.getItem(key); },
|
7946 |
+
del : function (key) { return window.localStorage.removeItem(key); }
|
7947 |
+
};
|
7948 |
+
}($));
|
7949 |
+
|
7950 |
+
// include the state plugin by default
|
7951 |
+
// $.jstree.defaults.plugins.push("state");
|
7952 |
+
|
7953 |
+
/**
|
7954 |
+
* ### Types plugin
|
7955 |
+
*
|
7956 |
+
* Makes it possible to add predefined types for groups of nodes, which make it possible to easily control nesting rules and icon for each group.
|
7957 |
+
*/
|
7958 |
+
|
7959 |
+
/**
|
7960 |
+
* An object storing all types as key value pairs, where the key is the type name and the value is an object that could contain following keys (all optional).
|
7961 |
+
*
|
7962 |
+
* * `max_children` the maximum number of immediate children this node type can have. Do not specify or set to `-1` for unlimited.
|
7963 |
+
* * `max_depth` the maximum number of nesting this node type can have. A value of `1` would mean that the node can have children, but no grandchildren. Do not specify or set to `-1` for unlimited.
|
7964 |
+
* * `valid_children` an array of node type strings, that nodes of this type can have as children. Do not specify or set to `-1` for no limits.
|
7965 |
+
* * `icon` a string - can be a path to an icon or a className, if using an image that is in the current directory use a `./` prefix, otherwise it will be detected as a class. Omit to use the default icon from your theme.
|
7966 |
+
* * `li_attr` an object of values which will be used to add HTML attributes on the resulting LI DOM node (merged with the node's own data)
|
7967 |
+
* * `a_attr` an object of values which will be used to add HTML attributes on the resulting A DOM node (merged with the node's own data)
|
7968 |
+
*
|
7969 |
+
* There are two predefined types:
|
7970 |
+
*
|
7971 |
+
* * `#` represents the root of the tree, for example `max_children` would control the maximum number of root nodes.
|
7972 |
+
* * `default` represents the default node - any settings here will be applied to all nodes that do not have a type specified.
|
7973 |
+
*
|
7974 |
+
* @name $.jstree.defaults.types
|
7975 |
+
* @plugin types
|
7976 |
+
*/
|
7977 |
+
$.jstree.defaults.types = {
|
7978 |
+
'default' : {}
|
7979 |
+
};
|
7980 |
+
$.jstree.defaults.types[$.jstree.root] = {};
|
7981 |
+
|
7982 |
+
$.jstree.plugins.types = function (options, parent) {
|
7983 |
+
this.init = function (el, options) {
|
7984 |
+
var i, j;
|
7985 |
+
if(options && options.types && options.types['default']) {
|
7986 |
+
for(i in options.types) {
|
7987 |
+
if(i !== "default" && i !== $.jstree.root && options.types.hasOwnProperty(i)) {
|
7988 |
+
for(j in options.types['default']) {
|
7989 |
+
if(options.types['default'].hasOwnProperty(j) && options.types[i][j] === undefined) {
|
7990 |
+
options.types[i][j] = options.types['default'][j];
|
7991 |
+
}
|
7992 |
+
}
|
7993 |
+
}
|
7994 |
+
}
|
7995 |
+
}
|
7996 |
+
parent.init.call(this, el, options);
|
7997 |
+
this._model.data[$.jstree.root].type = $.jstree.root;
|
7998 |
+
};
|
7999 |
+
this.refresh = function (skip_loading, forget_state) {
|
8000 |
+
parent.refresh.call(this, skip_loading, forget_state);
|
8001 |
+
this._model.data[$.jstree.root].type = $.jstree.root;
|
8002 |
+
};
|
8003 |
+
this.bind = function () {
|
8004 |
+
this.element
|
8005 |
+
.on('model.jstree', $.proxy(function (e, data) {
|
8006 |
+
var m = this._model.data,
|
8007 |
+
dpc = data.nodes,
|
8008 |
+
t = this.settings.types,
|
8009 |
+
i, j, c = 'default', k;
|
8010 |
+
for(i = 0, j = dpc.length; i < j; i++) {
|
8011 |
+
c = 'default';
|
8012 |
+
if(m[dpc[i]].original && m[dpc[i]].original.type && t[m[dpc[i]].original.type]) {
|
8013 |
+
c = m[dpc[i]].original.type;
|
8014 |
+
}
|
8015 |
+
if(m[dpc[i]].data && m[dpc[i]].data.jstree && m[dpc[i]].data.jstree.type && t[m[dpc[i]].data.jstree.type]) {
|
8016 |
+
c = m[dpc[i]].data.jstree.type;
|
8017 |
+
}
|
8018 |
+
m[dpc[i]].type = c;
|
8019 |
+
if(m[dpc[i]].icon === true && t[c].icon !== undefined) {
|
8020 |
+
m[dpc[i]].icon = t[c].icon;
|
8021 |
+
}
|
8022 |
+
if(t[c].li_attr !== undefined && typeof t[c].li_attr === 'object') {
|
8023 |
+
for (k in t[c].li_attr) {
|
8024 |
+
if (t[c].li_attr.hasOwnProperty(k)) {
|
8025 |
+
if (k === 'id') {
|
8026 |
+
continue;
|
8027 |
+
}
|
8028 |
+
else if (m[dpc[i]].li_attr[k] === undefined) {
|
8029 |
+
m[dpc[i]].li_attr[k] = t[c].li_attr[k];
|
8030 |
+
}
|
8031 |
+
else if (k === 'class') {
|
8032 |
+
m[dpc[i]].li_attr['class'] = t[c].li_attr['class'] + ' ' + m[dpc[i]].li_attr['class'];
|
8033 |
+
}
|
8034 |
+
}
|
8035 |
+
}
|
8036 |
+
}
|
8037 |
+
if(t[c].a_attr !== undefined && typeof t[c].a_attr === 'object') {
|
8038 |
+
for (k in t[c].a_attr) {
|
8039 |
+
if (t[c].a_attr.hasOwnProperty(k)) {
|
8040 |
+
if (k === 'id') {
|
8041 |
+
continue;
|
8042 |
+
}
|
8043 |
+
else if (m[dpc[i]].a_attr[k] === undefined) {
|
8044 |
+
m[dpc[i]].a_attr[k] = t[c].a_attr[k];
|
8045 |
+
}
|
8046 |
+
else if (k === 'href' && m[dpc[i]].a_attr[k] === '#') {
|
8047 |
+
m[dpc[i]].a_attr['href'] = t[c].a_attr['href'];
|
8048 |
+
}
|
8049 |
+
else if (k === 'class') {
|
8050 |
+
m[dpc[i]].a_attr['class'] = t[c].a_attr['class'] + ' ' + m[dpc[i]].a_attr['class'];
|
8051 |
+
}
|
8052 |
+
}
|
8053 |
+
}
|
8054 |
+
}
|
8055 |
+
}
|
8056 |
+
m[$.jstree.root].type = $.jstree.root;
|
8057 |
+
}, this));
|
8058 |
+
parent.bind.call(this);
|
8059 |
+
};
|
8060 |
+
this.get_json = function (obj, options, flat) {
|
8061 |
+
var i, j,
|
8062 |
+
m = this._model.data,
|
8063 |
+
opt = options ? $.extend(true, {}, options, {no_id:false}) : {},
|
8064 |
+
tmp = parent.get_json.call(this, obj, opt, flat);
|
8065 |
+
if(tmp === false) { return false; }
|
8066 |
+
if($.isArray(tmp)) {
|
8067 |
+
for(i = 0, j = tmp.length; i < j; i++) {
|
8068 |
+
tmp[i].type = tmp[i].id && m[tmp[i].id] && m[tmp[i].id].type ? m[tmp[i].id].type : "default";
|
8069 |
+
if(options && options.no_id) {
|
8070 |
+
delete tmp[i].id;
|
8071 |
+
if(tmp[i].li_attr && tmp[i].li_attr.id) {
|
8072 |
+
delete tmp[i].li_attr.id;
|
8073 |
+
}
|
8074 |
+
if(tmp[i].a_attr && tmp[i].a_attr.id) {
|
8075 |
+
delete tmp[i].a_attr.id;
|
8076 |
+
}
|
8077 |
+
}
|
8078 |
+
}
|
8079 |
+
}
|
8080 |
+
else {
|
8081 |
+
tmp.type = tmp.id && m[tmp.id] && m[tmp.id].type ? m[tmp.id].type : "default";
|
8082 |
+
if(options && options.no_id) {
|
8083 |
+
tmp = this._delete_ids(tmp);
|
8084 |
+
}
|
8085 |
+
}
|
8086 |
+
return tmp;
|
8087 |
+
};
|
8088 |
+
this._delete_ids = function (tmp) {
|
8089 |
+
if($.isArray(tmp)) {
|
8090 |
+
for(var i = 0, j = tmp.length; i < j; i++) {
|
8091 |
+
tmp[i] = this._delete_ids(tmp[i]);
|
8092 |
+
}
|
8093 |
+
return tmp;
|
8094 |
+
}
|
8095 |
+
delete tmp.id;
|
8096 |
+
if(tmp.li_attr && tmp.li_attr.id) {
|
8097 |
+
delete tmp.li_attr.id;
|
8098 |
+
}
|
8099 |
+
if(tmp.a_attr && tmp.a_attr.id) {
|
8100 |
+
delete tmp.a_attr.id;
|
8101 |
+
}
|
8102 |
+
if(tmp.children && $.isArray(tmp.children)) {
|
8103 |
+
tmp.children = this._delete_ids(tmp.children);
|
8104 |
+
}
|
8105 |
+
return tmp;
|
8106 |
+
};
|
8107 |
+
this.check = function (chk, obj, par, pos, more) {
|
8108 |
+
if(parent.check.call(this, chk, obj, par, pos, more) === false) { return false; }
|
8109 |
+
obj = obj && obj.id ? obj : this.get_node(obj);
|
8110 |
+
par = par && par.id ? par : this.get_node(par);
|
8111 |
+
var m = obj && obj.id ? (more && more.origin ? more.origin : $.jstree.reference(obj.id)) : null, tmp, d, i, j;
|
8112 |
+
m = m && m._model && m._model.data ? m._model.data : null;
|
8113 |
+
switch(chk) {
|
8114 |
+
case "create_node":
|
8115 |
+
case "move_node":
|
8116 |
+
case "copy_node":
|
8117 |
+
if(chk !== 'move_node' || $.inArray(obj.id, par.children) === -1) {
|
8118 |
+
tmp = this.get_rules(par);
|
8119 |
+
if(tmp.max_children !== undefined && tmp.max_children !== -1 && tmp.max_children === par.children.length) {
|
8120 |
+
this._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_01', 'reason' : 'max_children prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };
|
8121 |
+
return false;
|
8122 |
+
}
|
8123 |
+
if(tmp.valid_children !== undefined && tmp.valid_children !== -1 && $.inArray((obj.type || 'default'), tmp.valid_children) === -1) {
|
8124 |
+
this._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_02', 'reason' : 'valid_children prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };
|
8125 |
+
return false;
|
8126 |
+
}
|
8127 |
+
if(m && obj.children_d && obj.parents) {
|
8128 |
+
d = 0;
|
8129 |
+
for(i = 0, j = obj.children_d.length; i < j; i++) {
|
8130 |
+
d = Math.max(d, m[obj.children_d[i]].parents.length);
|
8131 |
+
}
|
8132 |
+
d = d - obj.parents.length + 1;
|
8133 |
+
}
|
8134 |
+
if(d <= 0 || d === undefined) { d = 1; }
|
8135 |
+
do {
|
8136 |
+
if(tmp.max_depth !== undefined && tmp.max_depth !== -1 && tmp.max_depth < d) {
|
8137 |
+
this._data.core.last_error = { 'error' : 'check', 'plugin' : 'types', 'id' : 'types_03', 'reason' : 'max_depth prevents function: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };
|
8138 |
+
return false;
|
8139 |
+
}
|
8140 |
+
par = this.get_node(par.parent);
|
8141 |
+
tmp = this.get_rules(par);
|
8142 |
+
d++;
|
8143 |
+
} while(par);
|
8144 |
+
}
|
8145 |
+
break;
|
8146 |
+
}
|
8147 |
+
return true;
|
8148 |
+
};
|
8149 |
+
/**
|
8150 |
+
* used to retrieve the type settings object for a node
|
8151 |
+
* @name get_rules(obj)
|
8152 |
+
* @param {mixed} obj the node to find the rules for
|
8153 |
+
* @return {Object}
|
8154 |
+
* @plugin types
|
8155 |
+
*/
|
8156 |
+
this.get_rules = function (obj) {
|
8157 |
+
obj = this.get_node(obj);
|
8158 |
+
if(!obj) { return false; }
|
8159 |
+
var tmp = this.get_type(obj, true);
|
8160 |
+
if(tmp.max_depth === undefined) { tmp.max_depth = -1; }
|
8161 |
+
if(tmp.max_children === undefined) { tmp.max_children = -1; }
|
8162 |
+
if(tmp.valid_children === undefined) { tmp.valid_children = -1; }
|
8163 |
+
return tmp;
|
8164 |
+
};
|
8165 |
+
/**
|
8166 |
+
* used to retrieve the type string or settings object for a node
|
8167 |
+
* @name get_type(obj [, rules])
|
8168 |
+
* @param {mixed} obj the node to find the rules for
|
8169 |
+
* @param {Boolean} rules if set to `true` instead of a string the settings object will be returned
|
8170 |
+
* @return {String|Object}
|
8171 |
+
* @plugin types
|
8172 |
+
*/
|
8173 |
+
this.get_type = function (obj, rules) {
|
8174 |
+
obj = this.get_node(obj);
|
8175 |
+
return (!obj) ? false : ( rules ? $.extend({ 'type' : obj.type }, this.settings.types[obj.type]) : obj.type);
|
8176 |
+
};
|
8177 |
+
/**
|
8178 |
+
* used to change a node's type
|
8179 |
+
* @name set_type(obj, type)
|
8180 |
+
* @param {mixed} obj the node to change
|
8181 |
+
* @param {String} type the new type
|
8182 |
+
* @plugin types
|
8183 |
+
*/
|
8184 |
+
this.set_type = function (obj, type) {
|
8185 |
+
var m = this._model.data, t, t1, t2, old_type, old_icon, k, d, a;
|
8186 |
+
if($.isArray(obj)) {
|
8187 |
+
obj = obj.slice();
|
8188 |
+
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
|
8189 |
+
this.set_type(obj[t1], type);
|
8190 |
+
}
|
8191 |
+
return true;
|
8192 |
+
}
|
8193 |
+
t = this.settings.types;
|
8194 |
+
obj = this.get_node(obj);
|
8195 |
+
if(!t[type] || !obj) { return false; }
|
8196 |
+
d = this.get_node(obj, true);
|
8197 |
+
if (d && d.length) {
|
8198 |
+
a = d.children('.jstree-anchor');
|
8199 |
+
}
|
8200 |
+
old_type = obj.type;
|
8201 |
+
old_icon = this.get_icon(obj);
|
8202 |
+
obj.type = type;
|
8203 |
+
if(old_icon === true || !t[old_type] || (t[old_type].icon !== undefined && old_icon === t[old_type].icon)) {
|
8204 |
+
this.set_icon(obj, t[type].icon !== undefined ? t[type].icon : true);
|
8205 |
+
}
|
8206 |
+
|
8207 |
+
// remove old type props
|
8208 |
+
if(t[old_type] && t[old_type].li_attr !== undefined && typeof t[old_type].li_attr === 'object') {
|
8209 |
+
for (k in t[old_type].li_attr) {
|
8210 |
+
if (t[old_type].li_attr.hasOwnProperty(k)) {
|
8211 |
+
if (k === 'id') {
|
8212 |
+
continue;
|
8213 |
+
}
|
8214 |
+
else if (k === 'class') {
|
8215 |
+
m[obj.id].li_attr['class'] = (m[obj.id].li_attr['class'] || '').replace(t[old_type].li_attr[k], '');
|
8216 |
+
if (d) { d.removeClass(t[old_type].li_attr[k]); }
|
8217 |
+
}
|
8218 |
+
else if (m[obj.id].li_attr[k] === t[old_type].li_attr[k]) {
|
8219 |
+
m[obj.id].li_attr[k] = null;
|
8220 |
+
if (d) { d.removeAttr(k); }
|
8221 |
+
}
|
8222 |
+
}
|
8223 |
+
}
|
8224 |
+
}
|
8225 |
+
if(t[old_type] && t[old_type].a_attr !== undefined && typeof t[old_type].a_attr === 'object') {
|
8226 |
+
for (k in t[old_type].a_attr) {
|
8227 |
+
if (t[old_type].a_attr.hasOwnProperty(k)) {
|
8228 |
+
if (k === 'id') {
|
8229 |
+
continue;
|
8230 |
+
}
|
8231 |
+
else if (k === 'class') {
|
8232 |
+
m[obj.id].a_attr['class'] = (m[obj.id].a_attr['class'] || '').replace(t[old_type].a_attr[k], '');
|
8233 |
+
if (a) { a.removeClass(t[old_type].a_attr[k]); }
|
8234 |
+
}
|
8235 |
+
else if (m[obj.id].a_attr[k] === t[old_type].a_attr[k]) {
|
8236 |
+
if (k === 'href') {
|
8237 |
+
m[obj.id].a_attr[k] = '#';
|
8238 |
+
if (a) { a.attr('href', '#'); }
|
8239 |
+
}
|
8240 |
+
else {
|
8241 |
+
delete m[obj.id].a_attr[k];
|
8242 |
+
if (a) { a.removeAttr(k); }
|
8243 |
+
}
|
8244 |
+
}
|
8245 |
+
}
|
8246 |
+
}
|
8247 |
+
}
|
8248 |
+
|
8249 |
+
// add new props
|
8250 |
+
if(t[type].li_attr !== undefined && typeof t[type].li_attr === 'object') {
|
8251 |
+
for (k in t[type].li_attr) {
|
8252 |
+
if (t[type].li_attr.hasOwnProperty(k)) {
|
8253 |
+
if (k === 'id') {
|
8254 |
+
continue;
|
8255 |
+
}
|
8256 |
+
else if (m[obj.id].li_attr[k] === undefined) {
|
8257 |
+
m[obj.id].li_attr[k] = t[type].li_attr[k];
|
8258 |
+
if (d) {
|
8259 |
+
if (k === 'class') {
|
8260 |
+
d.addClass(t[type].li_attr[k]);
|
8261 |
+
}
|
8262 |
+
else {
|
8263 |
+
d.attr(k, t[type].li_attr[k]);
|
8264 |
+
}
|
8265 |
+
}
|
8266 |
+
}
|
8267 |
+
else if (k === 'class') {
|
8268 |
+
m[obj.id].li_attr['class'] = t[type].li_attr[k] + ' ' + m[obj.id].li_attr['class'];
|
8269 |
+
if (d) { d.addClass(t[type].li_attr[k]); }
|
8270 |
+
}
|
8271 |
+
}
|
8272 |
+
}
|
8273 |
+
}
|
8274 |
+
if(t[type].a_attr !== undefined && typeof t[type].a_attr === 'object') {
|
8275 |
+
for (k in t[type].a_attr) {
|
8276 |
+
if (t[type].a_attr.hasOwnProperty(k)) {
|
8277 |
+
if (k === 'id') {
|
8278 |
+
continue;
|
8279 |
+
}
|
8280 |
+
else if (m[obj.id].a_attr[k] === undefined) {
|
8281 |
+
m[obj.id].a_attr[k] = t[type].a_attr[k];
|
8282 |
+
if (a) {
|
8283 |
+
if (k === 'class') {
|
8284 |
+
a.addClass(t[type].a_attr[k]);
|
8285 |
+
}
|
8286 |
+
else {
|
8287 |
+
a.attr(k, t[type].a_attr[k]);
|
8288 |
+
}
|
8289 |
+
}
|
8290 |
+
}
|
8291 |
+
else if (k === 'href' && m[obj.id].a_attr[k] === '#') {
|
8292 |
+
m[obj.id].a_attr['href'] = t[type].a_attr['href'];
|
8293 |
+
if (a) { a.attr('href', t[type].a_attr['href']); }
|
8294 |
+
}
|
8295 |
+
else if (k === 'class') {
|
8296 |
+
m[obj.id].a_attr['class'] = t[type].a_attr['class'] + ' ' + m[obj.id].a_attr['class'];
|
8297 |
+
if (a) { a.addClass(t[type].a_attr[k]); }
|
8298 |
+
}
|
8299 |
+
}
|
8300 |
+
}
|
8301 |
+
}
|
8302 |
+
|
8303 |
+
return true;
|
8304 |
+
};
|
8305 |
+
};
|
8306 |
+
// include the types plugin by default
|
8307 |
+
// $.jstree.defaults.plugins.push("types");
|
8308 |
+
|
8309 |
+
|
8310 |
+
/**
|
8311 |
+
* ### Unique plugin
|
8312 |
+
*
|
8313 |
+
* Enforces that no nodes with the same name can coexist as siblings.
|
8314 |
+
*/
|
8315 |
+
|
8316 |
+
/**
|
8317 |
+
* stores all defaults for the unique plugin
|
8318 |
+
* @name $.jstree.defaults.unique
|
8319 |
+
* @plugin unique
|
8320 |
+
*/
|
8321 |
+
$.jstree.defaults.unique = {
|
8322 |
+
/**
|
8323 |
+
* Indicates if the comparison should be case sensitive. Default is `false`.
|
8324 |
+
* @name $.jstree.defaults.unique.case_sensitive
|
8325 |
+
* @plugin unique
|
8326 |
+
*/
|
8327 |
+
case_sensitive : false,
|
8328 |
+
/**
|
8329 |
+
* Indicates if white space should be trimmed before the comparison. Default is `false`.
|
8330 |
+
* @name $.jstree.defaults.unique.trim_whitespace
|
8331 |
+
* @plugin unique
|
8332 |
+
*/
|
8333 |
+
trim_whitespace : false,
|
8334 |
+
/**
|
8335 |
+
* A callback executed in the instance's scope when a new node is created and the name is already taken, the two arguments are the conflicting name and the counter. The default will produce results like `New node (2)`.
|
8336 |
+
* @name $.jstree.defaults.unique.duplicate
|
8337 |
+
* @plugin unique
|
8338 |
+
*/
|
8339 |
+
duplicate : function (name, counter) {
|
8340 |
+
return name + ' (' + counter + ')';
|
8341 |
+
}
|
8342 |
+
};
|
8343 |
+
|
8344 |
+
$.jstree.plugins.unique = function (options, parent) {
|
8345 |
+
this.check = function (chk, obj, par, pos, more) {
|
8346 |
+
if(parent.check.call(this, chk, obj, par, pos, more) === false) { return false; }
|
8347 |
+
obj = obj && obj.id ? obj : this.get_node(obj);
|
8348 |
+
par = par && par.id ? par : this.get_node(par);
|
8349 |
+
if(!par || !par.children) { return true; }
|
8350 |
+
var n = chk === "rename_node" ? pos : obj.text,
|
8351 |
+
c = [],
|
8352 |
+
s = this.settings.unique.case_sensitive,
|
8353 |
+
w = this.settings.unique.trim_whitespace,
|
8354 |
+
m = this._model.data, i, j, t;
|
8355 |
+
for(i = 0, j = par.children.length; i < j; i++) {
|
8356 |
+
t = m[par.children[i]].text;
|
8357 |
+
if (!s) {
|
8358 |
+
t = t.toLowerCase();
|
8359 |
+
}
|
8360 |
+
if (w) {
|
8361 |
+
t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
8362 |
+
}
|
8363 |
+
c.push(t);
|
8364 |
+
}
|
8365 |
+
if(!s) { n = n.toLowerCase(); }
|
8366 |
+
if (w) { n = n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); }
|
8367 |
+
switch(chk) {
|
8368 |
+
case "delete_node":
|
8369 |
+
return true;
|
8370 |
+
case "rename_node":
|
8371 |
+
t = obj.text || '';
|
8372 |
+
if (!s) {
|
8373 |
+
t = t.toLowerCase();
|
8374 |
+
}
|
8375 |
+
if (w) {
|
8376 |
+
t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
8377 |
+
}
|
8378 |
+
i = ($.inArray(n, c) === -1 || (obj.text && t === n));
|
8379 |
+
if(!i) {
|
8380 |
+
this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_01', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };
|
8381 |
+
}
|
8382 |
+
return i;
|
8383 |
+
case "create_node":
|
8384 |
+
i = ($.inArray(n, c) === -1);
|
8385 |
+
if(!i) {
|
8386 |
+
this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_04', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };
|
8387 |
+
}
|
8388 |
+
return i;
|
8389 |
+
case "copy_node":
|
8390 |
+
i = ($.inArray(n, c) === -1);
|
8391 |
+
if(!i) {
|
8392 |
+
this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_02', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };
|
8393 |
+
}
|
8394 |
+
return i;
|
8395 |
+
case "move_node":
|
8396 |
+
i = ( (obj.parent === par.id && (!more || !more.is_multi)) || $.inArray(n, c) === -1);
|
8397 |
+
if(!i) {
|
8398 |
+
this._data.core.last_error = { 'error' : 'check', 'plugin' : 'unique', 'id' : 'unique_03', 'reason' : 'Child with name ' + n + ' already exists. Preventing: ' + chk, 'data' : JSON.stringify({ 'chk' : chk, 'pos' : pos, 'obj' : obj && obj.id ? obj.id : false, 'par' : par && par.id ? par.id : false }) };
|
8399 |
+
}
|
8400 |
+
return i;
|
8401 |
+
}
|
8402 |
+
return true;
|
8403 |
+
};
|
8404 |
+
this.create_node = function (par, node, pos, callback, is_loaded) {
|
8405 |
+
if(!node || node.text === undefined) {
|
8406 |
+
if(par === null) {
|
8407 |
+
par = $.jstree.root;
|
8408 |
+
}
|
8409 |
+
par = this.get_node(par);
|
8410 |
+
if(!par) {
|
8411 |
+
return parent.create_node.call(this, par, node, pos, callback, is_loaded);
|
8412 |
+
}
|
8413 |
+
pos = pos === undefined ? "last" : pos;
|
8414 |
+
if(!pos.toString().match(/^(before|after)$/) && !is_loaded && !this.is_loaded(par)) {
|
8415 |
+
return parent.create_node.call(this, par, node, pos, callback, is_loaded);
|
8416 |
+
}
|
8417 |
+
if(!node) { node = {}; }
|
8418 |
+
var tmp, n, dpc, i, j, m = this._model.data, s = this.settings.unique.case_sensitive, w = this.settings.unique.trim_whitespace, cb = this.settings.unique.duplicate, t;
|
8419 |
+
n = tmp = this.get_string('New node');
|
8420 |
+
dpc = [];
|
8421 |
+
for(i = 0, j = par.children.length; i < j; i++) {
|
8422 |
+
t = m[par.children[i]].text;
|
8423 |
+
if (!s) {
|
8424 |
+
t = t.toLowerCase();
|
8425 |
+
}
|
8426 |
+
if (w) {
|
8427 |
+
t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
8428 |
+
}
|
8429 |
+
dpc.push(t);
|
8430 |
+
}
|
8431 |
+
i = 1;
|
8432 |
+
t = n;
|
8433 |
+
if (!s) {
|
8434 |
+
t = t.toLowerCase();
|
8435 |
+
}
|
8436 |
+
if (w) {
|
8437 |
+
t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
8438 |
+
}
|
8439 |
+
while($.inArray(t, dpc) !== -1) {
|
8440 |
+
n = cb.call(this, tmp, (++i)).toString();
|
8441 |
+
t = n;
|
8442 |
+
if (!s) {
|
8443 |
+
t = t.toLowerCase();
|
8444 |
+
}
|
8445 |
+
if (w) {
|
8446 |
+
t = t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
8447 |
+
}
|
8448 |
+
}
|
8449 |
+
node.text = n;
|
8450 |
+
}
|
8451 |
+
return parent.create_node.call(this, par, node, pos, callback, is_loaded);
|
8452 |
+
};
|
8453 |
+
};
|
8454 |
+
|
8455 |
+
// include the unique plugin by default
|
8456 |
+
// $.jstree.defaults.plugins.push("unique");
|
8457 |
+
|
8458 |
+
|
8459 |
+
/**
|
8460 |
+
* ### Wholerow plugin
|
8461 |
+
*
|
8462 |
+
* Makes each node appear block level. Making selection easier. May cause slow down for large trees in old browsers.
|
8463 |
+
*/
|
8464 |
+
|
8465 |
+
var div = document.createElement('DIV');
|
8466 |
+
div.setAttribute('unselectable','on');
|
8467 |
+
div.setAttribute('role','presentation');
|
8468 |
+
div.className = 'jstree-wholerow';
|
8469 |
+
div.innerHTML = ' ';
|
8470 |
+
$.jstree.plugins.wholerow = function (options, parent) {
|
8471 |
+
this.bind = function () {
|
8472 |
+
parent.bind.call(this);
|
8473 |
+
|
8474 |
+
this.element
|
8475 |
+
.on('ready.jstree set_state.jstree', $.proxy(function () {
|
8476 |
+
this.hide_dots();
|
8477 |
+
}, this))
|
8478 |
+
.on("init.jstree loading.jstree ready.jstree", $.proxy(function () {
|
8479 |
+
//div.style.height = this._data.core.li_height + 'px';
|
8480 |
+
this.get_container_ul().addClass('jstree-wholerow-ul');
|
8481 |
+
}, this))
|
8482 |
+
.on("deselect_all.jstree", $.proxy(function (e, data) {
|
8483 |
+
this.element.find('.jstree-wholerow-clicked').removeClass('jstree-wholerow-clicked');
|
8484 |
+
}, this))
|
8485 |
+
.on("changed.jstree", $.proxy(function (e, data) {
|
8486 |
+
this.element.find('.jstree-wholerow-clicked').removeClass('jstree-wholerow-clicked');
|
8487 |
+
var tmp = false, i, j;
|
8488 |
+
for(i = 0, j = data.selected.length; i < j; i++) {
|
8489 |
+
tmp = this.get_node(data.selected[i], true);
|
8490 |
+
if(tmp && tmp.length) {
|
8491 |
+
tmp.children('.jstree-wholerow').addClass('jstree-wholerow-clicked');
|
8492 |
+
}
|
8493 |
+
}
|
8494 |
+
}, this))
|
8495 |
+
.on("open_node.jstree", $.proxy(function (e, data) {
|
8496 |
+
this.get_node(data.node, true).find('.jstree-clicked').parent().children('.jstree-wholerow').addClass('jstree-wholerow-clicked');
|
8497 |
+
}, this))
|
8498 |
+
.on("hover_node.jstree dehover_node.jstree", $.proxy(function (e, data) {
|
8499 |
+
if(e.type === "hover_node" && this.is_disabled(data.node)) { return; }
|
8500 |
+
this.get_node(data.node, true).children('.jstree-wholerow')[e.type === "hover_node"?"addClass":"removeClass"]('jstree-wholerow-hovered');
|
8501 |
+
}, this))
|
8502 |
+
.on("contextmenu.jstree", ".jstree-wholerow", $.proxy(function (e) {
|
8503 |
+
if (this._data.contextmenu) {
|
8504 |
+
e.preventDefault();
|
8505 |
+
var tmp = $.Event('contextmenu', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey, pageX : e.pageX, pageY : e.pageY });
|
8506 |
+
$(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp);
|
8507 |
+
}
|
8508 |
+
}, this))
|
8509 |
+
/*!
|
8510 |
+
.on("mousedown.jstree touchstart.jstree", ".jstree-wholerow", function (e) {
|
8511 |
+
if(e.target === e.currentTarget) {
|
8512 |
+
var a = $(e.currentTarget).closest(".jstree-node").children(".jstree-anchor");
|
8513 |
+
e.target = a[0];
|
8514 |
+
a.trigger(e);
|
8515 |
+
}
|
8516 |
+
})
|
8517 |
+
*/
|
8518 |
+
.on("click.jstree", ".jstree-wholerow", function (e) {
|
8519 |
+
e.stopImmediatePropagation();
|
8520 |
+
var tmp = $.Event('click', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey });
|
8521 |
+
$(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp).focus();
|
8522 |
+
})
|
8523 |
+
.on("dblclick.jstree", ".jstree-wholerow", function (e) {
|
8524 |
+
e.stopImmediatePropagation();
|
8525 |
+
var tmp = $.Event('dblclick', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey });
|
8526 |
+
$(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp).focus();
|
8527 |
+
})
|
8528 |
+
.on("click.jstree", ".jstree-leaf > .jstree-ocl", $.proxy(function (e) {
|
8529 |
+
e.stopImmediatePropagation();
|
8530 |
+
var tmp = $.Event('click', { metaKey : e.metaKey, ctrlKey : e.ctrlKey, altKey : e.altKey, shiftKey : e.shiftKey });
|
8531 |
+
$(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(tmp).focus();
|
8532 |
+
}, this))
|
8533 |
+
.on("mouseover.jstree", ".jstree-wholerow, .jstree-icon", $.proxy(function (e) {
|
8534 |
+
e.stopImmediatePropagation();
|
8535 |
+
if(!this.is_disabled(e.currentTarget)) {
|
8536 |
+
this.hover_node(e.currentTarget);
|
8537 |
+
}
|
8538 |
+
return false;
|
8539 |
+
}, this))
|
8540 |
+
.on("mouseleave.jstree", ".jstree-node", $.proxy(function (e) {
|
8541 |
+
this.dehover_node(e.currentTarget);
|
8542 |
+
}, this));
|
8543 |
+
};
|
8544 |
+
this.teardown = function () {
|
8545 |
+
if(this.settings.wholerow) {
|
8546 |
+
this.element.find(".jstree-wholerow").remove();
|
8547 |
+
}
|
8548 |
+
parent.teardown.call(this);
|
8549 |
+
};
|
8550 |
+
this.redraw_node = function(obj, deep, callback, force_render) {
|
8551 |
+
obj = parent.redraw_node.apply(this, arguments);
|
8552 |
+
if(obj) {
|
8553 |
+
var tmp = div.cloneNode(true);
|
8554 |
+
//tmp.style.height = this._data.core.li_height + 'px';
|
8555 |
+
if($.inArray(obj.id, this._data.core.selected) !== -1) { tmp.className += ' jstree-wholerow-clicked'; }
|
8556 |
+
if(this._data.core.focused && this._data.core.focused === obj.id) { tmp.className += ' jstree-wholerow-hovered'; }
|
8557 |
+
obj.insertBefore(tmp, obj.childNodes[0]);
|
8558 |
+
}
|
8559 |
+
return obj;
|
8560 |
+
};
|
8561 |
+
};
|
8562 |
+
// include the wholerow plugin by default
|
8563 |
+
// $.jstree.defaults.plugins.push("wholerow");
|
8564 |
+
if(document.registerElement && Object && Object.create) {
|
8565 |
+
var proto = Object.create(HTMLElement.prototype);
|
8566 |
+
proto.createdCallback = function () {
|
8567 |
+
var c = { core : {}, plugins : [] }, i;
|
8568 |
+
for(i in $.jstree.plugins) {
|
8569 |
+
if($.jstree.plugins.hasOwnProperty(i) && this.attributes[i]) {
|
8570 |
+
c.plugins.push(i);
|
8571 |
+
if(this.getAttribute(i) && JSON.parse(this.getAttribute(i))) {
|
8572 |
+
c[i] = JSON.parse(this.getAttribute(i));
|
8573 |
+
}
|
8574 |
+
}
|
8575 |
+
}
|
8576 |
+
for(i in $.jstree.defaults.core) {
|
8577 |
+
if($.jstree.defaults.core.hasOwnProperty(i) && this.attributes[i]) {
|
8578 |
+
c.core[i] = JSON.parse(this.getAttribute(i)) || this.getAttribute(i);
|
8579 |
+
}
|
8580 |
+
}
|
8581 |
+
$(this).jstree(c);
|
8582 |
+
};
|
8583 |
+
// proto.attributeChangedCallback = function (name, previous, value) { };
|
8584 |
+
try {
|
8585 |
+
document.registerElement("vakata-jstree", { prototype: proto });
|
8586 |
+
} catch(ignore) { }
|
8587 |
+
}
|
8588 |
+
|
8589 |
+
}));
|
assets/jstree/jstree.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jsTree - v3.3.5 - 2018-01-02 - (MIT) */
|
2 |
+
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a,b){"use strict";if(!a.jstree){var c=0,d=!1,e=!1,f=!1,g=[],h=a("script:last").attr("src"),i=window.document;a.jstree={version:"3.3.5",defaults:{plugins:[]},plugins:{},path:h&&-1!==h.indexOf("/")?h.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},a.jstree.create=function(b,d){var e=new a.jstree.core(++c),f=d;return d=a.extend(!0,{},a.jstree.defaults,d),f&&f.plugins&&(d.plugins=f.plugins),a.each(d.plugins,function(a,b){"core"!==a&&(e=e.plugin(b,d[b]))}),a(b).data("jstree",e),e.init(b,d),e},a.jstree.destroy=function(){a(".jstree:jstree").jstree("destroy"),a(i).off(".jstree")},a.jstree.core=function(a){this._id=a,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},a.jstree.reference=function(b){var c=null,d=null;if(!b||!b.id||b.tagName&&b.nodeType||(b=b.id),!d||!d.length)try{d=a(b)}catch(e){}if(!d||!d.length)try{d=a("#"+b.replace(a.jstree.idregex,"\\$&"))}catch(e){}return d&&d.length&&(d=d.closest(".jstree")).length&&(d=d.data("jstree"))?c=d:a(".jstree").each(function(){var d=a(this).data("jstree");return d&&d._model.data[b]?(c=d,!1):void 0}),c},a.fn.jstree=function(c){var d="string"==typeof c,e=Array.prototype.slice.call(arguments,1),f=null;return c!==!0||this.length?(this.each(function(){var g=a.jstree.reference(this),h=d&&g?g[c]:null;return f=d&&h?h.apply(g,e):null,g||d||c!==b&&!a.isPlainObject(c)||a.jstree.create(this,c),(g&&!d||c===!0)&&(f=g||!1),null!==f&&f!==b?!1:void 0}),null!==f&&f!==b?f:this):!1},a.expr.pseudos.jstree=a.expr.createPseudo(function(c){return function(c){return a(c).hasClass("jstree")&&a(c).data("jstree")!==b}}),a.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:a.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,keyboard:{"ctrl-space":function(b){b.type="click",a(b.currentTarget).trigger(b)},enter:function(b){b.type="click",a(b.currentTarget).trigger(b)},left:function(b){if(b.preventDefault(),this.is_open(b.currentTarget))this.close_node(b.currentTarget);else{var c=this.get_parent(b.currentTarget);c&&c.id!==a.jstree.root&&this.get_node(c,!0).children(".jstree-anchor").focus()}},up:function(a){a.preventDefault();var b=this.get_prev_dom(a.currentTarget);b&&b.length&&b.children(".jstree-anchor").focus()},right:function(b){if(b.preventDefault(),this.is_closed(b.currentTarget))this.open_node(b.currentTarget,function(a){this.get_node(a,!0).children(".jstree-anchor").focus()});else if(this.is_open(b.currentTarget)){var c=this.get_node(b.currentTarget,!0).children(".jstree-children")[0];c&&a(this._firstChild(c)).children(".jstree-anchor").focus()}},down:function(a){a.preventDefault();var b=this.get_next_dom(a.currentTarget);b&&b.length&&b.children(".jstree-anchor").focus()},"*":function(a){this.open_all()},home:function(b){b.preventDefault();var c=this._firstChild(this.get_container_ul()[0]);c&&a(c).children(".jstree-anchor").filter(":visible").focus()},end:function(a){a.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()},f2:function(a){a.preventDefault(),this.edit(a.currentTarget)}}},a.jstree.core.prototype={plugin:function(b,c){var d=a.jstree.plugins[b];return d?(this._data[b]={},d.prototype=this,new d(c,this)):this},init:function(b,c){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=a(b).addClass("jstree jstree-"+this._id),this.settings=c,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='tree-item'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(a.jstree.root)},destroy:function(a){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(b){}a||this.element.empty(),this.teardown()},_create_prototype_node:function(){var a=i.createElement("LI"),b,c;return a.setAttribute("role","treeitem"),b=i.createElement("I"),b.className="jstree-icon jstree-ocl",b.setAttribute("role","presentation"),a.appendChild(b),b=i.createElement("A"),b.className="jstree-anchor",b.setAttribute("href","#"),b.setAttribute("tabindex","-1"),c=i.createElement("I"),c.className="jstree-icon jstree-themeicon",c.setAttribute("role","presentation"),b.appendChild(c),a.appendChild(b),b=c=null,a},_kbevent_to_func:function(a){var b={8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},c=[];a.ctrlKey&&c.push("ctrl"),a.altKey&&c.push("alt"),a.shiftKey&&c.push("shift"),c.push(b[a.which]||a.which),c=c.sort().join("-").toLowerCase();var d=this.settings.core.keyboard,e,f;for(e in d)if(d.hasOwnProperty(e)&&(f=e,"-"!==f&&"+"!==f&&(f=f.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS"),f=f.split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),f===c))return d[e];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var b="",c=null,d=0;this.element.on("dblclick.jstree",function(a){if(a.target.tagName&&"input"===a.target.tagName.toLowerCase())return!0;if(i.selection&&i.selection.empty)i.selection.empty();else if(window.getSelection){var b=window.getSelection();try{b.removeAllRanges(),b.collapse()}catch(c){}}}).on("mousedown.jstree",a.proxy(function(a){a.target===this.element[0]&&(a.preventDefault(),d=+new Date)},this)).on("mousedown.jstree",".jstree-ocl",function(a){a.preventDefault()}).on("click.jstree",".jstree-ocl",a.proxy(function(a){this.toggle_node(a.target)},this)).on("dblclick.jstree",".jstree-anchor",a.proxy(function(a){return a.target.tagName&&"input"===a.target.tagName.toLowerCase()?!0:void(this.settings.core.dblclick_toggle&&this.toggle_node(a.target))},this)).on("click.jstree",".jstree-anchor",a.proxy(function(b){b.preventDefault(),b.currentTarget!==i.activeElement&&a(b.currentTarget).focus(),this.activate_node(b.currentTarget,b)},this)).on("keydown.jstree",".jstree-anchor",a.proxy(function(a){if(a.target.tagName&&"input"===a.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===a.which?a.which=39:39===a.which&&(a.which=37));var b=this._kbevent_to_func(a);if(b){var c=b.call(this,a);if(c===!1||c===!0)return c}},this)).on("load_node.jstree",a.proxy(function(b,c){c.status&&(c.node.id!==a.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(a.proxy(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var b=[],c,d;for(c=0,d=this._data.core.selected.length;d>c;c++)b=b.concat(this._model.data[this._data.core.selected[c]].parents);for(b=a.vakata.array_unique(b),c=0,d=b.length;d>c;c++)this.open_node(b[c],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}},this),0))},this)).on("keypress.jstree",a.proxy(function(d){if(d.target.tagName&&"input"===d.target.tagName.toLowerCase())return!0;c&&clearTimeout(c),c=setTimeout(function(){b=""},500);var e=String.fromCharCode(d.which).toLowerCase(),f=this.element.find(".jstree-anchor").filter(":visible"),g=f.index(i.activeElement)||0,h=!1;if(b+=e,b.length>1){if(f.slice(g).each(a.proxy(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).focus(),h=!0,!1):void 0},this)),h)return;if(f.slice(0,g).each(a.proxy(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).focus(),h=!0,!1):void 0},this)),h)return}if(new RegExp("^"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(b)){if(f.slice(g+1).each(a.proxy(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).focus(),h=!0,!1):void 0},this)),h)return;if(f.slice(0,g+1).each(a.proxy(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).focus(),h=!0,!1):void 0},this)),h)return}},this)).on("init.jstree",a.proxy(function(){var a=this.settings.core.themes;this._data.core.themes.dots=a.dots,this._data.core.themes.stripes=a.stripes,this._data.core.themes.icons=a.icons,this._data.core.themes.ellipsis=a.ellipsis,this.set_theme(a.name||"default",a.url),this.set_theme_variant(a.variant)},this)).on("loading.jstree",a.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()},this)).on("blur.jstree",".jstree-anchor",a.proxy(function(b){this._data.core.focused=null,a(b.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",a.proxy(function(b){var c=this.get_node(b.currentTarget);c&&c.id&&(this._data.core.focused=c.id),this.element.find(".jstree-hovered").not(b.currentTarget).mouseleave(),a(b.currentTarget).mouseenter(),this.element.attr("tabindex","-1")},this)).on("focus.jstree",a.proxy(function(){if(+new Date-d>500&&!this._data.core.focused&&this.settings.core.restore_focus){d=0;var a=this.get_node(this.element.attr("aria-activedescendant"),!0);a&&a.find("> .jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",a.proxy(function(a){this.hover_node(a.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",a.proxy(function(a){this.dehover_node(a.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),a(i).off(".jstree-"+this._id)},trigger:function(a,b){b||(b={}),b.instance=this,this.element.triggerHandler(a.replace(".jstree","")+".jstree",b)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(b){var c=this.settings.core.strings;return a.isFunction(c)?c.call(this,b):c&&c[b]?c[b]:b},_firstChild:function(a){a=a?a.firstChild:null;while(null!==a&&1!==a.nodeType)a=a.nextSibling;return a},_nextSibling:function(a){a=a?a.nextSibling:null;while(null!==a&&1!==a.nodeType)a=a.nextSibling;return a},_previousSibling:function(a){a=a?a.previousSibling:null;while(null!==a&&1!==a.nodeType)a=a.previousSibling;return a},get_node:function(b,c){b&&b.id&&(b=b.id);var d;try{if(this._model.data[b])b=this._model.data[b];else if("string"==typeof b&&this._model.data[b.replace(/^#/,"")])b=this._model.data[b.replace(/^#/,"")];else if("string"==typeof b&&(d=a("#"+b.replace(a.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else if((d=a(b,this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else{if(!(d=a(b,this.element)).length||!d.hasClass("jstree"))return!1;b=this._model.data[a.jstree.root]}return c&&(b=b.id===a.jstree.root?this.element:a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)),b}catch(e){return!1}},get_path:function(b,c,d){if(b=b.parents?b:this.get_node(b),!b||b.id===a.jstree.root||!b.parents)return!1;var e,f,g=[];for(g.push(d?b.id:b.text),e=0,f=b.parents.length;f>e;e++)g.push(d?b.parents[e]:this.get_text(b.parents[e]));return g=g.reverse().slice(1),c?g.join(c):g},get_next_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){d=this._firstChild(this.get_container_ul()[0]);while(d&&0===d.offsetHeight)d=this._nextSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}if(b.hasClass("jstree-open")){d=this._firstChild(b.children(".jstree-children")[0]);while(d&&0===d.offsetHeight)d=this._nextSibling(d);if(null!==d)return a(d)}d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return null!==d?a(d):b.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){d=this.get_container_ul()[0].lastChild;while(d&&0===d.offsetHeight)d=this._previousSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);if(null!==d){b=a(d);while(b.hasClass("jstree-open"))b=b.children(".jstree-children").first().children(".jstree-node:visible:last");return b}return d=b[0].parentNode.parentNode,d&&d.className&&-1!==d.className.indexOf("jstree-node")?a(d):!1},get_parent:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.parent:!1},get_children_dom:function(a){return a=this.get_node(a,!0),a[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):a&&a.length?a.children(".jstree-children").children(".jstree-node"):!1},is_parent:function(a){return a=this.get_node(a),a&&(a.state.loaded===!1||a.children.length>0)},is_loaded:function(a){return a=this.get_node(a),a&&a.state.loaded},is_loading:function(a){return a=this.get_node(a),a&&a.state&&a.state.loading},is_open:function(a){return a=this.get_node(a),a&&a.state.opened},is_closed:function(a){return a=this.get_node(a),a&&this.is_parent(a)&&!a.state.opened},is_leaf:function(a){return!this.is_parent(a)},load_node:function(b,c){var d,e,f,g,h;if(a.isArray(b))return this._load_nodes(b.slice(),c),!0;if(b=this.get_node(b),!b)return c&&c.call(this,b,!1),!1;if(b.state.loaded){for(b.state.loaded=!1,f=0,g=b.parents.length;g>f;f++)this._model.data[b.parents[f]].children_d=a.vakata.array_filter(this._model.data[b.parents[f]].children_d,function(c){return-1===a.inArray(c,b.children_d)});for(d=0,e=b.children_d.length;e>d;d++)this._model.data[b.children_d[d]].state.selected&&(h=!0),delete this._model.data[b.children_d[d]];h&&(this._data.core.selected=a.vakata.array_filter(this._data.core.selected,function(c){return-1===a.inArray(c,b.children_d)})),b.children=[],b.children_d=[],h&&this.trigger("changed",{action:"load_node",node:b,selected:this._data.core.selected})}return b.state.failed=!1,b.state.loading=!0,this.get_node(b,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(b,a.proxy(function(a){b=this._model.data[b.id],b.state.loading=!1,b.state.loaded=a,b.state.failed=!b.state.loaded;var d=this.get_node(b,!0),e=0,f=0,g=this._model.data,h=!1;for(e=0,f=b.children.length;f>e;e++)if(g[b.children[e]]&&!g[b.children[e]].state.hidden){h=!0;break}b.state.loaded&&d&&d.length&&(d.removeClass("jstree-closed jstree-open jstree-leaf"),h?"#"!==b.id&&d.addClass(b.state.opened?"jstree-open":"jstree-closed"):d.addClass("jstree-leaf")),d.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:b,status:a}),c&&c.call(this,b,a)},this)),!0},_load_nodes:function(a,b,c,d){var e=!0,f=function(){this._load_nodes(a,b,!0)},g=this._model.data,h,i,j=[];for(h=0,i=a.length;i>h;h++)g[a[h]]&&(!g[a[h]].state.loaded&&!g[a[h]].state.failed||!c&&d)&&(this.is_loading(a[h])||this.load_node(a[h],f),e=!1);if(e){for(h=0,i=a.length;i>h;h++)g[a[h]]&&g[a[h]].state.loaded&&j.push(a[h]);b&&!b.done&&(b.call(this,j),b.done=!0)}},load_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d=[],e=this._model.data,f=e[b.id].children_d,g,h;for(b.state&&!b.state.loaded&&d.push(b.id),g=0,h=f.length;h>g;g++)e[f[g]]&&e[f[g]].state&&!e[f[g]].state.loaded&&d.push(f[g]);d.length?this._load_nodes(d,function(){this.load_all(b,c)}):(c&&c.call(this,b),this.trigger("load_all",{node:b}))},_load_node:function(b,c){var d=this.settings.core.data,e,f=function g(){return 3!==this.nodeType&&8!==this.nodeType};return d?a.isFunction(d)?d.call(this,b,a.proxy(function(d){d===!1?c.call(this,!1):this["string"==typeof d?"_append_html_data":"_append_json_data"](b,"string"==typeof d?a(a.parseHTML(d)).filter(f):d,function(a){c.call(this,a)})},this)):"object"==typeof d?d.url?(d=a.extend(!0,{},d),a.isFunction(d.url)&&(d.url=d.url.call(this,b)),a.isFunction(d.data)&&(d.data=d.data.call(this,b)),a.ajax(d).done(a.proxy(function(d,e,g){var h=g.getResponseHeader("Content-Type");return h&&-1!==h.indexOf("json")||"object"==typeof d?this._append_json_data(b,d,function(a){c.call(this,a)}):h&&-1!==h.indexOf("html")||"string"==typeof d?this._append_html_data(b,a(a.parseHTML(d)).filter(f),function(a){c.call(this,a)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:g})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))},this)).fail(a.proxy(function(a){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:a})},c.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)},this))):(e=a.isArray(d)?a.extend(!0,[],d):a.isPlainObject(d)?a.extend(!0,{},d):d,b.id===a.jstree.root?this._append_json_data(b,e,function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))):"string"==typeof d?b.id===a.jstree.root?this._append_html_data(b,a(a.parseHTML(d)).filter(f),function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1)):c.call(this,!1):b.id===a.jstree.root?this._append_html_data(b,this._data.core.original_container_html.clone(!0),function(a){c.call(this,a)}):c.call(this,!1)},_node_changed:function(b){b=this.get_node(b),b&&-1===a.inArray(b.id,this._model.changed)&&this._model.changed.push(b.id)},_append_html_data:function(b,c,d){b=this.get_node(b),b.children=[],b.children_d=[];var e=c.is("ul")?c.children():c,f=b.id,g=[],h=[],i=this._model.data,j=i[f],k=this._data.core.selected.length,l,m,n;for(e.each(a.proxy(function(b,c){l=this._parse_model_from_html(a(c),f,j.parents.concat()),l&&(g.push(l),h.push(l),i[l].children_d.length&&(h=h.concat(i[l].children_d)))},this)),j.children=g,j.children_d=h,m=0,n=j.parents.length;n>m;m++)i[j.parents[m]].children_d=i[j.parents[m]].children_d.concat(h);this.trigger("model",{nodes:h,parent:f}),f!==a.jstree.root?(this._node_changed(f),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==k&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)},_append_json_data:function(b,c,d,e){if(null!==this.element){b=this.get_node(b),b.children=[],b.children_d=[],c.d&&(c=c.d,"string"==typeof c&&(c=JSON.parse(c))),a.isArray(c)||(c=[c]);var f=null,g={df:this._model.default_state,dat:c,par:b.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},h=function(a,b){a.data&&(a=a.data);var c=a.dat,d=a.par,e=[],f=[],g=[],h=a.df,i=a.t_id,j=a.t_cnt,k=a.m,l=k[d],m=a.sel,n,o,p,q,r=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=a.id.toString(),f,i,j,l,m={id:e,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in h)h.hasOwnProperty(f)&&(m.state[f]=h[f]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(m.icon=a.data.jstree.icon),(m.icon===b||null===m.icon||""===m.icon)&&(m.icon=!0),a&&a.data&&(m.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(m.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(m.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(m.li_attr[f]=a.li_attr[f]);if(m.li_attr.id||(m.li_attr.id=e),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(m.a_attr[f]=a.a_attr[f]);for(a&&a.children&&a.children===!0&&(m.state.loaded=!1,m.children=[],m.children_d=[]),k[m.id]=m,f=0,i=m.children.length;i>f;f++)j=r(k[m.children[f]],m.id,d),l=k[j],m.children_d.push(j),l.children_d.length&&(m.children_d=m.children_d.concat(l.children_d));return delete a.data,delete a.children,k[m.id].original=a,m.state.selected&&g.push(m.id),m.id},s=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=!1,f,l,m,n,o;do e="j"+i+"_"+ ++j;while(k[e]);o={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in h)h.hasOwnProperty(f)&&(o.state[f]=h[f]);if(a&&a.id&&(o.id=a.id.toString()),a&&a.text&&(o.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(o.icon=a.data.jstree.icon),(o.icon===b||null===o.icon||""===o.icon)&&(o.icon=!0),a&&a.data&&(o.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(o.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(o.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(o.li_attr[f]=a.li_attr[f]);if(o.li_attr.id&&!o.id&&(o.id=o.li_attr.id.toString()),o.id||(o.id=e),o.li_attr.id||(o.li_attr.id=o.id),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(o.a_attr[f]=a.a_attr[f]);if(a&&a.children&&a.children.length){for(f=0,l=a.children.length;l>f;f++)m=s(a.children[f],o.id,d),n=k[m],o.children.push(m),n.children_d.length&&(o.children_d=o.children_d.concat(n.children_d));o.children_d=o.children_d.concat(o.children)}return a&&a.children&&a.children===!0&&(o.state.loaded=!1,o.children=[],o.children_d=[]),delete a.data,delete a.children,o.original=a,k[o.id]=o,o.state.selected&&g.push(o.id),o.id};if(c.length&&c[0].id!==b&&c[0].parent!==b){for(o=0,p=c.length;p>o;o++)c[o].children||(c[o].children=[]),c[o].state||(c[o].state={}),k[c[o].id.toString()]=c[o];for(o=0,p=c.length;p>o;o++)k[c[o].parent.toString()]?(k[c[o].parent.toString()].children.push(c[o].id.toString()),l.children_d.push(c[o].id.toString())):(this._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:c[o].id.toString(),parent:c[o].parent.toString()})},this.settings.core.error.call(this,this._data.core.last_error));for(o=0,p=l.children.length;p>o;o++)n=r(k[l.children[o]],d,l.parents.concat()),f.push(n),k[n].children_d.length&&(f=f.concat(k[n].children_d));for(o=0,p=l.parents.length;p>o;o++)k[l.parents[o]].children_d=k[l.parents[o]].children_d.concat(f);q={cnt:j,mod:k,sel:m,par:d,dpc:f,add:g}}else{for(o=0,p=c.length;p>o;o++)n=s(c[o],d,l.parents.concat()),n&&(e.push(n),f.push(n),k[n].children_d.length&&(f=f.concat(k[n].children_d)));for(l.children=e,l.children_d=f,o=0,p=l.parents.length;p>o;o++)k[l.parents[o]].children_d=k[l.parents[o]].children_d.concat(f);q={cnt:j,mod:k,sel:m,par:d,dpc:f,add:g}}return"undefined"!=typeof window&&"undefined"!=typeof window.document?q:void postMessage(q)},i=function(b,c){if(null!==this.element){this._cnt=b.cnt;var e,f=this._model.data;for(e in f)f.hasOwnProperty(e)&&f[e].state&&f[e].state.loading&&b.mod[e]&&(b.mod[e].state.loading=!0);if(this._model.data=b.mod,c){var g,h=b.add,i=b.sel,j=this._data.core.selected.slice();if(f=this._model.data,i.length!==j.length||a.vakata.array_unique(i.concat(j)).length!==i.length){for(e=0,g=i.length;g>e;e++)-1===a.inArray(i[e],h)&&-1===a.inArray(i[e],j)&&(f[i[e]].state.selected=!1);for(e=0,g=j.length;g>e;e++)-1===a.inArray(j[e],i)&&(f[j[e]].state.selected=!0)}}b.add.length&&(this._data.core.selected=this._data.core.selected.concat(b.add)),this.trigger("model",{nodes:b.dpc,parent:b.par}),b.par!==a.jstree.root?(this._node_changed(b.par),this.redraw()):this.redraw(!0),b.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+h.toString()],{type:"text/javascript"}))),!this._data.core.working||e?(this._data.core.working=!0,f=new window.Worker(this._wrk),f.onmessage=a.proxy(function(a){i.call(this,a.data,!0);try{f.terminate(),f=null}catch(b){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),g.par?f.postMessage(g):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([b,c,d,!0])}catch(j){i.call(this,h(g),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else i.call(this,h(g),!1)}},_parse_model_from_html:function(c,d,e){e=e?[].concat(e):[],d&&e.unshift(d);var f,g,h=this._model.data,i={id:!1,text:!1,icon:!0,parent:d,parents:e,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},j,k,l;for(j in this._model.default_state)this._model.default_state.hasOwnProperty(j)&&(i.state[j]=this._model.default_state[j]);if(k=a.vakata.attributes(c,!0),a.each(k,function(b,c){return c=a.trim(c),c.length?(i.li_attr[b]=c,void("id"===b&&(i.id=c.toString()))):!0}),k=c.children("a").first(),k.length&&(k=a.vakata.attributes(k,!0),a.each(k,function(b,c){c=a.trim(c),c.length&&(i.a_attr[b]=c)})),k=c.children("a").first().length?c.children("a").first().clone():c.clone(),k.children("ins, i, ul").remove(),k=k.html(),k=a("<div />").html(k),i.text=this.settings.core.force_text?k.text():k.html(),k=c.data(),i.data=k?a.extend(!0,{},k):null,i.state.opened=c.hasClass("jstree-open"),i.state.selected=c.children("a").hasClass("jstree-clicked"),i.state.disabled=c.children("a").hasClass("jstree-disabled"),i.data&&i.data.jstree)for(j in i.data.jstree)i.data.jstree.hasOwnProperty(j)&&(i.state[j]=i.data.jstree[j]);k=c.children("a").children(".jstree-themeicon"),k.length&&(i.icon=k.hasClass("jstree-themeicon-hidden")?!1:k.attr("rel")),i.state.icon!==b&&(i.icon=i.state.icon),(i.icon===b||null===i.icon||""===i.icon)&&(i.icon=!0),k=c.children("ul").children("li");do l="j"+this._id+"_"+ ++this._cnt;while(h[l]);return i.id=i.li_attr.id?i.li_attr.id.toString():l,k.length?(k.each(a.proxy(function(b,c){f=this._parse_model_from_html(a(c),i.id,e),g=this._model.data[f],i.children.push(f),g.children_d.length&&(i.children_d=i.children_d.concat(g.children_d))},this)),i.children_d=i.children_d.concat(i.children)):c.hasClass("jstree-closed")&&(i.state.loaded=!1),i.li_attr["class"]&&(i.li_attr["class"]=i.li_attr["class"].replace("jstree-closed","").replace("jstree-open","")),i.a_attr["class"]&&(i.a_attr["class"]=i.a_attr["class"].replace("jstree-clicked","").replace("jstree-disabled","")),h[i.id]=i,i.state.selected&&this._data.core.selected.push(i.id),i.id},_parse_model_from_flat_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=a.id.toString(),f=this._model.data,g=this._model.default_state,h,i,j,k,l={id:e,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(h in g)g.hasOwnProperty(h)&&(l.state[h]=g[h]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0),a&&a.data&&(l.data=a.data,a.data.jstree))for(h in a.data.jstree)a.data.jstree.hasOwnProperty(h)&&(l.state[h]=a.data.jstree[h]);if(a&&"object"==typeof a.state)for(h in a.state)a.state.hasOwnProperty(h)&&(l.state[h]=a.state[h]);if(a&&"object"==typeof a.li_attr)for(h in a.li_attr)a.li_attr.hasOwnProperty(h)&&(l.li_attr[h]=a.li_attr[h]);if(l.li_attr.id||(l.li_attr.id=e),a&&"object"==typeof a.a_attr)for(h in a.a_attr)a.a_attr.hasOwnProperty(h)&&(l.a_attr[h]=a.a_attr[h]);for(a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),f[l.id]=l,h=0,i=l.children.length;i>h;h++)j=this._parse_model_from_flat_json(f[l.children[h]],l.id,d),k=f[j],l.children_d.push(j),k.children_d.length&&(l.children_d=l.children_d.concat(k.children_d));return delete a.data,delete a.children,f[l.id].original=a,l.state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=!1,f,g,h,i,j=this._model.data,k=this._model.default_state,l;do e="j"+this._id+"_"+ ++this._cnt;while(j[e]);l={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in k)k.hasOwnProperty(f)&&(l.state[f]=k[f]);if(a&&a.id&&(l.id=a.id.toString()),a&&a.text&&(l.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0),a&&a.data&&(l.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(l.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(l.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(l.li_attr[f]=a.li_attr[f]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),l.id||(l.id=e),l.li_attr.id||(l.li_attr.id=l.id),
|
3 |
+
a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(l.a_attr[f]=a.a_attr[f]);if(a&&a.children&&a.children.length){for(f=0,g=a.children.length;g>f;f++)h=this._parse_model_from_json(a.children[f],l.id,d),i=j[h],l.children.push(h),i.children_d.length&&(l.children_d=l.children_d.concat(i.children_d));l.children_d=l.children_d.concat(l.children)}return a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete a.data,delete a.children,l.original=a,j[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_redraw:function(){var b=this._model.force_full_redraw?this._model.data[a.jstree.root].children.concat([]):this._model.changed.concat([]),c=i.createElement("UL"),d,e,f,g=this._data.core.focused;for(e=0,f=b.length;f>e;e++)d=this.redraw_node(b[e],!0,this._model.force_full_redraw),d&&this._model.force_full_redraw&&c.appendChild(d);this._model.force_full_redraw&&(c.className=this.get_container_ul()[0].className,c.setAttribute("role","group"),this.element.empty().append(c)),null!==g&&(d=this.get_node(g,!0),d&&d.length&&d.children(".jstree-anchor")[0]!==i.activeElement?d.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:b})},redraw:function(a){a&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(b){var c=this.get_node(b),d=!1,e=!1,f=!1,g=i;if(!c)return!1;if(c.id===a.jstree.root)return this.redraw(!0);if(b=this.get_node(b,!0),!b||!b.length)return!1;if(b.children(".jstree-children").remove(),b=b[0],c.children.length&&c.state.loaded){for(f=g.createElement("UL"),f.setAttribute("role","group"),f.className="jstree-children",d=0,e=c.children.length;e>d;d++)f.appendChild(this.redraw_node(c.children[d],!0,!0));b.appendChild(f)}},redraw_node:function(b,c,d,e){var f=this.get_node(b),g=!1,h=!1,j=!1,k=!1,l=!1,m=!1,n="",o=i,p=this._model.data,q=!1,r=!1,s=null,t=0,u=0,v=!1,w=!1;if(!f)return!1;if(f.id===a.jstree.root)return this.redraw(!0);if(c=c||0===f.children.length,b=i.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(f.id[0])?"\\3"+f.id[0]+" "+f.id.substr(1).replace(a.jstree.idregex,"\\$&"):f.id.replace(a.jstree.idregex,"\\$&"))):i.getElementById(f.id))b=a(b),d||(g=b.parent().parent()[0],g===this.element[0]&&(g=null),h=b.index()),c||!f.children.length||b.children(".jstree-children").length||(c=!0),c||(j=b.children(".jstree-children")[0]),q=b.children(".jstree-anchor")[0]===i.activeElement,b.remove();else if(c=!0,!d){if(g=f.parent!==a.jstree.root?a("#"+f.parent.replace(a.jstree.idregex,"\\$&"),this.element)[0]:null,!(null===g||g&&p[f.parent].state.opened))return!1;h=a.inArray(f.id,null===g?p[a.jstree.root].children:p[f.parent].children)}b=this._data.core.node.cloneNode(!0),n="jstree-node ";for(k in f.li_attr)if(f.li_attr.hasOwnProperty(k)){if("id"===k)continue;"class"!==k?b.setAttribute(k,f.li_attr[k]):n+=f.li_attr[k]}for(f.a_attr.id||(f.a_attr.id=f.id+"_anchor"),b.setAttribute("aria-selected",!!f.state.selected),b.setAttribute("aria-level",f.parents.length),b.setAttribute("aria-labelledby",f.a_attr.id),f.state.disabled&&b.setAttribute("aria-disabled",!0),k=0,l=f.children.length;l>k;k++)if(!p[f.children[k]].state.hidden){v=!0;break}if(null!==f.parent&&p[f.parent]&&!f.state.hidden&&(k=a.inArray(f.id,p[f.parent].children),w=f.id,-1!==k))for(k++,l=p[f.parent].children.length;l>k;k++)if(p[p[f.parent].children[k]].state.hidden||(w=p[f.parent].children[k]),w!==f.id)break;f.state.hidden&&(n+=" jstree-hidden"),f.state.loading&&(n+=" jstree-loading"),f.state.loaded&&!v?n+=" jstree-leaf":(n+=f.state.opened&&f.state.loaded?" jstree-open":" jstree-closed",b.setAttribute("aria-expanded",f.state.opened&&f.state.loaded)),w===f.id&&(n+=" jstree-last"),b.id=f.id,b.className=n,n=(f.state.selected?" jstree-clicked":"")+(f.state.disabled?" jstree-disabled":"");for(l in f.a_attr)if(f.a_attr.hasOwnProperty(l)){if("href"===l&&"#"===f.a_attr[l])continue;"class"!==l?b.childNodes[1].setAttribute(l,f.a_attr[l]):n+=" "+f.a_attr[l]}if(n.length&&(b.childNodes[1].className="jstree-anchor "+n),(f.icon&&f.icon!==!0||f.icon===!1)&&(f.icon===!1?b.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===f.icon.indexOf("/")&&-1===f.icon.indexOf(".")?b.childNodes[1].childNodes[0].className+=" "+f.icon+" jstree-themeicon-custom":(b.childNodes[1].childNodes[0].style.backgroundImage='url("'+f.icon+'")',b.childNodes[1].childNodes[0].style.backgroundPosition="center center",b.childNodes[1].childNodes[0].style.backgroundSize="auto",b.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?b.childNodes[1].appendChild(o.createTextNode(f.text)):b.childNodes[1].innerHTML+=f.text,c&&f.children.length&&(f.state.opened||e)&&f.state.loaded){for(m=o.createElement("UL"),m.setAttribute("role","group"),m.className="jstree-children",k=0,l=f.children.length;l>k;k++)m.appendChild(this.redraw_node(f.children[k],c,!0));b.appendChild(m)}if(j&&b.appendChild(j),!d){for(g||(g=this.element[0]),k=0,l=g.childNodes.length;l>k;k++)if(g.childNodes[k]&&g.childNodes[k].className&&-1!==g.childNodes[k].className.indexOf("jstree-children")){s=g.childNodes[k];break}s||(s=o.createElement("UL"),s.setAttribute("role","group"),s.className="jstree-children",g.appendChild(s)),g=s,h<g.childNodes.length?g.insertBefore(b,g.childNodes[h]):g.appendChild(b),q&&(t=this.element[0].scrollTop,u=this.element[0].scrollLeft,b.childNodes[1].focus(),this.element[0].scrollTop=t,this.element[0].scrollLeft=u)}return f.state.opened&&!f.state.loaded&&(f.state.opened=!1,setTimeout(a.proxy(function(){this.open_node(f.id,!1,0)},this),0)),b},open_node:function(c,d,e){var f,g,h,i;if(a.isArray(c)){for(c=c.slice(),f=0,g=c.length;g>f;f++)this.open_node(c[f],d,e);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(e=e===b?this.settings.core.animation:e,this.is_closed(c)?this.is_loaded(c)?(h=this.get_node(c,!0),i=this,h.length&&(e&&h.children(".jstree-children").length&&h.children(".jstree-children").stop(!0,!0),c.children.length&&!this._firstChild(h.children(".jstree-children")[0])&&this.draw_children(c),e?(this.trigger("before_open",{node:c}),h.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").attr("aria-expanded",!0).children(".jstree-children").stop(!0,!0).slideDown(e,function(){this.style.display="",i.element&&i.trigger("after_open",{node:c})})):(this.trigger("before_open",{node:c}),h[0].className=h[0].className.replace("jstree-closed","jstree-open"),h[0].setAttribute("aria-expanded",!0))),c.state.opened=!0,d&&d.call(this,c,!0),h.length||this.trigger("before_open",{node:c}),this.trigger("open_node",{node:c}),e&&h.length||this.trigger("after_open",{node:c}),!0):this.is_loading(c)?setTimeout(a.proxy(function(){this.open_node(c,d,e)},this),500):void this.load_node(c,function(a,b){return b?this.open_node(a,d,e):d?d.call(this,a,!1):!1}):(d&&d.call(this,c,!1),!1)):!1},_open_to:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c,d,e=b.parents;for(c=0,d=e.length;d>c;c+=1)c!==a.jstree.root&&this.open_node(e[c],!1,0);return a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)},close_node:function(c,d){var e,f,g,h;if(a.isArray(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.close_node(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?this.is_closed(c)?!1:(d=d===b?this.settings.core.animation:d,g=this,h=this.get_node(c,!0),c.state.opened=!1,this.trigger("close_node",{node:c}),void(h.length?d?h.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded",!1).children(".jstree-children").stop(!0,!0).slideUp(d,function(){this.style.display="",h.children(".jstree-children").remove(),g.element&&g.trigger("after_close",{node:c})}):(h[0].className=h[0].className.replace("jstree-open","jstree-closed"),h.attr("aria-expanded",!1).children(".jstree-children").remove(),this.trigger("after_close",{node:c})):this.trigger("after_close",{node:c}))):!1},toggle_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.toggle_node(b[c]);return!0}return this.is_closed(b)?this.open_node(b):this.is_open(b)?this.close_node(b):void 0},open_all:function(b,c,d){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var e=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0),f,g,h;if(!e.length){for(f=0,g=b.children_d.length;g>f;f++)this.is_closed(this._model.data[b.children_d[f]])&&(this._model.data[b.children_d[f]].state.opened=!0);return this.trigger("open_all",{node:b})}d=d||e,h=this,e=this.is_closed(b)?e.find(".jstree-closed").addBack():e.find(".jstree-closed"),e.each(function(){h.open_node(this,function(a,b){b&&this.is_parent(a)&&this.open_all(a,c,d)},c||0)}),0===d.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(d)})},close_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0),e=this,f,g;for(d.length&&(d=this.is_open(b)?d.find(".jstree-open").addBack():d.find(".jstree-open"),a(d.get().reverse()).each(function(){e.close_node(this,c||0)})),f=0,g=b.children_d.length;g>f;f++)this._model.data[b.children_d[f]].state.opened=!1;this.trigger("close_all",{node:b})},is_disabled:function(a){return a=this.get_node(a),a&&a.state&&a.state.disabled},enable_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!1,this.get_node(b,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),void this.trigger("enable_node",{node:b})):!1},disable_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!0,this.get_node(b,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),void this.trigger("disable_node",{node:b})):!1},is_hidden:function(a){return a=this.get_node(a),a.state.hidden===!0},hide_node:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.hide_node(b[d],!0);return c||this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden||(b.state.hidden=!0,this._node_changed(b.parent),c||this.redraw(),this.trigger("hide_node",{node:b}))):!1},show_node:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.show_node(b[d],!0);return c||this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden&&(b.state.hidden=!1,this._node_changed(b.parent),c||this.redraw(),this.trigger("show_node",{node:b}))):!1},hide_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&!d[c].state.hidden&&(d[c].state.hidden=!0,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("hide_all",{nodes:e}),e},show_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&d[c].state.hidden&&(d[c].state.hidden=!1,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("show_all",{nodes:e}),e},activate_node:function(a,c){if(this.is_disabled(a))return!1;if(c&&"object"==typeof c||(c={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==b?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&(!c.shiftKey||this._data.core.last_clicked&&this.get_parent(a)&&this.get_parent(a)===this._data.core.last_clicked.parent))if(c.shiftKey){var d=this.get_node(a).id,e=this._data.core.last_clicked.id,f=this.get_node(this._data.core.last_clicked.parent).children,g=!1,h,i;for(h=0,i=f.length;i>h;h+=1)f[h]===d&&(g=!g),f[h]===e&&(g=!g),this.is_disabled(f[h])||!g&&f[h]!==d&&f[h]!==e?this.deselect_node(f[h],!0,c):this.is_hidden(f[h])||this.select_node(f[h],!0,!1,c);this.trigger("changed",{action:"select_node",node:this.get_node(a),selected:this._data.core.selected,event:c})}else this.is_selected(a)?this.deselect_node(a,!1,c):this.select_node(a,!1,!1,c);else!this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&this.is_selected(a)?this.deselect_node(a,!1,c):(this.deselect_all(!0),this.select_node(a,!1,!1,c),this._data.core.last_clicked=this.get_node(a));this.trigger("activate_node",{node:this.get_node(a),event:c})},hover_node:function(a){if(a=this.get_node(a,!0),!a||!a.length||a.children(".jstree-hovered").length)return!1;var b=this.element.find(".jstree-hovered"),c=this.element;b&&b.length&&this.dehover_node(b),a.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(a)}),setTimeout(function(){c.attr("aria-activedescendant",a[0].id)},0)},dehover_node:function(a){return a=this.get_node(a,!0),a&&a.length&&a.children(".jstree-hovered").length?(a.children(".jstree-anchor").removeClass("jstree-hovered"),void this.trigger("dehover_node",{node:this.get_node(a)})):!1},select_node:function(b,c,d,e){var f,g,h,i;if(a.isArray(b)){for(b=b.slice(),g=0,h=b.length;h>g;g++)this.select_node(b[g],c,d,e);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.selected||(b.state.selected=!0,this._data.core.selected.push(b.id),d||(f=this._open_to(b)),f&&f.length&&f.attr("aria-selected",!0).children(".jstree-anchor").addClass("jstree-clicked"),this.trigger("select_node",{node:b,selected:this._data.core.selected,event:e}),c||this.trigger("changed",{action:"select_node",node:b,selected:this._data.core.selected,event:e})))):!1},deselect_node:function(b,c,d){var e,f,g;if(a.isArray(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.deselect_node(b[e],c,d);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(g=this.get_node(b,!0),void(b.state.selected&&(b.state.selected=!1,this._data.core.selected=a.vakata.array_remove_item(this._data.core.selected,b.id),g.length&&g.attr("aria-selected",!1).children(".jstree-anchor").removeClass("jstree-clicked"),this.trigger("deselect_node",{node:b,selected:this._data.core.selected,event:d}),c||this.trigger("changed",{action:"deselect_node",node:b,selected:this._data.core.selected,event:d})))):!1},select_all:function(b){var c=this._data.core.selected.concat([]),d,e;for(this._data.core.selected=this._model.data[a.jstree.root].children_d.concat(),d=0,e=this._data.core.selected.length;e>d;d++)this._model.data[this._data.core.selected[d]]&&(this._model.data[this._data.core.selected[d]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),b||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:c})},deselect_all:function(a){var b=this._data.core.selected.concat([]),c,d;for(c=0,d=this._data.core.selected.length;d>c;c++)this._model.data[this._data.core.selected[c]]&&(this._model.data[this._data.core.selected[c]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").parent().attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:b}),a||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:b})},is_selected:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.selected:!1},get_selected:function(b){return b?a.map(this._data.core.selected,a.proxy(function(a){return this.get_node(a)},this)):this._data.core.selected.slice()},get_top_selected:function(b){var c=this.get_selected(!0),d={},e,f,g,h;for(e=0,f=c.length;f>e;e++)d[c[e].id]=c[e];for(e=0,f=c.length;f>e;e++)for(g=0,h=c[e].children_d.length;h>g;g++)d[c[e].children_d[g]]&&delete d[c[e].children_d[g]];c=[];for(e in d)d.hasOwnProperty(e)&&c.push(e);return b?a.map(c,a.proxy(function(a){return this.get_node(a)},this)):c},get_bottom_selected:function(b){var c=this.get_selected(!0),d=[],e,f;for(e=0,f=c.length;f>e;e++)c[e].children.length||d.push(c[e].id);return b?a.map(d,a.proxy(function(a){return this.get_node(a)},this)):d},get_state:function(){var b={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}},c;for(c in this._model.data)this._model.data.hasOwnProperty(c)&&c!==a.jstree.root&&(this._model.data[c].state.loaded&&this.settings.core.loaded_state&&b.core.loaded.push(c),this._model.data[c].state.opened&&b.core.open.push(c),this._model.data[c].state.selected&&b.core.selected.push(c));return b},set_state:function(c,d){if(c){if(c.core&&c.core.selected&&c.core.initial_selection===b&&(c.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),c.core){var e,f,g,h,i;if(c.core.loaded)return this.settings.core.loaded_state&&a.isArray(c.core.loaded)&&c.core.loaded.length?this._load_nodes(c.core.loaded,function(a){delete c.core.loaded,this.set_state(c,d)}):(delete c.core.loaded,this.set_state(c,d)),!1;if(c.core.open)return a.isArray(c.core.open)&&c.core.open.length?this._load_nodes(c.core.open,function(a){this.open_node(a,!1,0),delete c.core.open,this.set_state(c,d)}):(delete c.core.open,this.set_state(c,d)),!1;if(c.core.scroll)return c.core.scroll&&c.core.scroll.left!==b&&this.element.scrollLeft(c.core.scroll.left),c.core.scroll&&c.core.scroll.top!==b&&this.element.scrollTop(c.core.scroll.top),delete c.core.scroll,this.set_state(c,d),!1;if(c.core.selected)return h=this,(c.core.initial_selection===b||c.core.initial_selection===this._data.core.selected.concat([]).sort().join(","))&&(this.deselect_all(),a.each(c.core.selected,function(a,b){h.select_node(b,!1,!0)})),delete c.core.initial_selection,delete c.core.selected,this.set_state(c,d),!1;for(i in c)c.hasOwnProperty(i)&&"core"!==i&&-1===a.inArray(i,this.settings.plugins)&&delete c[i];if(a.isEmptyObject(c.core))return delete c.core,this.set_state(c,d),!1}return a.isEmptyObject(c)?(c=null,d&&d.call(this),this.trigger("set_state"),!1):!0}return!1},refresh:function(b,c){this._data.core.state=c===!0?{}:this.get_state(),c&&a.isFunction(c)&&(this._data.core.state=c.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var d=this.get_container_ul()[0].className;b||(this.element.html("<ul class='"+d+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='treeitem' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(a.jstree.root,function(b,c){c&&(this.get_container_ul()[0].className=d,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(a.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c=[],d=[],e=this._data.core.selected.concat([]);d.push(b.id),b.state.opened===!0&&c.push(b.id),this.get_node(b,!0).find(".jstree-open").each(function(){d.push(this.id),c.push(this.id)}),this._load_nodes(d,a.proxy(function(a){this.open_node(c,!1,0),this.select_node(e),this.trigger("refresh_node",{node:b,nodes:a})},this),!1,!0)},set_id:function(b,c){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var d,e,f=this._model.data,g=b.id;for(c=c.toString(),f[b.parent].children[a.inArray(b.id,f[b.parent].children)]=c,d=0,e=b.parents.length;e>d;d++)f[b.parents[d]].children_d[a.inArray(b.id,f[b.parents[d]].children_d)]=c;for(d=0,e=b.children.length;e>d;d++)f[b.children[d]].parent=c;for(d=0,e=b.children_d.length;e>d;d++)f[b.children_d[d]].parents[a.inArray(b.id,f[b.children_d[d]].parents)]=c;return d=a.inArray(b.id,this._data.core.selected),-1!==d&&(this._data.core.selected[d]=c),d=this.get_node(b.id,!0),d&&(d.attr("id",c),this.element.attr("aria-activedescendant")===b.id&&this.element.attr("aria-activedescendant",c)),delete f[b.id],b.id=c,b.li_attr.id=c,f[c]=b,this.trigger("set_id",{node:b,"new":b.id,old:g}),!0},get_text:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.text:!1},set_text:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.set_text(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.text=c,this.get_node(b,!0).length&&this.redraw_node(b.id),this.trigger("set_text",{obj:b,text:c}),!0):!1},get_json:function(b,c,d){if(b=this.get_node(b||a.jstree.root),!b)return!1;c&&c.flat&&!d&&(d=[]);var e={id:b.id,text:b.text,icon:this.get_icon(b),li_attr:a.extend(!0,{},b.li_attr),a_attr:a.extend(!0,{},b.a_attr),state:{},data:c&&c.no_data?!1:a.extend(!0,a.isArray(b.data)?[]:{},b.data)},f,g;if(c&&c.flat?e.parent=b.parent:e.children=[],c&&c.no_state)delete e.state;else for(f in b.state)b.state.hasOwnProperty(f)&&(e.state[f]=b.state[f]);if(c&&c.no_li_attr&&delete e.li_attr,c&&c.no_a_attr&&delete e.a_attr,c&&c.no_id&&(delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.a_attr&&e.a_attr.id&&delete e.a_attr.id),c&&c.flat&&b.id!==a.jstree.root&&d.push(e),!c||!c.no_children)for(f=0,g=b.children.length;g>f;f++)c&&c.flat?this.get_json(b.children[f],c,d):e.children.push(this.get_json(b.children[f],c));return c&&c.flat?d:b.id===a.jstree.root?e.children:e},create_node:function(c,d,e,f,g){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return!1;if(e=e===b?"last":e,!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(c))return this.load_node(c,function(){this.create_node(c,d,e,f,!0)});d||(d={text:this.get_string("New node")}),d="string"==typeof d?{text:d}:a.extend(!0,{},d),d.text===b&&(d.text=this.get_string("New node"));var h,i,j,k;switch(c.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":h=this.get_node(c.parent),e=a.inArray(c.id,h.children),c=h;break;case"after":h=this.get_node(c.parent),e=a.inArray(c.id,h.children)+1,c=h;break;case"inside":case"first":e=0;break;case"last":e=c.children.length;break;default:e||(e=0)}if(e>c.children.length&&(e=c.children.length),d.id||(d.id=!0),!this.check("create_node",d,c,e))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(d.id===!0&&delete d.id,d=this._parse_model_from_json(d,c.id,c.parents.concat()),!d)return!1;for(h=this.get_node(d),i=[],i.push(d),i=i.concat(h.children_d),this.trigger("model",{nodes:i,parent:c.id}),c.children_d=c.children_d.concat(i),j=0,k=c.parents.length;k>j;j++)this._model.data[c.parents[j]].children_d=this._model.data[c.parents[j]].children_d.concat(i);for(d=h,h=[],j=0,k=c.children.length;k>j;j++)h[j>=e?j+1:j]=c.children[j];return h[e]=d.id,c.children=h,this.redraw_node(c,!0),this.trigger("create_node",{node:this.get_node(d),parent:c.id,position:e}),f&&f.call(this,this.get_node(d)),d.id},rename_node:function(b,c){var d,e,f;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.rename_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=b.text,this.check("rename_node",b,this.get_parent(b),c)?(this.set_text(b,c),this.trigger("rename_node",{node:b,text:c,old:f}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1)):!1},delete_node:function(b){var c,d,e,f,g,h,i,j,k,l,m,n;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.delete_node(b[c]);return!0}if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;if(e=this.get_node(b.parent),f=a.inArray(b.id,e.children),l=!1,!this.check("delete_node",b,e,f))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==f&&(e.children=a.vakata.array_remove(e.children,f)),g=b.children_d.concat([]),g.push(b.id),h=0,i=b.parents.length;i>h;h++)this._model.data[b.parents[h]].children_d=a.vakata.array_filter(this._model.data[b.parents[h]].children_d,function(b){return-1===a.inArray(b,g)});for(j=0,k=g.length;k>j;j++)if(this._model.data[g[j]].state.selected){l=!0;break}for(l&&(this._data.core.selected=a.vakata.array_filter(this._data.core.selected,function(b){return-1===a.inArray(b,g)})),this.trigger("delete_node",{node:b,parent:e.id}),l&&this.trigger("changed",{action:"delete_node",node:b,selected:this._data.core.selected,parent:e.id}),j=0,k=g.length;k>j;j++)delete this._model.data[g[j]];return-1!==a.inArray(this._data.core.focused,g)&&(this._data.core.focused=null,m=this.element[0].scrollTop,n=this.element[0].scrollLeft,e.id===a.jstree.root?this._model.data[a.jstree.root].children[0]&&this.get_node(this._model.data[a.jstree.root].children[0],!0).children(".jstree-anchor").focus():this.get_node(e,!0).children(".jstree-anchor").focus(),this.element[0].scrollTop=m,this.element[0].scrollLeft=n),this.redraw_node(e,!0),!0},check:function(b,c,d,e,f){c=c&&c.id?c:this.get_node(c),d=d&&d.id?d:this.get_node(d);var g=b.match(/^move_node|copy_node|create_node$/i)?d:c,h=this.settings.core.check_callback;return"move_node"!==b&&"copy_node"!==b||f&&f.is_multi||c.id!==d.id&&("move_node"!==b||a.inArray(c.id,d.children)!==e)&&-1===a.inArray(d.id,c.children_d)?(g&&g.data&&(g=g.data),g&&g.functions&&(g.functions[b]===!1||g.functions[b]===!0)?(g.functions[b]===!1&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})}),g.functions[b]):h===!1||a.isFunction(h)&&h.call(this,b,c,d,e,f)===!1||h&&h[b]===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1):!0):(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.move_node(c,d,e,f,!0,!1,i)});if(a.isArray(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(r=this.move_node(c[j],d,e,f,g,!1,i))&&(d=r,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;if(l=(c.parent||a.jstree.root).toString(),n=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,o=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),p=!o||!o._id||this._id!==o._id,m=o&&o._id&&l&&o._model.data[l]&&o._model.data[l].children?a.inArray(c.id,o._model.data[l].children):-1,o&&o._id&&(c=o._model.data[c.id]),p)return(r=this.copy_node(c,d,e,f,g,!1,i))?(o&&o.delete_node(c),r):!1;switch(d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,n.children);break;case"after":e=a.inArray(d.id,n.children)+1;break;case"inside":case"first":e=0;break;case"last":e=n.children.length;break;default:e||(e=0)}if(e>n.children.length&&(e=n.children.length),!this.check("move_node",c,n,e,{core:!0,origin:i,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(c.parent===n.id){for(q=n.children.concat(),r=a.inArray(c.id,q),-1!==r&&(q=a.vakata.array_remove(q,r),e>r&&e--),r=[],s=0,t=q.length;t>s;s++)r[s>=e?s+1:s]=q[s];r[e]=c.id,n.children=r,this._node_changed(n.id),this.redraw(n.id===a.jstree.root)}else{for(r=c.children_d.concat(),r.push(c.id),s=0,t=c.parents.length;t>s;s++){for(q=[],w=o._model.data[c.parents[s]].children_d,u=0,v=w.length;v>u;u++)-1===a.inArray(w[u],r)&&q.push(w[u]);o._model.data[c.parents[s]].children_d=q}for(o._model.data[l].children=a.vakata.array_remove_item(o._model.data[l].children,c.id),s=0,t=n.parents.length;t>s;s++)this._model.data[n.parents[s]].children_d=this._model.data[n.parents[s]].children_d.concat(r);for(q=[],s=0,t=n.children.length;t>s;s++)q[s>=e?s+1:s]=n.children[s];for(q[e]=c.id,n.children=q,n.children_d.push(c.id),n.children_d=n.children_d.concat(c.children_d),c.parent=n.id,r=n.parents.concat(),r.unshift(n.id),w=c.parents.length,c.parents=r,r=r.concat(),s=0,t=c.children_d.length;t>s;s++)this._model.data[c.children_d[s]].parents=this._model.data[c.children_d[s]].parents.slice(0,-1*w),Array.prototype.push.apply(this._model.data[c.children_d[s]].parents,r);(l===a.jstree.root||n.id===a.jstree.root)&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(l),this._node_changed(n.id)),h||this.redraw()}return f&&f.call(this,c,n,e),this.trigger("move_node",{node:c,parent:n.id,position:e,old_parent:l,old_position:m,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id,old_instance:o,new_instance:this}),c.id},copy_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.copy_node(c,d,e,f,!0,!1,i)});if(a.isArray(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(m=this.copy_node(c[j],d,e,f,g,!0,i))&&(d=m,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;switch(q=(c.parent||a.jstree.root).toString(),r=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,s=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),t=!s||!s._id||this._id!==s._id,s&&s._id&&(c=s._model.data[c.id]),d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,r.children);break;case"after":e=a.inArray(d.id,r.children)+1;break;case"inside":case"first":e=0;break;case"last":e=r.children.length;break;default:e||(e=0)}if(e>r.children.length&&(e=r.children.length),!this.check("copy_node",c,r,e,{core:!0,origin:i,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(p=s?s.get_json(c,{no_id:!0,no_data:!0,no_state:!0}):c,!p)return!1;if(p.id===!0&&delete p.id,p=this._parse_model_from_json(p,r.id,r.parents.concat()),!p)return!1;for(m=this.get_node(p),c&&c.state&&c.state.loaded===!1&&(m.state.loaded=!1),l=[],l.push(p),l=l.concat(m.children_d),this.trigger("model",{nodes:l,parent:r.id}),n=0,o=r.parents.length;o>n;n++)this._model.data[r.parents[n]].children_d=this._model.data[r.parents[n]].children_d.concat(l);for(l=[],n=0,o=r.children.length;o>n;n++)l[n>=e?n+1:n]=r.children[n];return l[e]=m.id,r.children=l,r.children_d.push(m.id),r.children_d=r.children_d.concat(m.children_d),r.id===a.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(r.id),h||this.redraw(r.id===a.jstree.root),f&&f.call(this,m,r,e),this.trigger("copy_node",{node:m,original:c,parent:r.id,position:e,old_parent:q,old_position:s&&s._id&&q&&s._model.data[q]&&s._model.data[q].children?a.inArray(c.id,s._model.data[q].children):-1,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id,old_instance:s,new_instance:this}),m.id},cut:function(b){if(b||(b=this._data.core.selected.concat()),a.isArray(b)||(b=[b]),!b.length)return!1;var c=[],g,h,i;for(h=0,i=b.length;i>h;h++)g=this.get_node(b[h]),g&&g.id&&g.id!==a.jstree.root&&c.push(g);return c.length?(d=c,f=this,e="move_node",void this.trigger("cut",{
|
4 |
+
node:b})):!1},copy:function(b){if(b||(b=this._data.core.selected.concat()),a.isArray(b)||(b=[b]),!b.length)return!1;var c=[],g,h,i;for(h=0,i=b.length;i>h;h++)g=this.get_node(b[h]),g&&g.id&&g.id!==a.jstree.root&&c.push(g);return c.length?(d=c,f=this,e="copy_node",void this.trigger("copy",{node:b})):!1},get_buffer:function(){return{mode:e,node:d,inst:f}},can_paste:function(){return e!==!1&&d!==!1},paste:function(a,b){return a=this.get_node(a),a&&e&&e.match(/^(copy_node|move_node)$/)&&d?(this[e](d,a,b,!1,!1,!1,f)&&this.trigger("paste",{parent:a.id,node:d,mode:e}),d=!1,e=!1,void(f=!1)):!1},clear_buffer:function(){d=!1,e=!1,f=!1,this.trigger("clear_buffer")},edit:function(b,c,d){var e,f,g,h,j,k,l,m,n,o=!1;return(b=this.get_node(b))?this.check("edit",b,this.get_parent(b))?(n=b,c="string"==typeof c?c:b.text,this.set_text(b,""),b=this._open_to(b),n.text=c,e=this._data.core.rtl,f=this.element.width(),this._data.core.focused=n.id,g=b.children(".jstree-anchor").focus(),h=a("<span>"),j=c,k=a("<div />",{css:{position:"absolute",top:"-200px",left:e?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),l=a("<input />",{value:j,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:a.proxy(function(c){c.stopImmediatePropagation(),c.preventDefault();var e=h.children(".jstree-rename-input"),f=e.val(),i=this.settings.core.force_text,m;""===f&&(f=j),k.remove(),h.replaceWith(g),h.remove(),j=i?j:a("<div></div>").append(a.parseHTML(j)).html(),this.set_text(b,j),m=!!this.rename_node(b,i?a("<div></div>").text(f).text():a("<div></div>").append(a.parseHTML(f)).html()),m||this.set_text(b,j),this._data.core.focused=n.id,setTimeout(a.proxy(function(){var a=this.get_node(n.id,!0);a.length&&(this._data.core.focused=n.id,a.children(".jstree-anchor").focus())},this),0),d&&d.call(this,n,m,o),l=null},this),keydown:function(a){var b=a.which;27===b&&(o=!0,this.value=j),(27===b||13===b||37===b||38===b||39===b||40===b||32===b)&&a.stopImmediatePropagation(),(27===b||13===b)&&(a.preventDefault(),this.blur())},click:function(a){a.stopImmediatePropagation()},mousedown:function(a){a.stopImmediatePropagation()},keyup:function(a){l.width(Math.min(k.text("pW"+this.value).width(),f))},keypress:function(a){return 13===a.which?!1:void 0}}),m={fontFamily:g.css("fontFamily")||"",fontSize:g.css("fontSize")||"",fontWeight:g.css("fontWeight")||"",fontStyle:g.css("fontStyle")||"",fontStretch:g.css("fontStretch")||"",fontVariant:g.css("fontVariant")||"",letterSpacing:g.css("letterSpacing")||"",wordSpacing:g.css("wordSpacing")||""},h.attr("class",g.attr("class")).append(g.contents().clone()).append(l),g.replaceWith(h),k.css(m),l.css(m).width(Math.min(k.text("pW"+l[0].value).width(),f))[0].select(),void a(i).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(b){l&&b.target!==l&&a(l).blur()})):(this.settings.core.error.call(this,this._data.core.last_error),!1):!1},set_theme:function(b,c){if(!b)return!1;if(c===!0){var d=this.settings.core.themes.dir;d||(d=a.jstree.path+"/themes"),c=d+"/"+b+"/style.css"}c&&-1===a.inArray(c,g)&&(a("head").append('<link rel="stylesheet" href="'+c+'" type="text/css" />'),g.push(c)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=b,this.element.addClass("jstree-"+b),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+b+"-responsive"),this.trigger("set_theme",{theme:b})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(a){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=a,a&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(c,d){var e,f,g,h;if(a.isArray(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.set_icon(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(h=c.icon,c.icon=d===!0||null===d||d===b||""===d?!0:d,g=this.get_node(c,!0).children(".jstree-anchor").children(".jstree-themeicon"),d===!1?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),this.hide_icon(c)):d===!0||null===d||d===b||""===d?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),h===!1&&this.show_icon(c)):-1===d.indexOf("/")&&-1===d.indexOf(".")?(g.removeClass(h).css("background",""),g.addClass(d+" jstree-themeicon-custom").attr("rel",d),h===!1&&this.show_icon(c)):(g.removeClass(h).css("background",""),g.addClass("jstree-themeicon-custom").css("background","url('"+d+"') center center no-repeat").attr("rel",d),h===!1&&this.show_icon(c)),!0):!1},get_icon:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.icon:!1},hide_icon:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.hide_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(b.icon=!1,this.get_node(b,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0):!1},show_icon:function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.show_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(e=this.get_node(b,!0),b.icon=e.length?e.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"):!0,b.icon||(b.icon=!0),e.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0):!1}},a.vakata={},a.vakata.attributes=function(b,c){b=a(b)[0];var d=c?{}:[];return b&&b.attributes&&a.each(b.attributes,function(b,e){-1===a.inArray(e.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==e.value&&""!==a.trim(e.value)&&(c?d[e.name]=e.value:d.push(e.name))}),d},a.vakata.array_unique=function(a){var c=[],d,e,f,g={};for(d=0,f=a.length;f>d;d++)g[a[d]]===b&&(c.push(a[d]),g[a[d]]=!0);return c},a.vakata.array_remove=function(a,b){return a.splice(b,1),a},a.vakata.array_remove_item=function(b,c){var d=a.inArray(c,b);return-1!==d?a.vakata.array_remove(b,d):b},a.vakata.array_filter=function(a,b,c,d,e){if(a.filter)return a.filter(b,c);d=[];for(e in a)~~e+""==e+""&&e>=0&&b.call(c,a[e],+e,a)&&d.push(a[e]);return d},a.jstree.plugins.changed=function(a,b){var c=[];this.trigger=function(a,d){var e,f;if(d||(d={}),"changed"===a.replace(".jstree","")){d.changed={selected:[],deselected:[]};var g={};for(e=0,f=c.length;f>e;e++)g[c[e]]=1;for(e=0,f=d.selected.length;f>e;e++)g[d.selected[e]]?g[d.selected[e]]=2:d.changed.selected.push(d.selected[e]);for(e=0,f=c.length;f>e;e++)1===g[c[e]]&&d.changed.deselected.push(c[e]);c=d.selected.slice()}b.trigger.call(this,a,d)},this.refresh=function(a,d){return c=[],b.refresh.apply(this,arguments)}};var j=i.createElement("I");j.className="jstree-icon jstree-checkbox",j.setAttribute("role","presentation"),a.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},a.jstree.plugins.checkbox=function(c,d){this.bind=function(){d.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",a.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")},this)).on("loading.jstree",a.proxy(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()},this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",a.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(a.proxy(this._undetermined,this),50)},this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",a.proxy(function(a,b){var c=this._model.data,d=c[b.parent],e=b.nodes,f,g;for(f=0,g=e.length;g>f;f++)c[e[f]].state.checked=c[e[f]].state.checked||c[e[f]].original&&c[e[f]].original.state&&c[e[f]].original.state.checked,c[e[f]].state.checked&&this._data.checkbox.selected.push(e[f])},this)),(-1!==this.settings.checkbox.cascade.indexOf("up")||-1!==this.settings.checkbox.cascade.indexOf("down"))&&this.element.on("model.jstree",a.proxy(function(b,c){var d=this._model.data,e=d[c.parent],f=c.nodes,g=[],h,i,j,k,l,m,n=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection;if(-1!==n.indexOf("down"))if(e.state[o?"selected":"checked"]){for(i=0,j=f.length;j>i;i++)d[f[i]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(f)}else for(i=0,j=f.length;j>i;i++)if(d[f[i]].state[o?"selected":"checked"]){for(k=0,l=d[f[i]].children_d.length;l>k;k++)d[d[f[i]].children_d[k]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(d[f[i]].children_d)}if(-1!==n.indexOf("up")){for(i=0,j=e.children_d.length;j>i;i++)d[e.children_d[i]].children.length||g.push(d[e.children_d[i]].parent);for(g=a.vakata.array_unique(g),k=0,l=g.length;l>k;k++){e=d[g[k]];while(e&&e.id!==a.jstree.root){for(h=0,i=0,j=e.children.length;j>i;i++)h+=d[e.children[i]].state[o?"selected":"checked"];if(h!==j)break;e.state[o?"selected":"checked"]=!0,this._data[o?"core":"checkbox"].selected.push(e.id),m=this.get_node(e,!0),m&&m.length&&m.attr("aria-selected",!0).children(".jstree-anchor").addClass(o?"jstree-clicked":"jstree-checked"),e=this.get_node(e.parent)}}}this._data[o?"core":"checkbox"].selected=a.vakata.array_unique(this._data[o?"core":"checkbox"].selected)},this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",a.proxy(function(b,c){var d=this,e=c.node,f=this._model.data,g=this.get_node(e.parent),h,i,j,k,l=this.settings.checkbox.cascade,m=this.settings.checkbox.tie_selection,n={},o=this._data[m?"core":"checkbox"].selected;for(h=0,i=o.length;i>h;h++)n[o[h]]=!0;if(-1!==l.indexOf("down")){var p=this._cascade_new_checked_state(e.id,!0),q=e.children_d.concat(e.id);for(h=0,i=q.length;i>h;h++)p.indexOf(q[h])>-1?n[q[h]]=!0:delete n[q[h]]}if(-1!==l.indexOf("up"))while(g&&g.id!==a.jstree.root){for(j=0,h=0,i=g.children.length;i>h;h++)j+=f[g.children[h]].state[m?"selected":"checked"];if(j!==i)break;g.state[m?"selected":"checked"]=!0,n[g.id]=!0,k=this.get_node(g,!0),k&&k.length&&k.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),g=this.get_node(g.parent)}o=[];for(h in n)n.hasOwnProperty(h)&&o.push(h);this._data[m?"core":"checkbox"].selected=o},this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",a.proxy(function(b,c){var d=this.get_node(a.jstree.root),e=this._model.data,f,g,h;for(f=0,g=d.children_d.length;g>f;f++)h=e[d.children_d[f]],h&&h.original&&h.original.state&&h.original.state.undetermined&&(h.original.state.undetermined=!1)},this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",a.proxy(function(a,b){var c=this,d=b.node,e=this.get_node(d,!0),f,g,h,i=this.settings.checkbox.cascade,j=this.settings.checkbox.tie_selection,k=this._data[j?"core":"checkbox"].selected,l={},m=[],n=d.children_d.concat(d.id);if(-1!==i.indexOf("down")){var o=this._cascade_new_checked_state(d.id,!1);k=k.filter(function(a){return-1===n.indexOf(a)||o.indexOf(a)>-1})}if(-1!==i.indexOf("up")&&-1===k.indexOf(d.id)){for(f=0,g=d.parents.length;g>f;f++)h=this._model.data[d.parents[f]],h.state[j?"selected":"checked"]=!1,h&&h.original&&h.original.state&&h.original.state.undetermined&&(h.original.state.undetermined=!1),h=this.get_node(d.parents[f],!0),h&&h.length&&h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(j?"jstree-clicked":"jstree-checked");k=k.filter(function(a){return-1===d.parents.indexOf(a)})}this._data[j?"core":"checkbox"].selected=k},this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",a.proxy(function(b,c){var d=this.get_node(c.parent),e=this._model.data,f,g,h,i,j=this.settings.checkbox.tie_selection;while(d&&d.id!==a.jstree.root&&!d.state[j?"selected":"checked"]){for(h=0,f=0,g=d.children.length;g>f;f++)h+=e[d.children[f]].state[j?"selected":"checked"];if(!(g>0&&h===g))break;d.state[j?"selected":"checked"]=!0,this._data[j?"core":"checkbox"].selected.push(d.id),i=this.get_node(d,!0),i&&i.length&&i.attr("aria-selected",!0).children(".jstree-anchor").addClass(j?"jstree-clicked":"jstree-checked"),d=this.get_node(d.parent)}},this)).on("move_node.jstree",a.proxy(function(b,c){var d=c.is_multi,e=c.old_parent,f=this.get_node(c.parent),g=this._model.data,h,i,j,k,l,m=this.settings.checkbox.tie_selection;if(!d){h=this.get_node(e);while(h&&h.id!==a.jstree.root&&!h.state[m?"selected":"checked"]){for(i=0,j=0,k=h.children.length;k>j;j++)i+=g[h.children[j]].state[m?"selected":"checked"];if(!(k>0&&i===k))break;h.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),h=this.get_node(h.parent)}}h=f;while(h&&h.id!==a.jstree.root){for(i=0,j=0,k=h.children.length;k>j;j++)i+=g[h.children[j]].state[m?"selected":"checked"];if(i===k)h.state[m?"selected":"checked"]||(h.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"));else{if(!h.state[m?"selected":"checked"])break;h.state[m?"selected":"checked"]=!1,this._data[m?"core":"checkbox"].selected=a.vakata.array_remove_item(this._data[m?"core":"checkbox"].selected,h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(m?"jstree-clicked":"jstree-checked")}h=this.get_node(h.parent)}},this))},this.get_undetermined=function(c){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];var d,e,f,g,h={},i=this._model.data,j=this.settings.checkbox.tie_selection,k=this._data[j?"core":"checkbox"].selected,l=[],m=this,n=[];for(d=0,e=k.length;e>d;d++)if(i[k[d]]&&i[k[d]].parents)for(f=0,g=i[k[d]].parents.length;g>f;f++){if(h[i[k[d]].parents[f]]!==b)break;i[k[d]].parents[f]!==a.jstree.root&&(h[i[k[d]].parents[f]]=!0,l.push(i[k[d]].parents[f]))}for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var c=m.get_node(this),j;if(c)if(c.state.loaded){for(d=0,e=c.children_d.length;e>d;d++)if(j=i[c.children_d[d]],!j.state.loaded&&j.original&&j.original.state&&j.original.state.undetermined&&j.original.state.undetermined===!0)for(h[j.id]===b&&j.id!==a.jstree.root&&(h[j.id]=!0,l.push(j.id)),f=0,g=j.parents.length;g>f;f++)h[j.parents[f]]===b&&j.parents[f]!==a.jstree.root&&(h[j.parents[f]]=!0,l.push(j.parents[f]))}else if(c.original&&c.original.state&&c.original.state.undetermined&&c.original.state.undetermined===!0)for(h[c.id]===b&&c.id!==a.jstree.root&&(h[c.id]=!0,l.push(c.id)),f=0,g=c.parents.length;g>f;f++)h[c.parents[f]]===b&&c.parents[f]!==a.jstree.root&&(h[c.parents[f]]=!0,l.push(c.parents[f]))}),d=0,e=l.length;e>d;d++)i[l[d]].state[j?"selected":"checked"]||n.push(c?i[l[d]]:l[d]);return n},this._undetermined=function(){if(null!==this.element){var a=this.get_undetermined(!1),b,c,d;for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),b=0,c=a.length;c>b;b++)d=this.get_node(a[b],!0),d&&d.length&&d.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments)){var g,h,i=null,k=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(!this.settings.checkbox.tie_selection&&this._model.data[b.id].state.checked&&(i.className+=" jstree-checked"),k=j.cloneNode(!1),this._model.data[b.id].state.checkbox_disabled&&(k.className+=" jstree-checkbox-disabled"),i.insertBefore(k,i.childNodes[0]))}return e||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(a.proxy(this._undetermined,this),50)),b},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(b){b=this.get_node(b);var c=this.settings.checkbox.cascade,d,e,f=this.settings.checkbox.tie_selection,g=this._data[f?"core":"checkbox"].selected,h=this._model.data;if(!b||b.state[f?"selected":"checked"]===!0||-1===c.indexOf("undetermined")||-1===c.indexOf("down")&&-1===c.indexOf("up"))return!1;if(!b.state.loaded&&b.original.state.undetermined===!0)return!0;for(d=0,e=b.children_d.length;e>d;d++)if(-1!==a.inArray(b.children_d[d],g)||!h[b.children_d[d]].state.loaded&&h[b.children_d[d]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled||(b.state.checkbox_disabled=!0,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:b})))):!1},this.enable_checkbox=function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled&&(b.state.checkbox_disabled=!1,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:b})))):!1},this.activate_node=function(b,c){return a(c.target).hasClass("jstree-checkbox-disabled")?!1:(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||a(c.target).hasClass("jstree-checkbox"))&&(c.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!a(c.target).hasClass("jstree-checkbox")?d.activate_node.call(this,b,c):this.is_disabled(b)?!1:(this.is_checked(b)?this.uncheck_node(b,c):this.check_node(b,c),void this.trigger("activate_node",{node:this.get_node(b)})))},this._cascade_new_checked_state=function(a,b){var c=this,d=this.settings.checkbox.tie_selection,e=this._model.data[a],f=[],g=[],h,i,j;if(!this.settings.checkbox.cascade_to_disabled&&e.state.disabled||!this.settings.checkbox.cascade_to_hidden&&e.state.hidden)j=this.get_checked_descendants(a),e.state[d?"selected":"checked"]&&j.push(e.id),f=f.concat(j);else{if(e.children)for(h=0,i=e.children.length;i>h;h++){var k=e.children[h];j=c._cascade_new_checked_state(k,b),f=f.concat(j),j.indexOf(k)>-1&&g.push(k)}var l=c.get_node(e,!0),m=g.length>0&&g.length<e.children.length;e.original&&e.original.state&&e.original.state.undetermined&&(e.original.state.undetermined=m),m?(e.state[d?"selected":"checked"]=!1,l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(d?"jstree-clicked":"jstree-checked")):b&&g.length===e.children.length?(e.state[d?"selected":"checked"]=b,f.push(e.id),l.attr("aria-selected",!0).children(".jstree-anchor").addClass(d?"jstree-clicked":"jstree-checked")):(e.state[d?"selected":"checked"]=!1,l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(d?"jstree-clicked":"jstree-checked"))}return f},this.get_checked_descendants=function(a){var b=this,c=b.settings.checkbox.tie_selection,d=b._model.data[a];return d.children_d.filter(function(a){return b._model.data[a].state[c?"selected":"checked"]})},this.check_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.select_node(b,!1,!0,c);var d,e,f,g;if(a.isArray(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.check_node(b[e],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(d=this.get_node(b,!0),void(b.state.checked||(b.state.checked=!0,this._data.checkbox.selected.push(b.id),d&&d.length&&d.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.uncheck_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.deselect_node(b,!1,c);var d,e,f;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.uncheck_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.checked&&(b.state.checked=!1,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,b.id),f.length&&f.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var b=this._data.checkbox.selected.concat([]),c,d;for(this._data.checkbox.selected=this._model.data[a.jstree.root].children_d.concat(),c=0,d=this._data.checkbox.selected.length;d>c;c++)this._model.data[this._data.checkbox.selected[c]]&&(this._model.data[this._data.checkbox.selected[c]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var a=this._data.checkbox.selected.concat([]),b,c;for(b=0,c=this._data.checkbox.selected.length;c>b;b++)this._model.data[this._data.checkbox.selected[b]]&&(this._model.data[this._data.checkbox.selected[b]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:a})},this.is_checked=function(b){return this.settings.checkbox.tie_selection?this.is_selected(b):(b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.checked:!1)},this.get_checked=function(b){return this.settings.checkbox.tie_selection?this.get_selected(b):b?a.map(this._data.checkbox.selected,a.proxy(function(a){return this.get_node(a)},this)):this._data.checkbox.selected},this.get_top_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_top_selected(b);var c=this.get_checked(!0),d={},e,f,g,h;for(e=0,f=c.length;f>e;e++)d[c[e].id]=c[e];for(e=0,f=c.length;f>e;e++)for(g=0,h=c[e].children_d.length;h>g;g++)d[c[e].children_d[g]]&&delete d[c[e].children_d[g]];c=[];for(e in d)d.hasOwnProperty(e)&&c.push(e);return b?a.map(c,a.proxy(function(a){return this.get_node(a)},this)):c},this.get_bottom_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(b);var c=this.get_checked(!0),d=[],e,f;for(e=0,f=c.length;f>e;e++)c[e].children.length||d.push(c[e].id);return b?a.map(d,a.proxy(function(a){return this.get_node(a)},this)):d},this.load_node=function(b,c){var e,f,g,h,i,j;if(!a.isArray(b)&&!this.settings.checkbox.tie_selection&&(j=this.get_node(b),j&&j.state.loaded))for(e=0,f=j.children_d.length;f>e;e++)this._model.data[j.children_d[e]].state.checked&&(i=!0,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,j.children_d[e]));return d.load_node.apply(this,arguments)},this.get_state=function(){var a=d.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection?a:(a.checkbox=this._data.checkbox.selected.slice(),a)},this.set_state=function(b,c){var e=d.set_state.apply(this,arguments);if(e&&b.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var f=this;a.each(b.checkbox,function(a,b){f.check_node(b)})}return delete b.checkbox,this.set_state(b,c),!1}return e},this.refresh=function(a,b){return this.settings.checkbox.tie_selection||(this._data.checkbox.selected=[]),d.refresh.apply(this,arguments)}},a.jstree.defaults.conditionalselect=function(){return!0},a.jstree.plugins.conditionalselect=function(a,b){this.activate_node=function(a,c){return this.settings.conditionalselect.call(this,this.get_node(a),c)?b.activate_node.call(this,a,c):void 0}},a.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(b,c){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.create_node(d,{},"last",function(a){try{c.edit(a)}catch(b){setTimeout(function(){c.edit(a)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.edit(d)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.delete_node(c.get_selected()):c.delete_node(d)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.cut(c.get_top_selected()):c.cut(d)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.copy(c.get_top_selected()):c.copy(d)}},paste:{separator_before:!1,icon:!1,_disabled:function(b){return!a.jstree.reference(b.reference).can_paste()},separator_after:!1,label:"Paste",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.paste(d)}}}}}}},a.jstree.plugins.contextmenu=function(c,d){this.bind=function(){d.bind.call(this);var b=0,c=null,e,f;this.element.on("init.jstree loading.jstree ready.jstree",a.proxy(function(){this.get_container_ul().addClass("jstree-contextmenu")},this)).on("contextmenu.jstree",".jstree-anchor",a.proxy(function(a,d){"input"!==a.target.tagName.toLowerCase()&&(a.preventDefault(),b=a.ctrlKey?+new Date:0,(d||c)&&(b=+new Date+1e4),c&&clearTimeout(c),this.is_loading(a.currentTarget)||this.show_contextmenu(a.currentTarget,a.pageX,a.pageY,a))},this)).on("click.jstree",".jstree-anchor",a.proxy(function(c){this._data.contextmenu.visible&&(!b||+new Date-b>250)&&a.vakata.context.hide(),b=0},this)).on("touchstart.jstree",".jstree-anchor",function(b){b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(e=b.originalEvent.changedTouches[0].clientX,f=b.originalEvent.changedTouches[0].clientY,c=setTimeout(function(){a(b.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(b){c&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(Math.abs(e-b.originalEvent.changedTouches[0].clientX)>10||Math.abs(f-b.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(c),a.vakata.context.hide())}).on("touchend.vakata.jstree",function(a){c&&clearTimeout(c)}),a(i).on("context_hide.vakata.jstree",a.proxy(function(b,c){this._data.contextmenu.visible=!1,a(c.reference).removeClass("jstree-context")},this))},this.teardown=function(){this._data.contextmenu.visible&&a.vakata.context.hide(),d.teardown.call(this)},this.show_contextmenu=function(c,d,e,f){if(c=this.get_node(c),!c||c.id===a.jstree.root)return!1;var g=this.settings.contextmenu,h=this.get_node(c,!0),i=h.children(".jstree-anchor"),j=!1,k=!1;(g.show_at_node||d===b||e===b)&&(j=i.offset(),d=j.left,e=j.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(c)&&this.activate_node(c,f),k=g.items,a.isFunction(k)&&(k=k.call(this,c,a.proxy(function(a){this._show_contextmenu(c,d,e,a)},this))),a.isPlainObject(k)&&this._show_contextmenu(c,d,e,k)},this._show_contextmenu=function(b,c,d,e){var f=this.get_node(b,!0),g=f.children(".jstree-anchor");a(i).one("context_show.vakata.jstree",a.proxy(function(b,c){var d="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";a(c.element).addClass(d),g.addClass("jstree-context")},this)),this._data.contextmenu.visible=!0,a.vakata.context.show(g,{x:c,y:d},e),this.trigger("show_contextmenu",{node:b,x:c,y:d})}},function(a){var b=!1,c={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};a.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(b){a(i).triggerHandler("context_"+b+".vakata",{reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}})},_execute:function(b){return b=c.items[b],b&&(!b._disabled||a.isFunction(b._disabled)&&!b._disabled({item:b,reference:c.reference,element:c.element}))&&b.action?b.action.call(null,{item:b,reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}}):!1},_parse:function(b,d){if(!b)return!1;d||(c.html="",c.items=[]);var e="",f=!1,g;return d&&(e+="<ul>"),a.each(b,function(b,d){return d?(c.items.push(d),!f&&d.separator_before&&(e+="<li class='vakata-context-separator'><a href='#' "+(a.vakata.context.settings.icons?"":'style="margin-left:0px;"')+"> </a></li>"),f=!1,e+="<li class='"+(d._class||"")+(d._disabled===!0||a.isFunction(d._disabled)&&d._disabled({item:d,reference:c.reference,element:c.element})?" vakata-contextmenu-disabled ":"")+"' "+(d.shortcut?" data-shortcut='"+d.shortcut+"' ":"")+">",e+="<a href='#' rel='"+(c.items.length-1)+"' "+(d.title?"title='"+d.title+"'":"")+">",a.vakata.context.settings.icons&&(e+="<i ",d.icon&&(e+=-1!==d.icon.indexOf("/")||-1!==d.icon.indexOf(".")?" style='background:url(\""+d.icon+"\") center center no-repeat' ":" class='"+d.icon+"' "),e+="></i><span class='vakata-contextmenu-sep'> </span>"),e+=(a.isFunction(d.label)?d.label({item:b,reference:c.reference,element:c.element}):d.label)+(d.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+d.shortcut+'">'+(d.shortcut_label||"")+"</span>":"")+"</a>",
|
5 |
+
d.submenu&&(g=a.vakata.context._parse(d.submenu,!0),g&&(e+=g)),e+="</li>",void(d.separator_after&&(e+="<li class='vakata-context-separator'><a href='#' "+(a.vakata.context.settings.icons?"":'style="margin-left:0px;"')+"> </a></li>",f=!0))):!0}),e=e.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),d&&(e+="</ul>"),d||(c.html=e,a.vakata.context._trigger("parse")),e.length>10?e:!1},_show_submenu:function(c){if(c=a(c),c.length&&c.children("ul").length){var d=c.children("ul"),e=c.offset().left,f=e+c.outerWidth(),g=c.offset().top,h=d.width(),i=d.height(),j=a(window).width()+a(window).scrollLeft(),k=a(window).height()+a(window).scrollTop();b?c[f-(h+10+c.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):c[f+h>j&&e>j-f?"addClass":"removeClass"]("vakata-context-right"),g+i+10>k&&d.css("bottom","-1px"),c.hasClass("vakata-context-right")?h>e&&d.css("margin-right",e-h):h>j-f&&d.css("margin-left",j-f-h),d.show()}},show:function(d,e,f){var g,h,i,j,k,l,m,n,o=!0;switch(c.element&&c.element.length&&c.element.width(""),o){case!e&&!d:return!1;case!!e&&!!d:c.reference=d,c.position_x=e.x,c.position_y=e.y;break;case!e&&!!d:c.reference=d,g=d.offset(),c.position_x=g.left+d.outerHeight(),c.position_y=g.top;break;case!!e&&!d:c.position_x=e.x,c.position_y=e.y}d&&!f&&a(d).data("vakata_contextmenu")&&(f=a(d).data("vakata_contextmenu")),a.vakata.context._parse(f)&&c.element.html(c.html),c.items.length&&(c.element.appendTo("body"),h=c.element,i=c.position_x,j=c.position_y,k=h.width(),l=h.height(),m=a(window).width()+a(window).scrollLeft(),n=a(window).height()+a(window).scrollTop(),b&&(i-=h.outerWidth()-a(d).outerWidth(),i<a(window).scrollLeft()+20&&(i=a(window).scrollLeft()+20)),i+k+20>m&&(i=m-(k+20)),j+l+20>n&&(j=n-(l+20)),c.element.css({left:i,top:j}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),c.is_visible=!0,a.vakata.context._trigger("show"))},hide:function(){c.is_visible&&(c.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),c.is_visible=!1,a.vakata.context._trigger("hide"))}},a(function(){b="rtl"===a("body").css("direction");var d=!1;c.element=a("<ul class='vakata-context'></ul>"),c.element.on("mouseenter","li",function(b){b.stopImmediatePropagation(),a.contains(this,b.relatedTarget)||(d&&clearTimeout(d),c.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),a(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),a.vakata.context._show_submenu(this))}).on("mouseleave","li",function(b){a.contains(this,b.relatedTarget)||a(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(b){a(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),a.vakata.context.settings.hide_onmouseleave&&(d=setTimeout(function(b){return function(){a.vakata.context.hide()}}(this),a.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(b){b.preventDefault(),a(this).blur().parent().hasClass("vakata-context-disabled")||a.vakata.context._execute(a(this).attr("rel"))===!1||a.vakata.context.hide()}).on("keydown","a",function(b){var d=null;switch(b.which){case 13:case 32:b.type="click",b.preventDefault(),a(b.currentTarget).trigger(b);break;case 37:c.is_visible&&(c.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 38:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),d.addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 39:c.is_visible&&(c.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 40:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),d.addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 27:a.vakata.context.hide(),b.preventDefault()}}).on("keydown",function(a){a.preventDefault();var b=c.element.find(".vakata-contextmenu-shortcut-"+a.which).parent();b.parent().not(".vakata-context-disabled")&&b.click()}),a(i).on("mousedown.vakata.jstree",function(b){c.is_visible&&c.element[0]!==b.target&&!a.contains(c.element[0],b.target)&&a.vakata.context.hide()}).on("context_show.vakata.jstree",function(a,d){c.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),b&&c.element.addClass("vakata-context-rtl").css("direction","rtl"),c.element.find("ul").hide().end()})})}(a),a.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1};var k,l;a.jstree.plugins.dnd=function(b,c){this.init=function(a,b){c.init.call(this,a,b),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in i.createElement("span")},this.bind=function(){c.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",a.proxy(function(b){if(this.settings.dnd.large_drag_target&&a(b.target).closest(".jstree-node")[0]!==b.currentTarget)return!0;if("touchstart"===b.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var c=this.get_node(b.target),d=this.is_selected(c)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,e=d>1?d+" "+this.get_string("nodes"):this.get_text(b.currentTarget);if(this.settings.core.force_text&&(e=a.vakata.html.escape(e)),c&&c.id&&c.id!==a.jstree.root&&(1===b.which||"touchstart"===b.type||"dragstart"===b.type)&&(this.settings.dnd.is_draggable===!0||a.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,d>1?this.get_top_selected(!0):[c],b))){if(k={jstree:!0,origin:this,obj:this.get_node(c,!0),nodes:d>1?this.get_top_selected():[c.id]},l=b.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),a.vakata.dnd.start(b,k,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+e+'<ins class="jstree-copy" style="display:none;">+</ins></div>');a.vakata.dnd._trigger("start",b,{helper:a(),element:l,data:k})}},this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(b){return b.preventDefault(),a.vakata.dnd._trigger("move",b,{helper:a(),element:l,data:k}),!1}).on("drop.jstree",a.proxy(function(b){return b.preventDefault(),a.vakata.dnd._trigger("stop",b,{helper:a(),element:l,data:k}),!1},this))},this.redraw_node=function(a,b,d,e){if(a=c.redraw_node.apply(this,arguments),a&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)a.setAttribute("draggable",!0);else{var f,g,h=null;for(f=0,g=a.childNodes.length;g>f;f++)if(a.childNodes[f]&&a.childNodes[f].className&&-1!==a.childNodes[f].className.indexOf("jstree-anchor")){h=a.childNodes[f];break}h&&h.setAttribute("draggable",!0)}return a}},a(function(){var c=!1,d=!1,e=!1,f=!1,g=a('<div id="jstree-marker"> </div>').hide();a(i).on("dnd_start.vakata.jstree",function(a,b){c=!1,e=!1,b&&b.data&&b.data.jstree&&g.appendTo("body")}).on("dnd_move.vakata.jstree",function(h,i){var j=i.event.target!==e.target;if(f&&(!i.event||"dragover"!==i.event.type||j)&&clearTimeout(f),i&&i.data&&i.data.jstree&&(!i.event.target.id||"jstree-marker"!==i.event.target.id)){e=i.event;var k=a.jstree.reference(i.event.target),l=!1,m=!1,n=!1,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E;if(k&&k._data&&k._data.dnd)if(g.attr("class","jstree-"+k.get_theme()+(k.settings.core.themes.responsive?" jstree-dnd-responsive":"")),D=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey)),i.helper.children().attr("class","jstree-"+k.get_theme()+" jstree-"+k.get_theme()+"-"+k.get_theme_variant()+" "+(k.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[D?"show":"hide"](),i.event.target!==k.element[0]&&i.event.target!==k.get_container_ul()[0]||0!==k.get_container_ul().children().length){if(l=k.settings.dnd.large_drop_target?a(i.event.target).closest(".jstree-node").children(".jstree-anchor"):a(i.event.target).closest(".jstree-anchor"),l&&l.length&&l.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(m=l.offset(),n=(i.event.pageY!==b?i.event.pageY:i.event.originalEvent.pageY)-m.top,r=l.outerHeight(),u=r/3>n?["b","i","a"]:n>r-r/3?["a","i","b"]:n>r/2?["i","a","b"]:["i","b","a"],a.each(u,function(b,e){switch(e){case"b":p=m.left-6,q=m.top,s=k.get_parent(l),t=l.parent().index();break;case"i":B=k.settings.dnd.inside_pos,C=k.get_node(l.parent()),p=m.left-2,q=m.top+r/2+1,s=C.id,t="first"===B?0:"last"===B?C.children.length:Math.min(B,C.children.length);break;case"a":p=m.left-6,q=m.top+r,s=k.get_parent(l),t=l.parent().index()+1}for(v=!0,w=0,x=i.data.nodes.length;x>w;w++)if(y=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",z=t,"move_node"===y&&"a"===e&&i.data.origin&&i.data.origin===k&&s===k.get_parent(i.data.nodes[w])&&(A=k.get_node(s),z>a.inArray(i.data.nodes[w],A.children)&&(z-=1)),v=v&&(k&&k.settings&&k.settings.dnd&&k.settings.dnd.check_while_dragging===!1||k.check(y,i.data.origin&&i.data.origin!==k?i.data.origin.get_node(i.data.nodes[w]):i.data.nodes[w],s,z,{dnd:!0,ref:k.get_node(l.parent()),pos:e,origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==k,is_foreign:!i.data.origin})),!v){k&&k.last_error&&(d=k.last_error());break}return"i"===e&&l.parent().is(".jstree-closed")&&k.settings.dnd.open_timeout&&(!i.event||"dragover"!==i.event.type||j)&&(f&&clearTimeout(f),f=setTimeout(function(a,b){return function(){a.open_node(b)}}(k,l),k.settings.dnd.open_timeout)),v?(E=k.get_node(s,!0),E.hasClass(".jstree-dnd-parent")||(a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),E.addClass("jstree-dnd-parent")),c={ins:k,par:s,pos:"i"!==e||"last"!==B||0!==t||k.is_loaded(C)?t:"last"},g.css({left:p+"px",top:q+"px"}).show(),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=D?"copy":"move"),d={},u=!0,!1):void 0}),u===!0))return}else{for(v=!0,w=0,x=i.data.nodes.length;x>w;w++)if(v=v&&k.check(i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",i.data.origin&&i.data.origin!==k?i.data.origin.get_node(i.data.nodes[w]):i.data.nodes[w],a.jstree.root,"last",{dnd:!0,ref:k.get_node(a.jstree.root),pos:"i",origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==k,is_foreign:!i.data.origin}),!v)break;if(v)return c={ins:k,par:a.jstree.root,pos:"last"},g.hide(),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=D?"copy":"move"))}a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),c=!1,i.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect="none"),g.hide()}}).on("dnd_scroll.vakata.jstree",function(a,b){b&&b.data&&b.data.jstree&&(g.hide(),c=!1,e=!1,b.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(b,h){if(a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),f&&clearTimeout(f),h&&h.data&&h.data.jstree){g.hide().detach();var i,j,k=[];if(c){for(i=0,j=h.data.nodes.length;j>i;i++)k[i]=h.data.origin?h.data.origin.get_node(h.data.nodes[i]):h.data.nodes[i];c.ins[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"copy_node":"move_node"](k,c.par,c.pos,!1,!1,!1,h.data.origin)}else i=a(h.event.target).closest(".jstree"),i.length&&d&&d.error&&"check"===d.error&&(i=i.jstree(!0),i&&i.settings.core.error.call(this,d));e=!1,c=!1}}).on("keyup.jstree keydown.jstree",function(b,h){h=a.vakata.dnd._get(),h&&h.data&&h.data.jstree&&("keyup"===b.type&&27===b.which?(f&&clearTimeout(f),c=!1,d=!1,e=!1,f=!1,g.hide().detach(),a.vakata.dnd._clean()):(h.helper.find(".jstree-copy").first()[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(b.metaKey||b.ctrlKey))?"show":"hide"](),e&&(e.metaKey=b.metaKey,e.ctrlKey=b.ctrlKey,a.vakata.dnd._trigger("move",e))))})}),function(a){a.vakata.html={div:a("<div />"),escape:function(b){return a.vakata.html.div.text(b).html()},strip:function(b){return a.vakata.html.div.empty().append(a.parseHTML(b)).text()}};var c={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};a.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(c,d,e){e===b&&(e=a.vakata.dnd._get()),e.event=d,a(i).triggerHandler("dnd_"+c+".vakata",e)},_get:function(){return{data:c.data,element:c.element,helper:c.helper}},_clean:function(){c.helper&&c.helper.remove(),c.scroll_i&&(clearInterval(c.scroll_i),c.scroll_i=!1),c={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},a(i).off("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(i).off("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop)},_scroll:function(b){if(!c.scroll_e||!c.scroll_l&&!c.scroll_t)return c.scroll_i&&(clearInterval(c.scroll_i),c.scroll_i=!1),!1;if(!c.scroll_i)return c.scroll_i=setInterval(a.vakata.dnd._scroll,100),!1;if(b===!0)return!1;var d=c.scroll_e.scrollTop(),e=c.scroll_e.scrollLeft();c.scroll_e.scrollTop(d+c.scroll_t*a.vakata.dnd.settings.scroll_speed),c.scroll_e.scrollLeft(e+c.scroll_l*a.vakata.dnd.settings.scroll_speed),(d!==c.scroll_e.scrollTop()||e!==c.scroll_e.scrollLeft())&&a.vakata.dnd._trigger("scroll",c.scroll_e)},start:function(b,d,e){"touchstart"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_drag&&a.vakata.dnd.stop({});try{b.currentTarget.unselectable="on",b.currentTarget.onselectstart=function(){return!1},b.currentTarget.style&&(b.currentTarget.style.touchAction="none",b.currentTarget.style.msTouchAction="none",b.currentTarget.style.MozUserSelect="none")}catch(f){}return c.init_x=b.pageX,c.init_y=b.pageY,c.data=d,c.is_down=!0,c.element=b.currentTarget,c.target=b.target,c.is_touch="touchstart"===b.type,e!==!1&&(c.helper=a("<div id='vakata-dnd'></div>").html(e).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),a(i).on("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(i).on("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop),!1},drag:function(b){if("touchmove"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_down){if(!c.is_drag){if(!(Math.abs(b.pageX-c.init_x)>(c.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)||Math.abs(b.pageY-c.init_y)>(c.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)))return;c.helper&&(c.helper.appendTo("body"),c.helper_w=c.helper.outerWidth()),c.is_drag=!0,a(c.target).one("click.vakata",!1),a.vakata.dnd._trigger("start",b)}var d=!1,e=!1,f=!1,g=!1,h=!1,j=!1,k=!1,l=!1,m=!1,n=!1;return c.scroll_t=0,c.scroll_l=0,c.scroll_e=!1,a(a(b.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(a(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var d=a(this),e=d.offset();return this.scrollHeight>this.offsetHeight&&(e.top+d.height()-b.pageY<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_t=1),b.pageY-e.top<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(e.left+d.width()-b.pageX<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_l=1),b.pageX-e.left<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_l=-1)),c.scroll_t||c.scroll_l?(c.scroll_e=a(this),!1):void 0}),c.scroll_e||(d=a(i),e=a(window),f=d.height(),g=e.height(),h=d.width(),j=e.width(),k=d.scrollTop(),l=d.scrollLeft(),f>g&&b.pageY-k<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_t=-1),f>g&&g-(b.pageY-k)<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_t=1),h>j&&b.pageX-l<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_l=-1),h>j&&j-(b.pageX-l)<a.vakata.dnd.settings.scroll_proximity&&(c.scroll_l=1),(c.scroll_t||c.scroll_l)&&(c.scroll_e=d)),c.scroll_e&&a.vakata.dnd._scroll(!0),c.helper&&(m=parseInt(b.pageY+a.vakata.dnd.settings.helper_top,10),n=parseInt(b.pageX+a.vakata.dnd.settings.helper_left,10),f&&m+25>f&&(m=f-50),h&&n+c.helper_w>h&&(n=h-(c.helper_w+2)),c.helper.css({left:n+"px",top:m+"px"})),a.vakata.dnd._trigger("move",b),!1}},stop:function(b){if("touchend"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_drag)b.target!==c.target&&a(c.target).off("click.vakata"),a.vakata.dnd._trigger("stop",b);else if("touchend"===b.type&&b.target===c.target){var d=setTimeout(function(){a(b.target).click()},100);a(b.target).one("click",function(){d&&clearTimeout(d)})}return a.vakata.dnd._clean(),!1}}}(a),a.jstree.defaults.massload=null,a.jstree.plugins.massload=function(b,c){this.init=function(a,b){this._data.massload={},c.init.call(this,a,b)},this._load_nodes=function(b,d,e,f){var g=this.settings.massload,h=JSON.stringify(b),i=[],j=this._model.data,k,l,m;if(!e){for(k=0,l=b.length;l>k;k++)(!j[b[k]]||!j[b[k]].state.loaded&&!j[b[k]].state.failed||f)&&(i.push(b[k]),m=this.get_node(b[k],!0),m&&m.length&&m.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},i.length){if(a.isFunction(g))return g.call(this,i,a.proxy(function(a){var g,h;if(a)for(g in a)a.hasOwnProperty(g)&&(this._data.massload[g]=a[g]);for(g=0,h=b.length;h>g;g++)m=this.get_node(b[g],!0),m&&m.length&&m.removeClass("jstree-loading").attr("aria-busy",!1);c._load_nodes.call(this,b,d,e,f)},this));if("object"==typeof g&&g&&g.url)return g=a.extend(!0,{},g),a.isFunction(g.url)&&(g.url=g.url.call(this,i)),a.isFunction(g.data)&&(g.data=g.data.call(this,i)),a.ajax(g).done(a.proxy(function(a,g,h){var i,j;if(a)for(i in a)a.hasOwnProperty(i)&&(this._data.massload[i]=a[i]);for(i=0,j=b.length;j>i;i++)m=this.get_node(b[i],!0),m&&m.length&&m.removeClass("jstree-loading").attr("aria-busy",!1);c._load_nodes.call(this,b,d,e,f)},this)).fail(a.proxy(function(a){c._load_nodes.call(this,b,d,e,f)},this))}}return c._load_nodes.call(this,b,d,e,f)},this._load_node=function(b,d){var e=this._data.massload[b.id],f=null,g;return e?(f=this["string"==typeof e?"_append_html_data":"_append_json_data"](b,"string"==typeof e?a(a.parseHTML(e)).filter(function(){return 3!==this.nodeType}):e,function(a){d.call(this,a)}),g=this.get_node(b.id,!0),g&&g.length&&g.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[b.id],f):c._load_node.call(this,b,d)}},a.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},a.jstree.plugins.search=function(c,d){this.bind=function(){d.bind.call(this),this._data.search.str="",this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",a.proxy(function(b,c){if(this._data.search.som&&c.res.length){var d=this._model.data,e,f,g=[],h,i;for(e=0,f=c.res.length;f>e;e++)if(d[c.res[e]]&&!d[c.res[e]].state.hidden&&(g.push(c.res[e]),g=g.concat(d[c.res[e]].parents),this._data.search.smc))for(h=0,i=d[c.res[e]].children_d.length;i>h;h++)d[d[c.res[e]].children_d[h]]&&!d[d[c.res[e]].children_d[h]].state.hidden&&g.push(d[c.res[e]].children_d[h]);g=a.vakata.array_remove_item(a.vakata.array_unique(g),a.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(g,!0),this.redraw(!0)}},this)).on("clear_search.jstree",a.proxy(function(a,b){this._data.search.som&&b.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))},this))},this.search=function(c,d,e,f,g,h){if(c===!1||""===a.trim(c.toString()))return this.clear_search();f=this.get_node(f),f=f&&f.id?f.id:null,c=c.toString();var i=this.settings.search,j=i.ajax?i.ajax:!1,k=this._model.data,l=null,m=[],n=[],o,p;if(this._data.search.res.length&&!g&&this.clear_search(),e===b&&(e=i.show_only_matches),h===b&&(h=i.show_only_matches_children),!d&&j!==!1)return a.isFunction(j)?j.call(this,c,a.proxy(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.isArray(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g,h)})},this),f):(j=a.extend({},j),j.data||(j.data={}),j.data.str=c,f&&(j.data.inside=f),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=a.ajax(j).fail(a.proxy(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(j)},this.settings.core.error.call(this,this._data.core.last_error)},this)).done(a.proxy(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.isArray(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g,h)})},this)),this._data.search.lastRequest);if(g||(this._data.search.str=c,this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=e,this._data.search.smc=h),l=new a.vakata.search(c,!0,{caseSensitive:i.case_sensitive,fuzzy:i.fuzzy}),a.each(k[f?f:a.jstree.root].children_d,function(a,b){var d=k[b];d.text&&!d.state.hidden&&(!i.search_leaves_only||d.state.loaded&&0===d.children.length)&&(i.search_callback&&i.search_callback.call(this,c,d)||!i.search_callback&&l.search(d.text).isMatch)&&(m.push(b),n=n.concat(d.parents))}),m.length){for(n=a.vakata.array_unique(n),o=0,p=n.length;p>o;o++)n[o]!==a.jstree.root&&k[n[o]]&&this.open_node(n[o],null,0)===!0&&this._data.search.opn.push(n[o]);g?(this._data.search.dom=this._data.search.dom.add(a(this.element[0].querySelectorAll("#"+a.map(m,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=a.vakata.array_unique(this._data.search.res.concat(m))):(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(m,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=m),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:c,res:this._data.search.res,show_only_matches:e})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(this._data.search.res,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=a()},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments),b&&-1!==a.inArray(b.id,this._data.search.res)){var g,h,i=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(i.className+=" jstree-search")}return b}},function(a){a.vakata.search=function(b,c,d){d=d||{},d=a.extend({},a.vakata.search.defaults,d),d.fuzzy!==!1&&(d.fuzzy=!0),b=d.caseSensitive?b:b.toLowerCase();var e=d.location,f=d.distance,g=d.threshold,h=b.length,i,j,k,l;return h>32&&(d.fuzzy=!1),d.fuzzy&&(i=1<<h-1,j=function(){var a={},c=0;for(c=0;h>c;c++)a[b.charAt(c)]=0;for(c=0;h>c;c++)a[b.charAt(c)]|=1<<h-c-1;return a}(),k=function(a,b){var c=a/h,d=Math.abs(e-b);return f?c+d/f:d?1:c}),l=function(a){if(a=d.caseSensitive?a:a.toLowerCase(),b===a||-1!==a.indexOf(b))return{isMatch:!0,score:0};if(!d.fuzzy)return{isMatch:!1,score:1};var c,f,l=a.length,m=g,n=a.indexOf(b,e),o,p,q=h+l,r,s,t,u,v,w=1,x=[];for(-1!==n&&(m=Math.min(k(0,n),m),n=a.lastIndexOf(b,e+h),-1!==n&&(m=Math.min(k(0,n),m))),n=-1,c=0;h>c;c++){o=0,p=q;while(p>o)k(c,e+p)<=m?o=p:q=p,p=Math.floor((q-o)/2+o);for(q=p,s=Math.max(1,e-p+1),t=Math.min(e+p,l)+h,u=new Array(t+2),u[t+1]=(1<<c)-1,f=t;f>=s;f--)if(v=j[a.charAt(f-1)],0===c?u[f]=(u[f+1]<<1|1)&v:u[f]=(u[f+1]<<1|1)&v|((r[f+1]|r[f])<<1|1)|r[f+1],u[f]&i&&(w=k(c,f-1),m>=w)){if(m=w,n=f-1,x.push(n),!(n>e))break;s=Math.max(1,2*e-n)}if(k(c+1,e)>m)break;r=u}return{isMatch:n>=0,score:w}},c===!0?{search:l}:l(c)},a.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(a),a.jstree.defaults.sort=function(a,b){return this.get_text(a)>this.get_text(b)?1:-1},a.jstree.plugins.sort=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("model.jstree",a.proxy(function(a,b){this.sort(b.parent,!0)},this)).on("rename_node.jstree create_node.jstree",a.proxy(function(a,b){this.sort(b.parent||b.node.parent,!1),this.redraw_node(b.parent||b.node.parent,!0)},this)).on("move_node.jstree copy_node.jstree",a.proxy(function(a,b){this.sort(b.parent,!1),this.redraw_node(b.parent,!0)},this))},this.sort=function(b,c){var d,e;if(b=this.get_node(b),b&&b.children&&b.children.length&&(b.children.sort(a.proxy(this.settings.sort,this)),c))for(d=0,e=b.children_d.length;e>d;d++)this.sort(b.children_d[d],!1)}};var m=!1;a.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},a.jstree.plugins.state=function(b,c){this.bind=function(){c.bind.call(this);var b=a.proxy(function(){this.element.on(this.settings.state.events,a.proxy(function(){m&&clearTimeout(m),m=setTimeout(a.proxy(function(){this.save_state()},this),100)},this)),this.trigger("state_ready")},this);this.element.on("ready.jstree",a.proxy(function(a,c){this.element.one("restore_state.jstree",b),this.restore_state()||b()},this))},this.save_state=function(){var b=this.get_state();this.settings.state.preserve_loaded||delete b.core.loaded;var c={state:b,ttl:this.settings.state.ttl,sec:+new Date};a.vakata.storage.set(this.settings.state.key,JSON.stringify(c))},this.restore_state=function(){var b=a.vakata.storage.get(this.settings.state.key);if(b)try{b=JSON.parse(b)}catch(c){return!1}return b&&b.ttl&&b.sec&&+new Date-b.sec>b.ttl?!1:(b&&b.state&&(b=b.state),b&&a.isFunction(this.settings.state.filter)&&(b=this.settings.state.filter.call(this,b)),b?(this.settings.state.preserve_loaded||delete b.core.loaded,this.element.one("set_state.jstree",function(c,d){d.instance.trigger("restore_state",{state:a.extend(!0,{},b)})}),this.set_state(b),!0):!1)},this.clear_state=function(){return a.vakata.storage.del(this.settings.state.key)}},function(a,b){a.vakata.storage={set:function(a,b){return window.localStorage.setItem(a,b)},get:function(a){return window.localStorage.getItem(a)},del:function(a){return window.localStorage.removeItem(a)}}}(a),a.jstree.defaults.types={"default":{}},a.jstree.defaults.types[a.jstree.root]={},a.jstree.plugins.types=function(c,d){this.init=function(c,e){var f,g;if(e&&e.types&&e.types["default"])for(f in e.types)if("default"!==f&&f!==a.jstree.root&&e.types.hasOwnProperty(f))for(g in e.types["default"])e.types["default"].hasOwnProperty(g)&&e.types[f][g]===b&&(e.types[f][g]=e.types["default"][g]);d.init.call(this,c,e),this._model.data[a.jstree.root].type=a.jstree.root},this.refresh=function(b,c){d.refresh.call(this,b,c),this._model.data[a.jstree.root].type=a.jstree.root},this.bind=function(){this.element.on("model.jstree",a.proxy(function(c,d){var e=this._model.data,f=d.nodes,g=this.settings.types,h,i,j="default",k;for(h=0,i=f.length;i>h;h++){if(j="default",e[f[h]].original&&e[f[h]].original.type&&g[e[f[h]].original.type]&&(j=e[f[h]].original.type),e[f[h]].data&&e[f[h]].data.jstree&&e[f[h]].data.jstree.type&&g[e[f[h]].data.jstree.type]&&(j=e[f[h]].data.jstree.type),e[f[h]].type=j,e[f[h]].icon===!0&&g[j].icon!==b&&(e[f[h]].icon=g[j].icon),g[j].li_attr!==b&&"object"==typeof g[j].li_attr)for(k in g[j].li_attr)if(g[j].li_attr.hasOwnProperty(k)){if("id"===k)continue;e[f[h]].li_attr[k]===b?e[f[h]].li_attr[k]=g[j].li_attr[k]:"class"===k&&(e[f[h]].li_attr["class"]=g[j].li_attr["class"]+" "+e[f[h]].li_attr["class"])}if(g[j].a_attr!==b&&"object"==typeof g[j].a_attr)for(k in g[j].a_attr)if(g[j].a_attr.hasOwnProperty(k)){if("id"===k)continue;e[f[h]].a_attr[k]===b?e[f[h]].a_attr[k]=g[j].a_attr[k]:"href"===k&&"#"===e[f[h]].a_attr[k]?e[f[h]].a_attr.href=g[j].a_attr.href:"class"===k&&(e[f[h]].a_attr["class"]=g[j].a_attr["class"]+" "+e[f[h]].a_attr["class"])}}e[a.jstree.root].type=a.jstree.root},this)),d.bind.call(this)},this.get_json=function(b,c,e){var f,g,h=this._model.data,i=c?a.extend(!0,{},c,{no_id:!1}):{},j=d.get_json.call(this,b,i,e);if(j===!1)return!1;if(a.isArray(j))for(f=0,g=j.length;g>f;f++)j[f].type=j[f].id&&h[j[f].id]&&h[j[f].id].type?h[j[f].id].type:"default",c&&c.no_id&&(delete j[f].id,j[f].li_attr&&j[f].li_attr.id&&delete j[f].li_attr.id,j[f].a_attr&&j[f].a_attr.id&&delete j[f].a_attr.id);else j.type=j.id&&h[j.id]&&h[j.id].type?h[j.id].type:"default",c&&c.no_id&&(j=this._delete_ids(j));return j},this._delete_ids=function(b){if(a.isArray(b)){for(var c=0,d=b.length;d>c;c++)b[c]=this._delete_ids(b[c]);return b}return delete b.id,b.li_attr&&b.li_attr.id&&delete b.li_attr.id,b.a_attr&&b.a_attr.id&&delete b.a_attr.id,b.children&&a.isArray(b.children)&&(b.children=this._delete_ids(b.children)),
|
6 |
+
b},this.check=function(c,e,f,g,h){if(d.check.call(this,c,e,f,g,h)===!1)return!1;e=e&&e.id?e:this.get_node(e),f=f&&f.id?f:this.get_node(f);var i=e&&e.id?h&&h.origin?h.origin:a.jstree.reference(e.id):null,j,k,l,m;switch(i=i&&i._model&&i._model.data?i._model.data:null,c){case"create_node":case"move_node":case"copy_node":if("move_node"!==c||-1===a.inArray(e.id,f.children)){if(j=this.get_rules(f),j.max_children!==b&&-1!==j.max_children&&j.max_children===f.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(j.valid_children!==b&&-1!==j.valid_children&&-1===a.inArray(e.type||"default",j.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(i&&e.children_d&&e.parents){for(k=0,l=0,m=e.children_d.length;m>l;l++)k=Math.max(k,i[e.children_d[l]].parents.length);k=k-e.parents.length+1}(0>=k||k===b)&&(k=1);do{if(j.max_depth!==b&&-1!==j.max_depth&&j.max_depth<k)return this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;f=this.get_node(f.parent),j=this.get_rules(f),k++}while(f)}}return!0},this.get_rules=function(a){if(a=this.get_node(a),!a)return!1;var c=this.get_type(a,!0);return c.max_depth===b&&(c.max_depth=-1),c.max_children===b&&(c.max_children=-1),c.valid_children===b&&(c.valid_children=-1),c},this.get_type=function(b,c){return b=this.get_node(b),b?c?a.extend({type:b.type},this.settings.types[b.type]):b.type:!1},this.set_type=function(c,d){var e=this._model.data,f,g,h,i,j,k,l,m;if(a.isArray(c)){for(c=c.slice(),g=0,h=c.length;h>g;g++)this.set_type(c[g],d);return!0}if(f=this.settings.types,c=this.get_node(c),!f[d]||!c)return!1;if(l=this.get_node(c,!0),l&&l.length&&(m=l.children(".jstree-anchor")),i=c.type,j=this.get_icon(c),c.type=d,(j===!0||!f[i]||f[i].icon!==b&&j===f[i].icon)&&this.set_icon(c,f[d].icon!==b?f[d].icon:!0),f[i]&&f[i].li_attr!==b&&"object"==typeof f[i].li_attr)for(k in f[i].li_attr)if(f[i].li_attr.hasOwnProperty(k)){if("id"===k)continue;"class"===k?(e[c.id].li_attr["class"]=(e[c.id].li_attr["class"]||"").replace(f[i].li_attr[k],""),l&&l.removeClass(f[i].li_attr[k])):e[c.id].li_attr[k]===f[i].li_attr[k]&&(e[c.id].li_attr[k]=null,l&&l.removeAttr(k))}if(f[i]&&f[i].a_attr!==b&&"object"==typeof f[i].a_attr)for(k in f[i].a_attr)if(f[i].a_attr.hasOwnProperty(k)){if("id"===k)continue;"class"===k?(e[c.id].a_attr["class"]=(e[c.id].a_attr["class"]||"").replace(f[i].a_attr[k],""),m&&m.removeClass(f[i].a_attr[k])):e[c.id].a_attr[k]===f[i].a_attr[k]&&("href"===k?(e[c.id].a_attr[k]="#",m&&m.attr("href","#")):(delete e[c.id].a_attr[k],m&&m.removeAttr(k)))}if(f[d].li_attr!==b&&"object"==typeof f[d].li_attr)for(k in f[d].li_attr)if(f[d].li_attr.hasOwnProperty(k)){if("id"===k)continue;e[c.id].li_attr[k]===b?(e[c.id].li_attr[k]=f[d].li_attr[k],l&&("class"===k?l.addClass(f[d].li_attr[k]):l.attr(k,f[d].li_attr[k]))):"class"===k&&(e[c.id].li_attr["class"]=f[d].li_attr[k]+" "+e[c.id].li_attr["class"],l&&l.addClass(f[d].li_attr[k]))}if(f[d].a_attr!==b&&"object"==typeof f[d].a_attr)for(k in f[d].a_attr)if(f[d].a_attr.hasOwnProperty(k)){if("id"===k)continue;e[c.id].a_attr[k]===b?(e[c.id].a_attr[k]=f[d].a_attr[k],m&&("class"===k?m.addClass(f[d].a_attr[k]):m.attr(k,f[d].a_attr[k]))):"href"===k&&"#"===e[c.id].a_attr[k]?(e[c.id].a_attr.href=f[d].a_attr.href,m&&m.attr("href",f[d].a_attr.href)):"class"===k&&(e[c.id].a_attr["class"]=f[d].a_attr["class"]+" "+e[c.id].a_attr["class"],m&&m.addClass(f[d].a_attr[k]))}return!0}},a.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(a,b){return a+" ("+b+")"}},a.jstree.plugins.unique=function(c,d){this.check=function(b,c,e,f,g){if(d.check.call(this,b,c,e,f,g)===!1)return!1;if(c=c&&c.id?c:this.get_node(c),e=e&&e.id?e:this.get_node(e),!e||!e.children)return!0;var h="rename_node"===b?f:c.text,i=[],j=this.settings.unique.case_sensitive,k=this.settings.unique.trim_whitespace,l=this._model.data,m,n,o;for(m=0,n=e.children.length;n>m;m++)o=l[e.children[m]].text,j||(o=o.toLowerCase()),k&&(o=o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),i.push(o);switch(j||(h=h.toLowerCase()),k&&(h=h.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),b){case"delete_node":return!0;case"rename_node":return o=c.text||"",j||(o=o.toLowerCase()),k&&(o=o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),m=-1===a.inArray(h,i)||c.text&&o===h,m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"create_node":return m=-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"copy_node":return m=-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"move_node":return m=c.parent===e.id&&(!g||!g.is_multi)||-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m}return!0},this.create_node=function(c,e,f,g,h){if(!e||e.text===b){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return d.create_node.call(this,c,e,f,g,h);if(f=f===b?"last":f,!f.toString().match(/^(before|after)$/)&&!h&&!this.is_loaded(c))return d.create_node.call(this,c,e,f,g,h);e||(e={});var i,j,k,l,m,n=this._model.data,o=this.settings.unique.case_sensitive,p=this.settings.unique.trim_whitespace,q=this.settings.unique.duplicate,r;for(j=i=this.get_string("New node"),k=[],l=0,m=c.children.length;m>l;l++)r=n[c.children[l]].text,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),k.push(r);l=1,r=j,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));while(-1!==a.inArray(r,k))j=q.call(this,i,++l).toString(),r=j,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));e.text=j}return d.create_node.call(this,c,e,f,g,h)}};var n=i.createElement("DIV");if(n.setAttribute("unselectable","on"),n.setAttribute("role","presentation"),n.className="jstree-wholerow",n.innerHTML=" ",a.jstree.plugins.wholerow=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("ready.jstree set_state.jstree",a.proxy(function(){this.hide_dots()},this)).on("init.jstree loading.jstree ready.jstree",a.proxy(function(){this.get_container_ul().addClass("jstree-wholerow-ul")},this)).on("deselect_all.jstree",a.proxy(function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).on("changed.jstree",a.proxy(function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var c=!1,d,e;for(d=0,e=b.selected.length;e>d;d++)c=this.get_node(b.selected[d],!0),c&&c.length&&c.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("open_node.jstree",a.proxy(function(a,b){this.get_node(b.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("hover_node.jstree dehover_node.jstree",a.proxy(function(a,b){"hover_node"===a.type&&this.is_disabled(b.node)||this.get_node(b.node,!0).children(".jstree-wholerow")["hover_node"===a.type?"addClass":"removeClass"]("jstree-wholerow-hovered")},this)).on("contextmenu.jstree",".jstree-wholerow",a.proxy(function(b){if(this._data.contextmenu){b.preventDefault();var c=a.Event("contextmenu",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey,pageX:b.pageX,pageY:b.pageY});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c)}},this)).on("click.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()}).on("dblclick.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("dblclick",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()}).on("click.jstree",".jstree-leaf > .jstree-ocl",a.proxy(function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",a.proxy(function(a){return a.stopImmediatePropagation(),this.is_disabled(a.currentTarget)||this.hover_node(a.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",a.proxy(function(a){this.dehover_node(a.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),c.teardown.call(this)},this.redraw_node=function(b,d,e,f){if(b=c.redraw_node.apply(this,arguments)){var g=n.cloneNode(!0);-1!==a.inArray(b.id,this._data.core.selected)&&(g.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===b.id&&(g.className+=" jstree-wholerow-hovered"),b.insertBefore(g,b.childNodes[0])}return b}},i.registerElement&&Object&&Object.create){var o=Object.create(HTMLElement.prototype);o.createdCallback=function(){var b={core:{},plugins:[]},c;for(c in a.jstree.plugins)a.jstree.plugins.hasOwnProperty(c)&&this.attributes[c]&&(b.plugins.push(c),this.getAttribute(c)&&JSON.parse(this.getAttribute(c))&&(b[c]=JSON.parse(this.getAttribute(c))));for(c in a.jstree.defaults.core)a.jstree.defaults.core.hasOwnProperty(c)&&this.attributes[c]&&(b.core[c]=JSON.parse(this.getAttribute(c))||this.getAttribute(c));a(this).jstree(b)};try{i.registerElement("vakata-jstree",{prototype:o})}catch(p){}}}});
|
assets/jstree/themes/default-dark/32px.png
ADDED
Binary file
|
assets/jstree/themes/default-dark/40px.png
ADDED
Binary file
|
assets/jstree/themes/default-dark/style.css
ADDED
@@ -0,0 +1,1152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* jsTree default dark theme */
|
2 |
+
.jstree-node,
|
3 |
+
.jstree-children,
|
4 |
+
.jstree-container-ul {
|
5 |
+
display: block;
|
6 |
+
margin: 0;
|
7 |
+
padding: 0;
|
8 |
+
list-style-type: none;
|
9 |
+
list-style-image: none;
|
10 |
+
}
|
11 |
+
.jstree-node {
|
12 |
+
white-space: nowrap;
|
13 |
+
}
|
14 |
+
.jstree-anchor {
|
15 |
+
display: inline-block;
|
16 |
+
color: black;
|
17 |
+
white-space: nowrap;
|
18 |
+
padding: 0 4px 0 1px;
|
19 |
+
margin: 0;
|
20 |
+
vertical-align: top;
|
21 |
+
}
|
22 |
+
.jstree-anchor:focus {
|
23 |
+
outline: 0;
|
24 |
+
}
|
25 |
+
.jstree-anchor,
|
26 |
+
.jstree-anchor:link,
|
27 |
+
.jstree-anchor:visited,
|
28 |
+
.jstree-anchor:hover,
|
29 |
+
.jstree-anchor:active {
|
30 |
+
text-decoration: none;
|
31 |
+
color: inherit;
|
32 |
+
}
|
33 |
+
.jstree-icon {
|
34 |
+
display: inline-block;
|
35 |
+
text-decoration: none;
|
36 |
+
margin: 0;
|
37 |
+
padding: 0;
|
38 |
+
vertical-align: top;
|
39 |
+
text-align: center;
|
40 |
+
}
|
41 |
+
.jstree-icon:empty {
|
42 |
+
display: inline-block;
|
43 |
+
text-decoration: none;
|
44 |
+
margin: 0;
|
45 |
+
padding: 0;
|
46 |
+
vertical-align: top;
|
47 |
+
text-align: center;
|
48 |
+
}
|
49 |
+
.jstree-ocl {
|
50 |
+
cursor: pointer;
|
51 |
+
}
|
52 |
+
.jstree-leaf > .jstree-ocl {
|
53 |
+
cursor: default;
|
54 |
+
}
|
55 |
+
.jstree .jstree-open > .jstree-children {
|
56 |
+
display: block;
|
57 |
+
}
|
58 |
+
.jstree .jstree-closed > .jstree-children,
|
59 |
+
.jstree .jstree-leaf > .jstree-children {
|
60 |
+
display: none;
|
61 |
+
}
|
62 |
+
.jstree-anchor > .jstree-themeicon {
|
63 |
+
margin-right: 2px;
|
64 |
+
}
|
65 |
+
.jstree-no-icons .jstree-themeicon,
|
66 |
+
.jstree-anchor > .jstree-themeicon-hidden {
|
67 |
+
display: none;
|
68 |
+
}
|
69 |
+
.jstree-hidden,
|
70 |
+
.jstree-node.jstree-hidden {
|
71 |
+
display: none;
|
72 |
+
}
|
73 |
+
.jstree-rtl .jstree-anchor {
|
74 |
+
padding: 0 1px 0 4px;
|
75 |
+
}
|
76 |
+
.jstree-rtl .jstree-anchor > .jstree-themeicon {
|
77 |
+
margin-left: 2px;
|
78 |
+
margin-right: 0;
|
79 |
+
}
|
80 |
+
.jstree-rtl .jstree-node {
|
81 |
+
margin-left: 0;
|
82 |
+
}
|
83 |
+
.jstree-rtl .jstree-container-ul > .jstree-node {
|
84 |
+
margin-right: 0;
|
85 |
+
}
|
86 |
+
.jstree-wholerow-ul {
|
87 |
+
position: relative;
|
88 |
+
display: inline-block;
|
89 |
+
min-width: 100%;
|
90 |
+
}
|
91 |
+
.jstree-wholerow-ul .jstree-leaf > .jstree-ocl {
|
92 |
+
cursor: pointer;
|
93 |
+
}
|
94 |
+
.jstree-wholerow-ul .jstree-anchor,
|
95 |
+
.jstree-wholerow-ul .jstree-icon {
|
96 |
+
position: relative;
|
97 |
+
}
|
98 |
+
.jstree-wholerow-ul .jstree-wholerow {
|
99 |
+
width: 100%;
|
100 |
+
cursor: pointer;
|
101 |
+
position: absolute;
|
102 |
+
left: 0;
|
103 |
+
-webkit-user-select: none;
|
104 |
+
-moz-user-select: none;
|
105 |
+
-ms-user-select: none;
|
106 |
+
user-select: none;
|
107 |
+
}
|
108 |
+
.jstree-contextmenu .jstree-anchor {
|
109 |
+
-webkit-user-select: none;
|
110 |
+
/* disable selection/Copy of UIWebView */
|
111 |
+
-webkit-touch-callout: none;
|
112 |
+
/* disable the IOS popup when long-press on a link */
|
113 |
+
}
|
114 |
+
.vakata-context {
|
115 |
+
display: none;
|
116 |
+
}
|
117 |
+
.vakata-context,
|
118 |
+
.vakata-context ul {
|
119 |
+
margin: 0;
|
120 |
+
padding: 2px;
|
121 |
+
position: absolute;
|
122 |
+
background: #f5f5f5;
|
123 |
+
border: 1px solid #979797;
|
124 |
+
box-shadow: 2px 2px 2px #999999;
|
125 |
+
}
|
126 |
+
.vakata-context ul {
|
127 |
+
list-style: none;
|
128 |
+
left: 100%;
|
129 |
+
margin-top: -2.7em;
|
130 |
+
margin-left: -4px;
|
131 |
+
}
|
132 |
+
.vakata-context .vakata-context-right ul {
|
133 |
+
left: auto;
|
134 |
+
right: 100%;
|
135 |
+
margin-left: auto;
|
136 |
+
margin-right: -4px;
|
137 |
+
}
|
138 |
+
.vakata-context li {
|
139 |
+
list-style: none;
|
140 |
+
}
|
141 |
+
.vakata-context li > a {
|
142 |
+
display: block;
|
143 |
+
padding: 0 2em 0 2em;
|
144 |
+
text-decoration: none;
|
145 |
+
width: auto;
|
146 |
+
color: black;
|
147 |
+
white-space: nowrap;
|
148 |
+
line-height: 2.4em;
|
149 |
+
text-shadow: 1px 1px 0 white;
|
150 |
+
border-radius: 1px;
|
151 |
+
}
|
152 |
+
.vakata-context li > a:hover {
|
153 |
+
position: relative;
|
154 |
+
background-color: #e8eff7;
|
155 |
+
box-shadow: 0 0 2px #0a6aa1;
|
156 |
+
}
|
157 |
+
.vakata-context li > a.vakata-context-parent {
|
158 |
+
background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");
|
159 |
+
background-position: right center;
|
160 |
+
background-repeat: no-repeat;
|
161 |
+
}
|
162 |
+
.vakata-context li > a:focus {
|
163 |
+
outline: 0;
|
164 |
+
}
|
165 |
+
.vakata-context .vakata-context-hover > a {
|
166 |
+
position: relative;
|
167 |
+
background-color: #e8eff7;
|
168 |
+
box-shadow: 0 0 2px #0a6aa1;
|
169 |
+
}
|
170 |
+
.vakata-context .vakata-context-separator > a,
|
171 |
+
.vakata-context .vakata-context-separator > a:hover {
|
172 |
+
background: white;
|
173 |
+
border: 0;
|
174 |
+
border-top: 1px solid #e2e3e3;
|
175 |
+
height: 1px;
|
176 |
+
min-height: 1px;
|
177 |
+
max-height: 1px;
|
178 |
+
padding: 0;
|
179 |
+
margin: 0 0 0 2.4em;
|
180 |
+
border-left: 1px solid #e0e0e0;
|
181 |
+
text-shadow: 0 0 0 transparent;
|
182 |
+
box-shadow: 0 0 0 transparent;
|
183 |
+
border-radius: 0;
|
184 |
+
}
|
185 |
+
.vakata-context .vakata-contextmenu-disabled a,
|
186 |
+
.vakata-context .vakata-contextmenu-disabled a:hover {
|
187 |
+
color: silver;
|
188 |
+
background-color: transparent;
|
189 |
+
border: 0;
|
190 |
+
box-shadow: 0 0 0;
|
191 |
+
}
|
192 |
+
.vakata-context li > a > i {
|
193 |
+
text-decoration: none;
|
194 |
+
display: inline-block;
|
195 |
+
width: 2.4em;
|
196 |
+
height: 2.4em;
|
197 |
+
background: transparent;
|
198 |
+
margin: 0 0 0 -2em;
|
199 |
+
vertical-align: top;
|
200 |
+
text-align: center;
|
201 |
+
line-height: 2.4em;
|
202 |
+
}
|
203 |
+
.vakata-context li > a > i:empty {
|
204 |
+
width: 2.4em;
|
205 |
+
line-height: 2.4em;
|
206 |
+
}
|
207 |
+
.vakata-context li > a .vakata-contextmenu-sep {
|
208 |
+
display: inline-block;
|
209 |
+
width: 1px;
|
210 |
+
height: 2.4em;
|
211 |
+
background: white;
|
212 |
+
margin: 0 0.5em 0 0;
|
213 |
+
border-left: 1px solid #e2e3e3;
|
214 |
+
}
|
215 |
+
.vakata-context .vakata-contextmenu-shortcut {
|
216 |
+
font-size: 0.8em;
|
217 |
+
color: silver;
|
218 |
+
opacity: 0.5;
|
219 |
+
display: none;
|
220 |
+
}
|
221 |
+
.vakata-context-rtl ul {
|
222 |
+
left: auto;
|
223 |
+
right: 100%;
|
224 |
+
margin-left: auto;
|
225 |
+
margin-right: -4px;
|
226 |
+
}
|
227 |
+
.vakata-context-rtl li > a.vakata-context-parent {
|
228 |
+
background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7");
|
229 |
+
background-position: left center;
|
230 |
+
background-repeat: no-repeat;
|
231 |
+
}
|
232 |
+
.vakata-context-rtl .vakata-context-separator > a {
|
233 |
+
margin: 0 2.4em 0 0;
|
234 |
+
border-left: 0;
|
235 |
+
border-right: 1px solid #e2e3e3;
|
236 |
+
}
|
237 |
+
.vakata-context-rtl .vakata-context-left ul {
|
238 |
+
right: auto;
|
239 |
+
left: 100%;
|
240 |
+
margin-left: -4px;
|
241 |
+
margin-right: auto;
|
242 |
+
}
|
243 |
+
.vakata-context-rtl li > a > i {
|
244 |
+
margin: 0 -2em 0 0;
|
245 |
+
}
|
246 |
+
.vakata-context-rtl li > a .vakata-contextmenu-sep {
|
247 |
+
margin: 0 0 0 0.5em;
|
248 |
+
border-left-color: white;
|
249 |
+
background: #e2e3e3;
|
250 |
+
}
|
251 |
+
#jstree-marker {
|
252 |
+
position: absolute;
|
253 |
+
top: 0;
|
254 |
+
left: 0;
|
255 |
+
margin: -5px 0 0 0;
|
256 |
+
padding: 0;
|
257 |
+
border-right: 0;
|
258 |
+
border-top: 5px solid transparent;
|
259 |
+
border-bottom: 5px solid transparent;
|
260 |
+
border-left: 5px solid;
|
261 |
+
width: 0;
|
262 |
+
height: 0;
|
263 |
+
font-size: 0;
|
264 |
+
line-height: 0;
|
265 |
+
}
|
266 |
+
#jstree-dnd {
|
267 |
+
line-height: 16px;
|
268 |
+
margin: 0;
|
269 |
+
padding: 4px;
|
270 |
+
}
|
271 |
+
#jstree-dnd .jstree-icon,
|
272 |
+
#jstree-dnd .jstree-copy {
|
273 |
+
display: inline-block;
|
274 |
+
text-decoration: none;
|
275 |
+
margin: 0 2px 0 0;
|
276 |
+
padding: 0;
|
277 |
+
width: 16px;
|
278 |
+
height: 16px;
|
279 |
+
}
|
280 |
+
#jstree-dnd .jstree-ok {
|
281 |
+
background: green;
|
282 |
+
}
|
283 |
+
#jstree-dnd .jstree-er {
|
284 |
+
background: red;
|
285 |
+
}
|
286 |
+
#jstree-dnd .jstree-copy {
|
287 |
+
margin: 0 2px 0 2px;
|
288 |
+
}
|
289 |
+
.jstree-default-dark .jstree-node,
|
290 |
+
.jstree-default-dark .jstree-icon {
|
291 |
+
background-repeat: no-repeat;
|
292 |
+
background-color: transparent;
|
293 |
+
}
|
294 |
+
.jstree-default-dark .jstree-anchor,
|
295 |
+
.jstree-default-dark .jstree-animated,
|
296 |
+
.jstree-default-dark .jstree-wholerow {
|
297 |
+
transition: background-color 0.15s, box-shadow 0.15s;
|
298 |
+
}
|
299 |
+
.jstree-default-dark .jstree-hovered {
|
300 |
+
background: #555555;
|
301 |
+
border-radius: 2px;
|
302 |
+
box-shadow: inset 0 0 1px #555555;
|
303 |
+
}
|
304 |
+
.jstree-default-dark .jstree-context {
|
305 |
+
background: #555555;
|
306 |
+
border-radius: 2px;
|
307 |
+
box-shadow: inset 0 0 1px #555555;
|
308 |
+
}
|
309 |
+
.jstree-default-dark .jstree-clicked {
|
310 |
+
background: #5fa2db;
|
311 |
+
border-radius: 2px;
|
312 |
+
box-shadow: inset 0 0 1px #666666;
|
313 |
+
}
|
314 |
+
.jstree-default-dark .jstree-no-icons .jstree-anchor > .jstree-themeicon {
|
315 |
+
display: none;
|
316 |
+
}
|
317 |
+
.jstree-default-dark .jstree-disabled {
|
318 |
+
background: transparent;
|
319 |
+
color: #666666;
|
320 |
+
}
|
321 |
+
.jstree-default-dark .jstree-disabled.jstree-hovered {
|
322 |
+
background: transparent;
|
323 |
+
box-shadow: none;
|
324 |
+
}
|
325 |
+
.jstree-default-dark .jstree-disabled.jstree-clicked {
|
326 |
+
background: #333333;
|
327 |
+
}
|
328 |
+
.jstree-default-dark .jstree-disabled > .jstree-icon {
|
329 |
+
opacity: 0.8;
|
330 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
331 |
+
/* Firefox 10+ */
|
332 |
+
filter: gray;
|
333 |
+
/* IE6-9 */
|
334 |
+
-webkit-filter: grayscale(100%);
|
335 |
+
/* Chrome 19+ & Safari 6+ */
|
336 |
+
}
|
337 |
+
.jstree-default-dark .jstree-search {
|
338 |
+
font-style: italic;
|
339 |
+
color: #ffffff;
|
340 |
+
font-weight: bold;
|
341 |
+
}
|
342 |
+
.jstree-default-dark .jstree-no-checkboxes .jstree-checkbox {
|
343 |
+
display: none !important;
|
344 |
+
}
|
345 |
+
.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked {
|
346 |
+
background: transparent;
|
347 |
+
box-shadow: none;
|
348 |
+
}
|
349 |
+
.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {
|
350 |
+
background: #555555;
|
351 |
+
}
|
352 |
+
.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked {
|
353 |
+
background: transparent;
|
354 |
+
}
|
355 |
+
.jstree-default-dark.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {
|
356 |
+
background: #555555;
|
357 |
+
}
|
358 |
+
.jstree-default-dark > .jstree-striped {
|
359 |
+
min-width: 100%;
|
360 |
+
display: inline-block;
|
361 |
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat;
|
362 |
+
}
|
363 |
+
.jstree-default-dark > .jstree-wholerow-ul .jstree-hovered,
|
364 |
+
.jstree-default-dark > .jstree-wholerow-ul .jstree-clicked {
|
365 |
+
background: transparent;
|
366 |
+
box-shadow: none;
|
367 |
+
border-radius: 0;
|
368 |
+
}
|
369 |
+
.jstree-default-dark .jstree-wholerow {
|
370 |
+
-moz-box-sizing: border-box;
|
371 |
+
-webkit-box-sizing: border-box;
|
372 |
+
box-sizing: border-box;
|
373 |
+
}
|
374 |
+
.jstree-default-dark .jstree-wholerow-hovered {
|
375 |
+
background: #555555;
|
376 |
+
}
|
377 |
+
.jstree-default-dark .jstree-wholerow-clicked {
|
378 |
+
background: #5fa2db;
|
379 |
+
background: -webkit-linear-gradient(top, #5fa2db 0%, #5fa2db 100%);
|
380 |
+
background: linear-gradient(to bottom, #5fa2db 0%, #5fa2db 100%);
|
381 |
+
}
|
382 |
+
.jstree-default-dark .jstree-node {
|
383 |
+
min-height: 24px;
|
384 |
+
line-height: 24px;
|
385 |
+
margin-left: 24px;
|
386 |
+
min-width: 24px;
|
387 |
+
}
|
388 |
+
.jstree-default-dark .jstree-anchor {
|
389 |
+
line-height: 24px;
|
390 |
+
height: 24px;
|
391 |
+
}
|
392 |
+
.jstree-default-dark .jstree-icon {
|
393 |
+
width: 24px;
|
394 |
+
height: 24px;
|
395 |
+
line-height: 24px;
|
396 |
+
}
|
397 |
+
.jstree-default-dark .jstree-icon:empty {
|
398 |
+
width: 24px;
|
399 |
+
height: 24px;
|
400 |
+
line-height: 24px;
|
401 |
+
}
|
402 |
+
.jstree-default-dark.jstree-rtl .jstree-node {
|
403 |
+
margin-right: 24px;
|
404 |
+
}
|
405 |
+
.jstree-default-dark .jstree-wholerow {
|
406 |
+
height: 24px;
|
407 |
+
}
|
408 |
+
.jstree-default-dark .jstree-node,
|
409 |
+
.jstree-default-dark .jstree-icon {
|
410 |
+
background-image: url("32px.png");
|
411 |
+
}
|
412 |
+
.jstree-default-dark .jstree-node {
|
413 |
+
background-position: -292px -4px;
|
414 |
+
background-repeat: repeat-y;
|
415 |
+
}
|
416 |
+
.jstree-default-dark .jstree-last {
|
417 |
+
background: transparent;
|
418 |
+
}
|
419 |
+
.jstree-default-dark .jstree-open > .jstree-ocl {
|
420 |
+
background-position: -132px -4px;
|
421 |
+
}
|
422 |
+
.jstree-default-dark .jstree-closed > .jstree-ocl {
|
423 |
+
background-position: -100px -4px;
|
424 |
+
}
|
425 |
+
.jstree-default-dark .jstree-leaf > .jstree-ocl {
|
426 |
+
background-position: -68px -4px;
|
427 |
+
}
|
428 |
+
.jstree-default-dark .jstree-themeicon {
|
429 |
+
background-position: -260px -4px;
|
430 |
+
}
|
431 |
+
.jstree-default-dark > .jstree-no-dots .jstree-node,
|
432 |
+
.jstree-default-dark > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
433 |
+
background: transparent;
|
434 |
+
}
|
435 |
+
.jstree-default-dark > .jstree-no-dots .jstree-open > .jstree-ocl {
|
436 |
+
background-position: -36px -4px;
|
437 |
+
}
|
438 |
+
.jstree-default-dark > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
439 |
+
background-position: -4px -4px;
|
440 |
+
}
|
441 |
+
.jstree-default-dark .jstree-disabled {
|
442 |
+
background: transparent;
|
443 |
+
}
|
444 |
+
.jstree-default-dark .jstree-disabled.jstree-hovered {
|
445 |
+
background: transparent;
|
446 |
+
}
|
447 |
+
.jstree-default-dark .jstree-disabled.jstree-clicked {
|
448 |
+
background: #efefef;
|
449 |
+
}
|
450 |
+
.jstree-default-dark .jstree-checkbox {
|
451 |
+
background-position: -164px -4px;
|
452 |
+
}
|
453 |
+
.jstree-default-dark .jstree-checkbox:hover {
|
454 |
+
background-position: -164px -36px;
|
455 |
+
}
|
456 |
+
.jstree-default-dark.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
|
457 |
+
.jstree-default-dark .jstree-checked > .jstree-checkbox {
|
458 |
+
background-position: -228px -4px;
|
459 |
+
}
|
460 |
+
.jstree-default-dark.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
|
461 |
+
.jstree-default-dark .jstree-checked > .jstree-checkbox:hover {
|
462 |
+
background-position: -228px -36px;
|
463 |
+
}
|
464 |
+
.jstree-default-dark .jstree-anchor > .jstree-undetermined {
|
465 |
+
background-position: -196px -4px;
|
466 |
+
}
|
467 |
+
.jstree-default-dark .jstree-anchor > .jstree-undetermined:hover {
|
468 |
+
background-position: -196px -36px;
|
469 |
+
}
|
470 |
+
.jstree-default-dark .jstree-checkbox-disabled {
|
471 |
+
opacity: 0.8;
|
472 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
473 |
+
/* Firefox 10+ */
|
474 |
+
filter: gray;
|
475 |
+
/* IE6-9 */
|
476 |
+
-webkit-filter: grayscale(100%);
|
477 |
+
/* Chrome 19+ & Safari 6+ */
|
478 |
+
}
|
479 |
+
.jstree-default-dark > .jstree-striped {
|
480 |
+
background-size: auto 48px;
|
481 |
+
}
|
482 |
+
.jstree-default-dark.jstree-rtl .jstree-node {
|
483 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
|
484 |
+
background-position: 100% 1px;
|
485 |
+
background-repeat: repeat-y;
|
486 |
+
}
|
487 |
+
.jstree-default-dark.jstree-rtl .jstree-last {
|
488 |
+
background: transparent;
|
489 |
+
}
|
490 |
+
.jstree-default-dark.jstree-rtl .jstree-open > .jstree-ocl {
|
491 |
+
background-position: -132px -36px;
|
492 |
+
}
|
493 |
+
.jstree-default-dark.jstree-rtl .jstree-closed > .jstree-ocl {
|
494 |
+
background-position: -100px -36px;
|
495 |
+
}
|
496 |
+
.jstree-default-dark.jstree-rtl .jstree-leaf > .jstree-ocl {
|
497 |
+
background-position: -68px -36px;
|
498 |
+
}
|
499 |
+
.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-node,
|
500 |
+
.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
501 |
+
background: transparent;
|
502 |
+
}
|
503 |
+
.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
|
504 |
+
background-position: -36px -36px;
|
505 |
+
}
|
506 |
+
.jstree-default-dark.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
507 |
+
background-position: -4px -36px;
|
508 |
+
}
|
509 |
+
.jstree-default-dark .jstree-themeicon-custom {
|
510 |
+
background-color: transparent;
|
511 |
+
background-image: none;
|
512 |
+
background-position: 0 0;
|
513 |
+
}
|
514 |
+
.jstree-default-dark > .jstree-container-ul .jstree-loading > .jstree-ocl {
|
515 |
+
background: url("throbber.gif") center center no-repeat;
|
516 |
+
}
|
517 |
+
.jstree-default-dark .jstree-file {
|
518 |
+
background: url("32px.png") -100px -68px no-repeat;
|
519 |
+
}
|
520 |
+
.jstree-default-dark .jstree-folder {
|
521 |
+
background: url("32px.png") -260px -4px no-repeat;
|
522 |
+
}
|
523 |
+
.jstree-default-dark > .jstree-container-ul > .jstree-node {
|
524 |
+
margin-left: 0;
|
525 |
+
margin-right: 0;
|
526 |
+
}
|
527 |
+
#jstree-dnd.jstree-default-dark {
|
528 |
+
line-height: 24px;
|
529 |
+
padding: 0 4px;
|
530 |
+
}
|
531 |
+
#jstree-dnd.jstree-default-dark .jstree-ok,
|
532 |
+
#jstree-dnd.jstree-default-dark .jstree-er {
|
533 |
+
background-image: url("32px.png");
|
534 |
+
background-repeat: no-repeat;
|
535 |
+
background-color: transparent;
|
536 |
+
}
|
537 |
+
#jstree-dnd.jstree-default-dark i {
|
538 |
+
background: transparent;
|
539 |
+
width: 24px;
|
540 |
+
height: 24px;
|
541 |
+
line-height: 24px;
|
542 |
+
}
|
543 |
+
#jstree-dnd.jstree-default-dark .jstree-ok {
|
544 |
+
background-position: -4px -68px;
|
545 |
+
}
|
546 |
+
#jstree-dnd.jstree-default-dark .jstree-er {
|
547 |
+
background-position: -36px -68px;
|
548 |
+
}
|
549 |
+
.jstree-default-dark .jstree-ellipsis {
|
550 |
+
overflow: hidden;
|
551 |
+
}
|
552 |
+
.jstree-default-dark .jstree-ellipsis .jstree-anchor {
|
553 |
+
width: calc(100% - 29px);
|
554 |
+
text-overflow: ellipsis;
|
555 |
+
overflow: hidden;
|
556 |
+
}
|
557 |
+
.jstree-default-dark .jstree-ellipsis.jstree-no-icons .jstree-anchor {
|
558 |
+
width: calc(100% - 5px);
|
559 |
+
}
|
560 |
+
.jstree-default-dark.jstree-rtl .jstree-node {
|
561 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
|
562 |
+
}
|
563 |
+
.jstree-default-dark.jstree-rtl .jstree-last {
|
564 |
+
background: transparent;
|
565 |
+
}
|
566 |
+
.jstree-default-dark-small .jstree-node {
|
567 |
+
min-height: 18px;
|
568 |
+
line-height: 18px;
|
569 |
+
margin-left: 18px;
|
570 |
+
min-width: 18px;
|
571 |
+
}
|
572 |
+
.jstree-default-dark-small .jstree-anchor {
|
573 |
+
line-height: 18px;
|
574 |
+
height: 18px;
|
575 |
+
}
|
576 |
+
.jstree-default-dark-small .jstree-icon {
|
577 |
+
width: 18px;
|
578 |
+
height: 18px;
|
579 |
+
line-height: 18px;
|
580 |
+
}
|
581 |
+
.jstree-default-dark-small .jstree-icon:empty {
|
582 |
+
width: 18px;
|
583 |
+
height: 18px;
|
584 |
+
line-height: 18px;
|
585 |
+
}
|
586 |
+
.jstree-default-dark-small.jstree-rtl .jstree-node {
|
587 |
+
margin-right: 18px;
|
588 |
+
}
|
589 |
+
.jstree-default-dark-small .jstree-wholerow {
|
590 |
+
height: 18px;
|
591 |
+
}
|
592 |
+
.jstree-default-dark-small .jstree-node,
|
593 |
+
.jstree-default-dark-small .jstree-icon {
|
594 |
+
background-image: url("32px.png");
|
595 |
+
}
|
596 |
+
.jstree-default-dark-small .jstree-node {
|
597 |
+
background-position: -295px -7px;
|
598 |
+
background-repeat: repeat-y;
|
599 |
+
}
|
600 |
+
.jstree-default-dark-small .jstree-last {
|
601 |
+
background: transparent;
|
602 |
+
}
|
603 |
+
.jstree-default-dark-small .jstree-open > .jstree-ocl {
|
604 |
+
background-position: -135px -7px;
|
605 |
+
}
|
606 |
+
.jstree-default-dark-small .jstree-closed > .jstree-ocl {
|
607 |
+
background-position: -103px -7px;
|
608 |
+
}
|
609 |
+
.jstree-default-dark-small .jstree-leaf > .jstree-ocl {
|
610 |
+
background-position: -71px -7px;
|
611 |
+
}
|
612 |
+
.jstree-default-dark-small .jstree-themeicon {
|
613 |
+
background-position: -263px -7px;
|
614 |
+
}
|
615 |
+
.jstree-default-dark-small > .jstree-no-dots .jstree-node,
|
616 |
+
.jstree-default-dark-small > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
617 |
+
background: transparent;
|
618 |
+
}
|
619 |
+
.jstree-default-dark-small > .jstree-no-dots .jstree-open > .jstree-ocl {
|
620 |
+
background-position: -39px -7px;
|
621 |
+
}
|
622 |
+
.jstree-default-dark-small > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
623 |
+
background-position: -7px -7px;
|
624 |
+
}
|
625 |
+
.jstree-default-dark-small .jstree-disabled {
|
626 |
+
background: transparent;
|
627 |
+
}
|
628 |
+
.jstree-default-dark-small .jstree-disabled.jstree-hovered {
|
629 |
+
background: transparent;
|
630 |
+
}
|
631 |
+
.jstree-default-dark-small .jstree-disabled.jstree-clicked {
|
632 |
+
background: #efefef;
|
633 |
+
}
|
634 |
+
.jstree-default-dark-small .jstree-checkbox {
|
635 |
+
background-position: -167px -7px;
|
636 |
+
}
|
637 |
+
.jstree-default-dark-small .jstree-checkbox:hover {
|
638 |
+
background-position: -167px -39px;
|
639 |
+
}
|
640 |
+
.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
|
641 |
+
.jstree-default-dark-small .jstree-checked > .jstree-checkbox {
|
642 |
+
background-position: -231px -7px;
|
643 |
+
}
|
644 |
+
.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
|
645 |
+
.jstree-default-dark-small .jstree-checked > .jstree-checkbox:hover {
|
646 |
+
background-position: -231px -39px;
|
647 |
+
}
|
648 |
+
.jstree-default-dark-small .jstree-anchor > .jstree-undetermined {
|
649 |
+
background-position: -199px -7px;
|
650 |
+
}
|
651 |
+
.jstree-default-dark-small .jstree-anchor > .jstree-undetermined:hover {
|
652 |
+
background-position: -199px -39px;
|
653 |
+
}
|
654 |
+
.jstree-default-dark-small .jstree-checkbox-disabled {
|
655 |
+
opacity: 0.8;
|
656 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
657 |
+
/* Firefox 10+ */
|
658 |
+
filter: gray;
|
659 |
+
/* IE6-9 */
|
660 |
+
-webkit-filter: grayscale(100%);
|
661 |
+
/* Chrome 19+ & Safari 6+ */
|
662 |
+
}
|
663 |
+
.jstree-default-dark-small > .jstree-striped {
|
664 |
+
background-size: auto 36px;
|
665 |
+
}
|
666 |
+
.jstree-default-dark-small.jstree-rtl .jstree-node {
|
667 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
|
668 |
+
background-position: 100% 1px;
|
669 |
+
background-repeat: repeat-y;
|
670 |
+
}
|
671 |
+
.jstree-default-dark-small.jstree-rtl .jstree-last {
|
672 |
+
background: transparent;
|
673 |
+
}
|
674 |
+
.jstree-default-dark-small.jstree-rtl .jstree-open > .jstree-ocl {
|
675 |
+
background-position: -135px -39px;
|
676 |
+
}
|
677 |
+
.jstree-default-dark-small.jstree-rtl .jstree-closed > .jstree-ocl {
|
678 |
+
background-position: -103px -39px;
|
679 |
+
}
|
680 |
+
.jstree-default-dark-small.jstree-rtl .jstree-leaf > .jstree-ocl {
|
681 |
+
background-position: -71px -39px;
|
682 |
+
}
|
683 |
+
.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-node,
|
684 |
+
.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
685 |
+
background: transparent;
|
686 |
+
}
|
687 |
+
.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
|
688 |
+
background-position: -39px -39px;
|
689 |
+
}
|
690 |
+
.jstree-default-dark-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
691 |
+
background-position: -7px -39px;
|
692 |
+
}
|
693 |
+
.jstree-default-dark-small .jstree-themeicon-custom {
|
694 |
+
background-color: transparent;
|
695 |
+
background-image: none;
|
696 |
+
background-position: 0 0;
|
697 |
+
}
|
698 |
+
.jstree-default-dark-small > .jstree-container-ul .jstree-loading > .jstree-ocl {
|
699 |
+
background: url("throbber.gif") center center no-repeat;
|
700 |
+
}
|
701 |
+
.jstree-default-dark-small .jstree-file {
|
702 |
+
background: url("32px.png") -103px -71px no-repeat;
|
703 |
+
}
|
704 |
+
.jstree-default-dark-small .jstree-folder {
|
705 |
+
background: url("32px.png") -263px -7px no-repeat;
|
706 |
+
}
|
707 |
+
.jstree-default-dark-small > .jstree-container-ul > .jstree-node {
|
708 |
+
margin-left: 0;
|
709 |
+
margin-right: 0;
|
710 |
+
}
|
711 |
+
#jstree-dnd.jstree-default-dark-small {
|
712 |
+
line-height: 18px;
|
713 |
+
padding: 0 4px;
|
714 |
+
}
|
715 |
+
#jstree-dnd.jstree-default-dark-small .jstree-ok,
|
716 |
+
#jstree-dnd.jstree-default-dark-small .jstree-er {
|
717 |
+
background-image: url("32px.png");
|
718 |
+
background-repeat: no-repeat;
|
719 |
+
background-color: transparent;
|
720 |
+
}
|
721 |
+
#jstree-dnd.jstree-default-dark-small i {
|
722 |
+
background: transparent;
|
723 |
+
width: 18px;
|
724 |
+
height: 18px;
|
725 |
+
line-height: 18px;
|
726 |
+
}
|
727 |
+
#jstree-dnd.jstree-default-dark-small .jstree-ok {
|
728 |
+
background-position: -7px -71px;
|
729 |
+
}
|
730 |
+
#jstree-dnd.jstree-default-dark-small .jstree-er {
|
731 |
+
background-position: -39px -71px;
|
732 |
+
}
|
733 |
+
.jstree-default-dark-small .jstree-ellipsis {
|
734 |
+
overflow: hidden;
|
735 |
+
}
|
736 |
+
.jstree-default-dark-small .jstree-ellipsis .jstree-anchor {
|
737 |
+
width: calc(100% - 23px);
|
738 |
+
text-overflow: ellipsis;
|
739 |
+
overflow: hidden;
|
740 |
+
}
|
741 |
+
.jstree-default-dark-small .jstree-ellipsis.jstree-no-icons .jstree-anchor {
|
742 |
+
width: calc(100% - 5px);
|
743 |
+
}
|
744 |
+
.jstree-default-dark-small.jstree-rtl .jstree-node {
|
745 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==");
|
746 |
+
}
|
747 |
+
.jstree-default-dark-small.jstree-rtl .jstree-last {
|
748 |
+
background: transparent;
|
749 |
+
}
|
750 |
+
.jstree-default-dark-large .jstree-node {
|
751 |
+
min-height: 32px;
|
752 |
+
line-height: 32px;
|
753 |
+
margin-left: 32px;
|
754 |
+
min-width: 32px;
|
755 |
+
}
|
756 |
+
.jstree-default-dark-large .jstree-anchor {
|
757 |
+
line-height: 32px;
|
758 |
+
height: 32px;
|
759 |
+
}
|
760 |
+
.jstree-default-dark-large .jstree-icon {
|
761 |
+
width: 32px;
|
762 |
+
height: 32px;
|
763 |
+
line-height: 32px;
|
764 |
+
}
|
765 |
+
.jstree-default-dark-large .jstree-icon:empty {
|
766 |
+
width: 32px;
|
767 |
+
height: 32px;
|
768 |
+
line-height: 32px;
|
769 |
+
}
|
770 |
+
.jstree-default-dark-large.jstree-rtl .jstree-node {
|
771 |
+
margin-right: 32px;
|
772 |
+
}
|
773 |
+
.jstree-default-dark-large .jstree-wholerow {
|
774 |
+
height: 32px;
|
775 |
+
}
|
776 |
+
.jstree-default-dark-large .jstree-node,
|
777 |
+
.jstree-default-dark-large .jstree-icon {
|
778 |
+
background-image: url("32px.png");
|
779 |
+
}
|
780 |
+
.jstree-default-dark-large .jstree-node {
|
781 |
+
background-position: -288px 0px;
|
782 |
+
background-repeat: repeat-y;
|
783 |
+
}
|
784 |
+
.jstree-default-dark-large .jstree-last {
|
785 |
+
background: transparent;
|
786 |
+
}
|
787 |
+
.jstree-default-dark-large .jstree-open > .jstree-ocl {
|
788 |
+
background-position: -128px 0px;
|
789 |
+
}
|
790 |
+
.jstree-default-dark-large .jstree-closed > .jstree-ocl {
|
791 |
+
background-position: -96px 0px;
|
792 |
+
}
|
793 |
+
.jstree-default-dark-large .jstree-leaf > .jstree-ocl {
|
794 |
+
background-position: -64px 0px;
|
795 |
+
}
|
796 |
+
.jstree-default-dark-large .jstree-themeicon {
|
797 |
+
background-position: -256px 0px;
|
798 |
+
}
|
799 |
+
.jstree-default-dark-large > .jstree-no-dots .jstree-node,
|
800 |
+
.jstree-default-dark-large > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
801 |
+
background: transparent;
|
802 |
+
}
|
803 |
+
.jstree-default-dark-large > .jstree-no-dots .jstree-open > .jstree-ocl {
|
804 |
+
background-position: -32px 0px;
|
805 |
+
}
|
806 |
+
.jstree-default-dark-large > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
807 |
+
background-position: 0px 0px;
|
808 |
+
}
|
809 |
+
.jstree-default-dark-large .jstree-disabled {
|
810 |
+
background: transparent;
|
811 |
+
}
|
812 |
+
.jstree-default-dark-large .jstree-disabled.jstree-hovered {
|
813 |
+
background: transparent;
|
814 |
+
}
|
815 |
+
.jstree-default-dark-large .jstree-disabled.jstree-clicked {
|
816 |
+
background: #efefef;
|
817 |
+
}
|
818 |
+
.jstree-default-dark-large .jstree-checkbox {
|
819 |
+
background-position: -160px 0px;
|
820 |
+
}
|
821 |
+
.jstree-default-dark-large .jstree-checkbox:hover {
|
822 |
+
background-position: -160px -32px;
|
823 |
+
}
|
824 |
+
.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
|
825 |
+
.jstree-default-dark-large .jstree-checked > .jstree-checkbox {
|
826 |
+
background-position: -224px 0px;
|
827 |
+
}
|
828 |
+
.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
|
829 |
+
.jstree-default-dark-large .jstree-checked > .jstree-checkbox:hover {
|
830 |
+
background-position: -224px -32px;
|
831 |
+
}
|
832 |
+
.jstree-default-dark-large .jstree-anchor > .jstree-undetermined {
|
833 |
+
background-position: -192px 0px;
|
834 |
+
}
|
835 |
+
.jstree-default-dark-large .jstree-anchor > .jstree-undetermined:hover {
|
836 |
+
background-position: -192px -32px;
|
837 |
+
}
|
838 |
+
.jstree-default-dark-large .jstree-checkbox-disabled {
|
839 |
+
opacity: 0.8;
|
840 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
841 |
+
/* Firefox 10+ */
|
842 |
+
filter: gray;
|
843 |
+
/* IE6-9 */
|
844 |
+
-webkit-filter: grayscale(100%);
|
845 |
+
/* Chrome 19+ & Safari 6+ */
|
846 |
+
}
|
847 |
+
.jstree-default-dark-large > .jstree-striped {
|
848 |
+
background-size: auto 64px;
|
849 |
+
}
|
850 |
+
.jstree-default-dark-large.jstree-rtl .jstree-node {
|
851 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
|
852 |
+
background-position: 100% 1px;
|
853 |
+
background-repeat: repeat-y;
|
854 |
+
}
|
855 |
+
.jstree-default-dark-large.jstree-rtl .jstree-last {
|
856 |
+
background: transparent;
|
857 |
+
}
|
858 |
+
.jstree-default-dark-large.jstree-rtl .jstree-open > .jstree-ocl {
|
859 |
+
background-position: -128px -32px;
|
860 |
+
}
|
861 |
+
.jstree-default-dark-large.jstree-rtl .jstree-closed > .jstree-ocl {
|
862 |
+
background-position: -96px -32px;
|
863 |
+
}
|
864 |
+
.jstree-default-dark-large.jstree-rtl .jstree-leaf > .jstree-ocl {
|
865 |
+
background-position: -64px -32px;
|
866 |
+
}
|
867 |
+
.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-node,
|
868 |
+
.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
869 |
+
background: transparent;
|
870 |
+
}
|
871 |
+
.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
|
872 |
+
background-position: -32px -32px;
|
873 |
+
}
|
874 |
+
.jstree-default-dark-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
875 |
+
background-position: 0px -32px;
|
876 |
+
}
|
877 |
+
.jstree-default-dark-large .jstree-themeicon-custom {
|
878 |
+
background-color: transparent;
|
879 |
+
background-image: none;
|
880 |
+
background-position: 0 0;
|
881 |
+
}
|
882 |
+
.jstree-default-dark-large > .jstree-container-ul .jstree-loading > .jstree-ocl {
|
883 |
+
background: url("throbber.gif") center center no-repeat;
|
884 |
+
}
|
885 |
+
.jstree-default-dark-large .jstree-file {
|
886 |
+
background: url("32px.png") -96px -64px no-repeat;
|
887 |
+
}
|
888 |
+
.jstree-default-dark-large .jstree-folder {
|
889 |
+
background: url("32px.png") -256px 0px no-repeat;
|
890 |
+
}
|
891 |
+
.jstree-default-dark-large > .jstree-container-ul > .jstree-node {
|
892 |
+
margin-left: 0;
|
893 |
+
margin-right: 0;
|
894 |
+
}
|
895 |
+
#jstree-dnd.jstree-default-dark-large {
|
896 |
+
line-height: 32px;
|
897 |
+
padding: 0 4px;
|
898 |
+
}
|
899 |
+
#jstree-dnd.jstree-default-dark-large .jstree-ok,
|
900 |
+
#jstree-dnd.jstree-default-dark-large .jstree-er {
|
901 |
+
background-image: url("32px.png");
|
902 |
+
background-repeat: no-repeat;
|
903 |
+
background-color: transparent;
|
904 |
+
}
|
905 |
+
#jstree-dnd.jstree-default-dark-large i {
|
906 |
+
background: transparent;
|
907 |
+
width: 32px;
|
908 |
+
height: 32px;
|
909 |
+
line-height: 32px;
|
910 |
+
}
|
911 |
+
#jstree-dnd.jstree-default-dark-large .jstree-ok {
|
912 |
+
background-position: 0px -64px;
|
913 |
+
}
|
914 |
+
#jstree-dnd.jstree-default-dark-large .jstree-er {
|
915 |
+
background-position: -32px -64px;
|
916 |
+
}
|
917 |
+
.jstree-default-dark-large .jstree-ellipsis {
|
918 |
+
overflow: hidden;
|
919 |
+
}
|
920 |
+
.jstree-default-dark-large .jstree-ellipsis .jstree-anchor {
|
921 |
+
width: calc(100% - 37px);
|
922 |
+
text-overflow: ellipsis;
|
923 |
+
overflow: hidden;
|
924 |
+
}
|
925 |
+
.jstree-default-dark-large .jstree-ellipsis.jstree-no-icons .jstree-anchor {
|
926 |
+
width: calc(100% - 5px);
|
927 |
+
}
|
928 |
+
.jstree-default-dark-large.jstree-rtl .jstree-node {
|
929 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==");
|
930 |
+
}
|
931 |
+
.jstree-default-dark-large.jstree-rtl .jstree-last {
|
932 |
+
background: transparent;
|
933 |
+
}
|
934 |
+
@media (max-width: 768px) {
|
935 |
+
#jstree-dnd.jstree-dnd-responsive {
|
936 |
+
line-height: 40px;
|
937 |
+
font-weight: bold;
|
938 |
+
font-size: 1.1em;
|
939 |
+
text-shadow: 1px 1px white;
|
940 |
+
}
|
941 |
+
#jstree-dnd.jstree-dnd-responsive > i {
|
942 |
+
background: transparent;
|
943 |
+
width: 40px;
|
944 |
+
height: 40px;
|
945 |
+
}
|
946 |
+
#jstree-dnd.jstree-dnd-responsive > .jstree-ok {
|
947 |
+
background-image: url("40px.png");
|
948 |
+
background-position: 0 -200px;
|
949 |
+
background-size: 120px 240px;
|
950 |
+
}
|
951 |
+
#jstree-dnd.jstree-dnd-responsive > .jstree-er {
|
952 |
+
background-image: url("40px.png");
|
953 |
+
background-position: -40px -200px;
|
954 |
+
background-size: 120px 240px;
|
955 |
+
}
|
956 |
+
#jstree-marker.jstree-dnd-responsive {
|
957 |
+
border-left-width: 10px;
|
958 |
+
border-top-width: 10px;
|
959 |
+
border-bottom-width: 10px;
|
960 |
+
margin-top: -10px;
|
961 |
+
}
|
962 |
+
}
|
963 |
+
@media (max-width: 768px) {
|
964 |
+
.jstree-default-dark-responsive {
|
965 |
+
/*
|
966 |
+
.jstree-open > .jstree-ocl,
|
967 |
+
.jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; }
|
968 |
+
*/
|
969 |
+
}
|
970 |
+
.jstree-default-dark-responsive .jstree-icon {
|
971 |
+
background-image: url("40px.png");
|
972 |
+
}
|
973 |
+
.jstree-default-dark-responsive .jstree-node,
|
974 |
+
.jstree-default-dark-responsive .jstree-leaf > .jstree-ocl {
|
975 |
+
background: transparent;
|
976 |
+
}
|
977 |
+
.jstree-default-dark-responsive .jstree-node {
|
978 |
+
min-height: 40px;
|
979 |
+
line-height: 40px;
|
980 |
+
margin-left: 40px;
|
981 |
+
min-width: 40px;
|
982 |
+
white-space: nowrap;
|
983 |
+
}
|
984 |
+
.jstree-default-dark-responsive .jstree-anchor {
|
985 |
+
line-height: 40px;
|
986 |
+
height: 40px;
|
987 |
+
}
|
988 |
+
.jstree-default-dark-responsive .jstree-icon,
|
989 |
+
.jstree-default-dark-responsive .jstree-icon:empty {
|
990 |
+
width: 40px;
|
991 |
+
height: 40px;
|
992 |
+
line-height: 40px;
|
993 |
+
}
|
994 |
+
.jstree-default-dark-responsive > .jstree-container-ul > .jstree-node {
|
995 |
+
margin-left: 0;
|
996 |
+
}
|
997 |
+
.jstree-default-dark-responsive.jstree-rtl .jstree-node {
|
998 |
+
margin-left: 0;
|
999 |
+
margin-right: 40px;
|
1000 |
+
background: transparent;
|
1001 |
+
}
|
1002 |
+
.jstree-default-dark-responsive.jstree-rtl .jstree-container-ul > .jstree-node {
|
1003 |
+
margin-right: 0;
|
1004 |
+
}
|
1005 |
+
.jstree-default-dark-responsive .jstree-ocl,
|
1006 |
+
.jstree-default-dark-responsive .jstree-themeicon,
|
1007 |
+
.jstree-default-dark-responsive .jstree-checkbox {
|
1008 |
+
background-size: 120px 240px;
|
1009 |
+
}
|
1010 |
+
.jstree-default-dark-responsive .jstree-leaf > .jstree-ocl,
|
1011 |
+
.jstree-default-dark-responsive.jstree-rtl .jstree-leaf > .jstree-ocl {
|
1012 |
+
background: transparent;
|
1013 |
+
}
|
1014 |
+
.jstree-default-dark-responsive .jstree-open > .jstree-ocl {
|
1015 |
+
background-position: 0 0px !important;
|
1016 |
+
}
|
1017 |
+
.jstree-default-dark-responsive .jstree-closed > .jstree-ocl {
|
1018 |
+
background-position: 0 -40px !important;
|
1019 |
+
}
|
1020 |
+
.jstree-default-dark-responsive.jstree-rtl .jstree-closed > .jstree-ocl {
|
1021 |
+
background-position: -40px 0px !important;
|
1022 |
+
}
|
1023 |
+
.jstree-default-dark-responsive .jstree-themeicon {
|
1024 |
+
background-position: -40px -40px;
|
1025 |
+
}
|
1026 |
+
.jstree-default-dark-responsive .jstree-checkbox,
|
1027 |
+
.jstree-default-dark-responsive .jstree-checkbox:hover {
|
1028 |
+
background-position: -40px -80px;
|
1029 |
+
}
|
1030 |
+
.jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
|
1031 |
+
.jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
|
1032 |
+
.jstree-default-dark-responsive .jstree-checked > .jstree-checkbox,
|
1033 |
+
.jstree-default-dark-responsive .jstree-checked > .jstree-checkbox:hover {
|
1034 |
+
background-position: 0 -80px;
|
1035 |
+
}
|
1036 |
+
.jstree-default-dark-responsive .jstree-anchor > .jstree-undetermined,
|
1037 |
+
.jstree-default-dark-responsive .jstree-anchor > .jstree-undetermined:hover {
|
1038 |
+
background-position: 0 -120px;
|
1039 |
+
}
|
1040 |
+
.jstree-default-dark-responsive .jstree-anchor {
|
1041 |
+
font-weight: bold;
|
1042 |
+
font-size: 1.1em;
|
1043 |
+
text-shadow: 1px 1px white;
|
1044 |
+
}
|
1045 |
+
.jstree-default-dark-responsive > .jstree-striped {
|
1046 |
+
background: transparent;
|
1047 |
+
}
|
1048 |
+
.jstree-default-dark-responsive .jstree-wholerow {
|
1049 |
+
border-top: 1px solid #666666;
|
1050 |
+
border-bottom: 1px solid #000000;
|
1051 |
+
background: #333333;
|
1052 |
+
height: 40px;
|
1053 |
+
}
|
1054 |
+
.jstree-default-dark-responsive .jstree-wholerow-hovered {
|
1055 |
+
background: #555555;
|
1056 |
+
}
|
1057 |
+
.jstree-default-dark-responsive .jstree-wholerow-clicked {
|
1058 |
+
background: #5fa2db;
|
1059 |
+
}
|
1060 |
+
.jstree-default-dark-responsive .jstree-children .jstree-last > .jstree-wholerow {
|
1061 |
+
box-shadow: inset 0 -6px 3px -5px #111111;
|
1062 |
+
}
|
1063 |
+
.jstree-default-dark-responsive .jstree-children .jstree-open > .jstree-wholerow {
|
1064 |
+
box-shadow: inset 0 6px 3px -5px #111111;
|
1065 |
+
border-top: 0;
|
1066 |
+
}
|
1067 |
+
.jstree-default-dark-responsive .jstree-children .jstree-open + .jstree-open {
|
1068 |
+
box-shadow: none;
|
1069 |
+
}
|
1070 |
+
.jstree-default-dark-responsive .jstree-node,
|
1071 |
+
.jstree-default-dark-responsive .jstree-icon,
|
1072 |
+
.jstree-default-dark-responsive .jstree-node > .jstree-ocl,
|
1073 |
+
.jstree-default-dark-responsive .jstree-themeicon,
|
1074 |
+
.jstree-default-dark-responsive .jstree-checkbox {
|
1075 |
+
background-image: url("40px.png");
|
1076 |
+
background-size: 120px 240px;
|
1077 |
+
}
|
1078 |
+
.jstree-default-dark-responsive .jstree-node {
|
1079 |
+
background-position: -80px 0;
|
1080 |
+
background-repeat: repeat-y;
|
1081 |
+
}
|
1082 |
+
.jstree-default-dark-responsive .jstree-last {
|
1083 |
+
background: transparent;
|
1084 |
+
}
|
1085 |
+
.jstree-default-dark-responsive .jstree-leaf > .jstree-ocl {
|
1086 |
+
background-position: -40px -120px;
|
1087 |
+
}
|
1088 |
+
.jstree-default-dark-responsive .jstree-last > .jstree-ocl {
|
1089 |
+
background-position: -40px -160px;
|
1090 |
+
}
|
1091 |
+
.jstree-default-dark-responsive .jstree-themeicon-custom {
|
1092 |
+
background-color: transparent;
|
1093 |
+
background-image: none;
|
1094 |
+
background-position: 0 0;
|
1095 |
+
}
|
1096 |
+
.jstree-default-dark-responsive .jstree-file {
|
1097 |
+
background: url("40px.png") 0 -160px no-repeat;
|
1098 |
+
background-size: 120px 240px;
|
1099 |
+
}
|
1100 |
+
.jstree-default-dark-responsive .jstree-folder {
|
1101 |
+
background: url("40px.png") -40px -40px no-repeat;
|
1102 |
+
background-size: 120px 240px;
|
1103 |
+
}
|
1104 |
+
.jstree-default-dark-responsive > .jstree-container-ul > .jstree-node {
|
1105 |
+
margin-left: 0;
|
1106 |
+
margin-right: 0;
|
1107 |
+
}
|
1108 |
+
}
|
1109 |
+
.jstree-default-dark {
|
1110 |
+
background: #333;
|
1111 |
+
}
|
1112 |
+
.jstree-default-dark .jstree-anchor {
|
1113 |
+
color: #999;
|
1114 |
+
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
|
1115 |
+
}
|
1116 |
+
.jstree-default-dark .jstree-clicked,
|
1117 |
+
.jstree-default-dark .jstree-checked {
|
1118 |
+
color: white;
|
1119 |
+
}
|
1120 |
+
.jstree-default-dark .jstree-hovered {
|
1121 |
+
color: white;
|
1122 |
+
}
|
1123 |
+
#jstree-marker.jstree-default-dark {
|
1124 |
+
border-left-color: #999;
|
1125 |
+
background: transparent;
|
1126 |
+
}
|
1127 |
+
.jstree-default-dark .jstree-anchor > .jstree-icon {
|
1128 |
+
opacity: 0.75;
|
1129 |
+
}
|
1130 |
+
.jstree-default-dark .jstree-clicked > .jstree-icon,
|
1131 |
+
.jstree-default-dark .jstree-hovered > .jstree-icon,
|
1132 |
+
.jstree-default-dark .jstree-checked > .jstree-icon {
|
1133 |
+
opacity: 1;
|
1134 |
+
}
|
1135 |
+
.jstree-default-dark.jstree-rtl .jstree-node {
|
1136 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
|
1137 |
+
}
|
1138 |
+
.jstree-default-dark.jstree-rtl .jstree-last {
|
1139 |
+
background: transparent;
|
1140 |
+
}
|
1141 |
+
.jstree-default-dark-small.jstree-rtl .jstree-node {
|
1142 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==");
|
1143 |
+
}
|
1144 |
+
.jstree-default-dark-small.jstree-rtl .jstree-last {
|
1145 |
+
background: transparent;
|
1146 |
+
}
|
1147 |
+
.jstree-default-dark-large.jstree-rtl .jstree-node {
|
1148 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==");
|
1149 |
+
}
|
1150 |
+
.jstree-default-dark-large.jstree-rtl .jstree-last {
|
1151 |
+
background: transparent;
|
1152 |
+
}
|
assets/jstree/themes/default-dark/style.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jstree-contextmenu .jstree-anchor{-webkit-user-select:none;-webkit-touch-callout:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-default-dark .jstree-node,.jstree-default-dark .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default-dark .jstree-anchor,.jstree-default-dark .jstree-animated,.jstree-default-dark .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default-dark .jstree-hovered{background:#555;border-radius:2px;box-shadow:inset 0 0 1px #555}.jstree-default-dark .jstree-context{background:#555;border-radius:2px;box-shadow:inset 0 0 1px #555}.jstree-default-dark .jstree-clicked{background:#5fa2db;border-radius:2px;box-shadow:inset 0 0 1px #666}.jstree-default-dark .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default-dark .jstree-disabled{background:0 0;color:#666}.jstree-default-dark .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default-dark .jstree-disabled.jstree-clicked{background:#333}.jstree-default-dark .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark .jstree-search{font-style:italic;color:#fff;font-weight:700}.jstree-default-dark .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default-dark.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#555}.jstree-default-dark.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default-dark.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#555}.jstree-default-dark>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default-dark>.jstree-wholerow-ul .jstree-hovered,.jstree-default-dark>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-default-dark .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default-dark .jstree-wholerow-hovered{background:#555}.jstree-default-dark .jstree-wholerow-clicked{background:#5fa2db;background:-webkit-linear-gradient(top,#5fa2db 0,#5fa2db 100%);background:linear-gradient(to bottom,#5fa2db 0,#5fa2db 100%)}.jstree-default-dark .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default-dark .jstree-anchor{line-height:24px;height:24px}.jstree-default-dark .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default-dark .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default-dark.jstree-rtl .jstree-node{margin-right:24px}.jstree-default-dark .jstree-wholerow{height:24px}.jstree-default-dark .jstree-node,.jstree-default-dark .jstree-icon{background-image:url(32px.png)}.jstree-default-dark .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default-dark .jstree-last{background:0 0}.jstree-default-dark .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default-dark .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default-dark .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default-dark .jstree-themeicon{background-position:-260px -4px}.jstree-default-dark>.jstree-no-dots .jstree-node,.jstree-default-dark>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default-dark>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default-dark .jstree-disabled{background:0 0}.jstree-default-dark .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-dark .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark .jstree-checkbox{background-position:-164px -4px}.jstree-default-dark .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default-dark.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default-dark.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default-dark .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default-dark .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default-dark .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark>.jstree-striped{background-size:auto 48px}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default-dark.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default-dark.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default-dark.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default-dark .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-dark .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-default-dark .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-default-dark>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default-dark .jstree-ok,#jstree-dnd.jstree-default-dark .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default-dark .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default-dark .jstree-er{background-position:-36px -68px}.jstree-default-dark .jstree-ellipsis{overflow:hidden}.jstree-default-dark .jstree-ellipsis .jstree-anchor{width:calc(100% - 29px);text-overflow:ellipsis;overflow:hidden}.jstree-default-dark .jstree-ellipsis.jstree-no-icons .jstree-anchor{width:calc(100% - 5px)}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default-dark.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-dark-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-dark-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-dark-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-dark-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-dark-small .jstree-wholerow{height:18px}.jstree-default-dark-small .jstree-node,.jstree-default-dark-small .jstree-icon{background-image:url(32px.png)}.jstree-default-dark-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-dark-small .jstree-last{background:0 0}.jstree-default-dark-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-dark-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-dark-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-dark-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-dark-small>.jstree-no-dots .jstree-node,.jstree-default-dark-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-dark-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-dark-small .jstree-disabled{background:0 0}.jstree-default-dark-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-dark-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-dark-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-dark-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-dark-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-dark-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-dark-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark-small>.jstree-striped{background-size:auto 36px}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-dark-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-dark-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-dark-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-dark-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-dark-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-default-dark-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-default-dark-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-dark-small .jstree-ok,#jstree-dnd.jstree-default-dark-small .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-dark-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-dark-small .jstree-er{background-position:-39px -71px}.jstree-default-dark-small .jstree-ellipsis{overflow:hidden}.jstree-default-dark-small .jstree-ellipsis .jstree-anchor{width:calc(100% - 23px);text-overflow:ellipsis;overflow:hidden}.jstree-default-dark-small .jstree-ellipsis.jstree-no-icons .jstree-anchor{width:calc(100% - 5px)}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-dark-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-dark-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-dark-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-dark-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-dark-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-dark-large .jstree-wholerow{height:32px}.jstree-default-dark-large .jstree-node,.jstree-default-dark-large .jstree-icon{background-image:url(32px.png)}.jstree-default-dark-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-dark-large .jstree-last{background:0 0}.jstree-default-dark-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-dark-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-dark-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-dark-large .jstree-themeicon{background-position:-256px 0}.jstree-default-dark-large>.jstree-no-dots .jstree-node,.jstree-default-dark-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-dark-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-dark-large .jstree-disabled{background:0 0}.jstree-default-dark-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-dark-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-dark-large .jstree-checkbox{background-position:-160px 0}.jstree-default-dark-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-dark-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-dark-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-dark-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-dark-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-dark-large>.jstree-striped{background-size:auto 64px}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-dark-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-dark-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-dark-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-dark-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-dark-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-dark-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-default-dark-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-default-dark-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-dark-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-dark-large .jstree-ok,#jstree-dnd.jstree-default-dark-large .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-dark-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-dark-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-dark-large .jstree-er{background-position:-32px -64px}.jstree-default-dark-large .jstree-ellipsis{overflow:hidden}.jstree-default-dark-large .jstree-ellipsis .jstree-anchor{width:calc(100% - 37px);text-overflow:ellipsis;overflow:hidden}.jstree-default-dark-large .jstree-ellipsis.jstree-no-icons .jstree-anchor{width:calc(100% - 5px)}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-dark-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-dark-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-dark-responsive .jstree-node,.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-dark-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-dark-responsive .jstree-icon,.jstree-default-dark-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-dark-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-dark-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px;background:0 0}.jstree-default-dark-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-dark-responsive .jstree-ocl,.jstree-default-dark-responsive .jstree-themeicon,.jstree-default-dark-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl,.jstree-default-dark-responsive.jstree-rtl .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-dark-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-dark-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-dark-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-dark-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-dark-responsive .jstree-checkbox,.jstree-default-dark-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-dark-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-dark-responsive .jstree-checked>.jstree-checkbox,.jstree-default-dark-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-dark-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-dark-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-dark-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-dark-responsive>.jstree-striped{background:0 0}.jstree-default-dark-responsive .jstree-wholerow{border-top:1px solid #666;border-bottom:1px solid #000;background:#333;height:40px}.jstree-default-dark-responsive .jstree-wholerow-hovered{background:#555}.jstree-default-dark-responsive .jstree-wholerow-clicked{background:#5fa2db}.jstree-default-dark-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #111}.jstree-default-dark-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #111;border-top:0}.jstree-default-dark-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-dark-responsive .jstree-node,.jstree-default-dark-responsive .jstree-icon,.jstree-default-dark-responsive .jstree-node>.jstree-ocl,.jstree-default-dark-responsive .jstree-themeicon,.jstree-default-dark-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 240px}.jstree-default-dark-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-dark-responsive .jstree-last{background:0 0}.jstree-default-dark-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-dark-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-dark-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-dark-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-default-dark-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-default-dark-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}.jstree-default-dark{background:#333}.jstree-default-dark .jstree-anchor{color:#999;text-shadow:1px 1px 0 rgba(0,0,0,.5)}.jstree-default-dark .jstree-clicked,.jstree-default-dark .jstree-checked{color:#fff}.jstree-default-dark .jstree-hovered{color:#fff}#jstree-marker.jstree-default-dark{border-left-color:#999;background:0 0}.jstree-default-dark .jstree-anchor>.jstree-icon{opacity:.75}.jstree-default-dark .jstree-clicked>.jstree-icon,.jstree-default-dark .jstree-hovered>.jstree-icon,.jstree-default-dark .jstree-checked>.jstree-icon{opacity:1}.jstree-default-dark.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default-dark.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-dark-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-dark-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAACZmZl+9SADAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-dark-large.jstree-rtl .jstree-last{background:0 0}
|
assets/jstree/themes/default-dark/throbber.gif
ADDED
Binary file
|
assets/jstree/themes/default/32px.png
ADDED
Binary file
|
assets/jstree/themes/default/40px.png
ADDED
Binary file
|
assets/jstree/themes/default/style.css
ADDED
@@ -0,0 +1,1108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* jsTree default theme */
|
2 |
+
.jstree-node,
|
3 |
+
.jstree-children,
|
4 |
+
.jstree-container-ul {
|
5 |
+
display: block;
|
6 |
+
margin: 0;
|
7 |
+
padding: 0;
|
8 |
+
list-style-type: none;
|
9 |
+
list-style-image: none;
|
10 |
+
}
|
11 |
+
.jstree-node {
|
12 |
+
white-space: nowrap;
|
13 |
+
}
|
14 |
+
.jstree-anchor {
|
15 |
+
display: inline-block;
|
16 |
+
color: black;
|
17 |
+
white-space: nowrap;
|
18 |
+
padding: 0 4px 0 1px;
|
19 |
+
margin: 0;
|
20 |
+
vertical-align: top;
|
21 |
+
}
|
22 |
+
.jstree-anchor:focus {
|
23 |
+
outline: 0;
|
24 |
+
}
|
25 |
+
.jstree-anchor,
|
26 |
+
.jstree-anchor:link,
|
27 |
+
.jstree-anchor:visited,
|
28 |
+
.jstree-anchor:hover,
|
29 |
+
.jstree-anchor:active {
|
30 |
+
text-decoration: none;
|
31 |
+
color: inherit;
|
32 |
+
}
|
33 |
+
.jstree-icon {
|
34 |
+
display: inline-block;
|
35 |
+
text-decoration: none;
|
36 |
+
margin: 0;
|
37 |
+
padding: 0;
|
38 |
+
vertical-align: top;
|
39 |
+
text-align: center;
|
40 |
+
}
|
41 |
+
.jstree-icon:empty {
|
42 |
+
display: inline-block;
|
43 |
+
text-decoration: none;
|
44 |
+
margin: 0;
|
45 |
+
padding: 0;
|
46 |
+
vertical-align: top;
|
47 |
+
text-align: center;
|
48 |
+
}
|
49 |
+
.jstree-ocl {
|
50 |
+
cursor: pointer;
|
51 |
+
}
|
52 |
+
.jstree-leaf > .jstree-ocl {
|
53 |
+
cursor: default;
|
54 |
+
}
|
55 |
+
.jstree .jstree-open > .jstree-children {
|
56 |
+
display: block;
|
57 |
+
}
|
58 |
+
.jstree .jstree-closed > .jstree-children,
|
59 |
+
.jstree .jstree-leaf > .jstree-children {
|
60 |
+
display: none;
|
61 |
+
}
|
62 |
+
.jstree-anchor > .jstree-themeicon {
|
63 |
+
margin-right: 2px;
|
64 |
+
}
|
65 |
+
.jstree-no-icons .jstree-themeicon,
|
66 |
+
.jstree-anchor > .jstree-themeicon-hidden {
|
67 |
+
display: none;
|
68 |
+
}
|
69 |
+
.jstree-hidden,
|
70 |
+
.jstree-node.jstree-hidden {
|
71 |
+
display: none;
|
72 |
+
}
|
73 |
+
.jstree-rtl .jstree-anchor {
|
74 |
+
padding: 0 1px 0 4px;
|
75 |
+
}
|
76 |
+
.jstree-rtl .jstree-anchor > .jstree-themeicon {
|
77 |
+
margin-left: 2px;
|
78 |
+
margin-right: 0;
|
79 |
+
}
|
80 |
+
.jstree-rtl .jstree-node {
|
81 |
+
margin-left: 0;
|
82 |
+
}
|
83 |
+
.jstree-rtl .jstree-container-ul > .jstree-node {
|
84 |
+
margin-right: 0;
|
85 |
+
}
|
86 |
+
.jstree-wholerow-ul {
|
87 |
+
position: relative;
|
88 |
+
display: inline-block;
|
89 |
+
min-width: 100%;
|
90 |
+
}
|
91 |
+
.jstree-wholerow-ul .jstree-leaf > .jstree-ocl {
|
92 |
+
cursor: pointer;
|
93 |
+
}
|
94 |
+
.jstree-wholerow-ul .jstree-anchor,
|
95 |
+
.jstree-wholerow-ul .jstree-icon {
|
96 |
+
position: relative;
|
97 |
+
}
|
98 |
+
.jstree-wholerow-ul .jstree-wholerow {
|
99 |
+
width: 100%;
|
100 |
+
cursor: pointer;
|
101 |
+
position: absolute;
|
102 |
+
left: 0;
|
103 |
+
-webkit-user-select: none;
|
104 |
+
-moz-user-select: none;
|
105 |
+
-ms-user-select: none;
|
106 |
+
user-select: none;
|
107 |
+
}
|
108 |
+
.jstree-contextmenu .jstree-anchor {
|
109 |
+
-webkit-user-select: none;
|
110 |
+
/* disable selection/Copy of UIWebView */
|
111 |
+
-webkit-touch-callout: none;
|
112 |
+
/* disable the IOS popup when long-press on a link */
|
113 |
+
}
|
114 |
+
.vakata-context {
|
115 |
+
display: none;
|
116 |
+
}
|
117 |
+
.vakata-context,
|
118 |
+
.vakata-context ul {
|
119 |
+
margin: 0;
|
120 |
+
padding: 2px;
|
121 |
+
position: absolute;
|
122 |
+
background: #f5f5f5;
|
123 |
+
border: 1px solid #979797;
|
124 |
+
box-shadow: 2px 2px 2px #999999;
|
125 |
+
}
|
126 |
+
.vakata-context ul {
|
127 |
+
list-style: none;
|
128 |
+
left: 100%;
|
129 |
+
margin-top: -2.7em;
|
130 |
+
margin-left: -4px;
|
131 |
+
}
|
132 |
+
.vakata-context .vakata-context-right ul {
|
133 |
+
left: auto;
|
134 |
+
right: 100%;
|
135 |
+
margin-left: auto;
|
136 |
+
margin-right: -4px;
|
137 |
+
}
|
138 |
+
.vakata-context li {
|
139 |
+
list-style: none;
|
140 |
+
}
|
141 |
+
.vakata-context li > a {
|
142 |
+
display: block;
|
143 |
+
padding: 0 2em 0 2em;
|
144 |
+
text-decoration: none;
|
145 |
+
width: auto;
|
146 |
+
color: black;
|
147 |
+
white-space: nowrap;
|
148 |
+
line-height: 2.4em;
|
149 |
+
text-shadow: 1px 1px 0 white;
|
150 |
+
border-radius: 1px;
|
151 |
+
}
|
152 |
+
.vakata-context li > a:hover {
|
153 |
+
position: relative;
|
154 |
+
background-color: #e8eff7;
|
155 |
+
box-shadow: 0 0 2px #0a6aa1;
|
156 |
+
}
|
157 |
+
.vakata-context li > a.vakata-context-parent {
|
158 |
+
background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");
|
159 |
+
background-position: right center;
|
160 |
+
background-repeat: no-repeat;
|
161 |
+
}
|
162 |
+
.vakata-context li > a:focus {
|
163 |
+
outline: 0;
|
164 |
+
}
|
165 |
+
.vakata-context .vakata-context-hover > a {
|
166 |
+
position: relative;
|
167 |
+
background-color: #e8eff7;
|
168 |
+
box-shadow: 0 0 2px #0a6aa1;
|
169 |
+
}
|
170 |
+
.vakata-context .vakata-context-separator > a,
|
171 |
+
.vakata-context .vakata-context-separator > a:hover {
|
172 |
+
background: white;
|
173 |
+
border: 0;
|
174 |
+
border-top: 1px solid #e2e3e3;
|
175 |
+
height: 1px;
|
176 |
+
min-height: 1px;
|
177 |
+
max-height: 1px;
|
178 |
+
padding: 0;
|
179 |
+
margin: 0 0 0 2.4em;
|
180 |
+
border-left: 1px solid #e0e0e0;
|
181 |
+
text-shadow: 0 0 0 transparent;
|
182 |
+
box-shadow: 0 0 0 transparent;
|
183 |
+
border-radius: 0;
|
184 |
+
}
|
185 |
+
.vakata-context .vakata-contextmenu-disabled a,
|
186 |
+
.vakata-context .vakata-contextmenu-disabled a:hover {
|
187 |
+
color: silver;
|
188 |
+
background-color: transparent;
|
189 |
+
border: 0;
|
190 |
+
box-shadow: 0 0 0;
|
191 |
+
}
|
192 |
+
.vakata-context li > a > i {
|
193 |
+
text-decoration: none;
|
194 |
+
display: inline-block;
|
195 |
+
width: 2.4em;
|
196 |
+
height: 2.4em;
|
197 |
+
background: transparent;
|
198 |
+
margin: 0 0 0 -2em;
|
199 |
+
vertical-align: top;
|
200 |
+
text-align: center;
|
201 |
+
line-height: 2.4em;
|
202 |
+
}
|
203 |
+
.vakata-context li > a > i:empty {
|
204 |
+
width: 2.4em;
|
205 |
+
line-height: 2.4em;
|
206 |
+
}
|
207 |
+
.vakata-context li > a .vakata-contextmenu-sep {
|
208 |
+
display: inline-block;
|
209 |
+
width: 1px;
|
210 |
+
height: 2.4em;
|
211 |
+
background: white;
|
212 |
+
margin: 0 0.5em 0 0;
|
213 |
+
border-left: 1px solid #e2e3e3;
|
214 |
+
}
|
215 |
+
.vakata-context .vakata-contextmenu-shortcut {
|
216 |
+
font-size: 0.8em;
|
217 |
+
color: silver;
|
218 |
+
opacity: 0.5;
|
219 |
+
display: none;
|
220 |
+
}
|
221 |
+
.vakata-context-rtl ul {
|
222 |
+
left: auto;
|
223 |
+
right: 100%;
|
224 |
+
margin-left: auto;
|
225 |
+
margin-right: -4px;
|
226 |
+
}
|
227 |
+
.vakata-context-rtl li > a.vakata-context-parent {
|
228 |
+
background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7");
|
229 |
+
background-position: left center;
|
230 |
+
background-repeat: no-repeat;
|
231 |
+
}
|
232 |
+
.vakata-context-rtl .vakata-context-separator > a {
|
233 |
+
margin: 0 2.4em 0 0;
|
234 |
+
border-left: 0;
|
235 |
+
border-right: 1px solid #e2e3e3;
|
236 |
+
}
|
237 |
+
.vakata-context-rtl .vakata-context-left ul {
|
238 |
+
right: auto;
|
239 |
+
left: 100%;
|
240 |
+
margin-left: -4px;
|
241 |
+
margin-right: auto;
|
242 |
+
}
|
243 |
+
.vakata-context-rtl li > a > i {
|
244 |
+
margin: 0 -2em 0 0;
|
245 |
+
}
|
246 |
+
.vakata-context-rtl li > a .vakata-contextmenu-sep {
|
247 |
+
margin: 0 0 0 0.5em;
|
248 |
+
border-left-color: white;
|
249 |
+
background: #e2e3e3;
|
250 |
+
}
|
251 |
+
#jstree-marker {
|
252 |
+
position: absolute;
|
253 |
+
top: 0;
|
254 |
+
left: 0;
|
255 |
+
margin: -5px 0 0 0;
|
256 |
+
padding: 0;
|
257 |
+
border-right: 0;
|
258 |
+
border-top: 5px solid transparent;
|
259 |
+
border-bottom: 5px solid transparent;
|
260 |
+
border-left: 5px solid;
|
261 |
+
width: 0;
|
262 |
+
height: 0;
|
263 |
+
font-size: 0;
|
264 |
+
line-height: 0;
|
265 |
+
}
|
266 |
+
#jstree-dnd {
|
267 |
+
line-height: 16px;
|
268 |
+
margin: 0;
|
269 |
+
padding: 4px;
|
270 |
+
}
|
271 |
+
#jstree-dnd .jstree-icon,
|
272 |
+
#jstree-dnd .jstree-copy {
|
273 |
+
display: inline-block;
|
274 |
+
text-decoration: none;
|
275 |
+
margin: 0 2px 0 0;
|
276 |
+
padding: 0;
|
277 |
+
width: 16px;
|
278 |
+
height: 16px;
|
279 |
+
}
|
280 |
+
#jstree-dnd .jstree-ok {
|
281 |
+
background: green;
|
282 |
+
}
|
283 |
+
#jstree-dnd .jstree-er {
|
284 |
+
background: red;
|
285 |
+
}
|
286 |
+
#jstree-dnd .jstree-copy {
|
287 |
+
margin: 0 2px 0 2px;
|
288 |
+
}
|
289 |
+
.jstree-default .jstree-node,
|
290 |
+
.jstree-default .jstree-icon {
|
291 |
+
background-repeat: no-repeat;
|
292 |
+
background-color: transparent;
|
293 |
+
}
|
294 |
+
.jstree-default .jstree-anchor,
|
295 |
+
.jstree-default .jstree-animated,
|
296 |
+
.jstree-default .jstree-wholerow {
|
297 |
+
transition: background-color 0.15s, box-shadow 0.15s;
|
298 |
+
}
|
299 |
+
.jstree-default .jstree-hovered {
|
300 |
+
background: #e7f4f9;
|
301 |
+
border-radius: 2px;
|
302 |
+
box-shadow: inset 0 0 1px #cccccc;
|
303 |
+
}
|
304 |
+
.jstree-default .jstree-context {
|
305 |
+
background: #e7f4f9;
|
306 |
+
border-radius: 2px;
|
307 |
+
box-shadow: inset 0 0 1px #cccccc;
|
308 |
+
}
|
309 |
+
.jstree-default .jstree-clicked {
|
310 |
+
background: #beebff;
|
311 |
+
border-radius: 2px;
|
312 |
+
box-shadow: inset 0 0 1px #999999;
|
313 |
+
}
|
314 |
+
.jstree-default .jstree-no-icons .jstree-anchor > .jstree-themeicon {
|
315 |
+
display: none;
|
316 |
+
}
|
317 |
+
.jstree-default .jstree-disabled {
|
318 |
+
background: transparent;
|
319 |
+
color: #666666;
|
320 |
+
}
|
321 |
+
.jstree-default .jstree-disabled.jstree-hovered {
|
322 |
+
background: transparent;
|
323 |
+
box-shadow: none;
|
324 |
+
}
|
325 |
+
.jstree-default .jstree-disabled.jstree-clicked {
|
326 |
+
background: #efefef;
|
327 |
+
}
|
328 |
+
.jstree-default .jstree-disabled > .jstree-icon {
|
329 |
+
opacity: 0.8;
|
330 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
331 |
+
/* Firefox 10+ */
|
332 |
+
filter: gray;
|
333 |
+
/* IE6-9 */
|
334 |
+
-webkit-filter: grayscale(100%);
|
335 |
+
/* Chrome 19+ & Safari 6+ */
|
336 |
+
}
|
337 |
+
.jstree-default .jstree-search {
|
338 |
+
font-style: italic;
|
339 |
+
color: #8b0000;
|
340 |
+
font-weight: bold;
|
341 |
+
}
|
342 |
+
.jstree-default .jstree-no-checkboxes .jstree-checkbox {
|
343 |
+
display: none !important;
|
344 |
+
}
|
345 |
+
.jstree-default.jstree-checkbox-no-clicked .jstree-clicked {
|
346 |
+
background: transparent;
|
347 |
+
box-shadow: none;
|
348 |
+
}
|
349 |
+
.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {
|
350 |
+
background: #e7f4f9;
|
351 |
+
}
|
352 |
+
.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked {
|
353 |
+
background: transparent;
|
354 |
+
}
|
355 |
+
.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {
|
356 |
+
background: #e7f4f9;
|
357 |
+
}
|
358 |
+
.jstree-default > .jstree-striped {
|
359 |
+
min-width: 100%;
|
360 |
+
display: inline-block;
|
361 |
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat;
|
362 |
+
}
|
363 |
+
.jstree-default > .jstree-wholerow-ul .jstree-hovered,
|
364 |
+
.jstree-default > .jstree-wholerow-ul .jstree-clicked {
|
365 |
+
background: transparent;
|
366 |
+
box-shadow: none;
|
367 |
+
border-radius: 0;
|
368 |
+
}
|
369 |
+
.jstree-default .jstree-wholerow {
|
370 |
+
-moz-box-sizing: border-box;
|
371 |
+
-webkit-box-sizing: border-box;
|
372 |
+
box-sizing: border-box;
|
373 |
+
}
|
374 |
+
.jstree-default .jstree-wholerow-hovered {
|
375 |
+
background: #e7f4f9;
|
376 |
+
}
|
377 |
+
.jstree-default .jstree-wholerow-clicked {
|
378 |
+
background: #beebff;
|
379 |
+
background: -webkit-linear-gradient(top, #beebff 0%, #a8e4ff 100%);
|
380 |
+
background: linear-gradient(to bottom, #beebff 0%, #a8e4ff 100%);
|
381 |
+
}
|
382 |
+
.jstree-default .jstree-node {
|
383 |
+
min-height: 24px;
|
384 |
+
line-height: 24px;
|
385 |
+
margin-left: 24px;
|
386 |
+
min-width: 24px;
|
387 |
+
}
|
388 |
+
.jstree-default .jstree-anchor {
|
389 |
+
line-height: 24px;
|
390 |
+
height: 24px;
|
391 |
+
}
|
392 |
+
.jstree-default .jstree-icon {
|
393 |
+
width: 24px;
|
394 |
+
height: 24px;
|
395 |
+
line-height: 24px;
|
396 |
+
}
|
397 |
+
.jstree-default .jstree-icon:empty {
|
398 |
+
width: 24px;
|
399 |
+
height: 24px;
|
400 |
+
line-height: 24px;
|
401 |
+
}
|
402 |
+
.jstree-default.jstree-rtl .jstree-node {
|
403 |
+
margin-right: 24px;
|
404 |
+
}
|
405 |
+
.jstree-default .jstree-wholerow {
|
406 |
+
height: 24px;
|
407 |
+
}
|
408 |
+
.jstree-default .jstree-node,
|
409 |
+
.jstree-default .jstree-icon {
|
410 |
+
background-image: url("32px.png");
|
411 |
+
}
|
412 |
+
.jstree-default .jstree-node {
|
413 |
+
background-position: -292px -4px;
|
414 |
+
background-repeat: repeat-y;
|
415 |
+
}
|
416 |
+
.jstree-default .jstree-last {
|
417 |
+
background: transparent;
|
418 |
+
}
|
419 |
+
.jstree-default .jstree-open > .jstree-ocl {
|
420 |
+
background-position: -132px -4px;
|
421 |
+
}
|
422 |
+
.jstree-default .jstree-closed > .jstree-ocl {
|
423 |
+
background-position: -100px -4px;
|
424 |
+
}
|
425 |
+
.jstree-default .jstree-leaf > .jstree-ocl {
|
426 |
+
background-position: -68px -4px;
|
427 |
+
}
|
428 |
+
.jstree-default .jstree-themeicon {
|
429 |
+
background-position: -260px -4px;
|
430 |
+
}
|
431 |
+
.jstree-default > .jstree-no-dots .jstree-node,
|
432 |
+
.jstree-default > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
433 |
+
background: transparent;
|
434 |
+
}
|
435 |
+
.jstree-default > .jstree-no-dots .jstree-open > .jstree-ocl {
|
436 |
+
background-position: -36px -4px;
|
437 |
+
}
|
438 |
+
.jstree-default > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
439 |
+
background-position: -4px -4px;
|
440 |
+
}
|
441 |
+
.jstree-default .jstree-disabled {
|
442 |
+
background: transparent;
|
443 |
+
}
|
444 |
+
.jstree-default .jstree-disabled.jstree-hovered {
|
445 |
+
background: transparent;
|
446 |
+
}
|
447 |
+
.jstree-default .jstree-disabled.jstree-clicked {
|
448 |
+
background: #efefef;
|
449 |
+
}
|
450 |
+
.jstree-default .jstree-checkbox {
|
451 |
+
background-position: -164px -4px;
|
452 |
+
}
|
453 |
+
.jstree-default .jstree-checkbox:hover {
|
454 |
+
background-position: -164px -36px;
|
455 |
+
}
|
456 |
+
.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
|
457 |
+
.jstree-default .jstree-checked > .jstree-checkbox {
|
458 |
+
background-position: -228px -4px;
|
459 |
+
}
|
460 |
+
.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
|
461 |
+
.jstree-default .jstree-checked > .jstree-checkbox:hover {
|
462 |
+
background-position: -228px -36px;
|
463 |
+
}
|
464 |
+
.jstree-default .jstree-anchor > .jstree-undetermined {
|
465 |
+
background-position: -196px -4px;
|
466 |
+
}
|
467 |
+
.jstree-default .jstree-anchor > .jstree-undetermined:hover {
|
468 |
+
background-position: -196px -36px;
|
469 |
+
}
|
470 |
+
.jstree-default .jstree-checkbox-disabled {
|
471 |
+
opacity: 0.8;
|
472 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
473 |
+
/* Firefox 10+ */
|
474 |
+
filter: gray;
|
475 |
+
/* IE6-9 */
|
476 |
+
-webkit-filter: grayscale(100%);
|
477 |
+
/* Chrome 19+ & Safari 6+ */
|
478 |
+
}
|
479 |
+
.jstree-default > .jstree-striped {
|
480 |
+
background-size: auto 48px;
|
481 |
+
}
|
482 |
+
.jstree-default.jstree-rtl .jstree-node {
|
483 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
|
484 |
+
background-position: 100% 1px;
|
485 |
+
background-repeat: repeat-y;
|
486 |
+
}
|
487 |
+
.jstree-default.jstree-rtl .jstree-last {
|
488 |
+
background: transparent;
|
489 |
+
}
|
490 |
+
.jstree-default.jstree-rtl .jstree-open > .jstree-ocl {
|
491 |
+
background-position: -132px -36px;
|
492 |
+
}
|
493 |
+
.jstree-default.jstree-rtl .jstree-closed > .jstree-ocl {
|
494 |
+
background-position: -100px -36px;
|
495 |
+
}
|
496 |
+
.jstree-default.jstree-rtl .jstree-leaf > .jstree-ocl {
|
497 |
+
background-position: -68px -36px;
|
498 |
+
}
|
499 |
+
.jstree-default.jstree-rtl > .jstree-no-dots .jstree-node,
|
500 |
+
.jstree-default.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
501 |
+
background: transparent;
|
502 |
+
}
|
503 |
+
.jstree-default.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
|
504 |
+
background-position: -36px -36px;
|
505 |
+
}
|
506 |
+
.jstree-default.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
507 |
+
background-position: -4px -36px;
|
508 |
+
}
|
509 |
+
.jstree-default .jstree-themeicon-custom {
|
510 |
+
background-color: transparent;
|
511 |
+
background-image: none;
|
512 |
+
background-position: 0 0;
|
513 |
+
}
|
514 |
+
.jstree-default > .jstree-container-ul .jstree-loading > .jstree-ocl {
|
515 |
+
background: url("throbber.gif") center center no-repeat;
|
516 |
+
}
|
517 |
+
.jstree-default .jstree-file {
|
518 |
+
background: url("32px.png") -100px -68px no-repeat;
|
519 |
+
}
|
520 |
+
.jstree-default .jstree-folder {
|
521 |
+
background: url("32px.png") -260px -4px no-repeat;
|
522 |
+
}
|
523 |
+
.jstree-default > .jstree-container-ul > .jstree-node {
|
524 |
+
margin-left: 0;
|
525 |
+
margin-right: 0;
|
526 |
+
}
|
527 |
+
#jstree-dnd.jstree-default {
|
528 |
+
line-height: 24px;
|
529 |
+
padding: 0 4px;
|
530 |
+
}
|
531 |
+
#jstree-dnd.jstree-default .jstree-ok,
|
532 |
+
#jstree-dnd.jstree-default .jstree-er {
|
533 |
+
background-image: url("32px.png");
|
534 |
+
background-repeat: no-repeat;
|
535 |
+
background-color: transparent;
|
536 |
+
}
|
537 |
+
#jstree-dnd.jstree-default i {
|
538 |
+
background: transparent;
|
539 |
+
width: 24px;
|
540 |
+
height: 24px;
|
541 |
+
line-height: 24px;
|
542 |
+
}
|
543 |
+
#jstree-dnd.jstree-default .jstree-ok {
|
544 |
+
background-position: -4px -68px;
|
545 |
+
}
|
546 |
+
#jstree-dnd.jstree-default .jstree-er {
|
547 |
+
background-position: -36px -68px;
|
548 |
+
}
|
549 |
+
.jstree-default .jstree-ellipsis {
|
550 |
+
overflow: hidden;
|
551 |
+
}
|
552 |
+
.jstree-default .jstree-ellipsis .jstree-anchor {
|
553 |
+
width: calc(100% - 29px);
|
554 |
+
text-overflow: ellipsis;
|
555 |
+
overflow: hidden;
|
556 |
+
}
|
557 |
+
.jstree-default .jstree-ellipsis.jstree-no-icons .jstree-anchor {
|
558 |
+
width: calc(100% - 5px);
|
559 |
+
}
|
560 |
+
.jstree-default.jstree-rtl .jstree-node {
|
561 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
|
562 |
+
}
|
563 |
+
.jstree-default.jstree-rtl .jstree-last {
|
564 |
+
background: transparent;
|
565 |
+
}
|
566 |
+
.jstree-default-small .jstree-node {
|
567 |
+
min-height: 18px;
|
568 |
+
line-height: 18px;
|
569 |
+
margin-left: 18px;
|
570 |
+
min-width: 18px;
|
571 |
+
}
|
572 |
+
.jstree-default-small .jstree-anchor {
|
573 |
+
line-height: 18px;
|
574 |
+
height: 18px;
|
575 |
+
}
|
576 |
+
.jstree-default-small .jstree-icon {
|
577 |
+
width: 18px;
|
578 |
+
height: 18px;
|
579 |
+
line-height: 18px;
|
580 |
+
}
|
581 |
+
.jstree-default-small .jstree-icon:empty {
|
582 |
+
width: 18px;
|
583 |
+
height: 18px;
|
584 |
+
line-height: 18px;
|
585 |
+
}
|
586 |
+
.jstree-default-small.jstree-rtl .jstree-node {
|
587 |
+
margin-right: 18px;
|
588 |
+
}
|
589 |
+
.jstree-default-small .jstree-wholerow {
|
590 |
+
height: 18px;
|
591 |
+
}
|
592 |
+
.jstree-default-small .jstree-node,
|
593 |
+
.jstree-default-small .jstree-icon {
|
594 |
+
background-image: url("32px.png");
|
595 |
+
}
|
596 |
+
.jstree-default-small .jstree-node {
|
597 |
+
background-position: -295px -7px;
|
598 |
+
background-repeat: repeat-y;
|
599 |
+
}
|
600 |
+
.jstree-default-small .jstree-last {
|
601 |
+
background: transparent;
|
602 |
+
}
|
603 |
+
.jstree-default-small .jstree-open > .jstree-ocl {
|
604 |
+
background-position: -135px -7px;
|
605 |
+
}
|
606 |
+
.jstree-default-small .jstree-closed > .jstree-ocl {
|
607 |
+
background-position: -103px -7px;
|
608 |
+
}
|
609 |
+
.jstree-default-small .jstree-leaf > .jstree-ocl {
|
610 |
+
background-position: -71px -7px;
|
611 |
+
}
|
612 |
+
.jstree-default-small .jstree-themeicon {
|
613 |
+
background-position: -263px -7px;
|
614 |
+
}
|
615 |
+
.jstree-default-small > .jstree-no-dots .jstree-node,
|
616 |
+
.jstree-default-small > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
617 |
+
background: transparent;
|
618 |
+
}
|
619 |
+
.jstree-default-small > .jstree-no-dots .jstree-open > .jstree-ocl {
|
620 |
+
background-position: -39px -7px;
|
621 |
+
}
|
622 |
+
.jstree-default-small > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
623 |
+
background-position: -7px -7px;
|
624 |
+
}
|
625 |
+
.jstree-default-small .jstree-disabled {
|
626 |
+
background: transparent;
|
627 |
+
}
|
628 |
+
.jstree-default-small .jstree-disabled.jstree-hovered {
|
629 |
+
background: transparent;
|
630 |
+
}
|
631 |
+
.jstree-default-small .jstree-disabled.jstree-clicked {
|
632 |
+
background: #efefef;
|
633 |
+
}
|
634 |
+
.jstree-default-small .jstree-checkbox {
|
635 |
+
background-position: -167px -7px;
|
636 |
+
}
|
637 |
+
.jstree-default-small .jstree-checkbox:hover {
|
638 |
+
background-position: -167px -39px;
|
639 |
+
}
|
640 |
+
.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
|
641 |
+
.jstree-default-small .jstree-checked > .jstree-checkbox {
|
642 |
+
background-position: -231px -7px;
|
643 |
+
}
|
644 |
+
.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
|
645 |
+
.jstree-default-small .jstree-checked > .jstree-checkbox:hover {
|
646 |
+
background-position: -231px -39px;
|
647 |
+
}
|
648 |
+
.jstree-default-small .jstree-anchor > .jstree-undetermined {
|
649 |
+
background-position: -199px -7px;
|
650 |
+
}
|
651 |
+
.jstree-default-small .jstree-anchor > .jstree-undetermined:hover {
|
652 |
+
background-position: -199px -39px;
|
653 |
+
}
|
654 |
+
.jstree-default-small .jstree-checkbox-disabled {
|
655 |
+
opacity: 0.8;
|
656 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
657 |
+
/* Firefox 10+ */
|
658 |
+
filter: gray;
|
659 |
+
/* IE6-9 */
|
660 |
+
-webkit-filter: grayscale(100%);
|
661 |
+
/* Chrome 19+ & Safari 6+ */
|
662 |
+
}
|
663 |
+
.jstree-default-small > .jstree-striped {
|
664 |
+
background-size: auto 36px;
|
665 |
+
}
|
666 |
+
.jstree-default-small.jstree-rtl .jstree-node {
|
667 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
|
668 |
+
background-position: 100% 1px;
|
669 |
+
background-repeat: repeat-y;
|
670 |
+
}
|
671 |
+
.jstree-default-small.jstree-rtl .jstree-last {
|
672 |
+
background: transparent;
|
673 |
+
}
|
674 |
+
.jstree-default-small.jstree-rtl .jstree-open > .jstree-ocl {
|
675 |
+
background-position: -135px -39px;
|
676 |
+
}
|
677 |
+
.jstree-default-small.jstree-rtl .jstree-closed > .jstree-ocl {
|
678 |
+
background-position: -103px -39px;
|
679 |
+
}
|
680 |
+
.jstree-default-small.jstree-rtl .jstree-leaf > .jstree-ocl {
|
681 |
+
background-position: -71px -39px;
|
682 |
+
}
|
683 |
+
.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-node,
|
684 |
+
.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
685 |
+
background: transparent;
|
686 |
+
}
|
687 |
+
.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
|
688 |
+
background-position: -39px -39px;
|
689 |
+
}
|
690 |
+
.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
691 |
+
background-position: -7px -39px;
|
692 |
+
}
|
693 |
+
.jstree-default-small .jstree-themeicon-custom {
|
694 |
+
background-color: transparent;
|
695 |
+
background-image: none;
|
696 |
+
background-position: 0 0;
|
697 |
+
}
|
698 |
+
.jstree-default-small > .jstree-container-ul .jstree-loading > .jstree-ocl {
|
699 |
+
background: url("throbber.gif") center center no-repeat;
|
700 |
+
}
|
701 |
+
.jstree-default-small .jstree-file {
|
702 |
+
background: url("32px.png") -103px -71px no-repeat;
|
703 |
+
}
|
704 |
+
.jstree-default-small .jstree-folder {
|
705 |
+
background: url("32px.png") -263px -7px no-repeat;
|
706 |
+
}
|
707 |
+
.jstree-default-small > .jstree-container-ul > .jstree-node {
|
708 |
+
margin-left: 0;
|
709 |
+
margin-right: 0;
|
710 |
+
}
|
711 |
+
#jstree-dnd.jstree-default-small {
|
712 |
+
line-height: 18px;
|
713 |
+
padding: 0 4px;
|
714 |
+
}
|
715 |
+
#jstree-dnd.jstree-default-small .jstree-ok,
|
716 |
+
#jstree-dnd.jstree-default-small .jstree-er {
|
717 |
+
background-image: url("32px.png");
|
718 |
+
background-repeat: no-repeat;
|
719 |
+
background-color: transparent;
|
720 |
+
}
|
721 |
+
#jstree-dnd.jstree-default-small i {
|
722 |
+
background: transparent;
|
723 |
+
width: 18px;
|
724 |
+
height: 18px;
|
725 |
+
line-height: 18px;
|
726 |
+
}
|
727 |
+
#jstree-dnd.jstree-default-small .jstree-ok {
|
728 |
+
background-position: -7px -71px;
|
729 |
+
}
|
730 |
+
#jstree-dnd.jstree-default-small .jstree-er {
|
731 |
+
background-position: -39px -71px;
|
732 |
+
}
|
733 |
+
.jstree-default-small .jstree-ellipsis {
|
734 |
+
overflow: hidden;
|
735 |
+
}
|
736 |
+
.jstree-default-small .jstree-ellipsis .jstree-anchor {
|
737 |
+
width: calc(100% - 23px);
|
738 |
+
text-overflow: ellipsis;
|
739 |
+
overflow: hidden;
|
740 |
+
}
|
741 |
+
.jstree-default-small .jstree-ellipsis.jstree-no-icons .jstree-anchor {
|
742 |
+
width: calc(100% - 5px);
|
743 |
+
}
|
744 |
+
.jstree-default-small.jstree-rtl .jstree-node {
|
745 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==");
|
746 |
+
}
|
747 |
+
.jstree-default-small.jstree-rtl .jstree-last {
|
748 |
+
background: transparent;
|
749 |
+
}
|
750 |
+
.jstree-default-large .jstree-node {
|
751 |
+
min-height: 32px;
|
752 |
+
line-height: 32px;
|
753 |
+
margin-left: 32px;
|
754 |
+
min-width: 32px;
|
755 |
+
}
|
756 |
+
.jstree-default-large .jstree-anchor {
|
757 |
+
line-height: 32px;
|
758 |
+
height: 32px;
|
759 |
+
}
|
760 |
+
.jstree-default-large .jstree-icon {
|
761 |
+
width: 32px;
|
762 |
+
height: 32px;
|
763 |
+
line-height: 32px;
|
764 |
+
}
|
765 |
+
.jstree-default-large .jstree-icon:empty {
|
766 |
+
width: 32px;
|
767 |
+
height: 32px;
|
768 |
+
line-height: 32px;
|
769 |
+
}
|
770 |
+
.jstree-default-large.jstree-rtl .jstree-node {
|
771 |
+
margin-right: 32px;
|
772 |
+
}
|
773 |
+
.jstree-default-large .jstree-wholerow {
|
774 |
+
height: 32px;
|
775 |
+
}
|
776 |
+
.jstree-default-large .jstree-node,
|
777 |
+
.jstree-default-large .jstree-icon {
|
778 |
+
background-image: url("32px.png");
|
779 |
+
}
|
780 |
+
.jstree-default-large .jstree-node {
|
781 |
+
background-position: -288px 0px;
|
782 |
+
background-repeat: repeat-y;
|
783 |
+
}
|
784 |
+
.jstree-default-large .jstree-last {
|
785 |
+
background: transparent;
|
786 |
+
}
|
787 |
+
.jstree-default-large .jstree-open > .jstree-ocl {
|
788 |
+
background-position: -128px 0px;
|
789 |
+
}
|
790 |
+
.jstree-default-large .jstree-closed > .jstree-ocl {
|
791 |
+
background-position: -96px 0px;
|
792 |
+
}
|
793 |
+
.jstree-default-large .jstree-leaf > .jstree-ocl {
|
794 |
+
background-position: -64px 0px;
|
795 |
+
}
|
796 |
+
.jstree-default-large .jstree-themeicon {
|
797 |
+
background-position: -256px 0px;
|
798 |
+
}
|
799 |
+
.jstree-default-large > .jstree-no-dots .jstree-node,
|
800 |
+
.jstree-default-large > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
801 |
+
background: transparent;
|
802 |
+
}
|
803 |
+
.jstree-default-large > .jstree-no-dots .jstree-open > .jstree-ocl {
|
804 |
+
background-position: -32px 0px;
|
805 |
+
}
|
806 |
+
.jstree-default-large > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
807 |
+
background-position: 0px 0px;
|
808 |
+
}
|
809 |
+
.jstree-default-large .jstree-disabled {
|
810 |
+
background: transparent;
|
811 |
+
}
|
812 |
+
.jstree-default-large .jstree-disabled.jstree-hovered {
|
813 |
+
background: transparent;
|
814 |
+
}
|
815 |
+
.jstree-default-large .jstree-disabled.jstree-clicked {
|
816 |
+
background: #efefef;
|
817 |
+
}
|
818 |
+
.jstree-default-large .jstree-checkbox {
|
819 |
+
background-position: -160px 0px;
|
820 |
+
}
|
821 |
+
.jstree-default-large .jstree-checkbox:hover {
|
822 |
+
background-position: -160px -32px;
|
823 |
+
}
|
824 |
+
.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
|
825 |
+
.jstree-default-large .jstree-checked > .jstree-checkbox {
|
826 |
+
background-position: -224px 0px;
|
827 |
+
}
|
828 |
+
.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
|
829 |
+
.jstree-default-large .jstree-checked > .jstree-checkbox:hover {
|
830 |
+
background-position: -224px -32px;
|
831 |
+
}
|
832 |
+
.jstree-default-large .jstree-anchor > .jstree-undetermined {
|
833 |
+
background-position: -192px 0px;
|
834 |
+
}
|
835 |
+
.jstree-default-large .jstree-anchor > .jstree-undetermined:hover {
|
836 |
+
background-position: -192px -32px;
|
837 |
+
}
|
838 |
+
.jstree-default-large .jstree-checkbox-disabled {
|
839 |
+
opacity: 0.8;
|
840 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
841 |
+
/* Firefox 10+ */
|
842 |
+
filter: gray;
|
843 |
+
/* IE6-9 */
|
844 |
+
-webkit-filter: grayscale(100%);
|
845 |
+
/* Chrome 19+ & Safari 6+ */
|
846 |
+
}
|
847 |
+
.jstree-default-large > .jstree-striped {
|
848 |
+
background-size: auto 64px;
|
849 |
+
}
|
850 |
+
.jstree-default-large.jstree-rtl .jstree-node {
|
851 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");
|
852 |
+
background-position: 100% 1px;
|
853 |
+
background-repeat: repeat-y;
|
854 |
+
}
|
855 |
+
.jstree-default-large.jstree-rtl .jstree-last {
|
856 |
+
background: transparent;
|
857 |
+
}
|
858 |
+
.jstree-default-large.jstree-rtl .jstree-open > .jstree-ocl {
|
859 |
+
background-position: -128px -32px;
|
860 |
+
}
|
861 |
+
.jstree-default-large.jstree-rtl .jstree-closed > .jstree-ocl {
|
862 |
+
background-position: -96px -32px;
|
863 |
+
}
|
864 |
+
.jstree-default-large.jstree-rtl .jstree-leaf > .jstree-ocl {
|
865 |
+
background-position: -64px -32px;
|
866 |
+
}
|
867 |
+
.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-node,
|
868 |
+
.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {
|
869 |
+
background: transparent;
|
870 |
+
}
|
871 |
+
.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {
|
872 |
+
background-position: -32px -32px;
|
873 |
+
}
|
874 |
+
.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {
|
875 |
+
background-position: 0px -32px;
|
876 |
+
}
|
877 |
+
.jstree-default-large .jstree-themeicon-custom {
|
878 |
+
background-color: transparent;
|
879 |
+
background-image: none;
|
880 |
+
background-position: 0 0;
|
881 |
+
}
|
882 |
+
.jstree-default-large > .jstree-container-ul .jstree-loading > .jstree-ocl {
|
883 |
+
background: url("throbber.gif") center center no-repeat;
|
884 |
+
}
|
885 |
+
.jstree-default-large .jstree-file {
|
886 |
+
background: url("32px.png") -96px -64px no-repeat;
|
887 |
+
}
|
888 |
+
.jstree-default-large .jstree-folder {
|
889 |
+
background: url("32px.png") -256px 0px no-repeat;
|
890 |
+
}
|
891 |
+
.jstree-default-large > .jstree-container-ul > .jstree-node {
|
892 |
+
margin-left: 0;
|
893 |
+
margin-right: 0;
|
894 |
+
}
|
895 |
+
#jstree-dnd.jstree-default-large {
|
896 |
+
line-height: 32px;
|
897 |
+
padding: 0 4px;
|
898 |
+
}
|
899 |
+
#jstree-dnd.jstree-default-large .jstree-ok,
|
900 |
+
#jstree-dnd.jstree-default-large .jstree-er {
|
901 |
+
background-image: url("32px.png");
|
902 |
+
background-repeat: no-repeat;
|
903 |
+
background-color: transparent;
|
904 |
+
}
|
905 |
+
#jstree-dnd.jstree-default-large i {
|
906 |
+
background: transparent;
|
907 |
+
width: 32px;
|
908 |
+
height: 32px;
|
909 |
+
line-height: 32px;
|
910 |
+
}
|
911 |
+
#jstree-dnd.jstree-default-large .jstree-ok {
|
912 |
+
background-position: 0px -64px;
|
913 |
+
}
|
914 |
+
#jstree-dnd.jstree-default-large .jstree-er {
|
915 |
+
background-position: -32px -64px;
|
916 |
+
}
|
917 |
+
.jstree-default-large .jstree-ellipsis {
|
918 |
+
overflow: hidden;
|
919 |
+
}
|
920 |
+
.jstree-default-large .jstree-ellipsis .jstree-anchor {
|
921 |
+
width: calc(100% - 37px);
|
922 |
+
text-overflow: ellipsis;
|
923 |
+
overflow: hidden;
|
924 |
+
}
|
925 |
+
.jstree-default-large .jstree-ellipsis.jstree-no-icons .jstree-anchor {
|
926 |
+
width: calc(100% - 5px);
|
927 |
+
}
|
928 |
+
.jstree-default-large.jstree-rtl .jstree-node {
|
929 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==");
|
930 |
+
}
|
931 |
+
.jstree-default-large.jstree-rtl .jstree-last {
|
932 |
+
background: transparent;
|
933 |
+
}
|
934 |
+
@media (max-width: 768px) {
|
935 |
+
#jstree-dnd.jstree-dnd-responsive {
|
936 |
+
line-height: 40px;
|
937 |
+
font-weight: bold;
|
938 |
+
font-size: 1.1em;
|
939 |
+
text-shadow: 1px 1px white;
|
940 |
+
}
|
941 |
+
#jstree-dnd.jstree-dnd-responsive > i {
|
942 |
+
background: transparent;
|
943 |
+
width: 40px;
|
944 |
+
height: 40px;
|
945 |
+
}
|
946 |
+
#jstree-dnd.jstree-dnd-responsive > .jstree-ok {
|
947 |
+
background-image: url("40px.png");
|
948 |
+
background-position: 0 -200px;
|
949 |
+
background-size: 120px 240px;
|
950 |
+
}
|
951 |
+
#jstree-dnd.jstree-dnd-responsive > .jstree-er {
|
952 |
+
background-image: url("40px.png");
|
953 |
+
background-position: -40px -200px;
|
954 |
+
background-size: 120px 240px;
|
955 |
+
}
|
956 |
+
#jstree-marker.jstree-dnd-responsive {
|
957 |
+
border-left-width: 10px;
|
958 |
+
border-top-width: 10px;
|
959 |
+
border-bottom-width: 10px;
|
960 |
+
margin-top: -10px;
|
961 |
+
}
|
962 |
+
}
|
963 |
+
@media (max-width: 768px) {
|
964 |
+
.jstree-default-responsive {
|
965 |
+
/*
|
966 |
+
.jstree-open > .jstree-ocl,
|
967 |
+
.jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; }
|
968 |
+
*/
|
969 |
+
}
|
970 |
+
.jstree-default-responsive .jstree-icon {
|
971 |
+
background-image: url("40px.png");
|
972 |
+
}
|
973 |
+
.jstree-default-responsive .jstree-node,
|
974 |
+
.jstree-default-responsive .jstree-leaf > .jstree-ocl {
|
975 |
+
background: transparent;
|
976 |
+
}
|
977 |
+
.jstree-default-responsive .jstree-node {
|
978 |
+
min-height: 40px;
|
979 |
+
line-height: 40px;
|
980 |
+
margin-left: 40px;
|
981 |
+
min-width: 40px;
|
982 |
+
white-space: nowrap;
|
983 |
+
}
|
984 |
+
.jstree-default-responsive .jstree-anchor {
|
985 |
+
line-height: 40px;
|
986 |
+
height: 40px;
|
987 |
+
}
|
988 |
+
.jstree-default-responsive .jstree-icon,
|
989 |
+
.jstree-default-responsive .jstree-icon:empty {
|
990 |
+
width: 40px;
|
991 |
+
height: 40px;
|
992 |
+
line-height: 40px;
|
993 |
+
}
|
994 |
+
.jstree-default-responsive > .jstree-container-ul > .jstree-node {
|
995 |
+
margin-left: 0;
|
996 |
+
}
|
997 |
+
.jstree-default-responsive.jstree-rtl .jstree-node {
|
998 |
+
margin-left: 0;
|
999 |
+
margin-right: 40px;
|
1000 |
+
background: transparent;
|
1001 |
+
}
|
1002 |
+
.jstree-default-responsive.jstree-rtl .jstree-container-ul > .jstree-node {
|
1003 |
+
margin-right: 0;
|
1004 |
+
}
|
1005 |
+
.jstree-default-responsive .jstree-ocl,
|
1006 |
+
.jstree-default-responsive .jstree-themeicon,
|
1007 |
+
.jstree-default-responsive .jstree-checkbox {
|
1008 |
+
background-size: 120px 240px;
|
1009 |
+
}
|
1010 |
+
.jstree-default-responsive .jstree-leaf > .jstree-ocl,
|
1011 |
+
.jstree-default-responsive.jstree-rtl .jstree-leaf > .jstree-ocl {
|
1012 |
+
background: transparent;
|
1013 |
+
}
|
1014 |
+
.jstree-default-responsive .jstree-open > .jstree-ocl {
|
1015 |
+
background-position: 0 0px !important;
|
1016 |
+
}
|
1017 |
+
.jstree-default-responsive .jstree-closed > .jstree-ocl {
|
1018 |
+
background-position: 0 -40px !important;
|
1019 |
+
}
|
1020 |
+
.jstree-default-responsive.jstree-rtl .jstree-closed > .jstree-ocl {
|
1021 |
+
background-position: -40px 0px !important;
|
1022 |
+
}
|
1023 |
+
.jstree-default-responsive .jstree-themeicon {
|
1024 |
+
background-position: -40px -40px;
|
1025 |
+
}
|
1026 |
+
.jstree-default-responsive .jstree-checkbox,
|
1027 |
+
.jstree-default-responsive .jstree-checkbox:hover {
|
1028 |
+
background-position: -40px -80px;
|
1029 |
+
}
|
1030 |
+
.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,
|
1031 |
+
.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,
|
1032 |
+
.jstree-default-responsive .jstree-checked > .jstree-checkbox,
|
1033 |
+
.jstree-default-responsive .jstree-checked > .jstree-checkbox:hover {
|
1034 |
+
background-position: 0 -80px;
|
1035 |
+
}
|
1036 |
+
.jstree-default-responsive .jstree-anchor > .jstree-undetermined,
|
1037 |
+
.jstree-default-responsive .jstree-anchor > .jstree-undetermined:hover {
|
1038 |
+
background-position: 0 -120px;
|
1039 |
+
}
|
1040 |
+
.jstree-default-responsive .jstree-anchor {
|
1041 |
+
font-weight: bold;
|
1042 |
+
font-size: 1.1em;
|
1043 |
+
text-shadow: 1px 1px white;
|
1044 |
+
}
|
1045 |
+
.jstree-default-responsive > .jstree-striped {
|
1046 |
+
background: transparent;
|
1047 |
+
}
|
1048 |
+
.jstree-default-responsive .jstree-wholerow {
|
1049 |
+
border-top: 1px solid rgba(255, 255, 255, 0.7);
|
1050 |
+
border-bottom: 1px solid rgba(64, 64, 64, 0.2);
|
1051 |
+
background: #ebebeb;
|
1052 |
+
height: 40px;
|
1053 |
+
}
|
1054 |
+
.jstree-default-responsive .jstree-wholerow-hovered {
|
1055 |
+
background: #e7f4f9;
|
1056 |
+
}
|
1057 |
+
.jstree-default-responsive .jstree-wholerow-clicked {
|
1058 |
+
background: #beebff;
|
1059 |
+
}
|
1060 |
+
.jstree-default-responsive .jstree-children .jstree-last > .jstree-wholerow {
|
1061 |
+
box-shadow: inset 0 -6px 3px -5px #666666;
|
1062 |
+
}
|
1063 |
+
.jstree-default-responsive .jstree-children .jstree-open > .jstree-wholerow {
|
1064 |
+
box-shadow: inset 0 6px 3px -5px #666666;
|
1065 |
+
border-top: 0;
|
1066 |
+
}
|
1067 |
+
.jstree-default-responsive .jstree-children .jstree-open + .jstree-open {
|
1068 |
+
box-shadow: none;
|
1069 |
+
}
|
1070 |
+
.jstree-default-responsive .jstree-node,
|
1071 |
+
.jstree-default-responsive .jstree-icon,
|
1072 |
+
.jstree-default-responsive .jstree-node > .jstree-ocl,
|
1073 |
+
.jstree-default-responsive .jstree-themeicon,
|
1074 |
+
.jstree-default-responsive .jstree-checkbox {
|
1075 |
+
background-image: url("40px.png");
|
1076 |
+
background-size: 120px 240px;
|
1077 |
+
}
|
1078 |
+
.jstree-default-responsive .jstree-node {
|
1079 |
+
background-position: -80px 0;
|
1080 |
+
background-repeat: repeat-y;
|
1081 |
+
}
|
1082 |
+
.jstree-default-responsive .jstree-last {
|
1083 |
+
background: transparent;
|
1084 |
+
}
|
1085 |
+
.jstree-default-responsive .jstree-leaf > .jstree-ocl {
|
1086 |
+
background-position: -40px -120px;
|
1087 |
+
}
|
1088 |
+
.jstree-default-responsive .jstree-last > .jstree-ocl {
|
1089 |
+
background-position: -40px -160px;
|
1090 |
+
}
|
1091 |
+
.jstree-default-responsive .jstree-themeicon-custom {
|
1092 |
+
background-color: transparent;
|
1093 |
+
background-image: none;
|
1094 |
+
background-position: 0 0;
|
1095 |
+
}
|
1096 |
+
.jstree-default-responsive .jstree-file {
|
1097 |
+
background: url("40px.png") 0 -160px no-repeat;
|
1098 |
+
background-size: 120px 240px;
|
1099 |
+
}
|
1100 |
+
.jstree-default-responsive .jstree-folder {
|
1101 |
+
background: url("40px.png") -40px -40px no-repeat;
|
1102 |
+
background-size: 120px 240px;
|
1103 |
+
}
|
1104 |
+
.jstree-default-responsive > .jstree-container-ul > .jstree-node {
|
1105 |
+
margin-left: 0;
|
1106 |
+
margin-right: 0;
|
1107 |
+
}
|
1108 |
+
}
|
assets/jstree/themes/default/style.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jstree-contextmenu .jstree-anchor{-webkit-user-select:none;-webkit-touch-callout:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-animated,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-context{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:0 0;color:#666}.jstree-default .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-default>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-hovered,.jstree-default>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url(32px.png)}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background:0 0}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-node,.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:0 0}.jstree-default .jstree-disabled.jstree-hovered{background:0 0}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-default .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default .jstree-ok,#jstree-dnd.jstree-default .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default .jstree-er{background-position:-36px -68px}.jstree-default .jstree-ellipsis{overflow:hidden}.jstree-default .jstree-ellipsis .jstree-anchor{width:calc(100% - 29px);text-overflow:ellipsis;overflow:hidden}.jstree-default .jstree-ellipsis.jstree-no-icons .jstree-anchor{width:calc(100% - 5px)}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-node,.jstree-default-small .jstree-icon{background-image:url(32px.png)}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background:0 0}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-node,.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:0 0}.jstree-default-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-default-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-default-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-small .jstree-ok,#jstree-dnd.jstree-default-small .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-small .jstree-er{background-position:-39px -71px}.jstree-default-small .jstree-ellipsis{overflow:hidden}.jstree-default-small .jstree-ellipsis .jstree-anchor{width:calc(100% - 23px);text-overflow:ellipsis;overflow:hidden}.jstree-default-small .jstree-ellipsis.jstree-no-icons .jstree-anchor{width:calc(100% - 5px)}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-node,.jstree-default-large .jstree-icon{background-image:url(32px.png)}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background:0 0}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-node,.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:0 0}.jstree-default-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-default-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-default-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-large .jstree-ok,#jstree-dnd.jstree-default-large .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-large .jstree-er{background-position:-32px -64px}.jstree-default-large .jstree-ellipsis{overflow:hidden}.jstree-default-large .jstree-ellipsis .jstree-anchor{width:calc(100% - 37px);text-overflow:ellipsis;overflow:hidden}.jstree-default-large .jstree-ellipsis.jstree-no-icons .jstree-anchor{width:calc(100% - 5px)}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px;background:0 0}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-responsive .jstree-leaf>.jstree-ocl,.jstree-default-responsive.jstree-rtl .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-responsive .jstree-checked>.jstree-checkbox,.jstree-default-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-responsive>.jstree-striped{background:0 0}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 240px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background:0 0}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-default-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}
|
assets/jstree/themes/default/throbber.gif
ADDED
Binary file
|
assets/jstree/themes/gray/32px.png
ADDED
Binary file
|
assets/jstree/themes/gray/40px.png
ADDED
Binary file
|
assets/jstree/themes/gray/style.css
ADDED
@@ -0,0 +1,1259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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style-type: none;
|
9 |
+
list-style-image: none
|
10 |
+
}
|
11 |
+
|
12 |
+
.jstree-node {
|
13 |
+
white-space: nowrap
|
14 |
+
}
|
15 |
+
|
16 |
+
.jstree-anchor {
|
17 |
+
display: inline-block;
|
18 |
+
color: #000;
|
19 |
+
white-space: nowrap;
|
20 |
+
padding: 0 4px 0 1px;
|
21 |
+
margin: 0;
|
22 |
+
vertical-align: top
|
23 |
+
}
|
24 |
+
|
25 |
+
.jstree-anchor:focus {
|
26 |
+
outline: 0
|
27 |
+
}
|
28 |
+
|
29 |
+
.jstree-anchor,
|
30 |
+
.jstree-anchor:link,
|
31 |
+
.jstree-anchor:visited,
|
32 |
+
.jstree-anchor:hover,
|
33 |
+
.jstree-anchor:active {
|
34 |
+
text-decoration: none;
|
35 |
+
color: inherit
|
36 |
+
}
|
37 |
+
|
38 |
+
.jstree-icon {
|
39 |
+
display: inline-block;
|
40 |
+
text-decoration: none;
|
41 |
+
margin: 0;
|
42 |
+
padding: 0;
|
43 |
+
vertical-align: top;
|
44 |
+
text-align: center
|
45 |
+
}
|
46 |
+
|
47 |
+
.jstree-icon:empty {
|
48 |
+
display: inline-block;
|
49 |
+
text-decoration: none;
|
50 |
+
margin: 0;
|
51 |
+
padding: 0;
|
52 |
+
vertical-align: top;
|
53 |
+
text-align: center
|
54 |
+
}
|
55 |
+
|
56 |
+
.jstree-ocl {
|
57 |
+
cursor: pointer
|
58 |
+
}
|
59 |
+
|
60 |
+
.jstree-leaf>.jstree-ocl {
|
61 |
+
cursor: default
|
62 |
+
}
|
63 |
+
|
64 |
+
.jstree .jstree-open>.jstree-children {
|
65 |
+
display: block
|
66 |
+
}
|
67 |
+
|
68 |
+
.jstree .jstree-closed>.jstree-children,
|
69 |
+
.jstree .jstree-leaf>.jstree-children {
|
70 |
+
display: none
|
71 |
+
}
|
72 |
+
|
73 |
+
.jstree-anchor>.jstree-themeicon {
|
74 |
+
margin-right: 2px
|
75 |
+
}
|
76 |
+
|
77 |
+
.jstree-no-icons .jstree-themeicon,
|
78 |
+
.jstree-anchor>.jstree-themeicon-hidden {
|
79 |
+
display: none
|
80 |
+
}
|
81 |
+
|
82 |
+
.jstree-hidden,
|
83 |
+
.jstree-node.jstree-hidden {
|
84 |
+
display: none
|
85 |
+
}
|
86 |
+
|
87 |
+
.jstree-rtl .jstree-anchor {
|
88 |
+
padding: 0 1px 0 4px
|
89 |
+
}
|
90 |
+
|
91 |
+
.jstree-rtl .jstree-anchor>.jstree-themeicon {
|
92 |
+
margin-left: 2px;
|
93 |
+
margin-right: 0
|
94 |
+
}
|
95 |
+
|
96 |
+
.jstree-rtl .jstree-node {
|
97 |
+
margin-left: 0
|
98 |
+
}
|
99 |
+
|
100 |
+
.jstree-rtl .jstree-container-ul>.jstree-node {
|
101 |
+
margin-right: 0
|
102 |
+
}
|
103 |
+
|
104 |
+
.jstree-wholerow-ul {
|
105 |
+
position: relative;
|
106 |
+
display: inline-block;
|
107 |
+
min-width: 100%
|
108 |
+
}
|
109 |
+
|
110 |
+
.jstree-wholerow-ul .jstree-leaf>.jstree-ocl {
|
111 |
+
cursor: pointer
|
112 |
+
}
|
113 |
+
|
114 |
+
.jstree-wholerow-ul .jstree-anchor,
|
115 |
+
.jstree-wholerow-ul .jstree-icon {
|
116 |
+
position: relative
|
117 |
+
}
|
118 |
+
|
119 |
+
.jstree-wholerow-ul .jstree-wholerow {
|
120 |
+
width: 100%;
|
121 |
+
cursor: pointer;
|
122 |
+
position: absolute;
|
123 |
+
left: 0;
|
124 |
+
-webkit-user-select: none;
|
125 |
+
-moz-user-select: none;
|
126 |
+
-ms-user-select: none;
|
127 |
+
user-select: none
|
128 |
+
}
|
129 |
+
|
130 |
+
.vakata-context {
|
131 |
+
display: none
|
132 |
+
}
|
133 |
+
|
134 |
+
.vakata-context,
|
135 |
+
.vakata-context ul {
|
136 |
+
margin: 0;
|
137 |
+
padding: 2px;
|
138 |
+
position: absolute;
|
139 |
+
background: #f5f5f5;
|
140 |
+
border: 1px solid #979797;
|
141 |
+
box-shadow: 2px 2px 2px #999
|
142 |
+
}
|
143 |
+
|
144 |
+
.vakata-context ul {
|
145 |
+
list-style: none;
|
146 |
+
left: 100%;
|
147 |
+
margin-top: -2.7em;
|
148 |
+
margin-left: -4px
|
149 |
+
}
|
150 |
+
|
151 |
+
.vakata-context .vakata-context-right ul {
|
152 |
+
left: auto;
|
153 |
+
right: 100%;
|
154 |
+
margin-left: auto;
|
155 |
+
margin-right: -4px
|
156 |
+
}
|
157 |
+
|
158 |
+
.vakata-context li {
|
159 |
+
list-style: none
|
160 |
+
}
|
161 |
+
|
162 |
+
.vakata-context li>a {
|
163 |
+
display: block;
|
164 |
+
padding: 0 2em;
|
165 |
+
text-decoration: none;
|
166 |
+
width: auto;
|
167 |
+
color: #000;
|
168 |
+
white-space: nowrap;
|
169 |
+
line-height: 2.4em;
|
170 |
+
text-shadow: 1px 1px 0 #fff;
|
171 |
+
border-radius: 1px
|
172 |
+
}
|
173 |
+
|
174 |
+
.vakata-context li>a:hover {
|
175 |
+
position: relative;
|
176 |
+
background-color: #e8eff7;
|
177 |
+
box-shadow: 0 0 2px #0a6aa1
|
178 |
+
}
|
179 |
+
|
180 |
+
.vakata-context li>a.vakata-context-parent {
|
181 |
+
background-image: url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);
|
182 |
+
background-position: right center;
|
183 |
+
background-repeat: no-repeat
|
184 |
+
}
|
185 |
+
|
186 |
+
.vakata-context li>a:focus {
|
187 |
+
outline: 0
|
188 |
+
}
|
189 |
+
|
190 |
+
.vakata-context .vakata-context-hover>a {
|
191 |
+
position: relative;
|
192 |
+
background-color: #e8eff7;
|
193 |
+
box-shadow: 0 0 2px #0a6aa1
|
194 |
+
}
|
195 |
+
|
196 |
+
.vakata-context .vakata-context-separator>a,
|
197 |
+
.vakata-context .vakata-context-separator>a:hover {
|
198 |
+
background: #fff;
|
199 |
+
border: 0;
|
200 |
+
border-top: 1px solid #e2e3e3;
|
201 |
+
height: 1px;
|
202 |
+
min-height: 1px;
|
203 |
+
max-height: 1px;
|
204 |
+
padding: 0;
|
205 |
+
margin: 0 0 0 2.4em;
|
206 |
+
border-left: 1px solid #e0e0e0;
|
207 |
+
text-shadow: 0 0 0 transparent;
|
208 |
+
box-shadow: 0 0 0 transparent;
|
209 |
+
border-radius: 0
|
210 |
+
}
|
211 |
+
|
212 |
+
.vakata-context .vakata-contextmenu-disabled a,
|
213 |
+
.vakata-context .vakata-contextmenu-disabled a:hover {
|
214 |
+
color: silver;
|
215 |
+
background-color: transparent;
|
216 |
+
border: 0;
|
217 |
+
box-shadow: 0 0 0
|
218 |
+
}
|
219 |
+
|
220 |
+
.vakata-context li>a>i {
|
221 |
+
text-decoration: none;
|
222 |
+
display: inline-block;
|
223 |
+
width: 2.4em;
|
224 |
+
height: 2.4em;
|
225 |
+
background: 0 0;
|
226 |
+
margin: 0 0 0 -2em;
|
227 |
+
vertical-align: top;
|
228 |
+
text-align: center;
|
229 |
+
line-height: 2.4em
|
230 |
+
}
|
231 |
+
|
232 |
+
.vakata-context li>a>i:empty {
|
233 |
+
width: 2.4em;
|
234 |
+
line-height: 2.4em
|
235 |
+
}
|
236 |
+
|
237 |
+
.vakata-context li>a .vakata-contextmenu-sep {
|
238 |
+
display: inline-block;
|
239 |
+
width: 1px;
|
240 |
+
height: 2.4em;
|
241 |
+
background: #fff;
|
242 |
+
margin: 0 .5em 0 0;
|
243 |
+
border-left: 1px solid #e2e3e3
|
244 |
+
}
|
245 |
+
|
246 |
+
.vakata-context .vakata-contextmenu-shortcut {
|
247 |
+
font-size: .8em;
|
248 |
+
color: silver;
|
249 |
+
opacity: .5;
|
250 |
+
display: none
|
251 |
+
}
|
252 |
+
|
253 |
+
.vakata-context-rtl ul {
|
254 |
+
left: auto;
|
255 |
+
right: 100%;
|
256 |
+
margin-left: auto;
|
257 |
+
margin-right: -4px
|
258 |
+
}
|
259 |
+
|
260 |
+
.vakata-context-rtl li>a.vakata-context-parent {
|
261 |
+
background-image: url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);
|
262 |
+
background-position: left center;
|
263 |
+
background-repeat: no-repeat
|
264 |
+
}
|
265 |
+
|
266 |
+
.vakata-context-rtl .vakata-context-separator>a {
|
267 |
+
margin: 0 2.4em 0 0;
|
268 |
+
border-left: 0;
|
269 |
+
border-right: 1px solid #e2e3e3
|
270 |
+
}
|
271 |
+
|
272 |
+
.vakata-context-rtl .vakata-context-left ul {
|
273 |
+
right: auto;
|
274 |
+
left: 100%;
|
275 |
+
margin-left: -4px;
|
276 |
+
margin-right: auto
|
277 |
+
}
|
278 |
+
|
279 |
+
.vakata-context-rtl li>a>i {
|
280 |
+
margin: 0 -2em 0 0
|
281 |
+
}
|
282 |
+
|
283 |
+
.vakata-context-rtl li>a .vakata-contextmenu-sep {
|
284 |
+
margin: 0 0 0 .5em;
|
285 |
+
border-left-color: #fff;
|
286 |
+
background: #e2e3e3
|
287 |
+
}
|
288 |
+
|
289 |
+
#jstree-marker {
|
290 |
+
position: absolute;
|
291 |
+
top: 0;
|
292 |
+
left: 0;
|
293 |
+
margin: -5px 0 0 0;
|
294 |
+
padding: 0;
|
295 |
+
border-right: 0;
|
296 |
+
border-top: 5px solid transparent;
|
297 |
+
border-bottom: 5px solid transparent;
|
298 |
+
border-left: 5px solid;
|
299 |
+
width: 0;
|
300 |
+
height: 0;
|
301 |
+
font-size: 0;
|
302 |
+
line-height: 0
|
303 |
+
}
|
304 |
+
|
305 |
+
#jstree-dnd {
|
306 |
+
line-height: 16px;
|
307 |
+
margin: 0;
|
308 |
+
padding: 4px
|
309 |
+
}
|
310 |
+
|
311 |
+
#jstree-dnd .jstree-icon,
|
312 |
+
#jstree-dnd .jstree-copy {
|
313 |
+
display: inline-block;
|
314 |
+
text-decoration: none;
|
315 |
+
margin: 0 2px 0 0;
|
316 |
+
padding: 0;
|
317 |
+
width: 16px;
|
318 |
+
height: 16px
|
319 |
+
}
|
320 |
+
|
321 |
+
#jstree-dnd .jstree-ok {
|
322 |
+
background: green
|
323 |
+
}
|
324 |
+
|
325 |
+
#jstree-dnd .jstree-er {
|
326 |
+
background: red
|
327 |
+
}
|
328 |
+
|
329 |
+
#jstree-dnd .jstree-copy {
|
330 |
+
margin: 0 2px
|
331 |
+
}
|
332 |
+
|
333 |
+
.jstree-gray .jstree-node,
|
334 |
+
.jstree-gray .jstree-icon {
|
335 |
+
background-repeat: no-repeat;
|
336 |
+
background-color: transparent
|
337 |
+
}
|
338 |
+
|
339 |
+
.jstree-gray .jstree-anchor,
|
340 |
+
.jstree-gray .jstree-wholerow {
|
341 |
+
transition: background-color .15s, box-shadow .15s
|
342 |
+
}
|
343 |
+
|
344 |
+
.jstree-gray .jstree-hovered {
|
345 |
+
background: #dee0e2;
|
346 |
+
border-radius: 2px;
|
347 |
+
box-shadow: inset 0 0 1px #ccc
|
348 |
+
}
|
349 |
+
|
350 |
+
.jstree-gray .jstree-context {
|
351 |
+
background: #e7f4f9;
|
352 |
+
border-radius: 2px;
|
353 |
+
box-shadow: inset 0 0 1px #ccc
|
354 |
+
}
|
355 |
+
|
356 |
+
.jstree-gray .jstree-clicked {
|
357 |
+
background: #b4b9be;
|
358 |
+
border-radius: 2px;
|
359 |
+
box-shadow: inset 0 0 1px #999
|
360 |
+
}
|
361 |
+
|
362 |
+
.jstree-gray .jstree-no-icons .jstree-anchor>.jstree-themeicon {
|
363 |
+
display: none
|
364 |
+
}
|
365 |
+
|
366 |
+
.jstree-gray .jstree-disabled {
|
367 |
+
background: 0 0;
|
368 |
+
color: #666
|
369 |
+
}
|
370 |
+
|
371 |
+
.jstree-gray .jstree-disabled.jstree-hovered {
|
372 |
+
background: 0 0;
|
373 |
+
box-shadow: none
|
374 |
+
}
|
375 |
+
|
376 |
+
.jstree-gray .jstree-disabled.jstree-clicked {
|
377 |
+
background: #efefef
|
378 |
+
}
|
379 |
+
|
380 |
+
.jstree-gray .jstree-disabled>.jstree-icon {
|
381 |
+
opacity: .8;
|
382 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
383 |
+
filter: gray;
|
384 |
+
-webkit-filter: grayscale(100%)
|
385 |
+
}
|
386 |
+
|
387 |
+
.jstree-gray .jstree-search {
|
388 |
+
font-style: italic;
|
389 |
+
color: #8b0000;
|
390 |
+
font-weight: 700
|
391 |
+
}
|
392 |
+
|
393 |
+
.jstree-gray .jstree-no-checkboxes .jstree-checkbox {
|
394 |
+
display: none!important
|
395 |
+
}
|
396 |
+
|
397 |
+
.jstree-gray.jstree-checkbox-no-clicked .jstree-clicked {
|
398 |
+
background: 0 0;
|
399 |
+
box-shadow: none
|
400 |
+
}
|
401 |
+
|
402 |
+
.jstree-gray.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {
|
403 |
+
background: #e7f4f9
|
404 |
+
}
|
405 |
+
|
406 |
+
.jstree-gray.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked {
|
407 |
+
background: 0 0
|
408 |
+
}
|
409 |
+
|
410 |
+
.jstree-gray.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {
|
411 |
+
background: #e7f4f9
|
412 |
+
}
|
413 |
+
|
414 |
+
.jstree-gray>.jstree-striped {
|
415 |
+
min-width: 100%;
|
416 |
+
display: inline-block;
|
417 |
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat
|
418 |
+
}
|
419 |
+
|
420 |
+
.jstree-gray>.jstree-wholerow-ul .jstree-hovered,
|
421 |
+
.jstree-gray>.jstree-wholerow-ul .jstree-clicked {
|
422 |
+
background: 0 0;
|
423 |
+
box-shadow: none;
|
424 |
+
border-radius: 0
|
425 |
+
}
|
426 |
+
|
427 |
+
.jstree-gray .jstree-wholerow {
|
428 |
+
-moz-box-sizing: border-box;
|
429 |
+
-webkit-box-sizing: border-box;
|
430 |
+
box-sizing: border-box
|
431 |
+
}
|
432 |
+
|
433 |
+
.jstree-gray .jstree-wholerow-hovered {
|
434 |
+
background: #dee0e2;
|
435 |
+
}
|
436 |
+
|
437 |
+
.jstree-gray .jstree-wholerow-clicked {
|
438 |
+
background: #b4b9be;
|
439 |
+
}
|
440 |
+
|
441 |
+
.jstree-gray .jstree-node {
|
442 |
+
min-height: 24px;
|
443 |
+
line-height: 24px;
|
444 |
+
margin-left: 24px;
|
445 |
+
min-width: 24px
|
446 |
+
}
|
447 |
+
|
448 |
+
.jstree-gray .jstree-anchor {
|
449 |
+
line-height: 24px;
|
450 |
+
height: 24px
|
451 |
+
}
|
452 |
+
|
453 |
+
.jstree-gray .jstree-icon {
|
454 |
+
width: 24px;
|
455 |
+
height: 24px;
|
456 |
+
line-height: 24px
|
457 |
+
}
|
458 |
+
|
459 |
+
.jstree-gray .jstree-icon:empty {
|
460 |
+
width: 24px;
|
461 |
+
height: 24px;
|
462 |
+
line-height: 24px
|
463 |
+
}
|
464 |
+
|
465 |
+
.jstree-gray.jstree-rtl .jstree-node {
|
466 |
+
margin-right: 24px
|
467 |
+
}
|
468 |
+
|
469 |
+
.jstree-gray .jstree-wholerow {
|
470 |
+
height: 24px
|
471 |
+
}
|
472 |
+
|
473 |
+
.jstree-gray .jstree-node,
|
474 |
+
.jstree-gray .jstree-icon {
|
475 |
+
background-image: url(32px.png)
|
476 |
+
}
|
477 |
+
|
478 |
+
.jstree-gray .jstree-node {
|
479 |
+
background-position: -292px -4px;
|
480 |
+
background-repeat: repeat-y
|
481 |
+
}
|
482 |
+
|
483 |
+
.jstree-gray .jstree-last {
|
484 |
+
background: 0 0
|
485 |
+
}
|
486 |
+
|
487 |
+
.jstree-gray .jstree-open>.jstree-ocl {
|
488 |
+
background-position: -132px -4px
|
489 |
+
}
|
490 |
+
|
491 |
+
.jstree-gray .jstree-closed>.jstree-ocl {
|
492 |
+
background-position: -100px -4px
|
493 |
+
}
|
494 |
+
|
495 |
+
.jstree-gray .jstree-leaf>.jstree-ocl {
|
496 |
+
background-position: -68px -4px
|
497 |
+
}
|
498 |
+
|
499 |
+
.jstree-gray .jstree-themeicon {
|
500 |
+
background-position: -260px -4px
|
501 |
+
}
|
502 |
+
|
503 |
+
.jstree-gray>.jstree-no-dots .jstree-node,
|
504 |
+
.jstree-gray>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
505 |
+
background: 0 0
|
506 |
+
}
|
507 |
+
|
508 |
+
.jstree-gray>.jstree-no-dots .jstree-open>.jstree-ocl {
|
509 |
+
background-position: -36px -4px
|
510 |
+
}
|
511 |
+
|
512 |
+
.jstree-gray>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
513 |
+
background-position: -4px -4px
|
514 |
+
}
|
515 |
+
|
516 |
+
.jstree-gray .jstree-disabled {
|
517 |
+
background: 0 0
|
518 |
+
}
|
519 |
+
|
520 |
+
.jstree-gray .jstree-disabled.jstree-hovered {
|
521 |
+
background: 0 0
|
522 |
+
}
|
523 |
+
|
524 |
+
.jstree-gray .jstree-disabled.jstree-clicked {
|
525 |
+
background: #efefef
|
526 |
+
}
|
527 |
+
|
528 |
+
.jstree-gray .jstree-checkbox {
|
529 |
+
background-position: -164px -4px
|
530 |
+
}
|
531 |
+
|
532 |
+
.jstree-gray .jstree-checkbox:hover {
|
533 |
+
background-position: -164px -36px
|
534 |
+
}
|
535 |
+
|
536 |
+
.jstree-gray.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,
|
537 |
+
.jstree-gray .jstree-checked>.jstree-checkbox {
|
538 |
+
background-position: -228px -4px
|
539 |
+
}
|
540 |
+
|
541 |
+
.jstree-gray.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,
|
542 |
+
.jstree-gray .jstree-checked>.jstree-checkbox:hover {
|
543 |
+
background-position: -228px -36px
|
544 |
+
}
|
545 |
+
|
546 |
+
.jstree-gray .jstree-anchor>.jstree-undetermined {
|
547 |
+
background-position: -196px -4px
|
548 |
+
}
|
549 |
+
|
550 |
+
.jstree-gray .jstree-anchor>.jstree-undetermined:hover {
|
551 |
+
background-position: -196px -36px
|
552 |
+
}
|
553 |
+
|
554 |
+
.jstree-gray .jstree-checkbox-disabled {
|
555 |
+
opacity: .8;
|
556 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
557 |
+
filter: gray;
|
558 |
+
-webkit-filter: grayscale(100%)
|
559 |
+
}
|
560 |
+
|
561 |
+
.jstree-gray>.jstree-striped {
|
562 |
+
background-size: auto 48px
|
563 |
+
}
|
564 |
+
|
565 |
+
.jstree-gray.jstree-rtl .jstree-node {
|
566 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);
|
567 |
+
background-position: 100% 1px;
|
568 |
+
background-repeat: repeat-y
|
569 |
+
}
|
570 |
+
|
571 |
+
.jstree-gray.jstree-rtl .jstree-last {
|
572 |
+
background: 0 0
|
573 |
+
}
|
574 |
+
|
575 |
+
.jstree-gray.jstree-rtl .jstree-open>.jstree-ocl {
|
576 |
+
background-position: -132px -36px
|
577 |
+
}
|
578 |
+
|
579 |
+
.jstree-gray.jstree-rtl .jstree-closed>.jstree-ocl {
|
580 |
+
background-position: -100px -36px
|
581 |
+
}
|
582 |
+
|
583 |
+
.jstree-gray.jstree-rtl .jstree-leaf>.jstree-ocl {
|
584 |
+
background-position: -68px -36px
|
585 |
+
}
|
586 |
+
|
587 |
+
.jstree-gray.jstree-rtl>.jstree-no-dots .jstree-node,
|
588 |
+
.jstree-gray.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
589 |
+
background: 0 0
|
590 |
+
}
|
591 |
+
|
592 |
+
.jstree-gray.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl {
|
593 |
+
background-position: -36px -36px
|
594 |
+
}
|
595 |
+
|
596 |
+
.jstree-gray.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
597 |
+
background-position: -4px -36px
|
598 |
+
}
|
599 |
+
|
600 |
+
.jstree-gray .jstree-themeicon-custom {
|
601 |
+
background-color: transparent;
|
602 |
+
background-image: none;
|
603 |
+
background-position: 0 0
|
604 |
+
}
|
605 |
+
|
606 |
+
.jstree-gray>.jstree-container-ul .jstree-loading>.jstree-ocl {
|
607 |
+
background: url(throbber.gif) center center no-repeat
|
608 |
+
}
|
609 |
+
|
610 |
+
.jstree-gray .jstree-file {
|
611 |
+
background: url(32px.png) -100px -68px no-repeat
|
612 |
+
}
|
613 |
+
|
614 |
+
.jstree-gray .jstree-folder {
|
615 |
+
background: url(32px.png) -260px -4px no-repeat
|
616 |
+
}
|
617 |
+
|
618 |
+
.jstree-gray>.jstree-container-ul>.jstree-node {
|
619 |
+
margin-left: 0;
|
620 |
+
margin-right: 0
|
621 |
+
}
|
622 |
+
|
623 |
+
#jstree-dnd.jstree-gray {
|
624 |
+
line-height: 24px;
|
625 |
+
padding: 0 4px
|
626 |
+
}
|
627 |
+
|
628 |
+
#jstree-dnd.jstree-gray .jstree-ok,
|
629 |
+
#jstree-dnd.jstree-gray .jstree-er {
|
630 |
+
background-image: url(32px.png);
|
631 |
+
background-repeat: no-repeat;
|
632 |
+
background-color: transparent
|
633 |
+
}
|
634 |
+
|
635 |
+
#jstree-dnd.jstree-gray i {
|
636 |
+
background: 0 0;
|
637 |
+
width: 24px;
|
638 |
+
height: 24px;
|
639 |
+
line-height: 24px
|
640 |
+
}
|
641 |
+
|
642 |
+
#jstree-dnd.jstree-gray .jstree-ok {
|
643 |
+
background-position: -4px -68px
|
644 |
+
}
|
645 |
+
|
646 |
+
#jstree-dnd.jstree-gray .jstree-er {
|
647 |
+
background-position: -36px -68px
|
648 |
+
}
|
649 |
+
|
650 |
+
.jstree-gray.jstree-rtl .jstree-node {
|
651 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)
|
652 |
+
}
|
653 |
+
|
654 |
+
.jstree-gray.jstree-rtl .jstree-last {
|
655 |
+
background: 0 0
|
656 |
+
}
|
657 |
+
|
658 |
+
.jstree-gray-small .jstree-node {
|
659 |
+
min-height: 18px;
|
660 |
+
line-height: 18px;
|
661 |
+
margin-left: 18px;
|
662 |
+
min-width: 18px
|
663 |
+
}
|
664 |
+
|
665 |
+
.jstree-gray-small .jstree-anchor {
|
666 |
+
line-height: 18px;
|
667 |
+
height: 18px
|
668 |
+
}
|
669 |
+
|
670 |
+
.jstree-gray-small .jstree-icon {
|
671 |
+
width: 18px;
|
672 |
+
height: 18px;
|
673 |
+
line-height: 18px
|
674 |
+
}
|
675 |
+
|
676 |
+
.jstree-gray-small .jstree-icon:empty {
|
677 |
+
width: 18px;
|
678 |
+
height: 18px;
|
679 |
+
line-height: 18px
|
680 |
+
}
|
681 |
+
|
682 |
+
.jstree-gray-small.jstree-rtl .jstree-node {
|
683 |
+
margin-right: 18px
|
684 |
+
}
|
685 |
+
|
686 |
+
.jstree-gray-small .jstree-wholerow {
|
687 |
+
height: 18px
|
688 |
+
}
|
689 |
+
|
690 |
+
.jstree-gray-small .jstree-node,
|
691 |
+
.jstree-gray-small .jstree-icon {
|
692 |
+
background-image: url(32px.png)
|
693 |
+
}
|
694 |
+
|
695 |
+
.jstree-gray-small .jstree-node {
|
696 |
+
background-position: -295px -7px;
|
697 |
+
background-repeat: repeat-y
|
698 |
+
}
|
699 |
+
|
700 |
+
.jstree-gray-small .jstree-last {
|
701 |
+
background: 0 0
|
702 |
+
}
|
703 |
+
|
704 |
+
.jstree-gray-small .jstree-open>.jstree-ocl {
|
705 |
+
background-position: -135px -7px
|
706 |
+
}
|
707 |
+
|
708 |
+
.jstree-gray-small .jstree-closed>.jstree-ocl {
|
709 |
+
background-position: -103px -7px
|
710 |
+
}
|
711 |
+
|
712 |
+
.jstree-gray-small .jstree-leaf>.jstree-ocl {
|
713 |
+
background-position: -71px -7px
|
714 |
+
}
|
715 |
+
|
716 |
+
.jstree-gray-small .jstree-themeicon {
|
717 |
+
background-position: -263px -7px
|
718 |
+
}
|
719 |
+
|
720 |
+
.jstree-gray-small>.jstree-no-dots .jstree-node,
|
721 |
+
.jstree-gray-small>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
722 |
+
background: 0 0
|
723 |
+
}
|
724 |
+
|
725 |
+
.jstree-gray-small>.jstree-no-dots .jstree-open>.jstree-ocl {
|
726 |
+
background-position: -39px -7px
|
727 |
+
}
|
728 |
+
|
729 |
+
.jstree-gray-small>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
730 |
+
background-position: -7px -7px
|
731 |
+
}
|
732 |
+
|
733 |
+
.jstree-gray-small .jstree-disabled {
|
734 |
+
background: 0 0
|
735 |
+
}
|
736 |
+
|
737 |
+
.jstree-gray-small .jstree-disabled.jstree-hovered {
|
738 |
+
background: 0 0
|
739 |
+
}
|
740 |
+
|
741 |
+
.jstree-gray-small .jstree-disabled.jstree-clicked {
|
742 |
+
background: #efefef
|
743 |
+
}
|
744 |
+
|
745 |
+
.jstree-gray-small .jstree-checkbox {
|
746 |
+
background-position: -167px -7px
|
747 |
+
}
|
748 |
+
|
749 |
+
.jstree-gray-small .jstree-checkbox:hover {
|
750 |
+
background-position: -167px -39px
|
751 |
+
}
|
752 |
+
|
753 |
+
.jstree-gray-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,
|
754 |
+
.jstree-gray-small .jstree-checked>.jstree-checkbox {
|
755 |
+
background-position: -231px -7px
|
756 |
+
}
|
757 |
+
|
758 |
+
.jstree-gray-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,
|
759 |
+
.jstree-gray-small .jstree-checked>.jstree-checkbox:hover {
|
760 |
+
background-position: -231px -39px
|
761 |
+
}
|
762 |
+
|
763 |
+
.jstree-gray-small .jstree-anchor>.jstree-undetermined {
|
764 |
+
background-position: -199px -7px
|
765 |
+
}
|
766 |
+
|
767 |
+
.jstree-gray-small .jstree-anchor>.jstree-undetermined:hover {
|
768 |
+
background-position: -199px -39px
|
769 |
+
}
|
770 |
+
|
771 |
+
.jstree-gray-small .jstree-checkbox-disabled {
|
772 |
+
opacity: .8;
|
773 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
774 |
+
filter: gray;
|
775 |
+
-webkit-filter: grayscale(100%)
|
776 |
+
}
|
777 |
+
|
778 |
+
.jstree-gray-small>.jstree-striped {
|
779 |
+
background-size: auto 36px
|
780 |
+
}
|
781 |
+
|
782 |
+
.jstree-gray-small.jstree-rtl .jstree-node {
|
783 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);
|
784 |
+
background-position: 100% 1px;
|
785 |
+
background-repeat: repeat-y
|
786 |
+
}
|
787 |
+
|
788 |
+
.jstree-gray-small.jstree-rtl .jstree-last {
|
789 |
+
background: 0 0
|
790 |
+
}
|
791 |
+
|
792 |
+
.jstree-gray-small.jstree-rtl .jstree-open>.jstree-ocl {
|
793 |
+
background-position: -135px -39px
|
794 |
+
}
|
795 |
+
|
796 |
+
.jstree-gray-small.jstree-rtl .jstree-closed>.jstree-ocl {
|
797 |
+
background-position: -103px -39px
|
798 |
+
}
|
799 |
+
|
800 |
+
.jstree-gray-small.jstree-rtl .jstree-leaf>.jstree-ocl {
|
801 |
+
background-position: -71px -39px
|
802 |
+
}
|
803 |
+
|
804 |
+
.jstree-gray-small.jstree-rtl>.jstree-no-dots .jstree-node,
|
805 |
+
.jstree-gray-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
806 |
+
background: 0 0
|
807 |
+
}
|
808 |
+
|
809 |
+
.jstree-gray-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl {
|
810 |
+
background-position: -39px -39px
|
811 |
+
}
|
812 |
+
|
813 |
+
.jstree-gray-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
814 |
+
background-position: -7px -39px
|
815 |
+
}
|
816 |
+
|
817 |
+
.jstree-gray-small .jstree-themeicon-custom {
|
818 |
+
background-color: transparent;
|
819 |
+
background-image: none;
|
820 |
+
background-position: 0 0
|
821 |
+
}
|
822 |
+
|
823 |
+
.jstree-gray-small>.jstree-container-ul .jstree-loading>.jstree-ocl {
|
824 |
+
background: url(throbber.gif) center center no-repeat
|
825 |
+
}
|
826 |
+
|
827 |
+
.jstree-gray-small .jstree-file {
|
828 |
+
background: url(32px.png) -103px -71px no-repeat
|
829 |
+
}
|
830 |
+
|
831 |
+
.jstree-gray-small .jstree-folder {
|
832 |
+
background: url(32px.png) -263px -7px no-repeat
|
833 |
+
}
|
834 |
+
|
835 |
+
.jstree-gray-small>.jstree-container-ul>.jstree-node {
|
836 |
+
margin-left: 0;
|
837 |
+
margin-right: 0
|
838 |
+
}
|
839 |
+
|
840 |
+
#jstree-dnd.jstree-gray-small {
|
841 |
+
line-height: 18px;
|
842 |
+
padding: 0 4px
|
843 |
+
}
|
844 |
+
|
845 |
+
#jstree-dnd.jstree-gray-small .jstree-ok,
|
846 |
+
#jstree-dnd.jstree-gray-small .jstree-er {
|
847 |
+
background-image: url(32px.png);
|
848 |
+
background-repeat: no-repeat;
|
849 |
+
background-color: transparent
|
850 |
+
}
|
851 |
+
|
852 |
+
#jstree-dnd.jstree-gray-small i {
|
853 |
+
background: 0 0;
|
854 |
+
width: 18px;
|
855 |
+
height: 18px;
|
856 |
+
line-height: 18px
|
857 |
+
}
|
858 |
+
|
859 |
+
#jstree-dnd.jstree-gray-small .jstree-ok {
|
860 |
+
background-position: -7px -71px
|
861 |
+
}
|
862 |
+
|
863 |
+
#jstree-dnd.jstree-gray-small .jstree-er {
|
864 |
+
background-position: -39px -71px
|
865 |
+
}
|
866 |
+
|
867 |
+
.jstree-gray-small.jstree-rtl .jstree-node {
|
868 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)
|
869 |
+
}
|
870 |
+
|
871 |
+
.jstree-gray-small.jstree-rtl .jstree-last {
|
872 |
+
background: 0 0
|
873 |
+
}
|
874 |
+
|
875 |
+
.jstree-gray-large .jstree-node {
|
876 |
+
min-height: 32px;
|
877 |
+
line-height: 32px;
|
878 |
+
margin-left: 32px;
|
879 |
+
min-width: 32px
|
880 |
+
}
|
881 |
+
|
882 |
+
.jstree-gray-large .jstree-anchor {
|
883 |
+
line-height: 32px;
|
884 |
+
height: 32px
|
885 |
+
}
|
886 |
+
|
887 |
+
.jstree-gray-large .jstree-icon {
|
888 |
+
width: 32px;
|
889 |
+
height: 32px;
|
890 |
+
line-height: 32px
|
891 |
+
}
|
892 |
+
|
893 |
+
.jstree-gray-large .jstree-icon:empty {
|
894 |
+
width: 32px;
|
895 |
+
height: 32px;
|
896 |
+
line-height: 32px
|
897 |
+
}
|
898 |
+
|
899 |
+
.jstree-gray-large.jstree-rtl .jstree-node {
|
900 |
+
margin-right: 32px
|
901 |
+
}
|
902 |
+
|
903 |
+
.jstree-gray-large .jstree-wholerow {
|
904 |
+
height: 32px
|
905 |
+
}
|
906 |
+
|
907 |
+
.jstree-gray-large .jstree-node,
|
908 |
+
.jstree-gray-large .jstree-icon {
|
909 |
+
background-image: url(32px.png)
|
910 |
+
}
|
911 |
+
|
912 |
+
.jstree-gray-large .jstree-node {
|
913 |
+
background-position: -288px 0;
|
914 |
+
background-repeat: repeat-y
|
915 |
+
}
|
916 |
+
|
917 |
+
.jstree-gray-large .jstree-last {
|
918 |
+
background: 0 0
|
919 |
+
}
|
920 |
+
|
921 |
+
.jstree-gray-large .jstree-open>.jstree-ocl {
|
922 |
+
background-position: -128px 0
|
923 |
+
}
|
924 |
+
|
925 |
+
.jstree-gray-large .jstree-closed>.jstree-ocl {
|
926 |
+
background-position: -96px 0
|
927 |
+
}
|
928 |
+
|
929 |
+
.jstree-gray-large .jstree-leaf>.jstree-ocl {
|
930 |
+
background-position: -64px 0
|
931 |
+
}
|
932 |
+
|
933 |
+
.jstree-gray-large .jstree-themeicon {
|
934 |
+
background-position: -256px 0
|
935 |
+
}
|
936 |
+
|
937 |
+
.jstree-gray-large>.jstree-no-dots .jstree-node,
|
938 |
+
.jstree-gray-large>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
939 |
+
background: 0 0
|
940 |
+
}
|
941 |
+
|
942 |
+
.jstree-gray-large>.jstree-no-dots .jstree-open>.jstree-ocl {
|
943 |
+
background-position: -32px 0
|
944 |
+
}
|
945 |
+
|
946 |
+
.jstree-gray-large>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
947 |
+
background-position: 0 0
|
948 |
+
}
|
949 |
+
|
950 |
+
.jstree-gray-large .jstree-disabled {
|
951 |
+
background: 0 0
|
952 |
+
}
|
953 |
+
|
954 |
+
.jstree-gray-large .jstree-disabled.jstree-hovered {
|
955 |
+
background: 0 0
|
956 |
+
}
|
957 |
+
|
958 |
+
.jstree-gray-large .jstree-disabled.jstree-clicked {
|
959 |
+
background: #efefef
|
960 |
+
}
|
961 |
+
|
962 |
+
.jstree-gray-large .jstree-checkbox {
|
963 |
+
background-position: -160px 0
|
964 |
+
}
|
965 |
+
|
966 |
+
.jstree-gray-large .jstree-checkbox:hover {
|
967 |
+
background-position: -160px -32px
|
968 |
+
}
|
969 |
+
|
970 |
+
.jstree-gray-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,
|
971 |
+
.jstree-gray-large .jstree-checked>.jstree-checkbox {
|
972 |
+
background-position: -224px 0
|
973 |
+
}
|
974 |
+
|
975 |
+
.jstree-gray-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,
|
976 |
+
.jstree-gray-large .jstree-checked>.jstree-checkbox:hover {
|
977 |
+
background-position: -224px -32px
|
978 |
+
}
|
979 |
+
|
980 |
+
.jstree-gray-large .jstree-anchor>.jstree-undetermined {
|
981 |
+
background-position: -192px 0
|
982 |
+
}
|
983 |
+
|
984 |
+
.jstree-gray-large .jstree-anchor>.jstree-undetermined:hover {
|
985 |
+
background-position: -192px -32px
|
986 |
+
}
|
987 |
+
|
988 |
+
.jstree-gray-large .jstree-checkbox-disabled {
|
989 |
+
opacity: .8;
|
990 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
991 |
+
filter: gray;
|
992 |
+
-webkit-filter: grayscale(100%)
|
993 |
+
}
|
994 |
+
|
995 |
+
.jstree-gray-large>.jstree-striped {
|
996 |
+
background-size: auto 64px
|
997 |
+
}
|
998 |
+
|
999 |
+
.jstree-gray-large.jstree-rtl .jstree-node {
|
1000 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);
|
1001 |
+
background-position: 100% 1px;
|
1002 |
+
background-repeat: repeat-y
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
.jstree-gray-large.jstree-rtl .jstree-last {
|
1006 |
+
background: 0 0
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
.jstree-gray-large.jstree-rtl .jstree-open>.jstree-ocl {
|
1010 |
+
background-position: -128px -32px
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
.jstree-gray-large.jstree-rtl .jstree-closed>.jstree-ocl {
|
1014 |
+
background-position: -96px -32px
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
.jstree-gray-large.jstree-rtl .jstree-leaf>.jstree-ocl {
|
1018 |
+
background-position: -64px -32px
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
.jstree-gray-large.jstree-rtl>.jstree-no-dots .jstree-node,
|
1022 |
+
.jstree-gray-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
1023 |
+
background: 0 0
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
.jstree-gray-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl {
|
1027 |
+
background-position: -32px -32px
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
.jstree-gray-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
1031 |
+
background-position: 0 -32px
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
.jstree-gray-large .jstree-themeicon-custom {
|
1035 |
+
background-color: transparent;
|
1036 |
+
background-image: none;
|
1037 |
+
background-position: 0 0
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
.jstree-gray-large>.jstree-container-ul .jstree-loading>.jstree-ocl {
|
1041 |
+
background: url(throbber.gif) center center no-repeat
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
.jstree-gray-large .jstree-file {
|
1045 |
+
background: url(32px.png) -96px -64px no-repeat
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
.jstree-gray-large .jstree-folder {
|
1049 |
+
background: url(32px.png) -256px 0 no-repeat
|
1050 |
+
}
|
1051 |
+
|
1052 |
+
.jstree-gray-large>.jstree-container-ul>.jstree-node {
|
1053 |
+
margin-left: 0;
|
1054 |
+
margin-right: 0
|
1055 |
+
}
|
1056 |
+
|
1057 |
+
#jstree-dnd.jstree-gray-large {
|
1058 |
+
line-height: 32px;
|
1059 |
+
padding: 0 4px
|
1060 |
+
}
|
1061 |
+
|
1062 |
+
#jstree-dnd.jstree-gray-large .jstree-ok,
|
1063 |
+
#jstree-dnd.jstree-gray-large .jstree-er {
|
1064 |
+
background-image: url(32px.png);
|
1065 |
+
background-repeat: no-repeat;
|
1066 |
+
background-color: transparent
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
#jstree-dnd.jstree-gray-large i {
|
1070 |
+
background: 0 0;
|
1071 |
+
width: 32px;
|
1072 |
+
height: 32px;
|
1073 |
+
line-height: 32px
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
#jstree-dnd.jstree-gray-large .jstree-ok {
|
1077 |
+
background-position: 0 -64px
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
#jstree-dnd.jstree-gray-large .jstree-er {
|
1081 |
+
background-position: -32px -64px
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
.jstree-gray-large.jstree-rtl .jstree-node {
|
1085 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
.jstree-gray-large.jstree-rtl .jstree-last {
|
1089 |
+
background: 0 0
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
@media (max-width:768px) {
|
1093 |
+
#jstree-dnd.jstree-dnd-responsive {
|
1094 |
+
line-height: 40px;
|
1095 |
+
font-weight: 700;
|
1096 |
+
font-size: 1.1em;
|
1097 |
+
text-shadow: 1px 1px #fff
|
1098 |
+
}
|
1099 |
+
#jstree-dnd.jstree-dnd-responsive>i {
|
1100 |
+
background: 0 0;
|
1101 |
+
width: 40px;
|
1102 |
+
height: 40px
|
1103 |
+
}
|
1104 |
+
#jstree-dnd.jstree-dnd-responsive>.jstree-ok {
|
1105 |
+
background-image: url(40px.png);
|
1106 |
+
background-position: 0 -200px;
|
1107 |
+
background-size: 120px 240px
|
1108 |
+
}
|
1109 |
+
#jstree-dnd.jstree-dnd-responsive>.jstree-er {
|
1110 |
+
background-image: url(40px.png);
|
1111 |
+
background-position: -40px -200px;
|
1112 |
+
background-size: 120px 240px
|
1113 |
+
}
|
1114 |
+
#jstree-marker.jstree-dnd-responsive {
|
1115 |
+
border-left-width: 10px;
|
1116 |
+
border-top-width: 10px;
|
1117 |
+
border-bottom-width: 10px;
|
1118 |
+
margin-top: -10px
|
1119 |
+
}
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
@media (max-width:768px) {
|
1123 |
+
.jstree-gray-responsive .jstree-icon {
|
1124 |
+
background-image: url(40px.png)
|
1125 |
+
}
|
1126 |
+
.jstree-gray-responsive .jstree-node,
|
1127 |
+
.jstree-gray-responsive .jstree-leaf>.jstree-ocl {
|
1128 |
+
background: 0 0
|
1129 |
+
}
|
1130 |
+
.jstree-gray-responsive .jstree-node {
|
1131 |
+
min-height: 40px;
|
1132 |
+
line-height: 40px;
|
1133 |
+
margin-left: 40px;
|
1134 |
+
min-width: 40px;
|
1135 |
+
white-space: nowrap
|
1136 |
+
}
|
1137 |
+
.jstree-gray-responsive .jstree-anchor {
|
1138 |
+
line-height: 40px;
|
1139 |
+
height: 40px
|
1140 |
+
}
|
1141 |
+
.jstree-gray-responsive .jstree-icon,
|
1142 |
+
.jstree-gray-responsive .jstree-icon:empty {
|
1143 |
+
width: 40px;
|
1144 |
+
height: 40px;
|
1145 |
+
line-height: 40px
|
1146 |
+
}
|
1147 |
+
.jstree-gray-responsive>.jstree-container-ul>.jstree-node {
|
1148 |
+
margin-left: 0
|
1149 |
+
}
|
1150 |
+
.jstree-gray-responsive.jstree-rtl .jstree-node {
|
1151 |
+
margin-left: 0;
|
1152 |
+
margin-right: 40px
|
1153 |
+
}
|
1154 |
+
.jstree-gray-responsive.jstree-rtl .jstree-container-ul>.jstree-node {
|
1155 |
+
margin-right: 0
|
1156 |
+
}
|
1157 |
+
.jstree-gray-responsive .jstree-ocl,
|
1158 |
+
.jstree-gray-responsive .jstree-themeicon,
|
1159 |
+
.jstree-gray-responsive .jstree-checkbox {
|
1160 |
+
background-size: 120px 240px
|
1161 |
+
}
|
1162 |
+
.jstree-gray-responsive .jstree-leaf>.jstree-ocl {
|
1163 |
+
background: 0 0
|
1164 |
+
}
|
1165 |
+
.jstree-gray-responsive .jstree-open>.jstree-ocl {
|
1166 |
+
background-position: 0 0!important
|
1167 |
+
}
|
1168 |
+
.jstree-gray-responsive .jstree-closed>.jstree-ocl {
|
1169 |
+
background-position: 0 -40px!important
|
1170 |
+
}
|
1171 |
+
.jstree-gray-responsive.jstree-rtl .jstree-closed>.jstree-ocl {
|
1172 |
+
background-position: -40px 0!important
|
1173 |
+
}
|
1174 |
+
.jstree-gray-responsive .jstree-themeicon {
|
1175 |
+
background-position: -40px -40px
|
1176 |
+
}
|
1177 |
+
.jstree-gray-responsive .jstree-checkbox,
|
1178 |
+
.jstree-gray-responsive .jstree-checkbox:hover {
|
1179 |
+
background-position: -40px -80px
|
1180 |
+
}
|
1181 |
+
.jstree-gray-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,
|
1182 |
+
.jstree-gray-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,
|
1183 |
+
.jstree-gray-responsive .jstree-checked>.jstree-checkbox,
|
1184 |
+
.jstree-gray-responsive .jstree-checked>.jstree-checkbox:hover {
|
1185 |
+
background-position: 0 -80px
|
1186 |
+
}
|
1187 |
+
.jstree-gray-responsive .jstree-anchor>.jstree-undetermined,
|
1188 |
+
.jstree-gray-responsive .jstree-anchor>.jstree-undetermined:hover {
|
1189 |
+
background-position: 0 -120px
|
1190 |
+
}
|
1191 |
+
.jstree-gray-responsive .jstree-anchor {
|
1192 |
+
font-weight: 700;
|
1193 |
+
font-size: 1.1em;
|
1194 |
+
text-shadow: 1px 1px #fff
|
1195 |
+
}
|
1196 |
+
.jstree-gray-responsive>.jstree-striped {
|
1197 |
+
background: 0 0
|
1198 |
+
}
|
1199 |
+
.jstree-gray-responsive .jstree-wholerow {
|
1200 |
+
border-top: 1px solid rgba(255, 255, 255, .7);
|
1201 |
+
border-bottom: 1px solid rgba(64, 64, 64, .2);
|
1202 |
+
background: #ebebeb;
|
1203 |
+
height: 40px
|
1204 |
+
}
|
1205 |
+
.jstree-gray-responsive .jstree-wholerow-hovered {
|
1206 |
+
background: #e7f4f9
|
1207 |
+
}
|
1208 |
+
.jstree-gray-responsive .jstree-wholerow-clicked {
|
1209 |
+
background: #beebff
|
1210 |
+
}
|
1211 |
+
.jstree-gray-responsive .jstree-children .jstree-last>.jstree-wholerow {
|
1212 |
+
box-shadow: inset 0 -6px 3px -5px #666
|
1213 |
+
}
|
1214 |
+
.jstree-gray-responsive .jstree-children .jstree-open>.jstree-wholerow {
|
1215 |
+
box-shadow: inset 0 6px 3px -5px #666;
|
1216 |
+
border-top: 0
|
1217 |
+
}
|
1218 |
+
.jstree-gray-responsive .jstree-children .jstree-open+.jstree-open {
|
1219 |
+
box-shadow: none
|
1220 |
+
}
|
1221 |
+
.jstree-gray-responsive .jstree-node,
|
1222 |
+
.jstree-gray-responsive .jstree-icon,
|
1223 |
+
.jstree-gray-responsive .jstree-node>.jstree-ocl,
|
1224 |
+
.jstree-gray-responsive .jstree-themeicon,
|
1225 |
+
.jstree-gray-responsive .jstree-checkbox {
|
1226 |
+
background-image: url(40px.png);
|
1227 |
+
background-size: 120px 240px
|
1228 |
+
}
|
1229 |
+
.jstree-gray-responsive .jstree-node {
|
1230 |
+
background-position: -80px 0;
|
1231 |
+
background-repeat: repeat-y
|
1232 |
+
}
|
1233 |
+
.jstree-gray-responsive .jstree-last {
|
1234 |
+
background: 0 0
|
1235 |
+
}
|
1236 |
+
.jstree-gray-responsive .jstree-leaf>.jstree-ocl {
|
1237 |
+
background-position: -40px -120px
|
1238 |
+
}
|
1239 |
+
.jstree-gray-responsive .jstree-last>.jstree-ocl {
|
1240 |
+
background-position: -40px -160px
|
1241 |
+
}
|
1242 |
+
.jstree-gray-responsive .jstree-themeicon-custom {
|
1243 |
+
background-color: transparent;
|
1244 |
+
background-image: none;
|
1245 |
+
background-position: 0 0
|
1246 |
+
}
|
1247 |
+
.jstree-gray-responsive .jstree-file {
|
1248 |
+
background: url(40px.png) 0 -160px no-repeat;
|
1249 |
+
background-size: 120px 240px
|
1250 |
+
}
|
1251 |
+
.jstree-gray-responsive .jstree-folder {
|
1252 |
+
background: url(40px.png) -40px -40px no-repeat;
|
1253 |
+
background-size: 120px 240px
|
1254 |
+
}
|
1255 |
+
.jstree-gray-responsive>.jstree-container-ul>.jstree-node {
|
1256 |
+
margin-left: 0;
|
1257 |
+
margin-right: 0
|
1258 |
+
}
|
1259 |
+
}
|
assets/jstree/themes/gray/style.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-gray .jstree-node,.jstree-gray .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-gray .jstree-anchor,.jstree-gray .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-gray .jstree-hovered{background:#dee0e2;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-gray .jstree-context{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-gray .jstree-clicked{background:#b4b9be;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-gray .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-gray .jstree-disabled{background:0 0;color:#666}.jstree-gray .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-gray .jstree-disabled.jstree-clicked{background:#efefef}.jstree-gray .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-gray .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-gray .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-gray.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-gray.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-gray.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-gray.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-gray>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-gray>.jstree-wholerow-ul .jstree-hovered,.jstree-gray>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-gray .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-gray .jstree-wholerow-hovered{background:#dee0e2}.jstree-gray .jstree-wholerow-clicked{background:#b4b9be}.jstree-gray .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-gray .jstree-anchor{line-height:24px;height:24px}.jstree-gray .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-gray .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-gray.jstree-rtl .jstree-node{margin-right:24px}.jstree-gray .jstree-wholerow{height:24px}.jstree-gray .jstree-node,.jstree-gray .jstree-icon{background-image:url(32px.png)}.jstree-gray .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-gray .jstree-last{background:0 0}.jstree-gray .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-gray .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-gray .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-gray .jstree-themeicon{background-position:-260px -4px}.jstree-gray>.jstree-no-dots .jstree-node,.jstree-gray>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-gray>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-gray>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-gray .jstree-disabled{background:0 0}.jstree-gray .jstree-disabled.jstree-hovered{background:0 0}.jstree-gray .jstree-disabled.jstree-clicked{background:#efefef}.jstree-gray .jstree-checkbox{background-position:-164px -4px}.jstree-gray .jstree-checkbox:hover{background-position:-164px -36px}.jstree-gray.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-gray .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-gray.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-gray .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-gray .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-gray .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-gray .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-gray>.jstree-striped{background-size:auto 48px}.jstree-gray.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-gray.jstree-rtl .jstree-last{background:0 0}.jstree-gray.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-gray.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-gray.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-gray.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-gray.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-gray.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-gray.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-gray .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-gray>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-gray .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-gray .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-gray>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-gray{line-height:24px;padding:0 4px}#jstree-dnd.jstree-gray .jstree-ok,#jstree-dnd.jstree-gray .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-gray i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-gray .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-gray .jstree-er{background-position:-36px -68px}.jstree-gray.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-gray.jstree-rtl .jstree-last{background:0 0}.jstree-gray-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-gray-small .jstree-anchor{line-height:18px;height:18px}.jstree-gray-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-gray-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-gray-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-gray-small .jstree-wholerow{height:18px}.jstree-gray-small .jstree-node,.jstree-gray-small .jstree-icon{background-image:url(32px.png)}.jstree-gray-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-gray-small .jstree-last{background:0 0}.jstree-gray-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-gray-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-gray-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-gray-small .jstree-themeicon{background-position:-263px -7px}.jstree-gray-small>.jstree-no-dots .jstree-node,.jstree-gray-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-gray-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-gray-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-gray-small .jstree-disabled{background:0 0}.jstree-gray-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-gray-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-gray-small .jstree-checkbox{background-position:-167px -7px}.jstree-gray-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-gray-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-gray-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-gray-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-gray-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-gray-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-gray-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-gray-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-gray-small>.jstree-striped{background-size:auto 36px}.jstree-gray-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-gray-small.jstree-rtl .jstree-last{background:0 0}.jstree-gray-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-gray-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-gray-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-gray-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-gray-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-gray-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-gray-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-gray-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-gray-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-gray-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-gray-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-gray-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-gray-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-gray-small .jstree-ok,#jstree-dnd.jstree-gray-small .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-gray-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-gray-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-gray-small .jstree-er{background-position:-39px -71px}.jstree-gray-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-gray-small.jstree-rtl .jstree-last{background:0 0}.jstree-gray-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-gray-large .jstree-anchor{line-height:32px;height:32px}.jstree-gray-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-gray-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-gray-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-gray-large .jstree-wholerow{height:32px}.jstree-gray-large .jstree-node,.jstree-gray-large .jstree-icon{background-image:url(32px.png)}.jstree-gray-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-gray-large .jstree-last{background:0 0}.jstree-gray-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-gray-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-gray-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-gray-large .jstree-themeicon{background-position:-256px 0}.jstree-gray-large>.jstree-no-dots .jstree-node,.jstree-gray-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-gray-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-gray-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-gray-large .jstree-disabled{background:0 0}.jstree-gray-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-gray-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-gray-large .jstree-checkbox{background-position:-160px 0}.jstree-gray-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-gray-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-gray-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-gray-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-gray-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-gray-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-gray-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-gray-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-gray-large>.jstree-striped{background-size:auto 64px}.jstree-gray-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-gray-large.jstree-rtl .jstree-last{background:0 0}.jstree-gray-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-gray-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-gray-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-gray-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-gray-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-gray-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-gray-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-gray-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-gray-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-gray-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-gray-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-gray-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-gray-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-gray-large .jstree-ok,#jstree-dnd.jstree-gray-large .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-gray-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-gray-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-gray-large .jstree-er{background-position:-32px -64px}.jstree-gray-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-gray-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}.jstree-gray-responsive .jstree-icon{background-image:url(40px.png)}.jstree-gray-responsive .jstree-node,.jstree-gray-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-gray-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-gray-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-gray-responsive .jstree-icon,.jstree-gray-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-gray-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-gray-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px}.jstree-gray-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-gray-responsive .jstree-ocl,.jstree-gray-responsive .jstree-themeicon,.jstree-gray-responsive .jstree-checkbox{background-size:120px 240px}.jstree-gray-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-gray-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-gray-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-gray-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-gray-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-gray-responsive .jstree-checkbox,.jstree-gray-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-gray-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-gray-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-gray-responsive .jstree-checked>.jstree-checkbox,.jstree-gray-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-gray-responsive .jstree-anchor>.jstree-undetermined,.jstree-gray-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-gray-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-gray-responsive>.jstree-striped{background:0 0}.jstree-gray-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-gray-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-gray-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-gray-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-gray-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-gray-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-gray-responsive .jstree-node,.jstree-gray-responsive .jstree-icon,.jstree-gray-responsive .jstree-node>.jstree-ocl,.jstree-gray-responsive .jstree-themeicon,.jstree-gray-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 240px}.jstree-gray-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-gray-responsive .jstree-last{background:0 0}.jstree-gray-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-gray-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-gray-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-gray-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-gray-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-gray-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}
|
assets/jstree/themes/gray/throbber.gif
ADDED
Binary file
|
assets/jstree/themes/modern/32px.png
ADDED
Binary file
|
assets/jstree/themes/modern/40px.png
ADDED
Binary file
|
assets/jstree/themes/modern/style.css
ADDED
@@ -0,0 +1,1261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* jsTree modern theme */
|
2 |
+
.jstree-node,
|
3 |
+
.jstree-children,
|
4 |
+
.jstree-container-ul {
|
5 |
+
display: block;
|
6 |
+
margin: 0;
|
7 |
+
padding: 0;
|
8 |
+
list-style-type: none;
|
9 |
+
list-style-image: none
|
10 |
+
}
|
11 |
+
|
12 |
+
.jstree-node {
|
13 |
+
white-space: nowrap
|
14 |
+
}
|
15 |
+
|
16 |
+
.jstree-anchor {
|
17 |
+
display: inline-block;
|
18 |
+
color: #000;
|
19 |
+
white-space: nowrap;
|
20 |
+
padding: 0 4px 0 1px;
|
21 |
+
margin: 0;
|
22 |
+
vertical-align: top
|
23 |
+
}
|
24 |
+
|
25 |
+
.jstree-anchor:focus {
|
26 |
+
outline: 0
|
27 |
+
}
|
28 |
+
|
29 |
+
.jstree-anchor,
|
30 |
+
.jstree-anchor:link,
|
31 |
+
.jstree-anchor:visited,
|
32 |
+
.jstree-anchor:hover,
|
33 |
+
.jstree-anchor:active {
|
34 |
+
text-decoration: none;
|
35 |
+
color: inherit
|
36 |
+
}
|
37 |
+
|
38 |
+
.jstree-icon {
|
39 |
+
display: inline-block;
|
40 |
+
text-decoration: none;
|
41 |
+
margin: 0;
|
42 |
+
padding: 0;
|
43 |
+
vertical-align: top;
|
44 |
+
text-align: center
|
45 |
+
}
|
46 |
+
|
47 |
+
.jstree-icon:empty {
|
48 |
+
display: inline-block;
|
49 |
+
text-decoration: none;
|
50 |
+
margin: 0;
|
51 |
+
padding: 0;
|
52 |
+
vertical-align: top;
|
53 |
+
text-align: center
|
54 |
+
}
|
55 |
+
|
56 |
+
.jstree-ocl {
|
57 |
+
cursor: pointer
|
58 |
+
}
|
59 |
+
|
60 |
+
.jstree-leaf>.jstree-ocl {
|
61 |
+
cursor: default
|
62 |
+
}
|
63 |
+
|
64 |
+
.jstree .jstree-open>.jstree-children {
|
65 |
+
display: block
|
66 |
+
}
|
67 |
+
|
68 |
+
.jstree .jstree-closed>.jstree-children,
|
69 |
+
.jstree .jstree-leaf>.jstree-children {
|
70 |
+
display: none
|
71 |
+
}
|
72 |
+
|
73 |
+
.jstree-anchor>.jstree-themeicon {
|
74 |
+
margin-right: 2px
|
75 |
+
}
|
76 |
+
|
77 |
+
.jstree-no-icons .jstree-themeicon,
|
78 |
+
.jstree-anchor>.jstree-themeicon-hidden {
|
79 |
+
display: none
|
80 |
+
}
|
81 |
+
|
82 |
+
.jstree-hidden,
|
83 |
+
.jstree-node.jstree-hidden {
|
84 |
+
display: none
|
85 |
+
}
|
86 |
+
|
87 |
+
.jstree-rtl .jstree-anchor {
|
88 |
+
padding: 0 1px 0 4px
|
89 |
+
}
|
90 |
+
|
91 |
+
.jstree-rtl .jstree-anchor>.jstree-themeicon {
|
92 |
+
margin-left: 2px;
|
93 |
+
margin-right: 0
|
94 |
+
}
|
95 |
+
|
96 |
+
.jstree-rtl .jstree-node {
|
97 |
+
margin-left: 0
|
98 |
+
}
|
99 |
+
|
100 |
+
.jstree-rtl .jstree-container-ul>.jstree-node {
|
101 |
+
margin-right: 0
|
102 |
+
}
|
103 |
+
|
104 |
+
.jstree-wholerow-ul {
|
105 |
+
position: relative;
|
106 |
+
display: inline-block;
|
107 |
+
min-width: 100%
|
108 |
+
}
|
109 |
+
|
110 |
+
.jstree-wholerow-ul .jstree-leaf>.jstree-ocl {
|
111 |
+
cursor: pointer
|
112 |
+
}
|
113 |
+
|
114 |
+
.jstree-wholerow-ul .jstree-anchor,
|
115 |
+
.jstree-wholerow-ul .jstree-icon {
|
116 |
+
position: relative
|
117 |
+
}
|
118 |
+
|
119 |
+
.jstree-wholerow-ul .jstree-wholerow {
|
120 |
+
width: 100%;
|
121 |
+
cursor: pointer;
|
122 |
+
position: absolute;
|
123 |
+
left: 0;
|
124 |
+
-webkit-user-select: none;
|
125 |
+
-moz-user-select: none;
|
126 |
+
-ms-user-select: none;
|
127 |
+
user-select: none
|
128 |
+
}
|
129 |
+
|
130 |
+
.vakata-context {
|
131 |
+
display: none
|
132 |
+
}
|
133 |
+
|
134 |
+
.vakata-context,
|
135 |
+
.vakata-context ul {
|
136 |
+
margin: 0;
|
137 |
+
padding: 2px;
|
138 |
+
position: absolute;
|
139 |
+
background: #f5f5f5;
|
140 |
+
border: 1px solid #979797;
|
141 |
+
box-shadow: 2px 2px 2px #999
|
142 |
+
}
|
143 |
+
|
144 |
+
.vakata-context ul {
|
145 |
+
list-style: none;
|
146 |
+
left: 100%;
|
147 |
+
margin-top: -2.7em;
|
148 |
+
margin-left: -4px
|
149 |
+
}
|
150 |
+
|
151 |
+
.vakata-context .vakata-context-right ul {
|
152 |
+
left: auto;
|
153 |
+
right: 100%;
|
154 |
+
margin-left: auto;
|
155 |
+
margin-right: -4px
|
156 |
+
}
|
157 |
+
|
158 |
+
.vakata-context li {
|
159 |
+
list-style: none
|
160 |
+
}
|
161 |
+
|
162 |
+
.vakata-context li>a {
|
163 |
+
display: block;
|
164 |
+
padding: 0 2em;
|
165 |
+
text-decoration: none;
|
166 |
+
width: auto;
|
167 |
+
color: #000;
|
168 |
+
white-space: nowrap;
|
169 |
+
line-height: 2.4em;
|
170 |
+
text-shadow: 1px 1px 0 #fff;
|
171 |
+
border-radius: 1px
|
172 |
+
}
|
173 |
+
|
174 |
+
.vakata-context li>a:hover {
|
175 |
+
position: relative;
|
176 |
+
background-color: #e8eff7;
|
177 |
+
box-shadow: 0 0 2px #0a6aa1
|
178 |
+
}
|
179 |
+
|
180 |
+
.vakata-context li>a.vakata-context-parent {
|
181 |
+
background-image: url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);
|
182 |
+
background-position: right center;
|
183 |
+
background-repeat: no-repeat
|
184 |
+
}
|
185 |
+
|
186 |
+
.vakata-context li>a:focus {
|
187 |
+
outline: 0
|
188 |
+
}
|
189 |
+
|
190 |
+
.vakata-context .vakata-context-hover>a {
|
191 |
+
position: relative;
|
192 |
+
background-color: #e8eff7;
|
193 |
+
box-shadow: 0 0 2px #0a6aa1
|
194 |
+
}
|
195 |
+
|
196 |
+
.vakata-context .vakata-context-separator>a,
|
197 |
+
.vakata-context .vakata-context-separator>a:hover {
|
198 |
+
background: #fff;
|
199 |
+
border: 0;
|
200 |
+
border-top: 1px solid #e2e3e3;
|
201 |
+
height: 1px;
|
202 |
+
min-height: 1px;
|
203 |
+
max-height: 1px;
|
204 |
+
padding: 0;
|
205 |
+
margin: 0 0 0 2.4em;
|
206 |
+
border-left: 1px solid #e0e0e0;
|
207 |
+
text-shadow: 0 0 0 transparent;
|
208 |
+
box-shadow: 0 0 0 transparent;
|
209 |
+
border-radius: 0
|
210 |
+
}
|
211 |
+
|
212 |
+
.vakata-context .vakata-contextmenu-disabled a,
|
213 |
+
.vakata-context .vakata-contextmenu-disabled a:hover {
|
214 |
+
color: silver;
|
215 |
+
background-color: transparent;
|
216 |
+
border: 0;
|
217 |
+
box-shadow: 0 0 0
|
218 |
+
}
|
219 |
+
|
220 |
+
.vakata-context li>a>i {
|
221 |
+
text-decoration: none;
|
222 |
+
display: inline-block;
|
223 |
+
width: 2.4em;
|
224 |
+
height: 2.4em;
|
225 |
+
background: 0 0;
|
226 |
+
margin: 0 0 0 -2em;
|
227 |
+
vertical-align: top;
|
228 |
+
text-align: center;
|
229 |
+
line-height: 2.4em
|
230 |
+
}
|
231 |
+
|
232 |
+
.vakata-context li>a>i:empty {
|
233 |
+
width: 2.4em;
|
234 |
+
line-height: 2.4em
|
235 |
+
}
|
236 |
+
|
237 |
+
.vakata-context li>a .vakata-contextmenu-sep {
|
238 |
+
display: inline-block;
|
239 |
+
width: 1px;
|
240 |
+
height: 2.4em;
|
241 |
+
background: #fff;
|
242 |
+
margin: 0 .5em 0 0;
|
243 |
+
border-left: 1px solid #e2e3e3
|
244 |
+
}
|
245 |
+
|
246 |
+
.vakata-context .vakata-contextmenu-shortcut {
|
247 |
+
font-size: .8em;
|
248 |
+
color: silver;
|
249 |
+
opacity: .5;
|
250 |
+
display: none
|
251 |
+
}
|
252 |
+
|
253 |
+
.vakata-context-rtl ul {
|
254 |
+
left: auto;
|
255 |
+
right: 100%;
|
256 |
+
margin-left: auto;
|
257 |
+
margin-right: -4px
|
258 |
+
}
|
259 |
+
|
260 |
+
.vakata-context-rtl li>a.vakata-context-parent {
|
261 |
+
background-image: url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);
|
262 |
+
background-position: left center;
|
263 |
+
background-repeat: no-repeat
|
264 |
+
}
|
265 |
+
|
266 |
+
.vakata-context-rtl .vakata-context-separator>a {
|
267 |
+
margin: 0 2.4em 0 0;
|
268 |
+
border-left: 0;
|
269 |
+
border-right: 1px solid #e2e3e3
|
270 |
+
}
|
271 |
+
|
272 |
+
.vakata-context-rtl .vakata-context-left ul {
|
273 |
+
right: auto;
|
274 |
+
left: 100%;
|
275 |
+
margin-left: -4px;
|
276 |
+
margin-right: auto
|
277 |
+
}
|
278 |
+
|
279 |
+
.vakata-context-rtl li>a>i {
|
280 |
+
margin: 0 -2em 0 0
|
281 |
+
}
|
282 |
+
|
283 |
+
.vakata-context-rtl li>a .vakata-contextmenu-sep {
|
284 |
+
margin: 0 0 0 .5em;
|
285 |
+
border-left-color: #fff;
|
286 |
+
background: #e2e3e3
|
287 |
+
}
|
288 |
+
|
289 |
+
#jstree-marker {
|
290 |
+
position: absolute;
|
291 |
+
top: 0;
|
292 |
+
left: 0;
|
293 |
+
margin: -5px 0 0 0;
|
294 |
+
padding: 0;
|
295 |
+
border-right: 0;
|
296 |
+
border-top: 5px solid transparent;
|
297 |
+
border-bottom: 5px solid transparent;
|
298 |
+
border-left: 5px solid;
|
299 |
+
width: 0;
|
300 |
+
height: 0;
|
301 |
+
font-size: 0;
|
302 |
+
line-height: 0
|
303 |
+
}
|
304 |
+
|
305 |
+
#jstree-dnd {
|
306 |
+
line-height: 16px;
|
307 |
+
margin: 0;
|
308 |
+
padding: 4px
|
309 |
+
}
|
310 |
+
|
311 |
+
#jstree-dnd .jstree-icon,
|
312 |
+
#jstree-dnd .jstree-copy {
|
313 |
+
display: inline-block;
|
314 |
+
text-decoration: none;
|
315 |
+
margin: 0 2px 0 0;
|
316 |
+
padding: 0;
|
317 |
+
width: 16px;
|
318 |
+
height: 16px
|
319 |
+
}
|
320 |
+
|
321 |
+
#jstree-dnd .jstree-ok {
|
322 |
+
background: green
|
323 |
+
}
|
324 |
+
|
325 |
+
#jstree-dnd .jstree-er {
|
326 |
+
background: red
|
327 |
+
}
|
328 |
+
|
329 |
+
#jstree-dnd .jstree-copy {
|
330 |
+
margin: 0 2px
|
331 |
+
}
|
332 |
+
|
333 |
+
.jstree-modern .jstree-node,
|
334 |
+
.jstree-modern .jstree-icon {
|
335 |
+
background-repeat: no-repeat;
|
336 |
+
background-color: transparent
|
337 |
+
}
|
338 |
+
|
339 |
+
.jstree-modern .jstree-anchor,
|
340 |
+
.jstree-modern .jstree-wholerow {
|
341 |
+
transition: background-color .15s, box-shadow .15s
|
342 |
+
}
|
343 |
+
|
344 |
+
.jstree-modern .jstree-hovered {
|
345 |
+
background: #e7f4f9;
|
346 |
+
border-radius: 2px;
|
347 |
+
box-shadow: inset 0 0 1px #ccc
|
348 |
+
}
|
349 |
+
|
350 |
+
.jstree-modern .jstree-context {
|
351 |
+
background: #e7f4f9;
|
352 |
+
border-radius: 2px;
|
353 |
+
box-shadow: inset 0 0 1px #ccc
|
354 |
+
}
|
355 |
+
|
356 |
+
.jstree-modern .jstree-clicked {
|
357 |
+
background: #beebff;
|
358 |
+
border-radius: 2px;
|
359 |
+
box-shadow: inset 0 0 1px #999
|
360 |
+
}
|
361 |
+
|
362 |
+
.jstree-modern .jstree-no-icons .jstree-anchor>.jstree-themeicon {
|
363 |
+
display: none
|
364 |
+
}
|
365 |
+
|
366 |
+
.jstree-modern .jstree-disabled {
|
367 |
+
background: 0 0;
|
368 |
+
color: #666
|
369 |
+
}
|
370 |
+
|
371 |
+
.jstree-modern .jstree-disabled.jstree-hovered {
|
372 |
+
background: 0 0;
|
373 |
+
box-shadow: none
|
374 |
+
}
|
375 |
+
|
376 |
+
.jstree-modern .jstree-disabled.jstree-clicked {
|
377 |
+
background: #efefef
|
378 |
+
}
|
379 |
+
|
380 |
+
.jstree-modern .jstree-disabled>.jstree-icon {
|
381 |
+
opacity: .8;
|
382 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
383 |
+
filter: gray;
|
384 |
+
-webkit-filter: grayscale(100%)
|
385 |
+
}
|
386 |
+
|
387 |
+
.jstree-modern .jstree-search {
|
388 |
+
font-style: italic;
|
389 |
+
color: #8b0000;
|
390 |
+
font-weight: 700
|
391 |
+
}
|
392 |
+
|
393 |
+
.jstree-modern .jstree-no-checkboxes .jstree-checkbox {
|
394 |
+
display: none!important
|
395 |
+
}
|
396 |
+
|
397 |
+
.jstree-modern.jstree-checkbox-no-clicked .jstree-clicked {
|
398 |
+
background: 0 0;
|
399 |
+
box-shadow: none
|
400 |
+
}
|
401 |
+
|
402 |
+
.jstree-modern.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {
|
403 |
+
background: #e7f4f9
|
404 |
+
}
|
405 |
+
|
406 |
+
.jstree-modern.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked {
|
407 |
+
background: 0 0
|
408 |
+
}
|
409 |
+
|
410 |
+
.jstree-modern.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {
|
411 |
+
background: #e7f4f9
|
412 |
+
}
|
413 |
+
|
414 |
+
.jstree-modern>.jstree-striped {
|
415 |
+
min-width: 100%;
|
416 |
+
display: inline-block;
|
417 |
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat
|
418 |
+
}
|
419 |
+
|
420 |
+
.jstree-modern>.jstree-wholerow-ul .jstree-hovered,
|
421 |
+
.jstree-modern>.jstree-wholerow-ul .jstree-clicked {
|
422 |
+
background: 0 0;
|
423 |
+
box-shadow: none;
|
424 |
+
border-radius: 0
|
425 |
+
}
|
426 |
+
|
427 |
+
.jstree-modern .jstree-wholerow {
|
428 |
+
-moz-box-sizing: border-box;
|
429 |
+
-webkit-box-sizing: border-box;
|
430 |
+
box-sizing: border-box
|
431 |
+
}
|
432 |
+
|
433 |
+
.jstree-modern .jstree-wholerow-hovered {
|
434 |
+
background: #e7f4f9
|
435 |
+
}
|
436 |
+
|
437 |
+
.jstree-modern .jstree-wholerow-clicked {
|
438 |
+
background: #beebff;
|
439 |
+
background: -webkit-linear-gradient(top, #beebff 0, #a8e4ff 100%);
|
440 |
+
background: linear-gradient(to bottom, #beebff 0, #a8e4ff 100%)
|
441 |
+
}
|
442 |
+
|
443 |
+
.jstree-modern .jstree-node {
|
444 |
+
min-height: 24px;
|
445 |
+
line-height: 24px;
|
446 |
+
margin-left: 24px;
|
447 |
+
min-width: 24px
|
448 |
+
}
|
449 |
+
|
450 |
+
.jstree-modern .jstree-anchor {
|
451 |
+
line-height: 24px;
|
452 |
+
height: 24px
|
453 |
+
}
|
454 |
+
|
455 |
+
.jstree-modern .jstree-icon {
|
456 |
+
width: 24px;
|
457 |
+
height: 24px;
|
458 |
+
line-height: 24px
|
459 |
+
}
|
460 |
+
|
461 |
+
.jstree-modern .jstree-icon:empty {
|
462 |
+
width: 24px;
|
463 |
+
height: 24px;
|
464 |
+
line-height: 24px
|
465 |
+
}
|
466 |
+
|
467 |
+
.jstree-modern.jstree-rtl .jstree-node {
|
468 |
+
margin-right: 24px
|
469 |
+
}
|
470 |
+
|
471 |
+
.jstree-modern .jstree-wholerow {
|
472 |
+
height: 24px
|
473 |
+
}
|
474 |
+
|
475 |
+
.jstree-modern .jstree-node,
|
476 |
+
.jstree-modern .jstree-icon {
|
477 |
+
background-image: url(32px.png)
|
478 |
+
}
|
479 |
+
|
480 |
+
.jstree-modern .jstree-node {
|
481 |
+
background-position: -292px -4px;
|
482 |
+
background-repeat: repeat-y
|
483 |
+
}
|
484 |
+
|
485 |
+
.jstree-modern .jstree-last {
|
486 |
+
background: 0 0
|
487 |
+
}
|
488 |
+
|
489 |
+
.jstree-modern .jstree-open>.jstree-ocl {
|
490 |
+
background-position: -132px -4px
|
491 |
+
}
|
492 |
+
|
493 |
+
.jstree-modern .jstree-closed>.jstree-ocl {
|
494 |
+
background-position: -100px -4px
|
495 |
+
}
|
496 |
+
|
497 |
+
.jstree-modern .jstree-leaf>.jstree-ocl {
|
498 |
+
background-position: -68px -4px
|
499 |
+
}
|
500 |
+
|
501 |
+
.jstree-modern .jstree-themeicon {
|
502 |
+
background-position: -260px -4px
|
503 |
+
}
|
504 |
+
|
505 |
+
.jstree-modern>.jstree-no-dots .jstree-node,
|
506 |
+
.jstree-modern>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
507 |
+
background: 0 0
|
508 |
+
}
|
509 |
+
|
510 |
+
.jstree-modern>.jstree-no-dots .jstree-open>.jstree-ocl {
|
511 |
+
background-position: -36px -4px
|
512 |
+
}
|
513 |
+
|
514 |
+
.jstree-modern>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
515 |
+
background-position: -4px -4px
|
516 |
+
}
|
517 |
+
|
518 |
+
.jstree-modern .jstree-disabled {
|
519 |
+
background: 0 0
|
520 |
+
}
|
521 |
+
|
522 |
+
.jstree-modern .jstree-disabled.jstree-hovered {
|
523 |
+
background: 0 0
|
524 |
+
}
|
525 |
+
|
526 |
+
.jstree-modern .jstree-disabled.jstree-clicked {
|
527 |
+
background: #efefef
|
528 |
+
}
|
529 |
+
|
530 |
+
.jstree-modern .jstree-checkbox {
|
531 |
+
background-position: -164px -4px
|
532 |
+
}
|
533 |
+
|
534 |
+
.jstree-modern .jstree-checkbox:hover {
|
535 |
+
background-position: -164px -36px
|
536 |
+
}
|
537 |
+
|
538 |
+
.jstree-modern.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,
|
539 |
+
.jstree-modern .jstree-checked>.jstree-checkbox {
|
540 |
+
background-position: -228px -4px
|
541 |
+
}
|
542 |
+
|
543 |
+
.jstree-modern.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,
|
544 |
+
.jstree-modern .jstree-checked>.jstree-checkbox:hover {
|
545 |
+
background-position: -228px -36px
|
546 |
+
}
|
547 |
+
|
548 |
+
.jstree-modern .jstree-anchor>.jstree-undetermined {
|
549 |
+
background-position: -196px -4px
|
550 |
+
}
|
551 |
+
|
552 |
+
.jstree-modern .jstree-anchor>.jstree-undetermined:hover {
|
553 |
+
background-position: -196px -36px
|
554 |
+
}
|
555 |
+
|
556 |
+
.jstree-modern .jstree-checkbox-disabled {
|
557 |
+
opacity: .8;
|
558 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
559 |
+
filter: gray;
|
560 |
+
-webkit-filter: grayscale(100%)
|
561 |
+
}
|
562 |
+
|
563 |
+
.jstree-modern>.jstree-striped {
|
564 |
+
background-size: auto 48px
|
565 |
+
}
|
566 |
+
|
567 |
+
.jstree-modern.jstree-rtl .jstree-node {
|
568 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);
|
569 |
+
background-position: 100% 1px;
|
570 |
+
background-repeat: repeat-y
|
571 |
+
}
|
572 |
+
|
573 |
+
.jstree-modern.jstree-rtl .jstree-last {
|
574 |
+
background: 0 0
|
575 |
+
}
|
576 |
+
|
577 |
+
.jstree-modern.jstree-rtl .jstree-open>.jstree-ocl {
|
578 |
+
background-position: -132px -36px
|
579 |
+
}
|
580 |
+
|
581 |
+
.jstree-modern.jstree-rtl .jstree-closed>.jstree-ocl {
|
582 |
+
background-position: -100px -36px
|
583 |
+
}
|
584 |
+
|
585 |
+
.jstree-modern.jstree-rtl .jstree-leaf>.jstree-ocl {
|
586 |
+
background-position: -68px -36px
|
587 |
+
}
|
588 |
+
|
589 |
+
.jstree-modern.jstree-rtl>.jstree-no-dots .jstree-node,
|
590 |
+
.jstree-modern.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
591 |
+
background: 0 0
|
592 |
+
}
|
593 |
+
|
594 |
+
.jstree-modern.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl {
|
595 |
+
background-position: -36px -36px
|
596 |
+
}
|
597 |
+
|
598 |
+
.jstree-modern.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
599 |
+
background-position: -4px -36px
|
600 |
+
}
|
601 |
+
|
602 |
+
.jstree-modern .jstree-themeicon-custom {
|
603 |
+
background-color: transparent;
|
604 |
+
background-image: none;
|
605 |
+
background-position: 0 0
|
606 |
+
}
|
607 |
+
|
608 |
+
.jstree-modern>.jstree-container-ul .jstree-loading>.jstree-ocl {
|
609 |
+
background: url(throbber.gif) center center no-repeat
|
610 |
+
}
|
611 |
+
|
612 |
+
.jstree-modern .jstree-file {
|
613 |
+
background: url(32px.png) -100px -68px no-repeat
|
614 |
+
}
|
615 |
+
|
616 |
+
.jstree-modern .jstree-folder {
|
617 |
+
background: url(32px.png) -260px -4px no-repeat
|
618 |
+
}
|
619 |
+
|
620 |
+
.jstree-modern>.jstree-container-ul>.jstree-node {
|
621 |
+
margin-left: 0;
|
622 |
+
margin-right: 0
|
623 |
+
}
|
624 |
+
|
625 |
+
#jstree-dnd.jstree-modern {
|
626 |
+
line-height: 24px;
|
627 |
+
padding: 0 4px
|
628 |
+
}
|
629 |
+
|
630 |
+
#jstree-dnd.jstree-modern .jstree-ok,
|
631 |
+
#jstree-dnd.jstree-modern .jstree-er {
|
632 |
+
background-image: url(32px.png);
|
633 |
+
background-repeat: no-repeat;
|
634 |
+
background-color: transparent
|
635 |
+
}
|
636 |
+
|
637 |
+
#jstree-dnd.jstree-modern i {
|
638 |
+
background: 0 0;
|
639 |
+
width: 24px;
|
640 |
+
height: 24px;
|
641 |
+
line-height: 24px
|
642 |
+
}
|
643 |
+
|
644 |
+
#jstree-dnd.jstree-modern .jstree-ok {
|
645 |
+
background-position: -4px -68px
|
646 |
+
}
|
647 |
+
|
648 |
+
#jstree-dnd.jstree-modern .jstree-er {
|
649 |
+
background-position: -36px -68px
|
650 |
+
}
|
651 |
+
|
652 |
+
.jstree-modern.jstree-rtl .jstree-node {
|
653 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)
|
654 |
+
}
|
655 |
+
|
656 |
+
.jstree-modern.jstree-rtl .jstree-last {
|
657 |
+
background: 0 0
|
658 |
+
}
|
659 |
+
|
660 |
+
.jstree-modern-small .jstree-node {
|
661 |
+
min-height: 18px;
|
662 |
+
line-height: 18px;
|
663 |
+
margin-left: 18px;
|
664 |
+
min-width: 18px
|
665 |
+
}
|
666 |
+
|
667 |
+
.jstree-modern-small .jstree-anchor {
|
668 |
+
line-height: 18px;
|
669 |
+
height: 18px
|
670 |
+
}
|
671 |
+
|
672 |
+
.jstree-modern-small .jstree-icon {
|
673 |
+
width: 18px;
|
674 |
+
height: 18px;
|
675 |
+
line-height: 18px
|
676 |
+
}
|
677 |
+
|
678 |
+
.jstree-modern-small .jstree-icon:empty {
|
679 |
+
width: 18px;
|
680 |
+
height: 18px;
|
681 |
+
line-height: 18px
|
682 |
+
}
|
683 |
+
|
684 |
+
.jstree-modern-small.jstree-rtl .jstree-node {
|
685 |
+
margin-right: 18px
|
686 |
+
}
|
687 |
+
|
688 |
+
.jstree-modern-small .jstree-wholerow {
|
689 |
+
height: 18px
|
690 |
+
}
|
691 |
+
|
692 |
+
.jstree-modern-small .jstree-node,
|
693 |
+
.jstree-modern-small .jstree-icon {
|
694 |
+
background-image: url(32px.png)
|
695 |
+
}
|
696 |
+
|
697 |
+
.jstree-modern-small .jstree-node {
|
698 |
+
background-position: -295px -7px;
|
699 |
+
background-repeat: repeat-y
|
700 |
+
}
|
701 |
+
|
702 |
+
.jstree-modern-small .jstree-last {
|
703 |
+
background: 0 0
|
704 |
+
}
|
705 |
+
|
706 |
+
.jstree-modern-small .jstree-open>.jstree-ocl {
|
707 |
+
background-position: -135px -7px
|
708 |
+
}
|
709 |
+
|
710 |
+
.jstree-modern-small .jstree-closed>.jstree-ocl {
|
711 |
+
background-position: -103px -7px
|
712 |
+
}
|
713 |
+
|
714 |
+
.jstree-modern-small .jstree-leaf>.jstree-ocl {
|
715 |
+
background-position: -71px -7px
|
716 |
+
}
|
717 |
+
|
718 |
+
.jstree-modern-small .jstree-themeicon {
|
719 |
+
background-position: -263px -7px
|
720 |
+
}
|
721 |
+
|
722 |
+
.jstree-modern-small>.jstree-no-dots .jstree-node,
|
723 |
+
.jstree-modern-small>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
724 |
+
background: 0 0
|
725 |
+
}
|
726 |
+
|
727 |
+
.jstree-modern-small>.jstree-no-dots .jstree-open>.jstree-ocl {
|
728 |
+
background-position: -39px -7px
|
729 |
+
}
|
730 |
+
|
731 |
+
.jstree-modern-small>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
732 |
+
background-position: -7px -7px
|
733 |
+
}
|
734 |
+
|
735 |
+
.jstree-modern-small .jstree-disabled {
|
736 |
+
background: 0 0
|
737 |
+
}
|
738 |
+
|
739 |
+
.jstree-modern-small .jstree-disabled.jstree-hovered {
|
740 |
+
background: 0 0
|
741 |
+
}
|
742 |
+
|
743 |
+
.jstree-modern-small .jstree-disabled.jstree-clicked {
|
744 |
+
background: #efefef
|
745 |
+
}
|
746 |
+
|
747 |
+
.jstree-modern-small .jstree-checkbox {
|
748 |
+
background-position: -167px -7px
|
749 |
+
}
|
750 |
+
|
751 |
+
.jstree-modern-small .jstree-checkbox:hover {
|
752 |
+
background-position: -167px -39px
|
753 |
+
}
|
754 |
+
|
755 |
+
.jstree-modern-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,
|
756 |
+
.jstree-modern-small .jstree-checked>.jstree-checkbox {
|
757 |
+
background-position: -231px -7px
|
758 |
+
}
|
759 |
+
|
760 |
+
.jstree-modern-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,
|
761 |
+
.jstree-modern-small .jstree-checked>.jstree-checkbox:hover {
|
762 |
+
background-position: -231px -39px
|
763 |
+
}
|
764 |
+
|
765 |
+
.jstree-modern-small .jstree-anchor>.jstree-undetermined {
|
766 |
+
background-position: -199px -7px
|
767 |
+
}
|
768 |
+
|
769 |
+
.jstree-modern-small .jstree-anchor>.jstree-undetermined:hover {
|
770 |
+
background-position: -199px -39px
|
771 |
+
}
|
772 |
+
|
773 |
+
.jstree-modern-small .jstree-checkbox-disabled {
|
774 |
+
opacity: .8;
|
775 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
776 |
+
filter: gray;
|
777 |
+
-webkit-filter: grayscale(100%)
|
778 |
+
}
|
779 |
+
|
780 |
+
.jstree-modern-small>.jstree-striped {
|
781 |
+
background-size: auto 36px
|
782 |
+
}
|
783 |
+
|
784 |
+
.jstree-modern-small.jstree-rtl .jstree-node {
|
785 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);
|
786 |
+
background-position: 100% 1px;
|
787 |
+
background-repeat: repeat-y
|
788 |
+
}
|
789 |
+
|
790 |
+
.jstree-modern-small.jstree-rtl .jstree-last {
|
791 |
+
background: 0 0
|
792 |
+
}
|
793 |
+
|
794 |
+
.jstree-modern-small.jstree-rtl .jstree-open>.jstree-ocl {
|
795 |
+
background-position: -135px -39px
|
796 |
+
}
|
797 |
+
|
798 |
+
.jstree-modern-small.jstree-rtl .jstree-closed>.jstree-ocl {
|
799 |
+
background-position: -103px -39px
|
800 |
+
}
|
801 |
+
|
802 |
+
.jstree-modern-small.jstree-rtl .jstree-leaf>.jstree-ocl {
|
803 |
+
background-position: -71px -39px
|
804 |
+
}
|
805 |
+
|
806 |
+
.jstree-modern-small.jstree-rtl>.jstree-no-dots .jstree-node,
|
807 |
+
.jstree-modern-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
808 |
+
background: 0 0
|
809 |
+
}
|
810 |
+
|
811 |
+
.jstree-modern-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl {
|
812 |
+
background-position: -39px -39px
|
813 |
+
}
|
814 |
+
|
815 |
+
.jstree-modern-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
816 |
+
background-position: -7px -39px
|
817 |
+
}
|
818 |
+
|
819 |
+
.jstree-modern-small .jstree-themeicon-custom {
|
820 |
+
background-color: transparent;
|
821 |
+
background-image: none;
|
822 |
+
background-position: 0 0
|
823 |
+
}
|
824 |
+
|
825 |
+
.jstree-modern-small>.jstree-container-ul .jstree-loading>.jstree-ocl {
|
826 |
+
background: url(throbber.gif) center center no-repeat
|
827 |
+
}
|
828 |
+
|
829 |
+
.jstree-modern-small .jstree-file {
|
830 |
+
background: url(32px.png) -103px -71px no-repeat
|
831 |
+
}
|
832 |
+
|
833 |
+
.jstree-modern-small .jstree-folder {
|
834 |
+
background: url(32px.png) -263px -7px no-repeat
|
835 |
+
}
|
836 |
+
|
837 |
+
.jstree-modern-small>.jstree-container-ul>.jstree-node {
|
838 |
+
margin-left: 0;
|
839 |
+
margin-right: 0
|
840 |
+
}
|
841 |
+
|
842 |
+
#jstree-dnd.jstree-modern-small {
|
843 |
+
line-height: 18px;
|
844 |
+
padding: 0 4px
|
845 |
+
}
|
846 |
+
|
847 |
+
#jstree-dnd.jstree-modern-small .jstree-ok,
|
848 |
+
#jstree-dnd.jstree-modern-small .jstree-er {
|
849 |
+
background-image: url(32px.png);
|
850 |
+
background-repeat: no-repeat;
|
851 |
+
background-color: transparent
|
852 |
+
}
|
853 |
+
|
854 |
+
#jstree-dnd.jstree-modern-small i {
|
855 |
+
background: 0 0;
|
856 |
+
width: 18px;
|
857 |
+
height: 18px;
|
858 |
+
line-height: 18px
|
859 |
+
}
|
860 |
+
|
861 |
+
#jstree-dnd.jstree-modern-small .jstree-ok {
|
862 |
+
background-position: -7px -71px
|
863 |
+
}
|
864 |
+
|
865 |
+
#jstree-dnd.jstree-modern-small .jstree-er {
|
866 |
+
background-position: -39px -71px
|
867 |
+
}
|
868 |
+
|
869 |
+
.jstree-modern-small.jstree-rtl .jstree-node {
|
870 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)
|
871 |
+
}
|
872 |
+
|
873 |
+
.jstree-modern-small.jstree-rtl .jstree-last {
|
874 |
+
background: 0 0
|
875 |
+
}
|
876 |
+
|
877 |
+
.jstree-modern-large .jstree-node {
|
878 |
+
min-height: 32px;
|
879 |
+
line-height: 32px;
|
880 |
+
margin-left: 32px;
|
881 |
+
min-width: 32px
|
882 |
+
}
|
883 |
+
|
884 |
+
.jstree-modern-large .jstree-anchor {
|
885 |
+
line-height: 32px;
|
886 |
+
height: 32px
|
887 |
+
}
|
888 |
+
|
889 |
+
.jstree-modern-large .jstree-icon {
|
890 |
+
width: 32px;
|
891 |
+
height: 32px;
|
892 |
+
line-height: 32px
|
893 |
+
}
|
894 |
+
|
895 |
+
.jstree-modern-large .jstree-icon:empty {
|
896 |
+
width: 32px;
|
897 |
+
height: 32px;
|
898 |
+
line-height: 32px
|
899 |
+
}
|
900 |
+
|
901 |
+
.jstree-modern-large.jstree-rtl .jstree-node {
|
902 |
+
margin-right: 32px
|
903 |
+
}
|
904 |
+
|
905 |
+
.jstree-modern-large .jstree-wholerow {
|
906 |
+
height: 32px
|
907 |
+
}
|
908 |
+
|
909 |
+
.jstree-modern-large .jstree-node,
|
910 |
+
.jstree-modern-large .jstree-icon {
|
911 |
+
background-image: url(32px.png)
|
912 |
+
}
|
913 |
+
|
914 |
+
.jstree-modern-large .jstree-node {
|
915 |
+
background-position: -288px 0;
|
916 |
+
background-repeat: repeat-y
|
917 |
+
}
|
918 |
+
|
919 |
+
.jstree-modern-large .jstree-last {
|
920 |
+
background: 0 0
|
921 |
+
}
|
922 |
+
|
923 |
+
.jstree-modern-large .jstree-open>.jstree-ocl {
|
924 |
+
background-position: -128px 0
|
925 |
+
}
|
926 |
+
|
927 |
+
.jstree-modern-large .jstree-closed>.jstree-ocl {
|
928 |
+
background-position: -96px 0
|
929 |
+
}
|
930 |
+
|
931 |
+
.jstree-modern-large .jstree-leaf>.jstree-ocl {
|
932 |
+
background-position: -64px 0
|
933 |
+
}
|
934 |
+
|
935 |
+
.jstree-modern-large .jstree-themeicon {
|
936 |
+
background-position: -256px 0
|
937 |
+
}
|
938 |
+
|
939 |
+
.jstree-modern-large>.jstree-no-dots .jstree-node,
|
940 |
+
.jstree-modern-large>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
941 |
+
background: 0 0
|
942 |
+
}
|
943 |
+
|
944 |
+
.jstree-modern-large>.jstree-no-dots .jstree-open>.jstree-ocl {
|
945 |
+
background-position: -32px 0
|
946 |
+
}
|
947 |
+
|
948 |
+
.jstree-modern-large>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
949 |
+
background-position: 0 0
|
950 |
+
}
|
951 |
+
|
952 |
+
.jstree-modern-large .jstree-disabled {
|
953 |
+
background: 0 0
|
954 |
+
}
|
955 |
+
|
956 |
+
.jstree-modern-large .jstree-disabled.jstree-hovered {
|
957 |
+
background: 0 0
|
958 |
+
}
|
959 |
+
|
960 |
+
.jstree-modern-large .jstree-disabled.jstree-clicked {
|
961 |
+
background: #efefef
|
962 |
+
}
|
963 |
+
|
964 |
+
.jstree-modern-large .jstree-checkbox {
|
965 |
+
background-position: -160px 0
|
966 |
+
}
|
967 |
+
|
968 |
+
.jstree-modern-large .jstree-checkbox:hover {
|
969 |
+
background-position: -160px -32px
|
970 |
+
}
|
971 |
+
|
972 |
+
.jstree-modern-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,
|
973 |
+
.jstree-modern-large .jstree-checked>.jstree-checkbox {
|
974 |
+
background-position: -224px 0
|
975 |
+
}
|
976 |
+
|
977 |
+
.jstree-modern-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,
|
978 |
+
.jstree-modern-large .jstree-checked>.jstree-checkbox:hover {
|
979 |
+
background-position: -224px -32px
|
980 |
+
}
|
981 |
+
|
982 |
+
.jstree-modern-large .jstree-anchor>.jstree-undetermined {
|
983 |
+
background-position: -192px 0
|
984 |
+
}
|
985 |
+
|
986 |
+
.jstree-modern-large .jstree-anchor>.jstree-undetermined:hover {
|
987 |
+
background-position: -192px -32px
|
988 |
+
}
|
989 |
+
|
990 |
+
.jstree-modern-large .jstree-checkbox-disabled {
|
991 |
+
opacity: .8;
|
992 |
+
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");
|
993 |
+
filter: gray;
|
994 |
+
-webkit-filter: grayscale(100%)
|
995 |
+
}
|
996 |
+
|
997 |
+
.jstree-modern-large>.jstree-striped {
|
998 |
+
background-size: auto 64px
|
999 |
+
}
|
1000 |
+
|
1001 |
+
.jstree-modern-large.jstree-rtl .jstree-node {
|
1002 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);
|
1003 |
+
background-position: 100% 1px;
|
1004 |
+
background-repeat: repeat-y
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
.jstree-modern-large.jstree-rtl .jstree-last {
|
1008 |
+
background: 0 0
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
.jstree-modern-large.jstree-rtl .jstree-open>.jstree-ocl {
|
1012 |
+
background-position: -128px -32px
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
.jstree-modern-large.jstree-rtl .jstree-closed>.jstree-ocl {
|
1016 |
+
background-position: -96px -32px
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
.jstree-modern-large.jstree-rtl .jstree-leaf>.jstree-ocl {
|
1020 |
+
background-position: -64px -32px
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
.jstree-modern-large.jstree-rtl>.jstree-no-dots .jstree-node,
|
1024 |
+
.jstree-modern-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl {
|
1025 |
+
background: 0 0
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
.jstree-modern-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl {
|
1029 |
+
background-position: -32px -32px
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
.jstree-modern-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl {
|
1033 |
+
background-position: 0 -32px
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
.jstree-modern-large .jstree-themeicon-custom {
|
1037 |
+
background-color: transparent;
|
1038 |
+
background-image: none;
|
1039 |
+
background-position: 0 0
|
1040 |
+
}
|
1041 |
+
|
1042 |
+
.jstree-modern-large>.jstree-container-ul .jstree-loading>.jstree-ocl {
|
1043 |
+
background: url(throbber.gif) center center no-repeat
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
.jstree-modern-large .jstree-file {
|
1047 |
+
background: url(32px.png) -96px -64px no-repeat
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
.jstree-modern-large .jstree-folder {
|
1051 |
+
background: url(32px.png) -256px 0 no-repeat
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
.jstree-modern-large>.jstree-container-ul>.jstree-node {
|
1055 |
+
margin-left: 0;
|
1056 |
+
margin-right: 0
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
#jstree-dnd.jstree-modern-large {
|
1060 |
+
line-height: 32px;
|
1061 |
+
padding: 0 4px
|
1062 |
+
}
|
1063 |
+
|
1064 |
+
#jstree-dnd.jstree-modern-large .jstree-ok,
|
1065 |
+
#jstree-dnd.jstree-modern-large .jstree-er {
|
1066 |
+
background-image: url(32px.png);
|
1067 |
+
background-repeat: no-repeat;
|
1068 |
+
background-color: transparent
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
#jstree-dnd.jstree-modern-large i {
|
1072 |
+
background: 0 0;
|
1073 |
+
width: 32px;
|
1074 |
+
height: 32px;
|
1075 |
+
line-height: 32px
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
#jstree-dnd.jstree-modern-large .jstree-ok {
|
1079 |
+
background-position: 0 -64px
|
1080 |
+
}
|
1081 |
+
|
1082 |
+
#jstree-dnd.jstree-modern-large .jstree-er {
|
1083 |
+
background-position: -32px -64px
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
.jstree-modern-large.jstree-rtl .jstree-node {
|
1087 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)
|
1088 |
+
}
|
1089 |
+
|
1090 |
+
.jstree-modern-large.jstree-rtl .jstree-last {
|
1091 |
+
background: 0 0
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
@media (max-width:768px) {
|
1095 |
+
#jstree-dnd.jstree-dnd-responsive {
|
1096 |
+
line-height: 40px;
|
1097 |
+
font-weight: 700;
|
1098 |
+
font-size: 1.1em;
|
1099 |
+
text-shadow: 1px 1px #fff
|
1100 |
+
}
|
1101 |
+
#jstree-dnd.jstree-dnd-responsive>i {
|
1102 |
+
background: 0 0;
|
1103 |
+
width: 40px;
|
1104 |
+
height: 40px
|
1105 |
+
}
|
1106 |
+
#jstree-dnd.jstree-dnd-responsive>.jstree-ok {
|
1107 |
+
background-image: url(40px.png);
|
1108 |
+
background-position: 0 -200px;
|
1109 |
+
background-size: 120px 240px
|
1110 |
+
}
|
1111 |
+
#jstree-dnd.jstree-dnd-responsive>.jstree-er {
|
1112 |
+
background-image: url(40px.png);
|
1113 |
+
background-position: -40px -200px;
|
1114 |
+
background-size: 120px 240px
|
1115 |
+
}
|
1116 |
+
#jstree-marker.jstree-dnd-responsive {
|
1117 |
+
border-left-width: 10px;
|
1118 |
+
border-top-width: 10px;
|
1119 |
+
border-bottom-width: 10px;
|
1120 |
+
margin-top: -10px
|
1121 |
+
}
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
@media (max-width:768px) {
|
1125 |
+
.jstree-modern-responsive .jstree-icon {
|
1126 |
+
background-image: url(40px.png)
|
1127 |
+
}
|
1128 |
+
.jstree-modern-responsive .jstree-node,
|
1129 |
+
.jstree-modern-responsive .jstree-leaf>.jstree-ocl {
|
1130 |
+
background: 0 0
|
1131 |
+
}
|
1132 |
+
.jstree-modern-responsive .jstree-node {
|
1133 |
+
min-height: 40px;
|
1134 |
+
line-height: 40px;
|
1135 |
+
margin-left: 40px;
|
1136 |
+
min-width: 40px;
|
1137 |
+
white-space: nowrap
|
1138 |
+
}
|
1139 |
+
.jstree-modern-responsive .jstree-anchor {
|
1140 |
+
line-height: 40px;
|
1141 |
+
height: 40px
|
1142 |
+
}
|
1143 |
+
.jstree-modern-responsive .jstree-icon,
|
1144 |
+
.jstree-modern-responsive .jstree-icon:empty {
|
1145 |
+
width: 40px;
|
1146 |
+
height: 40px;
|
1147 |
+
line-height: 40px
|
1148 |
+
}
|
1149 |
+
.jstree-modern-responsive>.jstree-container-ul>.jstree-node {
|
1150 |
+
margin-left: 0
|
1151 |
+
}
|
1152 |
+
.jstree-modern-responsive.jstree-rtl .jstree-node {
|
1153 |
+
margin-left: 0;
|
1154 |
+
margin-right: 40px
|
1155 |
+
}
|
1156 |
+
.jstree-modern-responsive.jstree-rtl .jstree-container-ul>.jstree-node {
|
1157 |
+
margin-right: 0
|
1158 |
+
}
|
1159 |
+
.jstree-modern-responsive .jstree-ocl,
|
1160 |
+
.jstree-modern-responsive .jstree-themeicon,
|
1161 |
+
.jstree-modern-responsive .jstree-checkbox {
|
1162 |
+
background-size: 120px 240px
|
1163 |
+
}
|
1164 |
+
.jstree-modern-responsive .jstree-leaf>.jstree-ocl {
|
1165 |
+
background: 0 0
|
1166 |
+
}
|
1167 |
+
.jstree-modern-responsive .jstree-open>.jstree-ocl {
|
1168 |
+
background-position: 0 0!important
|
1169 |
+
}
|
1170 |
+
.jstree-modern-responsive .jstree-closed>.jstree-ocl {
|
1171 |
+
background-position: 0 -40px!important
|
1172 |
+
}
|
1173 |
+
.jstree-modern-responsive.jstree-rtl .jstree-closed>.jstree-ocl {
|
1174 |
+
background-position: -40px 0!important
|
1175 |
+
}
|
1176 |
+
.jstree-modern-responsive .jstree-themeicon {
|
1177 |
+
background-position: -40px -40px
|
1178 |
+
}
|
1179 |
+
.jstree-modern-responsive .jstree-checkbox,
|
1180 |
+
.jstree-modern-responsive .jstree-checkbox:hover {
|
1181 |
+
background-position: -40px -80px
|
1182 |
+
}
|
1183 |
+
.jstree-modern-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,
|
1184 |
+
.jstree-modern-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,
|
1185 |
+
.jstree-modern-responsive .jstree-checked>.jstree-checkbox,
|
1186 |
+
.jstree-modern-responsive .jstree-checked>.jstree-checkbox:hover {
|
1187 |
+
background-position: 0 -80px
|
1188 |
+
}
|
1189 |
+
.jstree-modern-responsive .jstree-anchor>.jstree-undetermined,
|
1190 |
+
.jstree-modern-responsive .jstree-anchor>.jstree-undetermined:hover {
|
1191 |
+
background-position: 0 -120px
|
1192 |
+
}
|
1193 |
+
.jstree-modern-responsive .jstree-anchor {
|
1194 |
+
font-weight: 700;
|
1195 |
+
font-size: 1.1em;
|
1196 |
+
text-shadow: 1px 1px #fff
|
1197 |
+
}
|
1198 |
+
.jstree-modern-responsive>.jstree-striped {
|
1199 |
+
background: 0 0
|
1200 |
+
}
|
1201 |
+
.jstree-modern-responsive .jstree-wholerow {
|
1202 |
+
border-top: 1px solid rgba(255, 255, 255, .7);
|
1203 |
+
border-bottom: 1px solid rgba(64, 64, 64, .2);
|
1204 |
+
background: #ebebeb;
|
1205 |
+
height: 40px
|
1206 |
+
}
|
1207 |
+
.jstree-modern-responsive .jstree-wholerow-hovered {
|
1208 |
+
background: #e7f4f9
|
1209 |
+
}
|
1210 |
+
.jstree-modern-responsive .jstree-wholerow-clicked {
|
1211 |
+
background: #beebff
|
1212 |
+
}
|
1213 |
+
.jstree-modern-responsive .jstree-children .jstree-last>.jstree-wholerow {
|
1214 |
+
box-shadow: inset 0 -6px 3px -5px #666
|
1215 |
+
}
|
1216 |
+
.jstree-modern-responsive .jstree-children .jstree-open>.jstree-wholerow {
|
1217 |
+
box-shadow: inset 0 6px 3px -5px #666;
|
1218 |
+
border-top: 0
|
1219 |
+
}
|
1220 |
+
.jstree-modern-responsive .jstree-children .jstree-open+.jstree-open {
|
1221 |
+
box-shadow: none
|
1222 |
+
}
|
1223 |
+
.jstree-modern-responsive .jstree-node,
|
1224 |
+
.jstree-modern-responsive .jstree-icon,
|
1225 |
+
.jstree-modern-responsive .jstree-node>.jstree-ocl,
|
1226 |
+
.jstree-modern-responsive .jstree-themeicon,
|
1227 |
+
.jstree-modern-responsive .jstree-checkbox {
|
1228 |
+
background-image: url(40px.png);
|
1229 |
+
background-size: 120px 240px
|
1230 |
+
}
|
1231 |
+
.jstree-modern-responsive .jstree-node {
|
1232 |
+
background-position: -80px 0;
|
1233 |
+
background-repeat: repeat-y
|
1234 |
+
}
|
1235 |
+
.jstree-modern-responsive .jstree-last {
|
1236 |
+
background: 0 0
|
1237 |
+
}
|
1238 |
+
.jstree-modern-responsive .jstree-leaf>.jstree-ocl {
|
1239 |
+
background-position: -40px -120px
|
1240 |
+
}
|
1241 |
+
.jstree-modern-responsive .jstree-last>.jstree-ocl {
|
1242 |
+
background-position: -40px -160px
|
1243 |
+
}
|
1244 |
+
.jstree-modern-responsive .jstree-themeicon-custom {
|
1245 |
+
background-color: transparent;
|
1246 |
+
background-image: none;
|
1247 |
+
background-position: 0 0
|
1248 |
+
}
|
1249 |
+
.jstree-modern-responsive .jstree-file {
|
1250 |
+
background: url(40px.png) 0 -160px no-repeat;
|
1251 |
+
background-size: 120px 240px
|
1252 |
+
}
|
1253 |
+
.jstree-modern-responsive .jstree-folder {
|
1254 |
+
background: url(40px.png) -40px -40px no-repeat;
|
1255 |
+
background-size: 120px 240px
|
1256 |
+
}
|
1257 |
+
.jstree-modern-responsive>.jstree-container-ul>.jstree-node {
|
1258 |
+
margin-left: 0;
|
1259 |
+
margin-right: 0
|
1260 |
+
}
|
1261 |
+
}
|
assets/jstree/themes/modern/style.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-modern .jstree-node,.jstree-modern .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-modern .jstree-anchor,.jstree-modern .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-modern .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-modern .jstree-context{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-modern .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-modern .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-modern .jstree-disabled{background:0 0;color:#666}.jstree-modern .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-modern .jstree-disabled.jstree-clicked{background:#efefef}.jstree-modern .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-modern .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-modern .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-modern.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-modern.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-modern.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-modern.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-modern>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-modern>.jstree-wholerow-ul .jstree-hovered,.jstree-modern>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-modern .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-modern .jstree-wholerow-hovered{background:#e7f4f9}.jstree-modern .jstree-wholerow-clicked{background:#beebff;background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-modern .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-modern .jstree-anchor{line-height:24px;height:24px}.jstree-modern .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-modern .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-modern.jstree-rtl .jstree-node{margin-right:24px}.jstree-modern .jstree-wholerow{height:24px}.jstree-modern .jstree-node,.jstree-modern .jstree-icon{background-image:url(32px.png)}.jstree-modern .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-modern .jstree-last{background:0 0}.jstree-modern .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-modern .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-modern .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-modern .jstree-themeicon{background-position:-260px -4px}.jstree-modern>.jstree-no-dots .jstree-node,.jstree-modern>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-modern>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-modern>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-modern .jstree-disabled{background:0 0}.jstree-modern .jstree-disabled.jstree-hovered{background:0 0}.jstree-modern .jstree-disabled.jstree-clicked{background:#efefef}.jstree-modern .jstree-checkbox{background-position:-164px -4px}.jstree-modern .jstree-checkbox:hover{background-position:-164px -36px}.jstree-modern.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-modern .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-modern.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-modern .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-modern .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-modern .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-modern .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-modern>.jstree-striped{background-size:auto 48px}.jstree-modern.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-modern.jstree-rtl .jstree-last{background:0 0}.jstree-modern.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-modern.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-modern.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-modern.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-modern.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-modern.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-modern.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-modern .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-modern>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-modern .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-modern .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-modern>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-modern{line-height:24px;padding:0 4px}#jstree-dnd.jstree-modern .jstree-ok,#jstree-dnd.jstree-modern .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-modern i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-modern .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-modern .jstree-er{background-position:-36px -68px}.jstree-modern.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-modern.jstree-rtl .jstree-last{background:0 0}.jstree-modern-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-modern-small .jstree-anchor{line-height:18px;height:18px}.jstree-modern-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-modern-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-modern-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-modern-small .jstree-wholerow{height:18px}.jstree-modern-small .jstree-node,.jstree-modern-small .jstree-icon{background-image:url(32px.png)}.jstree-modern-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-modern-small .jstree-last{background:0 0}.jstree-modern-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-modern-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-modern-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-modern-small .jstree-themeicon{background-position:-263px -7px}.jstree-modern-small>.jstree-no-dots .jstree-node,.jstree-modern-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-modern-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-modern-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-modern-small .jstree-disabled{background:0 0}.jstree-modern-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-modern-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-modern-small .jstree-checkbox{background-position:-167px -7px}.jstree-modern-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-modern-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-modern-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-modern-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-modern-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-modern-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-modern-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-modern-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-modern-small>.jstree-striped{background-size:auto 36px}.jstree-modern-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-modern-small.jstree-rtl .jstree-last{background:0 0}.jstree-modern-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-modern-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-modern-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-modern-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-modern-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-modern-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-modern-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-modern-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-modern-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-modern-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-modern-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-modern-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-modern-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-modern-small .jstree-ok,#jstree-dnd.jstree-modern-small .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-modern-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-modern-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-modern-small .jstree-er{background-position:-39px -71px}.jstree-modern-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-modern-small.jstree-rtl .jstree-last{background:0 0}.jstree-modern-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-modern-large .jstree-anchor{line-height:32px;height:32px}.jstree-modern-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-modern-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-modern-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-modern-large .jstree-wholerow{height:32px}.jstree-modern-large .jstree-node,.jstree-modern-large .jstree-icon{background-image:url(32px.png)}.jstree-modern-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-modern-large .jstree-last{background:0 0}.jstree-modern-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-modern-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-modern-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-modern-large .jstree-themeicon{background-position:-256px 0}.jstree-modern-large>.jstree-no-dots .jstree-node,.jstree-modern-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-modern-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-modern-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-modern-large .jstree-disabled{background:0 0}.jstree-modern-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-modern-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-modern-large .jstree-checkbox{background-position:-160px 0}.jstree-modern-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-modern-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-modern-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-modern-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-modern-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-modern-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-modern-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-modern-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-modern-large>.jstree-striped{background-size:auto 64px}.jstree-modern-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-modern-large.jstree-rtl .jstree-last{background:0 0}.jstree-modern-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-modern-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-modern-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-modern-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-modern-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-modern-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-modern-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-modern-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-modern-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-modern-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-modern-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-modern-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-modern-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-modern-large .jstree-ok,#jstree-dnd.jstree-modern-large .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-modern-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-modern-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-modern-large .jstree-er{background-position:-32px -64px}.jstree-modern-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-modern-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}.jstree-modern-responsive .jstree-icon{background-image:url(40px.png)}.jstree-modern-responsive .jstree-node,.jstree-modern-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-modern-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-modern-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-modern-responsive .jstree-icon,.jstree-modern-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-modern-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-modern-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px}.jstree-modern-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-modern-responsive .jstree-ocl,.jstree-modern-responsive .jstree-themeicon,.jstree-modern-responsive .jstree-checkbox{background-size:120px 240px}.jstree-modern-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-modern-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-modern-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-modern-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-modern-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-modern-responsive .jstree-checkbox,.jstree-modern-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-modern-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-modern-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-modern-responsive .jstree-checked>.jstree-checkbox,.jstree-modern-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-modern-responsive .jstree-anchor>.jstree-undetermined,.jstree-modern-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-modern-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-modern-responsive>.jstree-striped{background:0 0}.jstree-modern-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-modern-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-modern-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-modern-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-modern-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-modern-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-modern-responsive .jstree-node,.jstree-modern-responsive .jstree-icon,.jstree-modern-responsive .jstree-node>.jstree-ocl,.jstree-modern-responsive .jstree-themeicon,.jstree-modern-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 240px}.jstree-modern-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-modern-responsive .jstree-last{background:0 0}.jstree-modern-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-modern-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-modern-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-modern-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-modern-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-modern-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}
|
assets/jstree/themes/modern/throbber.gif
ADDED
Binary file
|
assets/perfect-scrollbar/perfect-scrollbar.css
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Container style
|
3 |
+
*/
|
4 |
+
.ps {
|
5 |
+
overflow: hidden !important;
|
6 |
+
overflow-anchor: none;
|
7 |
+
-ms-overflow-style: none;
|
8 |
+
touch-action: auto;
|
9 |
+
-ms-touch-action: auto;
|
10 |
+
}
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Scrollbar rail styles
|
14 |
+
*/
|
15 |
+
.ps__rail-x {
|
16 |
+
display: none;
|
17 |
+
opacity: 0;
|
18 |
+
transition: background-color .2s linear, opacity .2s linear;
|
19 |
+
-webkit-transition: background-color .2s linear, opacity .2s linear;
|
20 |
+
height: 15px;
|
21 |
+
/* there must be 'bottom' or 'top' for ps__rail-x */
|
22 |
+
bottom: 0px;
|
23 |
+
/* please don't change 'position' */
|
24 |
+
position: absolute;
|
25 |
+
}
|
26 |
+
|
27 |
+
.ps__rail-y {
|
28 |
+
display: none;
|
29 |
+
opacity: 0;
|
30 |
+
transition: background-color .2s linear, opacity .2s linear;
|
31 |
+
-webkit-transition: background-color .2s linear, opacity .2s linear;
|
32 |
+
width: 15px;
|
33 |
+
/* there must be 'right' or 'left' for ps__rail-y */
|
34 |
+
right: 0;
|
35 |
+
/* please don't change 'position' */
|
36 |
+
position: absolute;
|
37 |
+
}
|
38 |
+
|
39 |
+
.ps--active-x > .ps__rail-x,
|
40 |
+
.ps--active-y > .ps__rail-y {
|
41 |
+
display: block;
|
42 |
+
background-color: transparent;
|
43 |
+
}
|
44 |
+
|
45 |
+
.ps:hover > .ps__rail-x,
|
46 |
+
.ps:hover > .ps__rail-y,
|
47 |
+
.ps--focus > .ps__rail-x,
|
48 |
+
.ps--focus > .ps__rail-y,
|
49 |
+
.ps--scrolling-x > .ps__rail-x,
|
50 |
+
.ps--scrolling-y > .ps__rail-y {
|
51 |
+
opacity: 0.6;
|
52 |
+
}
|
53 |
+
|
54 |
+
.ps .ps__rail-x:hover,
|
55 |
+
.ps .ps__rail-y:hover,
|
56 |
+
.ps .ps__rail-x:focus,
|
57 |
+
.ps .ps__rail-y:focus,
|
58 |
+
.ps .ps__rail-x.ps--clicking,
|
59 |
+
.ps .ps__rail-y.ps--clicking {
|
60 |
+
background-color: #eee;
|
61 |
+
opacity: 0.9;
|
62 |
+
}
|
63 |
+
|
64 |
+
/*
|
65 |
+
* Scrollbar thumb styles
|
66 |
+
*/
|
67 |
+
.ps__thumb-x {
|
68 |
+
background-color: #aaa;
|
69 |
+
border-radius: 6px;
|
70 |
+
transition: background-color .2s linear, height .2s ease-in-out;
|
71 |
+
-webkit-transition: background-color .2s linear, height .2s ease-in-out;
|
72 |
+
height: 6px;
|
73 |
+
/* there must be 'bottom' for ps__thumb-x */
|
74 |
+
bottom: 2px;
|
75 |
+
/* please don't change 'position' */
|
76 |
+
position: absolute;
|
77 |
+
}
|
78 |
+
|
79 |
+
.ps__thumb-y {
|
80 |
+
background-color: #aaa;
|
81 |
+
border-radius: 6px;
|
82 |
+
transition: background-color .2s linear, width .2s ease-in-out;
|
83 |
+
-webkit-transition: background-color .2s linear, width .2s ease-in-out;
|
84 |
+
width: 6px;
|
85 |
+
/* there must be 'right' for ps__thumb-y */
|
86 |
+
right: 2px;
|
87 |
+
/* please don't change 'position' */
|
88 |
+
position: absolute;
|
89 |
+
}
|
90 |
+
|
91 |
+
.ps__rail-x:hover > .ps__thumb-x,
|
92 |
+
.ps__rail-x:focus > .ps__thumb-x,
|
93 |
+
.ps__rail-x.ps--clicking .ps__thumb-x {
|
94 |
+
background-color: #999;
|
95 |
+
height: 11px;
|
96 |
+
}
|
97 |
+
|
98 |
+
.ps__rail-y:hover > .ps__thumb-y,
|
99 |
+
.ps__rail-y:focus > .ps__thumb-y,
|
100 |
+
.ps__rail-y.ps--clicking .ps__thumb-y {
|
101 |
+
background-color: #999;
|
102 |
+
width: 11px;
|
103 |
+
}
|
104 |
+
|
105 |
+
/* MS supports */
|
106 |
+
@supports (-ms-overflow-style: none) {
|
107 |
+
.ps {
|
108 |
+
overflow: auto !important;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
113 |
+
.ps {
|
114 |
+
overflow: auto !important;
|
115 |
+
}
|
116 |
+
}
|
assets/perfect-scrollbar/perfect-scrollbar.js
ADDED
@@ -0,0 +1,1324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* perfect-scrollbar v1.4.0
|
3 |
+
* (c) 2018 Hyunje Jun
|
4 |
+
* @license MIT
|
5 |
+
*/
|
6 |
+
(function (global, factory) {
|
7 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
8 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
9 |
+
(global.PerfectScrollbar = factory());
|
10 |
+
}(this, (function () { 'use strict';
|
11 |
+
|
12 |
+
function get(element) {
|
13 |
+
return getComputedStyle(element);
|
14 |
+
}
|
15 |
+
|
16 |
+
function set(element, obj) {
|
17 |
+
for (var key in obj) {
|
18 |
+
var val = obj[key];
|
19 |
+
if (typeof val === 'number') {
|
20 |
+
val = val + "px";
|
21 |
+
}
|
22 |
+
element.style[key] = val;
|
23 |
+
}
|
24 |
+
return element;
|
25 |
+
}
|
26 |
+
|
27 |
+
function div(className) {
|
28 |
+
var div = document.createElement('div');
|
29 |
+
div.className = className;
|
30 |
+
return div;
|
31 |
+
}
|
32 |
+
|
33 |
+
var elMatches =
|
34 |
+
typeof Element !== 'undefined' &&
|
35 |
+
(Element.prototype.matches ||
|
36 |
+
Element.prototype.webkitMatchesSelector ||
|
37 |
+
Element.prototype.mozMatchesSelector ||
|
38 |
+
Element.prototype.msMatchesSelector);
|
39 |
+
|
40 |
+
function matches(element, query) {
|
41 |
+
if (!elMatches) {
|
42 |
+
throw new Error('No element matching method supported');
|
43 |
+
}
|
44 |
+
|
45 |
+
return elMatches.call(element, query);
|
46 |
+
}
|
47 |
+
|
48 |
+
function remove(element) {
|
49 |
+
if (element.remove) {
|
50 |
+
element.remove();
|
51 |
+
} else {
|
52 |
+
if (element.parentNode) {
|
53 |
+
element.parentNode.removeChild(element);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
function queryChildren(element, selector) {
|
59 |
+
return Array.prototype.filter.call(element.children, function (child) { return matches(child, selector); }
|
60 |
+
);
|
61 |
+
}
|
62 |
+
|
63 |
+
var cls = {
|
64 |
+
main: 'ps',
|
65 |
+
element: {
|
66 |
+
thumb: function (x) { return ("ps__thumb-" + x); },
|
67 |
+
rail: function (x) { return ("ps__rail-" + x); },
|
68 |
+
consuming: 'ps__child--consume',
|
69 |
+
},
|
70 |
+
state: {
|
71 |
+
focus: 'ps--focus',
|
72 |
+
clicking: 'ps--clicking',
|
73 |
+
active: function (x) { return ("ps--active-" + x); },
|
74 |
+
scrolling: function (x) { return ("ps--scrolling-" + x); },
|
75 |
+
},
|
76 |
+
};
|
77 |
+
|
78 |
+
/*
|
79 |
+
* Helper methods
|
80 |
+
*/
|
81 |
+
var scrollingClassTimeout = { x: null, y: null };
|
82 |
+
|
83 |
+
function addScrollingClass(i, x) {
|
84 |
+
var classList = i.element.classList;
|
85 |
+
var className = cls.state.scrolling(x);
|
86 |
+
|
87 |
+
if (classList.contains(className)) {
|
88 |
+
clearTimeout(scrollingClassTimeout[x]);
|
89 |
+
} else {
|
90 |
+
classList.add(className);
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
function removeScrollingClass(i, x) {
|
95 |
+
scrollingClassTimeout[x] = setTimeout(
|
96 |
+
function () { return i.isAlive && i.element.classList.remove(cls.state.scrolling(x)); },
|
97 |
+
i.settings.scrollingThreshold
|
98 |
+
);
|
99 |
+
}
|
100 |
+
|
101 |
+
function setScrollingClassInstantly(i, x) {
|
102 |
+
addScrollingClass(i, x);
|
103 |
+
removeScrollingClass(i, x);
|
104 |
+
}
|
105 |
+
|
106 |
+
var EventElement = function EventElement(element) {
|
107 |
+
this.element = element;
|
108 |
+
this.handlers = {};
|
109 |
+
};
|
110 |
+
|
111 |
+
var prototypeAccessors = { isEmpty: { configurable: true } };
|
112 |
+
|
113 |
+
EventElement.prototype.bind = function bind (eventName, handler) {
|
114 |
+
if (typeof this.handlers[eventName] === 'undefined') {
|
115 |
+
this.handlers[eventName] = [];
|
116 |
+
}
|
117 |
+
this.handlers[eventName].push(handler);
|
118 |
+
this.element.addEventListener(eventName, handler, false);
|
119 |
+
};
|
120 |
+
|
121 |
+
EventElement.prototype.unbind = function unbind (eventName, target) {
|
122 |
+
var this$1 = this;
|
123 |
+
|
124 |
+
this.handlers[eventName] = this.handlers[eventName].filter(function (handler) {
|
125 |
+
if (target && handler !== target) {
|
126 |
+
return true;
|
127 |
+
}
|
128 |
+
this$1.element.removeEventListener(eventName, handler, false);
|
129 |
+
return false;
|
130 |
+
});
|
131 |
+
};
|
132 |
+
|
133 |
+
EventElement.prototype.unbindAll = function unbindAll () {
|
134 |
+
var this$1 = this;
|
135 |
+
|
136 |
+
for (var name in this$1.handlers) {
|
137 |
+
this$1.unbind(name);
|
138 |
+
}
|
139 |
+
};
|
140 |
+
|
141 |
+
prototypeAccessors.isEmpty.get = function () {
|
142 |
+
var this$1 = this;
|
143 |
+
|
144 |
+
return Object.keys(this.handlers).every(
|
145 |
+
function (key) { return this$1.handlers[key].length === 0; }
|
146 |
+
);
|
147 |
+
};
|
148 |
+
|
149 |
+
Object.defineProperties( EventElement.prototype, prototypeAccessors );
|
150 |
+
|
151 |
+
var EventManager = function EventManager() {
|
152 |
+
this.eventElements = [];
|
153 |
+
};
|
154 |
+
|
155 |
+
EventManager.prototype.eventElement = function eventElement (element) {
|
156 |
+
var ee = this.eventElements.filter(function (ee) { return ee.element === element; })[0];
|
157 |
+
if (!ee) {
|
158 |
+
ee = new EventElement(element);
|
159 |
+
this.eventElements.push(ee);
|
160 |
+
}
|
161 |
+
return ee;
|
162 |
+
};
|
163 |
+
|
164 |
+
EventManager.prototype.bind = function bind (element, eventName, handler) {
|
165 |
+
this.eventElement(element).bind(eventName, handler);
|
166 |
+
};
|
167 |
+
|
168 |
+
EventManager.prototype.unbind = function unbind (element, eventName, handler) {
|
169 |
+
var ee = this.eventElement(element);
|
170 |
+
ee.unbind(eventName, handler);
|
171 |
+
|
172 |
+
if (ee.isEmpty) {
|
173 |
+
// remove
|
174 |
+
this.eventElements.splice(this.eventElements.indexOf(ee), 1);
|
175 |
+
}
|
176 |
+
};
|
177 |
+
|
178 |
+
EventManager.prototype.unbindAll = function unbindAll () {
|
179 |
+
this.eventElements.forEach(function (e) { return e.unbindAll(); });
|
180 |
+
this.eventElements = [];
|
181 |
+
};
|
182 |
+
|
183 |
+
EventManager.prototype.once = function once (element, eventName, handler) {
|
184 |
+
var ee = this.eventElement(element);
|
185 |
+
var onceHandler = function (evt) {
|
186 |
+
ee.unbind(eventName, onceHandler);
|
187 |
+
handler(evt);
|
188 |
+
};
|
189 |
+
ee.bind(eventName, onceHandler);
|
190 |
+
};
|
191 |
+
|
192 |
+
function createEvent(name) {
|
193 |
+
if (typeof window.CustomEvent === 'function') {
|
194 |
+
return new CustomEvent(name);
|
195 |
+
} else {
|
196 |
+
var evt = document.createEvent('CustomEvent');
|
197 |
+
evt.initCustomEvent(name, false, false, undefined);
|
198 |
+
return evt;
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
var processScrollDiff = function(
|
203 |
+
i,
|
204 |
+
axis,
|
205 |
+
diff,
|
206 |
+
useScrollingClass,
|
207 |
+
forceFireReachEvent
|
208 |
+
) {
|
209 |
+
if ( useScrollingClass === void 0 ) useScrollingClass = true;
|
210 |
+
if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;
|
211 |
+
|
212 |
+
var fields;
|
213 |
+
if (axis === 'top') {
|
214 |
+
fields = [
|
215 |
+
'contentHeight',
|
216 |
+
'containerHeight',
|
217 |
+
'scrollTop',
|
218 |
+
'y',
|
219 |
+
'up',
|
220 |
+
'down' ];
|
221 |
+
} else if (axis === 'left') {
|
222 |
+
fields = [
|
223 |
+
'contentWidth',
|
224 |
+
'containerWidth',
|
225 |
+
'scrollLeft',
|
226 |
+
'x',
|
227 |
+
'left',
|
228 |
+
'right' ];
|
229 |
+
} else {
|
230 |
+
throw new Error('A proper axis should be provided');
|
231 |
+
}
|
232 |
+
|
233 |
+
processScrollDiff$1(i, diff, fields, useScrollingClass, forceFireReachEvent);
|
234 |
+
};
|
235 |
+
|
236 |
+
function processScrollDiff$1(
|
237 |
+
i,
|
238 |
+
diff,
|
239 |
+
ref,
|
240 |
+
useScrollingClass,
|
241 |
+
forceFireReachEvent
|
242 |
+
) {
|
243 |
+
var contentHeight = ref[0];
|
244 |
+
var containerHeight = ref[1];
|
245 |
+
var scrollTop = ref[2];
|
246 |
+
var y = ref[3];
|
247 |
+
var up = ref[4];
|
248 |
+
var down = ref[5];
|
249 |
+
if ( useScrollingClass === void 0 ) useScrollingClass = true;
|
250 |
+
if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;
|
251 |
+
|
252 |
+
var element = i.element;
|
253 |
+
|
254 |
+
// reset reach
|
255 |
+
i.reach[y] = null;
|
256 |
+
|
257 |
+
// 1 for subpixel rounding
|
258 |
+
if (element[scrollTop] < 1) {
|
259 |
+
i.reach[y] = 'start';
|
260 |
+
}
|
261 |
+
|
262 |
+
// 1 for subpixel rounding
|
263 |
+
if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {
|
264 |
+
i.reach[y] = 'end';
|
265 |
+
}
|
266 |
+
|
267 |
+
if (diff) {
|
268 |
+
element.dispatchEvent(createEvent(("ps-scroll-" + y)));
|
269 |
+
|
270 |
+
if (diff < 0) {
|
271 |
+
element.dispatchEvent(createEvent(("ps-scroll-" + up)));
|
272 |
+
} else if (diff > 0) {
|
273 |
+
element.dispatchEvent(createEvent(("ps-scroll-" + down)));
|
274 |
+
}
|
275 |
+
|
276 |
+
if (useScrollingClass) {
|
277 |
+
setScrollingClassInstantly(i, y);
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
if (i.reach[y] && (diff || forceFireReachEvent)) {
|
282 |
+
element.dispatchEvent(createEvent(("ps-" + y + "-reach-" + (i.reach[y]))));
|
283 |
+
}
|
284 |
+
}
|
285 |
+
|
286 |
+
function toInt(x) {
|
287 |
+
return parseInt(x, 10) || 0;
|
288 |
+
}
|
289 |
+
|
290 |
+
function isEditable(el) {
|
291 |
+
return (
|
292 |
+
matches(el, 'input,[contenteditable]') ||
|
293 |
+
matches(el, 'select,[contenteditable]') ||
|
294 |
+
matches(el, 'textarea,[contenteditable]') ||
|
295 |
+
matches(el, 'button,[contenteditable]')
|
296 |
+
);
|
297 |
+
}
|
298 |
+
|
299 |
+
function outerWidth(element) {
|
300 |
+
var styles = get(element);
|
301 |
+
return (
|
302 |
+
toInt(styles.width) +
|
303 |
+
toInt(styles.paddingLeft) +
|
304 |
+
toInt(styles.paddingRight) +
|
305 |
+
toInt(styles.borderLeftWidth) +
|
306 |
+
toInt(styles.borderRightWidth)
|
307 |
+
);
|
308 |
+
}
|
309 |
+
|
310 |
+
var env = {
|
311 |
+
isWebKit:
|
312 |
+
typeof document !== 'undefined' &&
|
313 |
+
'WebkitAppearance' in document.documentElement.style,
|
314 |
+
supportsTouch:
|
315 |
+
typeof window !== 'undefined' &&
|
316 |
+
('ontouchstart' in window ||
|
317 |
+
(window.DocumentTouch && document instanceof window.DocumentTouch)),
|
318 |
+
supportsIePointer:
|
319 |
+
typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,
|
320 |
+
isChrome:
|
321 |
+
typeof navigator !== 'undefined' &&
|
322 |
+
/Chrome/i.test(navigator && navigator.userAgent),
|
323 |
+
};
|
324 |
+
|
325 |
+
var updateGeometry = function(i) {
|
326 |
+
var element = i.element;
|
327 |
+
var roundedScrollTop = Math.floor(element.scrollTop);
|
328 |
+
|
329 |
+
i.containerWidth = element.clientWidth;
|
330 |
+
i.containerHeight = element.clientHeight;
|
331 |
+
i.contentWidth = element.scrollWidth;
|
332 |
+
i.contentHeight = element.scrollHeight;
|
333 |
+
|
334 |
+
if (!element.contains(i.scrollbarXRail)) {
|
335 |
+
// clean up and append
|
336 |
+
queryChildren(element, cls.element.rail('x')).forEach(function (el) { return remove(el); }
|
337 |
+
);
|
338 |
+
element.appendChild(i.scrollbarXRail);
|
339 |
+
}
|
340 |
+
if (!element.contains(i.scrollbarYRail)) {
|
341 |
+
// clean up and append
|
342 |
+
queryChildren(element, cls.element.rail('y')).forEach(function (el) { return remove(el); }
|
343 |
+
);
|
344 |
+
element.appendChild(i.scrollbarYRail);
|
345 |
+
}
|
346 |
+
|
347 |
+
if (
|
348 |
+
!i.settings.suppressScrollX &&
|
349 |
+
i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth
|
350 |
+
) {
|
351 |
+
i.scrollbarXActive = true;
|
352 |
+
i.railXWidth = i.containerWidth - i.railXMarginWidth;
|
353 |
+
i.railXRatio = i.containerWidth / i.railXWidth;
|
354 |
+
i.scrollbarXWidth = getThumbSize(
|
355 |
+
i,
|
356 |
+
toInt(i.railXWidth * i.containerWidth / i.contentWidth)
|
357 |
+
);
|
358 |
+
i.scrollbarXLeft = toInt(
|
359 |
+
(i.negativeScrollAdjustment + element.scrollLeft) *
|
360 |
+
(i.railXWidth - i.scrollbarXWidth) /
|
361 |
+
(i.contentWidth - i.containerWidth)
|
362 |
+
);
|
363 |
+
} else {
|
364 |
+
i.scrollbarXActive = false;
|
365 |
+
}
|
366 |
+
|
367 |
+
if (
|
368 |
+
!i.settings.suppressScrollY &&
|
369 |
+
i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight
|
370 |
+
) {
|
371 |
+
i.scrollbarYActive = true;
|
372 |
+
i.railYHeight = i.containerHeight - i.railYMarginHeight;
|
373 |
+
i.railYRatio = i.containerHeight / i.railYHeight;
|
374 |
+
i.scrollbarYHeight = getThumbSize(
|
375 |
+
i,
|
376 |
+
toInt(i.railYHeight * i.containerHeight / i.contentHeight)
|
377 |
+
);
|
378 |
+
i.scrollbarYTop = toInt(
|
379 |
+
roundedScrollTop *
|
380 |
+
(i.railYHeight - i.scrollbarYHeight) /
|
381 |
+
(i.contentHeight - i.containerHeight)
|
382 |
+
);
|
383 |
+
} else {
|
384 |
+
i.scrollbarYActive = false;
|
385 |
+
}
|
386 |
+
|
387 |
+
if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {
|
388 |
+
i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;
|
389 |
+
}
|
390 |
+
if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {
|
391 |
+
i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;
|
392 |
+
}
|
393 |
+
|
394 |
+
updateCss(element, i);
|
395 |
+
|
396 |
+
if (i.scrollbarXActive) {
|
397 |
+
element.classList.add(cls.state.active('x'));
|
398 |
+
} else {
|
399 |
+
element.classList.remove(cls.state.active('x'));
|
400 |
+
i.scrollbarXWidth = 0;
|
401 |
+
i.scrollbarXLeft = 0;
|
402 |
+
element.scrollLeft = 0;
|
403 |
+
}
|
404 |
+
if (i.scrollbarYActive) {
|
405 |
+
element.classList.add(cls.state.active('y'));
|
406 |
+
} else {
|
407 |
+
element.classList.remove(cls.state.active('y'));
|
408 |
+
i.scrollbarYHeight = 0;
|
409 |
+
i.scrollbarYTop = 0;
|
410 |
+
element.scrollTop = 0;
|
411 |
+
}
|
412 |
+
};
|
413 |
+
|
414 |
+
function getThumbSize(i, thumbSize) {
|
415 |
+
if (i.settings.minScrollbarLength) {
|
416 |
+
thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);
|
417 |
+
}
|
418 |
+
if (i.settings.maxScrollbarLength) {
|
419 |
+
thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);
|
420 |
+
}
|
421 |
+
return thumbSize;
|
422 |
+
}
|
423 |
+
|
424 |
+
function updateCss(element, i) {
|
425 |
+
var xRailOffset = { width: i.railXWidth };
|
426 |
+
var roundedScrollTop = Math.floor(element.scrollTop);
|
427 |
+
|
428 |
+
if (i.isRtl) {
|
429 |
+
xRailOffset.left =
|
430 |
+
i.negativeScrollAdjustment +
|
431 |
+
element.scrollLeft +
|
432 |
+
i.containerWidth -
|
433 |
+
i.contentWidth;
|
434 |
+
} else {
|
435 |
+
xRailOffset.left = element.scrollLeft;
|
436 |
+
}
|
437 |
+
if (i.isScrollbarXUsingBottom) {
|
438 |
+
xRailOffset.bottom = i.scrollbarXBottom - roundedScrollTop;
|
439 |
+
} else {
|
440 |
+
xRailOffset.top = i.scrollbarXTop + roundedScrollTop;
|
441 |
+
}
|
442 |
+
set(i.scrollbarXRail, xRailOffset);
|
443 |
+
|
444 |
+
var yRailOffset = { top: roundedScrollTop, height: i.railYHeight };
|
445 |
+
if (i.isScrollbarYUsingRight) {
|
446 |
+
if (i.isRtl) {
|
447 |
+
yRailOffset.right =
|
448 |
+
i.contentWidth -
|
449 |
+
(i.negativeScrollAdjustment + element.scrollLeft) -
|
450 |
+
i.scrollbarYRight -
|
451 |
+
i.scrollbarYOuterWidth;
|
452 |
+
} else {
|
453 |
+
yRailOffset.right = i.scrollbarYRight - element.scrollLeft;
|
454 |
+
}
|
455 |
+
} else {
|
456 |
+
if (i.isRtl) {
|
457 |
+
yRailOffset.left =
|
458 |
+
i.negativeScrollAdjustment +
|
459 |
+
element.scrollLeft +
|
460 |
+
i.containerWidth * 2 -
|
461 |
+
i.contentWidth -
|
462 |
+
i.scrollbarYLeft -
|
463 |
+
i.scrollbarYOuterWidth;
|
464 |
+
} else {
|
465 |
+
yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;
|
466 |
+
}
|
467 |
+
}
|
468 |
+
set(i.scrollbarYRail, yRailOffset);
|
469 |
+
|
470 |
+
set(i.scrollbarX, {
|
471 |
+
left: i.scrollbarXLeft,
|
472 |
+
width: i.scrollbarXWidth - i.railBorderXWidth,
|
473 |
+
});
|
474 |
+
set(i.scrollbarY, {
|
475 |
+
top: i.scrollbarYTop,
|
476 |
+
height: i.scrollbarYHeight - i.railBorderYWidth,
|
477 |
+
});
|
478 |
+
}
|
479 |
+
|
480 |
+
var clickRail = function(i) {
|
481 |
+
i.event.bind(i.scrollbarY, 'mousedown', function (e) { return e.stopPropagation(); });
|
482 |
+
i.event.bind(i.scrollbarYRail, 'mousedown', function (e) {
|
483 |
+
var positionTop =
|
484 |
+
e.pageY -
|
485 |
+
window.pageYOffset -
|
486 |
+
i.scrollbarYRail.getBoundingClientRect().top;
|
487 |
+
var direction = positionTop > i.scrollbarYTop ? 1 : -1;
|
488 |
+
|
489 |
+
i.element.scrollTop += direction * i.containerHeight;
|
490 |
+
updateGeometry(i);
|
491 |
+
|
492 |
+
e.stopPropagation();
|
493 |
+
});
|
494 |
+
|
495 |
+
i.event.bind(i.scrollbarX, 'mousedown', function (e) { return e.stopPropagation(); });
|
496 |
+
i.event.bind(i.scrollbarXRail, 'mousedown', function (e) {
|
497 |
+
var positionLeft =
|
498 |
+
e.pageX -
|
499 |
+
window.pageXOffset -
|
500 |
+
i.scrollbarXRail.getBoundingClientRect().left;
|
501 |
+
var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;
|
502 |
+
|
503 |
+
i.element.scrollLeft += direction * i.containerWidth;
|
504 |
+
updateGeometry(i);
|
505 |
+
|
506 |
+
e.stopPropagation();
|
507 |
+
});
|
508 |
+
};
|
509 |
+
|
510 |
+
var dragThumb = function(i) {
|
511 |
+
bindMouseScrollHandler(i, [
|
512 |
+
'containerWidth',
|
513 |
+
'contentWidth',
|
514 |
+
'pageX',
|
515 |
+
'railXWidth',
|
516 |
+
'scrollbarX',
|
517 |
+
'scrollbarXWidth',
|
518 |
+
'scrollLeft',
|
519 |
+
'x',
|
520 |
+
'scrollbarXRail' ]);
|
521 |
+
bindMouseScrollHandler(i, [
|
522 |
+
'containerHeight',
|
523 |
+
'contentHeight',
|
524 |
+
'pageY',
|
525 |
+
'railYHeight',
|
526 |
+
'scrollbarY',
|
527 |
+
'scrollbarYHeight',
|
528 |
+
'scrollTop',
|
529 |
+
'y',
|
530 |
+
'scrollbarYRail' ]);
|
531 |
+
};
|
532 |
+
|
533 |
+
function bindMouseScrollHandler(
|
534 |
+
i,
|
535 |
+
ref
|
536 |
+
) {
|
537 |
+
var containerHeight = ref[0];
|
538 |
+
var contentHeight = ref[1];
|
539 |
+
var pageY = ref[2];
|
540 |
+
var railYHeight = ref[3];
|
541 |
+
var scrollbarY = ref[4];
|
542 |
+
var scrollbarYHeight = ref[5];
|
543 |
+
var scrollTop = ref[6];
|
544 |
+
var y = ref[7];
|
545 |
+
var scrollbarYRail = ref[8];
|
546 |
+
|
547 |
+
var element = i.element;
|
548 |
+
|
549 |
+
var startingScrollTop = null;
|
550 |
+
var startingMousePageY = null;
|
551 |
+
var scrollBy = null;
|
552 |
+
|
553 |
+
function mouseMoveHandler(e) {
|
554 |
+
element[scrollTop] =
|
555 |
+
startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);
|
556 |
+
addScrollingClass(i, y);
|
557 |
+
updateGeometry(i);
|
558 |
+
|
559 |
+
e.stopPropagation();
|
560 |
+
e.preventDefault();
|
561 |
+
}
|
562 |
+
|
563 |
+
function mouseUpHandler() {
|
564 |
+
removeScrollingClass(i, y);
|
565 |
+
i[scrollbarYRail].classList.remove(cls.state.clicking);
|
566 |
+
i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
|
567 |
+
}
|
568 |
+
|
569 |
+
i.event.bind(i[scrollbarY], 'mousedown', function (e) {
|
570 |
+
startingScrollTop = element[scrollTop];
|
571 |
+
startingMousePageY = e[pageY];
|
572 |
+
scrollBy =
|
573 |
+
(i[contentHeight] - i[containerHeight]) /
|
574 |
+
(i[railYHeight] - i[scrollbarYHeight]);
|
575 |
+
|
576 |
+
i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);
|
577 |
+
i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);
|
578 |
+
|
579 |
+
i[scrollbarYRail].classList.add(cls.state.clicking);
|
580 |
+
|
581 |
+
e.stopPropagation();
|
582 |
+
e.preventDefault();
|
583 |
+
});
|
584 |
+
}
|
585 |
+
|
586 |
+
var keyboard = function(i) {
|
587 |
+
var element = i.element;
|
588 |
+
|
589 |
+
var elementHovered = function () { return matches(element, ':hover'); };
|
590 |
+
var scrollbarFocused = function () { return matches(i.scrollbarX, ':focus') || matches(i.scrollbarY, ':focus'); };
|
591 |
+
|
592 |
+
function shouldPreventDefault(deltaX, deltaY) {
|
593 |
+
var scrollTop = Math.floor(element.scrollTop);
|
594 |
+
if (deltaX === 0) {
|
595 |
+
if (!i.scrollbarYActive) {
|
596 |
+
return false;
|
597 |
+
}
|
598 |
+
if (
|
599 |
+
(scrollTop === 0 && deltaY > 0) ||
|
600 |
+
(scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)
|
601 |
+
) {
|
602 |
+
return !i.settings.wheelPropagation;
|
603 |
+
}
|
604 |
+
}
|
605 |
+
|
606 |
+
var scrollLeft = element.scrollLeft;
|
607 |
+
if (deltaY === 0) {
|
608 |
+
if (!i.scrollbarXActive) {
|
609 |
+
return false;
|
610 |
+
}
|
611 |
+
if (
|
612 |
+
(scrollLeft === 0 && deltaX < 0) ||
|
613 |
+
(scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)
|
614 |
+
) {
|
615 |
+
return !i.settings.wheelPropagation;
|
616 |
+
}
|
617 |
+
}
|
618 |
+
return true;
|
619 |
+
}
|
620 |
+
|
621 |
+
i.event.bind(i.ownerDocument, 'keydown', function (e) {
|
622 |
+
if (
|
623 |
+
(e.isDefaultPrevented && e.isDefaultPrevented()) ||
|
624 |
+
e.defaultPrevented
|
625 |
+
) {
|
626 |
+
return;
|
627 |
+
}
|
628 |
+
|
629 |
+
if (!elementHovered() && !scrollbarFocused()) {
|
630 |
+
return;
|
631 |
+
}
|
632 |
+
|
633 |
+
var activeElement = document.activeElement
|
634 |
+
? document.activeElement
|
635 |
+
: i.ownerDocument.activeElement;
|
636 |
+
if (activeElement) {
|
637 |
+
if (activeElement.tagName === 'IFRAME') {
|
638 |
+
activeElement = activeElement.contentDocument.activeElement;
|
639 |
+
} else {
|
640 |
+
// go deeper if element is a webcomponent
|
641 |
+
while (activeElement.shadowRoot) {
|
642 |
+
activeElement = activeElement.shadowRoot.activeElement;
|
643 |
+
}
|
644 |
+
}
|
645 |
+
if (isEditable(activeElement)) {
|
646 |
+
return;
|
647 |
+
}
|
648 |
+
}
|
649 |
+
|
650 |
+
var deltaX = 0;
|
651 |
+
var deltaY = 0;
|
652 |
+
|
653 |
+
switch (e.which) {
|
654 |
+
case 37: // left
|
655 |
+
if (e.metaKey) {
|
656 |
+
deltaX = -i.contentWidth;
|
657 |
+
} else if (e.altKey) {
|
658 |
+
deltaX = -i.containerWidth;
|
659 |
+
} else {
|
660 |
+
deltaX = -30;
|
661 |
+
}
|
662 |
+
break;
|
663 |
+
case 38: // up
|
664 |
+
if (e.metaKey) {
|
665 |
+
deltaY = i.contentHeight;
|
666 |
+
} else if (e.altKey) {
|
667 |
+
deltaY = i.containerHeight;
|
668 |
+
} else {
|
669 |
+
deltaY = 30;
|
670 |
+
}
|
671 |
+
break;
|
672 |
+
case 39: // right
|
673 |
+
if (e.metaKey) {
|
674 |
+
deltaX = i.contentWidth;
|
675 |
+
} else if (e.altKey) {
|
676 |
+
deltaX = i.containerWidth;
|
677 |
+
} else {
|
678 |
+
deltaX = 30;
|
679 |
+
}
|
680 |
+
break;
|
681 |
+
case 40: // down
|
682 |
+
if (e.metaKey) {
|
683 |
+
deltaY = -i.contentHeight;
|
684 |
+
} else if (e.altKey) {
|
685 |
+
deltaY = -i.containerHeight;
|
686 |
+
} else {
|
687 |
+
deltaY = -30;
|
688 |
+
}
|
689 |
+
break;
|
690 |
+
case 32: // space bar
|
691 |
+
if (e.shiftKey) {
|
692 |
+
deltaY = i.containerHeight;
|
693 |
+
} else {
|
694 |
+
deltaY = -i.containerHeight;
|
695 |
+
}
|
696 |
+
break;
|
697 |
+
case 33: // page up
|
698 |
+
deltaY = i.containerHeight;
|
699 |
+
break;
|
700 |
+
case 34: // page down
|
701 |
+
deltaY = -i.containerHeight;
|
702 |
+
break;
|
703 |
+
case 36: // home
|
704 |
+
deltaY = i.contentHeight;
|
705 |
+
break;
|
706 |
+
case 35: // end
|
707 |
+
deltaY = -i.contentHeight;
|
708 |
+
break;
|
709 |
+
default:
|
710 |
+
return;
|
711 |
+
}
|
712 |
+
|
713 |
+
if (i.settings.suppressScrollX && deltaX !== 0) {
|
714 |
+
return;
|
715 |
+
}
|
716 |
+
if (i.settings.suppressScrollY && deltaY !== 0) {
|
717 |
+
return;
|
718 |
+
}
|
719 |
+
|
720 |
+
element.scrollTop -= deltaY;
|
721 |
+
element.scrollLeft += deltaX;
|
722 |
+
updateGeometry(i);
|
723 |
+
|
724 |
+
if (shouldPreventDefault(deltaX, deltaY)) {
|
725 |
+
e.preventDefault();
|
726 |
+
}
|
727 |
+
});
|
728 |
+
};
|
729 |
+
|
730 |
+
var wheel = function(i) {
|
731 |
+
var element = i.element;
|
732 |
+
|
733 |
+
function shouldPreventDefault(deltaX, deltaY) {
|
734 |
+
var roundedScrollTop = Math.floor(element.scrollTop);
|
735 |
+
var isTop = element.scrollTop === 0;
|
736 |
+
var isBottom =
|
737 |
+
roundedScrollTop + element.offsetHeight === element.scrollHeight;
|
738 |
+
var isLeft = element.scrollLeft === 0;
|
739 |
+
var isRight =
|
740 |
+
element.scrollLeft + element.offsetWidth === element.scrollWidth;
|
741 |
+
|
742 |
+
var hitsBound;
|
743 |
+
|
744 |
+
// pick axis with primary direction
|
745 |
+
if (Math.abs(deltaY) > Math.abs(deltaX)) {
|
746 |
+
hitsBound = isTop || isBottom;
|
747 |
+
} else {
|
748 |
+
hitsBound = isLeft || isRight;
|
749 |
+
}
|
750 |
+
|
751 |
+
return hitsBound ? !i.settings.wheelPropagation : true;
|
752 |
+
}
|
753 |
+
|
754 |
+
function getDeltaFromEvent(e) {
|
755 |
+
var deltaX = e.deltaX;
|
756 |
+
var deltaY = -1 * e.deltaY;
|
757 |
+
|
758 |
+
if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {
|
759 |
+
// OS X Safari
|
760 |
+
deltaX = -1 * e.wheelDeltaX / 6;
|
761 |
+
deltaY = e.wheelDeltaY / 6;
|
762 |
+
}
|
763 |
+
|
764 |
+
if (e.deltaMode && e.deltaMode === 1) {
|
765 |
+
// Firefox in deltaMode 1: Line scrolling
|
766 |
+
deltaX *= 10;
|
767 |
+
deltaY *= 10;
|
768 |
+
}
|
769 |
+
|
770 |
+
if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {
|
771 |
+
// IE in some mouse drivers
|
772 |
+
deltaX = 0;
|
773 |
+
deltaY = e.wheelDelta;
|
774 |
+
}
|
775 |
+
|
776 |
+
if (e.shiftKey) {
|
777 |
+
// reverse axis with shift key
|
778 |
+
return [-deltaY, -deltaX];
|
779 |
+
}
|
780 |
+
return [deltaX, deltaY];
|
781 |
+
}
|
782 |
+
|
783 |
+
function shouldBeConsumedByChild(target, deltaX, deltaY) {
|
784 |
+
// FIXME: this is a workaround for <select> issue in FF and IE #571
|
785 |
+
if (!env.isWebKit && element.querySelector('select:focus')) {
|
786 |
+
return true;
|
787 |
+
}
|
788 |
+
|
789 |
+
if (!element.contains(target)) {
|
790 |
+
return false;
|
791 |
+
}
|
792 |
+
|
793 |
+
var cursor = target;
|
794 |
+
|
795 |
+
while (cursor && cursor !== element) {
|
796 |
+
if (cursor.classList.contains(cls.element.consuming)) {
|
797 |
+
return true;
|
798 |
+
}
|
799 |
+
|
800 |
+
var style = get(cursor);
|
801 |
+
var overflow = [style.overflow, style.overflowX, style.overflowY].join(
|
802 |
+
''
|
803 |
+
);
|
804 |
+
|
805 |
+
// if scrollable
|
806 |
+
if (overflow.match(/(scroll|auto)/)) {
|
807 |
+
var maxScrollTop = cursor.scrollHeight - cursor.clientHeight;
|
808 |
+
if (maxScrollTop > 0) {
|
809 |
+
if (
|
810 |
+
!(cursor.scrollTop === 0 && deltaY > 0) &&
|
811 |
+
!(cursor.scrollTop === maxScrollTop && deltaY < 0)
|
812 |
+
) {
|
813 |
+
return true;
|
814 |
+
}
|
815 |
+
}
|
816 |
+
var maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;
|
817 |
+
if (maxScrollLeft > 0) {
|
818 |
+
if (
|
819 |
+
!(cursor.scrollLeft === 0 && deltaX < 0) &&
|
820 |
+
!(cursor.scrollLeft === maxScrollLeft && deltaX > 0)
|
821 |
+
) {
|
822 |
+
return true;
|
823 |
+
}
|
824 |
+
}
|
825 |
+
}
|
826 |
+
|
827 |
+
cursor = cursor.parentNode;
|
828 |
+
}
|
829 |
+
|
830 |
+
return false;
|
831 |
+
}
|
832 |
+
|
833 |
+
function mousewheelHandler(e) {
|
834 |
+
var ref = getDeltaFromEvent(e);
|
835 |
+
var deltaX = ref[0];
|
836 |
+
var deltaY = ref[1];
|
837 |
+
|
838 |
+
if (shouldBeConsumedByChild(e.target, deltaX, deltaY)) {
|
839 |
+
return;
|
840 |
+
}
|
841 |
+
|
842 |
+
var shouldPrevent = false;
|
843 |
+
if (!i.settings.useBothWheelAxes) {
|
844 |
+
// deltaX will only be used for horizontal scrolling and deltaY will
|
845 |
+
// only be used for vertical scrolling - this is the default
|
846 |
+
element.scrollTop -= deltaY * i.settings.wheelSpeed;
|
847 |
+
element.scrollLeft += deltaX * i.settings.wheelSpeed;
|
848 |
+
} else if (i.scrollbarYActive && !i.scrollbarXActive) {
|
849 |
+
// only vertical scrollbar is active and useBothWheelAxes option is
|
850 |
+
// active, so let's scroll vertical bar using both mouse wheel axes
|
851 |
+
if (deltaY) {
|
852 |
+
element.scrollTop -= deltaY * i.settings.wheelSpeed;
|
853 |
+
} else {
|
854 |
+
element.scrollTop += deltaX * i.settings.wheelSpeed;
|
855 |
+
}
|
856 |
+
shouldPrevent = true;
|
857 |
+
} else if (i.scrollbarXActive && !i.scrollbarYActive) {
|
858 |
+
// useBothWheelAxes and only horizontal bar is active, so use both
|
859 |
+
// wheel axes for horizontal bar
|
860 |
+
if (deltaX) {
|
861 |
+
element.scrollLeft += deltaX * i.settings.wheelSpeed;
|
862 |
+
} else {
|
863 |
+
element.scrollLeft -= deltaY * i.settings.wheelSpeed;
|
864 |
+
}
|
865 |
+
shouldPrevent = true;
|
866 |
+
}
|
867 |
+
|
868 |
+
updateGeometry(i);
|
869 |
+
|
870 |
+
shouldPrevent = shouldPrevent || shouldPreventDefault(deltaX, deltaY);
|
871 |
+
if (shouldPrevent && !e.ctrlKey) {
|
872 |
+
e.stopPropagation();
|
873 |
+
e.preventDefault();
|
874 |
+
}
|
875 |
+
}
|
876 |
+
|
877 |
+
if (typeof window.onwheel !== 'undefined') {
|
878 |
+
i.event.bind(element, 'wheel', mousewheelHandler);
|
879 |
+
} else if (typeof window.onmousewheel !== 'undefined') {
|
880 |
+
i.event.bind(element, 'mousewheel', mousewheelHandler);
|
881 |
+
}
|
882 |
+
};
|
883 |
+
|
884 |
+
var touch = function(i) {
|
885 |
+
if (!env.supportsTouch && !env.supportsIePointer) {
|
886 |
+
return;
|
887 |
+
}
|
888 |
+
|
889 |
+
var element = i.element;
|
890 |
+
|
891 |
+
function shouldPrevent(deltaX, deltaY) {
|
892 |
+
var scrollTop = Math.floor(element.scrollTop);
|
893 |
+
var scrollLeft = element.scrollLeft;
|
894 |
+
var magnitudeX = Math.abs(deltaX);
|
895 |
+
var magnitudeY = Math.abs(deltaY);
|
896 |
+
|
897 |
+
if (magnitudeY > magnitudeX) {
|
898 |
+
// user is perhaps trying to swipe up/down the page
|
899 |
+
|
900 |
+
if (
|
901 |
+
(deltaY < 0 && scrollTop === i.contentHeight - i.containerHeight) ||
|
902 |
+
(deltaY > 0 && scrollTop === 0)
|
903 |
+
) {
|
904 |
+
// set prevent for mobile Chrome refresh
|
905 |
+
return window.scrollY === 0 && deltaY > 0 && env.isChrome;
|
906 |
+
}
|
907 |
+
} else if (magnitudeX > magnitudeY) {
|
908 |
+
// user is perhaps trying to swipe left/right across the page
|
909 |
+
|
910 |
+
if (
|
911 |
+
(deltaX < 0 && scrollLeft === i.contentWidth - i.containerWidth) ||
|
912 |
+
(deltaX > 0 && scrollLeft === 0)
|
913 |
+
) {
|
914 |
+
return true;
|
915 |
+
}
|
916 |
+
}
|
917 |
+
|
918 |
+
return true;
|
919 |
+
}
|
920 |
+
|
921 |
+
function applyTouchMove(differenceX, differenceY) {
|
922 |
+
element.scrollTop -= differenceY;
|
923 |
+
element.scrollLeft -= differenceX;
|
924 |
+
|
925 |
+
updateGeometry(i);
|
926 |
+
}
|
927 |
+
|
928 |
+
var startOffset = {};
|
929 |
+
var startTime = 0;
|
930 |
+
var speed = {};
|
931 |
+
var easingLoop = null;
|
932 |
+
|
933 |
+
function getTouch(e) {
|
934 |
+
if (e.targetTouches) {
|
935 |
+
return e.targetTouches[0];
|
936 |
+
} else {
|
937 |
+
// Maybe IE pointer
|
938 |
+
return e;
|
939 |
+
}
|
940 |
+
}
|
941 |
+
|
942 |
+
function shouldHandle(e) {
|
943 |
+
if (e.pointerType && e.pointerType === 'pen' && e.buttons === 0) {
|
944 |
+
return false;
|
945 |
+
}
|
946 |
+
if (e.targetTouches && e.targetTouches.length === 1) {
|
947 |
+
return true;
|
948 |
+
}
|
949 |
+
if (
|
950 |
+
e.pointerType &&
|
951 |
+
e.pointerType !== 'mouse' &&
|
952 |
+
e.pointerType !== e.MSPOINTER_TYPE_MOUSE
|
953 |
+
) {
|
954 |
+
return true;
|
955 |
+
}
|
956 |
+
return false;
|
957 |
+
}
|
958 |
+
|
959 |
+
function touchStart(e) {
|
960 |
+
if (!shouldHandle(e)) {
|
961 |
+
return;
|
962 |
+
}
|
963 |
+
|
964 |
+
var touch = getTouch(e);
|
965 |
+
|
966 |
+
startOffset.pageX = touch.pageX;
|
967 |
+
startOffset.pageY = touch.pageY;
|
968 |
+
|
969 |
+
startTime = new Date().getTime();
|
970 |
+
|
971 |
+
if (easingLoop !== null) {
|
972 |
+
clearInterval(easingLoop);
|
973 |
+
}
|
974 |
+
}
|
975 |
+
|
976 |
+
function shouldBeConsumedByChild(target, deltaX, deltaY) {
|
977 |
+
if (!element.contains(target)) {
|
978 |
+
return false;
|
979 |
+
}
|
980 |
+
|
981 |
+
var cursor = target;
|
982 |
+
|
983 |
+
while (cursor && cursor !== element) {
|
984 |
+
if (cursor.classList.contains(cls.element.consuming)) {
|
985 |
+
return true;
|
986 |
+
}
|
987 |
+
|
988 |
+
var style = get(cursor);
|
989 |
+
var overflow = [style.overflow, style.overflowX, style.overflowY].join(
|
990 |
+
''
|
991 |
+
);
|
992 |
+
|
993 |
+
// if scrollable
|
994 |
+
if (overflow.match(/(scroll|auto)/)) {
|
995 |
+
var maxScrollTop = cursor.scrollHeight - cursor.clientHeight;
|
996 |
+
if (maxScrollTop > 0) {
|
997 |
+
if (
|
998 |
+
!(cursor.scrollTop === 0 && deltaY > 0) &&
|
999 |
+
!(cursor.scrollTop === maxScrollTop && deltaY < 0)
|
1000 |
+
) {
|
1001 |
+
return true;
|
1002 |
+
}
|
1003 |
+
}
|
1004 |
+
var maxScrollLeft = cursor.scrollLeft - cursor.clientWidth;
|
1005 |
+
if (maxScrollLeft > 0) {
|
1006 |
+
if (
|
1007 |
+
!(cursor.scrollLeft === 0 && deltaX < 0) &&
|
1008 |
+
!(cursor.scrollLeft === maxScrollLeft && deltaX > 0)
|
1009 |
+
) {
|
1010 |
+
return true;
|
1011 |
+
}
|
1012 |
+
}
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
cursor = cursor.parentNode;
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
return false;
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
function touchMove(e) {
|
1022 |
+
if (shouldHandle(e)) {
|
1023 |
+
var touch = getTouch(e);
|
1024 |
+
|
1025 |
+
var currentOffset = { pageX: touch.pageX, pageY: touch.pageY };
|
1026 |
+
|
1027 |
+
var differenceX = currentOffset.pageX - startOffset.pageX;
|
1028 |
+
var differenceY = currentOffset.pageY - startOffset.pageY;
|
1029 |
+
|
1030 |
+
if (shouldBeConsumedByChild(e.target, differenceX, differenceY)) {
|
1031 |
+
return;
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
applyTouchMove(differenceX, differenceY);
|
1035 |
+
startOffset = currentOffset;
|
1036 |
+
|
1037 |
+
var currentTime = new Date().getTime();
|
1038 |
+
|
1039 |
+
var timeGap = currentTime - startTime;
|
1040 |
+
if (timeGap > 0) {
|
1041 |
+
speed.x = differenceX / timeGap;
|
1042 |
+
speed.y = differenceY / timeGap;
|
1043 |
+
startTime = currentTime;
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
if (shouldPrevent(differenceX, differenceY)) {
|
1047 |
+
e.preventDefault();
|
1048 |
+
}
|
1049 |
+
}
|
1050 |
+
}
|
1051 |
+
function touchEnd() {
|
1052 |
+
if (i.settings.swipeEasing) {
|
1053 |
+
clearInterval(easingLoop);
|
1054 |
+
easingLoop = setInterval(function() {
|
1055 |
+
if (i.isInitialized) {
|
1056 |
+
clearInterval(easingLoop);
|
1057 |
+
return;
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
if (!speed.x && !speed.y) {
|
1061 |
+
clearInterval(easingLoop);
|
1062 |
+
return;
|
1063 |
+
}
|
1064 |
+
|
1065 |
+
if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {
|
1066 |
+
clearInterval(easingLoop);
|
1067 |
+
return;
|
1068 |
+
}
|
1069 |
+
|
1070 |
+
applyTouchMove(speed.x * 30, speed.y * 30);
|
1071 |
+
|
1072 |
+
speed.x *= 0.8;
|
1073 |
+
speed.y *= 0.8;
|
1074 |
+
}, 10);
|
1075 |
+
}
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
if (env.supportsTouch) {
|
1079 |
+
i.event.bind(element, 'touchstart', touchStart);
|
1080 |
+
i.event.bind(element, 'touchmove', touchMove);
|
1081 |
+
i.event.bind(element, 'touchend', touchEnd);
|
1082 |
+
} else if (env.supportsIePointer) {
|
1083 |
+
if (window.PointerEvent) {
|
1084 |
+
i.event.bind(element, 'pointerdown', touchStart);
|
1085 |
+
i.event.bind(element, 'pointermove', touchMove);
|
1086 |
+
i.event.bind(element, 'pointerup', touchEnd);
|
1087 |
+
} else if (window.MSPointerEvent) {
|
1088 |
+
i.event.bind(element, 'MSPointerDown', touchStart);
|
1089 |
+
i.event.bind(element, 'MSPointerMove', touchMove);
|
1090 |
+
i.event.bind(element, 'MSPointerUp', touchEnd);
|
1091 |
+
}
|
1092 |
+
}
|
1093 |
+
};
|
1094 |
+
|
1095 |
+
var defaultSettings = function () { return ({
|
1096 |
+
handlers: ['click-rail', 'drag-thumb', 'keyboard', 'wheel', 'touch'],
|
1097 |
+
maxScrollbarLength: null,
|
1098 |
+
minScrollbarLength: null,
|
1099 |
+
scrollingThreshold: 1000,
|
1100 |
+
scrollXMarginOffset: 0,
|
1101 |
+
scrollYMarginOffset: 0,
|
1102 |
+
suppressScrollX: false,
|
1103 |
+
suppressScrollY: false,
|
1104 |
+
swipeEasing: true,
|
1105 |
+
useBothWheelAxes: false,
|
1106 |
+
wheelPropagation: true,
|
1107 |
+
wheelSpeed: 1,
|
1108 |
+
}); };
|
1109 |
+
|
1110 |
+
var handlers = {
|
1111 |
+
'click-rail': clickRail,
|
1112 |
+
'drag-thumb': dragThumb,
|
1113 |
+
keyboard: keyboard,
|
1114 |
+
wheel: wheel,
|
1115 |
+
touch: touch,
|
1116 |
+
};
|
1117 |
+
|
1118 |
+
var PerfectScrollbar = function PerfectScrollbar(element, userSettings) {
|
1119 |
+
var this$1 = this;
|
1120 |
+
if ( userSettings === void 0 ) userSettings = {};
|
1121 |
+
|
1122 |
+
if (typeof element === 'string') {
|
1123 |
+
element = document.querySelector(element);
|
1124 |
+
}
|
1125 |
+
|
1126 |
+
if (!element || !element.nodeName) {
|
1127 |
+
throw new Error('no element is specified to initialize PerfectScrollbar');
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
this.element = element;
|
1131 |
+
|
1132 |
+
element.classList.add(cls.main);
|
1133 |
+
|
1134 |
+
this.settings = defaultSettings();
|
1135 |
+
for (var key in userSettings) {
|
1136 |
+
this$1.settings[key] = userSettings[key];
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
this.containerWidth = null;
|
1140 |
+
this.containerHeight = null;
|
1141 |
+
this.contentWidth = null;
|
1142 |
+
this.contentHeight = null;
|
1143 |
+
|
1144 |
+
var focus = function () { return element.classList.add(cls.state.focus); };
|
1145 |
+
var blur = function () { return element.classList.remove(cls.state.focus); };
|
1146 |
+
|
1147 |
+
this.isRtl = get(element).direction === 'rtl';
|
1148 |
+
this.isNegativeScroll = (function () {
|
1149 |
+
var originalScrollLeft = element.scrollLeft;
|
1150 |
+
var result = null;
|
1151 |
+
element.scrollLeft = -1;
|
1152 |
+
result = element.scrollLeft < 0;
|
1153 |
+
element.scrollLeft = originalScrollLeft;
|
1154 |
+
return result;
|
1155 |
+
})();
|
1156 |
+
this.negativeScrollAdjustment = this.isNegativeScroll
|
1157 |
+
? element.scrollWidth - element.clientWidth
|
1158 |
+
: 0;
|
1159 |
+
this.event = new EventManager();
|
1160 |
+
this.ownerDocument = element.ownerDocument || document;
|
1161 |
+
|
1162 |
+
this.scrollbarXRail = div(cls.element.rail('x'));
|
1163 |
+
element.appendChild(this.scrollbarXRail);
|
1164 |
+
this.scrollbarX = div(cls.element.thumb('x'));
|
1165 |
+
this.scrollbarXRail.appendChild(this.scrollbarX);
|
1166 |
+
this.scrollbarX.setAttribute('tabindex', 0);
|
1167 |
+
this.event.bind(this.scrollbarX, 'focus', focus);
|
1168 |
+
this.event.bind(this.scrollbarX, 'blur', blur);
|
1169 |
+
this.scrollbarXActive = null;
|
1170 |
+
this.scrollbarXWidth = null;
|
1171 |
+
this.scrollbarXLeft = null;
|
1172 |
+
var railXStyle = get(this.scrollbarXRail);
|
1173 |
+
this.scrollbarXBottom = parseInt(railXStyle.bottom, 10);
|
1174 |
+
if (isNaN(this.scrollbarXBottom)) {
|
1175 |
+
this.isScrollbarXUsingBottom = false;
|
1176 |
+
this.scrollbarXTop = toInt(railXStyle.top);
|
1177 |
+
} else {
|
1178 |
+
this.isScrollbarXUsingBottom = true;
|
1179 |
+
}
|
1180 |
+
this.railBorderXWidth =
|
1181 |
+
toInt(railXStyle.borderLeftWidth) + toInt(railXStyle.borderRightWidth);
|
1182 |
+
// Set rail to display:block to calculate margins
|
1183 |
+
set(this.scrollbarXRail, { display: 'block' });
|
1184 |
+
this.railXMarginWidth =
|
1185 |
+
toInt(railXStyle.marginLeft) + toInt(railXStyle.marginRight);
|
1186 |
+
set(this.scrollbarXRail, { display: '' });
|
1187 |
+
this.railXWidth = null;
|
1188 |
+
this.railXRatio = null;
|
1189 |
+
|
1190 |
+
this.scrollbarYRail = div(cls.element.rail('y'));
|
1191 |
+
element.appendChild(this.scrollbarYRail);
|
1192 |
+
this.scrollbarY = div(cls.element.thumb('y'));
|
1193 |
+
this.scrollbarYRail.appendChild(this.scrollbarY);
|
1194 |
+
this.scrollbarY.setAttribute('tabindex', 0);
|
1195 |
+
this.event.bind(this.scrollbarY, 'focus', focus);
|
1196 |
+
this.event.bind(this.scrollbarY, 'blur', blur);
|
1197 |
+
this.scrollbarYActive = null;
|
1198 |
+
this.scrollbarYHeight = null;
|
1199 |
+
this.scrollbarYTop = null;
|
1200 |
+
var railYStyle = get(this.scrollbarYRail);
|
1201 |
+
this.scrollbarYRight = parseInt(railYStyle.right, 10);
|
1202 |
+
if (isNaN(this.scrollbarYRight)) {
|
1203 |
+
this.isScrollbarYUsingRight = false;
|
1204 |
+
this.scrollbarYLeft = toInt(railYStyle.left);
|
1205 |
+
} else {
|
1206 |
+
this.isScrollbarYUsingRight = true;
|
1207 |
+
}
|
1208 |
+
this.scrollbarYOuterWidth = this.isRtl ? outerWidth(this.scrollbarY) : null;
|
1209 |
+
this.railBorderYWidth =
|
1210 |
+
toInt(railYStyle.borderTopWidth) + toInt(railYStyle.borderBottomWidth);
|
1211 |
+
set(this.scrollbarYRail, { display: 'block' });
|
1212 |
+
this.railYMarginHeight =
|
1213 |
+
toInt(railYStyle.marginTop) + toInt(railYStyle.marginBottom);
|
1214 |
+
set(this.scrollbarYRail, { display: '' });
|
1215 |
+
this.railYHeight = null;
|
1216 |
+
this.railYRatio = null;
|
1217 |
+
|
1218 |
+
this.reach = {
|
1219 |
+
x:
|
1220 |
+
element.scrollLeft <= 0
|
1221 |
+
? 'start'
|
1222 |
+
: element.scrollLeft >= this.contentWidth - this.containerWidth
|
1223 |
+
? 'end'
|
1224 |
+
: null,
|
1225 |
+
y:
|
1226 |
+
element.scrollTop <= 0
|
1227 |
+
? 'start'
|
1228 |
+
: element.scrollTop >= this.contentHeight - this.containerHeight
|
1229 |
+
? 'end'
|
1230 |
+
: null,
|
1231 |
+
};
|
1232 |
+
|
1233 |
+
this.isAlive = true;
|
1234 |
+
|
1235 |
+
this.settings.handlers.forEach(function (handlerName) { return handlers[handlerName](this$1); });
|
1236 |
+
|
1237 |
+
this.lastScrollTop = Math.floor(element.scrollTop); // for onScroll only
|
1238 |
+
this.lastScrollLeft = element.scrollLeft; // for onScroll only
|
1239 |
+
this.event.bind(this.element, 'scroll', function (e) { return this$1.onScroll(e); });
|
1240 |
+
updateGeometry(this);
|
1241 |
+
};
|
1242 |
+
|
1243 |
+
PerfectScrollbar.prototype.update = function update () {
|
1244 |
+
if (!this.isAlive) {
|
1245 |
+
return;
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
// Recalcuate negative scrollLeft adjustment
|
1249 |
+
this.negativeScrollAdjustment = this.isNegativeScroll
|
1250 |
+
? this.element.scrollWidth - this.element.clientWidth
|
1251 |
+
: 0;
|
1252 |
+
|
1253 |
+
// Recalculate rail margins
|
1254 |
+
set(this.scrollbarXRail, { display: 'block' });
|
1255 |
+
set(this.scrollbarYRail, { display: 'block' });
|
1256 |
+
this.railXMarginWidth =
|
1257 |
+
toInt(get(this.scrollbarXRail).marginLeft) +
|
1258 |
+
toInt(get(this.scrollbarXRail).marginRight);
|
1259 |
+
this.railYMarginHeight =
|
1260 |
+
toInt(get(this.scrollbarYRail).marginTop) +
|
1261 |
+
toInt(get(this.scrollbarYRail).marginBottom);
|
1262 |
+
|
1263 |
+
// Hide scrollbars not to affect scrollWidth and scrollHeight
|
1264 |
+
set(this.scrollbarXRail, { display: 'none' });
|
1265 |
+
set(this.scrollbarYRail, { display: 'none' });
|
1266 |
+
|
1267 |
+
updateGeometry(this);
|
1268 |
+
|
1269 |
+
processScrollDiff(this, 'top', 0, false, true);
|
1270 |
+
processScrollDiff(this, 'left', 0, false, true);
|
1271 |
+
|
1272 |
+
set(this.scrollbarXRail, { display: '' });
|
1273 |
+
set(this.scrollbarYRail, { display: '' });
|
1274 |
+
};
|
1275 |
+
|
1276 |
+
PerfectScrollbar.prototype.onScroll = function onScroll (e) {
|
1277 |
+
if (!this.isAlive) {
|
1278 |
+
return;
|
1279 |
+
}
|
1280 |
+
|
1281 |
+
updateGeometry(this);
|
1282 |
+
processScrollDiff(this, 'top', this.element.scrollTop - this.lastScrollTop);
|
1283 |
+
processScrollDiff(
|
1284 |
+
this,
|
1285 |
+
'left',
|
1286 |
+
this.element.scrollLeft - this.lastScrollLeft
|
1287 |
+
);
|
1288 |
+
|
1289 |
+
this.lastScrollTop = Math.floor(this.element.scrollTop);
|
1290 |
+
this.lastScrollLeft = this.element.scrollLeft;
|
1291 |
+
};
|
1292 |
+
|
1293 |
+
PerfectScrollbar.prototype.destroy = function destroy () {
|
1294 |
+
if (!this.isAlive) {
|
1295 |
+
return;
|
1296 |
+
}
|
1297 |
+
|
1298 |
+
this.event.unbindAll();
|
1299 |
+
remove(this.scrollbarX);
|
1300 |
+
remove(this.scrollbarY);
|
1301 |
+
remove(this.scrollbarXRail);
|
1302 |
+
remove(this.scrollbarYRail);
|
1303 |
+
this.removePsClasses();
|
1304 |
+
|
1305 |
+
// unset elements
|
1306 |
+
this.element = null;
|
1307 |
+
this.scrollbarX = null;
|
1308 |
+
this.scrollbarY = null;
|
1309 |
+
this.scrollbarXRail = null;
|
1310 |
+
this.scrollbarYRail = null;
|
1311 |
+
|
1312 |
+
this.isAlive = false;
|
1313 |
+
};
|
1314 |
+
|
1315 |
+
PerfectScrollbar.prototype.removePsClasses = function removePsClasses () {
|
1316 |
+
this.element.className = this.element.className
|
1317 |
+
.split(' ')
|
1318 |
+
.filter(function (name) { return !name.match(/^ps([-_].+|)$/); })
|
1319 |
+
.join(' ');
|
1320 |
+
};
|
1321 |
+
|
1322 |
+
return PerfectScrollbar;
|
1323 |
+
|
1324 |
+
})));
|
assets/perfect-scrollbar/perfect-scrollbar.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.ps{overflow:hidden!important;overflow-anchor:none;-ms-overflow-style:none;touch-action:auto;-ms-touch-action:auto}.ps__rail-x{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;height:15px;bottom:0;position:absolute}.ps__rail-y{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;width:15px;right:0;position:absolute}.ps--active-x > .ps__rail-x,.ps--active-y > .ps__rail-y{display:block;background-color:transparent}.ps:hover > .ps__rail-x,.ps:hover > .ps__rail-y,.ps--focus > .ps__rail-x,.ps--focus > .ps__rail-y,.ps--scrolling-x > .ps__rail-x,.ps--scrolling-y > .ps__rail-y{opacity:.6}.ps .ps__rail-x:hover,.ps .ps__rail-y:hover,.ps .ps__rail-x:focus,.ps .ps__rail-y:focus,.ps .ps__rail-x.ps--clicking,.ps .ps__rail-y.ps--clicking{background-color:#eee;opacity:.9}.ps__thumb-x{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,height .2s ease-in-out;-webkit-transition:background-color .2s linear,height .2s ease-in-out;height:6px;bottom:2px;position:absolute}.ps__thumb-y{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,width .2s ease-in-out;-webkit-transition:background-color .2s linear,width .2s ease-in-out;width:6px;right:2px;position:absolute}.ps__rail-x:hover > .ps__thumb-x,.ps__rail-x:focus > .ps__thumb-x,.ps__rail-x.ps--clicking .ps__thumb-x{background-color:#999;height:11px}.ps__rail-y:hover > .ps__thumb-y,.ps__rail-y:focus > .ps__thumb-y,.ps__rail-y.ps--clicking .ps__thumb-y{background-color:#999;width:11px}@media screen and (-ms-high-contrast: active),(-ms-high-contrast: none){.ps{overflow:auto!important}}
|
assets/perfect-scrollbar/perfect-scrollbar.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* perfect-scrollbar v1.4.0
|
3 |
+
* (c) 2018 Hyunje Jun
|
4 |
+
* @license MIT
|
5 |
+
*/
|
6 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.PerfectScrollbar=e()}(this,function(){"use strict";function t(t){return getComputedStyle(t)}function e(t,e){for(var i in e){var r=e[i];"number"==typeof r&&(r+="px"),t.style[i]=r}return t}function i(t){var e=document.createElement("div");return e.className=t,e}function r(t,e){if(!v)throw new Error("No element matching method supported");return v.call(t,e)}function l(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function n(t,e){return Array.prototype.filter.call(t.children,function(t){return r(t,e)})}function o(t,e){var i=t.element.classList,r=m.state.scrolling(e);i.contains(r)?clearTimeout(Y[e]):i.add(r)}function s(t,e){Y[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(m.state.scrolling(e))},t.settings.scrollingThreshold)}function a(t,e){o(t,e),s(t,e)}function c(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function h(t,e,i,r,l){var n=i[0],o=i[1],s=i[2],h=i[3],u=i[4],d=i[5];void 0===r&&(r=!0),void 0===l&&(l=!1);var f=t.element;t.reach[h]=null,f[s]<1&&(t.reach[h]="start"),f[s]>t[n]-t[o]-1&&(t.reach[h]="end"),e&&(f.dispatchEvent(c("ps-scroll-"+h)),e<0?f.dispatchEvent(c("ps-scroll-"+u)):e>0&&f.dispatchEvent(c("ps-scroll-"+d)),r&&a(t,h)),t.reach[h]&&(e||l)&&f.dispatchEvent(c("ps-"+h+"-reach-"+t.reach[h]))}function u(t){return parseInt(t,10)||0}function d(t){return r(t,"input,[contenteditable]")||r(t,"select,[contenteditable]")||r(t,"textarea,[contenteditable]")||r(t,"button,[contenteditable]")}function f(e){var i=t(e);return u(i.width)+u(i.paddingLeft)+u(i.paddingRight)+u(i.borderLeftWidth)+u(i.borderRightWidth)}function p(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function b(t,i){var r={width:i.railXWidth},l=Math.floor(t.scrollTop);i.isRtl?r.left=i.negativeScrollAdjustment+t.scrollLeft+i.containerWidth-i.contentWidth:r.left=t.scrollLeft,i.isScrollbarXUsingBottom?r.bottom=i.scrollbarXBottom-l:r.top=i.scrollbarXTop+l,e(i.scrollbarXRail,r);var n={top:l,height:i.railYHeight};i.isScrollbarYUsingRight?i.isRtl?n.right=i.contentWidth-(i.negativeScrollAdjustment+t.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth:n.right=i.scrollbarYRight-t.scrollLeft:i.isRtl?n.left=i.negativeScrollAdjustment+t.scrollLeft+2*i.containerWidth-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth:n.left=i.scrollbarYLeft+t.scrollLeft,e(i.scrollbarYRail,n),e(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth}),e(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}function g(t,e){function i(e){b[d]=g+Y*(e[a]-v),o(t,f),R(t),e.stopPropagation(),e.preventDefault()}function r(){s(t,f),t[p].classList.remove(m.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",i)}var l=e[0],n=e[1],a=e[2],c=e[3],h=e[4],u=e[5],d=e[6],f=e[7],p=e[8],b=t.element,g=null,v=null,Y=null;t.event.bind(t[h],"mousedown",function(e){g=b[d],v=e[a],Y=(t[n]-t[l])/(t[c]-t[u]),t.event.bind(t.ownerDocument,"mousemove",i),t.event.once(t.ownerDocument,"mouseup",r),t[p].classList.add(m.state.clicking),e.stopPropagation(),e.preventDefault()})}var v="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),m={main:"ps",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},Y={x:null,y:null},X=function(t){this.element=t,this.handlers={}},w={isEmpty:{configurable:!0}};X.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},X.prototype.unbind=function(t,e){var i=this;this.handlers[t]=this.handlers[t].filter(function(r){return!(!e||r===e)||(i.element.removeEventListener(t,r,!1),!1)})},X.prototype.unbindAll=function(){var t=this;for(var e in t.handlers)t.unbind(e)},w.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(X.prototype,w);var y=function(){this.eventElements=[]};y.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new X(t),this.eventElements.push(e)),e},y.prototype.bind=function(t,e,i){this.eventElement(t).bind(e,i)},y.prototype.unbind=function(t,e,i){var r=this.eventElement(t);r.unbind(e,i),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},y.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},y.prototype.once=function(t,e,i){var r=this.eventElement(t),l=function(t){r.unbind(e,l),i(t)};r.bind(e,l)};var W=function(t,e,i,r,l){void 0===r&&(r=!0),void 0===l&&(l=!1);var n;if("top"===e)n=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");n=["contentWidth","containerWidth","scrollLeft","x","left","right"]}h(t,i,n,r,l)},L={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},R=function(t){var e=t.element,i=Math.floor(e.scrollTop);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||(n(e,m.element.rail("x")).forEach(function(t){return l(t)}),e.appendChild(t.scrollbarXRail)),e.contains(t.scrollbarYRail)||(n(e,m.element.rail("y")).forEach(function(t){return l(t)}),e.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=p(t,u(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=u((t.negativeScrollAdjustment+e.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=p(t,u(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=u(i*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),b(e,t),t.scrollbarXActive?e.classList.add(m.state.active("x")):(e.classList.remove(m.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=0),t.scrollbarYActive?e.classList.add(m.state.active("y")):(e.classList.remove(m.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0)},T={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var i=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=i*t.containerHeight,R(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var i=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=i*t.containerWidth,R(t),e.stopPropagation()})},"drag-thumb":function(t){g(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),g(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){function e(e,r){var l=Math.floor(i.scrollTop);if(0===e){if(!t.scrollbarYActive)return!1;if(0===l&&r>0||l>=t.contentHeight-t.containerHeight&&r<0)return!t.settings.wheelPropagation}var n=i.scrollLeft;if(0===r){if(!t.scrollbarXActive)return!1;if(0===n&&e<0||n>=t.contentWidth-t.containerWidth&&e>0)return!t.settings.wheelPropagation}return!0}var i=t.element,l=function(){return r(i,":hover")},n=function(){return r(t.scrollbarX,":focus")||r(t.scrollbarY,":focus")};t.event.bind(t.ownerDocument,"keydown",function(r){if(!(r.isDefaultPrevented&&r.isDefaultPrevented()||r.defaultPrevented)&&(l()||n())){var o=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(o){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(d(o))return}var s=0,a=0;switch(r.which){case 37:s=r.metaKey?-t.contentWidth:r.altKey?-t.containerWidth:-30;break;case 38:a=r.metaKey?t.contentHeight:r.altKey?t.containerHeight:30;break;case 39:s=r.metaKey?t.contentWidth:r.altKey?t.containerWidth:30;break;case 40:a=r.metaKey?-t.contentHeight:r.altKey?-t.containerHeight:-30;break;case 32:a=r.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:a=t.containerHeight;break;case 34:a=-t.containerHeight;break;case 36:a=t.contentHeight;break;case 35:a=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==s||t.settings.suppressScrollY&&0!==a||(i.scrollTop-=a,i.scrollLeft+=s,R(t),e(s,a)&&r.preventDefault())}})},wheel:function(e){function i(t,i){var r=Math.floor(o.scrollTop),l=0===o.scrollTop,n=r+o.offsetHeight===o.scrollHeight,s=0===o.scrollLeft,a=o.scrollLeft+o.offsetWidth===o.scrollWidth;return!(Math.abs(i)>Math.abs(t)?l||n:s||a)||!e.settings.wheelPropagation}function r(t){var e=t.deltaX,i=-1*t.deltaY;return void 0!==e&&void 0!==i||(e=-1*t.wheelDeltaX/6,i=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,i*=10),e!==e&&i!==i&&(e=0,i=t.wheelDelta),t.shiftKey?[-i,-e]:[e,i]}function l(e,i,r){if(!L.isWebKit&&o.querySelector("select:focus"))return!0;if(!o.contains(e))return!1;for(var l=e;l&&l!==o;){if(l.classList.contains(m.element.consuming))return!0;var n=t(l);if([n.overflow,n.overflowX,n.overflowY].join("").match(/(scroll|auto)/)){var s=l.scrollHeight-l.clientHeight;if(s>0&&!(0===l.scrollTop&&r>0||l.scrollTop===s&&r<0))return!0;var a=l.scrollWidth-l.clientWidth;if(a>0&&!(0===l.scrollLeft&&i<0||l.scrollLeft===a&&i>0))return!0}l=l.parentNode}return!1}function n(t){var n=r(t),s=n[0],a=n[1];if(!l(t.target,s,a)){var c=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(a?o.scrollTop-=a*e.settings.wheelSpeed:o.scrollTop+=s*e.settings.wheelSpeed,c=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(s?o.scrollLeft+=s*e.settings.wheelSpeed:o.scrollLeft-=a*e.settings.wheelSpeed,c=!0):(o.scrollTop-=a*e.settings.wheelSpeed,o.scrollLeft+=s*e.settings.wheelSpeed),R(e),(c=c||i(s,a))&&!t.ctrlKey&&(t.stopPropagation(),t.preventDefault())}}var o=e.element;void 0!==window.onwheel?e.event.bind(o,"wheel",n):void 0!==window.onmousewheel&&e.event.bind(o,"mousewheel",n)},touch:function(e){function i(t,i){var r=Math.floor(h.scrollTop),l=h.scrollLeft,n=Math.abs(t),o=Math.abs(i);if(o>n){if(i<0&&r===e.contentHeight-e.containerHeight||i>0&&0===r)return 0===window.scrollY&&i>0&&L.isChrome}else if(n>o&&(t<0&&l===e.contentWidth-e.containerWidth||t>0&&0===l))return!0;return!0}function r(t,i){h.scrollTop-=i,h.scrollLeft-=t,R(e)}function l(t){return t.targetTouches?t.targetTouches[0]:t}function n(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function o(t){if(n(t)){var e=l(t);u.pageX=e.pageX,u.pageY=e.pageY,d=(new Date).getTime(),null!==p&&clearInterval(p)}}function s(e,i,r){if(!h.contains(e))return!1;for(var l=e;l&&l!==h;){if(l.classList.contains(m.element.consuming))return!0;var n=t(l);if([n.overflow,n.overflowX,n.overflowY].join("").match(/(scroll|auto)/)){var o=l.scrollHeight-l.clientHeight;if(o>0&&!(0===l.scrollTop&&r>0||l.scrollTop===o&&r<0))return!0;var s=l.scrollLeft-l.clientWidth;if(s>0&&!(0===l.scrollLeft&&i<0||l.scrollLeft===s&&i>0))return!0}l=l.parentNode}return!1}function a(t){if(n(t)){var e=l(t),o={pageX:e.pageX,pageY:e.pageY},a=o.pageX-u.pageX,c=o.pageY-u.pageY;if(s(t.target,a,c))return;r(a,c),u=o;var h=(new Date).getTime(),p=h-d;p>0&&(f.x=a/p,f.y=c/p,d=h),i(a,c)&&t.preventDefault()}}function c(){e.settings.swipeEasing&&(clearInterval(p),p=setInterval(function(){e.isInitialized?clearInterval(p):f.x||f.y?Math.abs(f.x)<.01&&Math.abs(f.y)<.01?clearInterval(p):(r(30*f.x,30*f.y),f.x*=.8,f.y*=.8):clearInterval(p)},10))}if(L.supportsTouch||L.supportsIePointer){var h=e.element,u={},d=0,f={},p=null;L.supportsTouch?(e.event.bind(h,"touchstart",o),e.event.bind(h,"touchmove",a),e.event.bind(h,"touchend",c)):L.supportsIePointer&&(window.PointerEvent?(e.event.bind(h,"pointerdown",o),e.event.bind(h,"pointermove",a),e.event.bind(h,"pointerup",c)):window.MSPointerEvent&&(e.event.bind(h,"MSPointerDown",o),e.event.bind(h,"MSPointerMove",a),e.event.bind(h,"MSPointerUp",c)))}}},H=function(r,l){var n=this;if(void 0===l&&(l={}),"string"==typeof r&&(r=document.querySelector(r)),!r||!r.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=r,r.classList.add(m.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1};for(var o in l)n.settings[o]=l[o];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var s=function(){return r.classList.add(m.state.focus)},a=function(){return r.classList.remove(m.state.focus)};this.isRtl="rtl"===t(r).direction,this.isNegativeScroll=function(){var t=r.scrollLeft,e=null;return r.scrollLeft=-1,e=r.scrollLeft<0,r.scrollLeft=t,e}(),this.negativeScrollAdjustment=this.isNegativeScroll?r.scrollWidth-r.clientWidth:0,this.event=new y,this.ownerDocument=r.ownerDocument||document,this.scrollbarXRail=i(m.element.rail("x")),r.appendChild(this.scrollbarXRail),this.scrollbarX=i(m.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",s),this.event.bind(this.scrollbarX,"blur",a),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var c=t(this.scrollbarXRail);this.scrollbarXBottom=parseInt(c.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=u(c.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=u(c.borderLeftWidth)+u(c.borderRightWidth),e(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=u(c.marginLeft)+u(c.marginRight),e(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=i(m.element.rail("y")),r.appendChild(this.scrollbarYRail),this.scrollbarY=i(m.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",s),this.event.bind(this.scrollbarY,"blur",a),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var h=t(this.scrollbarYRail);this.scrollbarYRight=parseInt(h.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=u(h.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?f(this.scrollbarY):null,this.railBorderYWidth=u(h.borderTopWidth)+u(h.borderBottomWidth),e(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=u(h.marginTop)+u(h.marginBottom),e(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:r.scrollLeft<=0?"start":r.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:r.scrollTop<=0?"start":r.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return T[t](n)}),this.lastScrollTop=Math.floor(r.scrollTop),this.lastScrollLeft=r.scrollLeft,this.event.bind(this.element,"scroll",function(t){return n.onScroll(t)}),R(this)};return H.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,e(this.scrollbarXRail,{display:"block"}),e(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=u(t(this.scrollbarXRail).marginLeft)+u(t(this.scrollbarXRail).marginRight),this.railYMarginHeight=u(t(this.scrollbarYRail).marginTop)+u(t(this.scrollbarYRail).marginBottom),e(this.scrollbarXRail,{display:"none"}),e(this.scrollbarYRail,{display:"none"}),R(this),W(this,"top",0,!1,!0),W(this,"left",0,!1,!0),e(this.scrollbarXRail,{display:""}),e(this.scrollbarYRail,{display:""}))},H.prototype.onScroll=function(t){this.isAlive&&(R(this),W(this,"top",this.element.scrollTop-this.lastScrollTop),W(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},H.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),l(this.scrollbarX),l(this.scrollbarY),l(this.scrollbarXRail),l(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},H.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")},H});
|
assets/select2/css/select2.css
CHANGED
@@ -48,10 +48,9 @@
|
|
48 |
-webkit-appearance: none; }
|
49 |
|
50 |
.select2-dropdown {
|
51 |
-
background-color:
|
52 |
-
border: 1px solid #
|
53 |
-
|
54 |
-
border-radius: 0;
|
55 |
box-sizing: border-box;
|
56 |
display: block;
|
57 |
position: absolute;
|
@@ -69,7 +68,6 @@
|
|
69 |
|
70 |
.select2-results__option {
|
71 |
padding: 6px;
|
72 |
-
margin-bottom: 0;
|
73 |
user-select: none;
|
74 |
-webkit-user-select: none; }
|
75 |
.select2-results__option[aria-selected] {
|
@@ -120,18 +118,19 @@
|
|
120 |
.select2-hidden-accessible {
|
121 |
border: 0 !important;
|
122 |
clip: rect(0 0 0 0) !important;
|
|
|
|
|
123 |
height: 1px !important;
|
124 |
-
margin: -1px !important;
|
125 |
overflow: hidden !important;
|
126 |
padding: 0 !important;
|
127 |
position: absolute !important;
|
128 |
-
width: 1px !important;
|
|
|
129 |
|
130 |
.select2-container--default .select2-selection--single {
|
131 |
background-color: #fff;
|
132 |
-
border: 1px solid #
|
133 |
-
|
134 |
-
border-radius: 0; }
|
135 |
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
136 |
color: #444;
|
137 |
line-height: 28px; }
|
@@ -167,7 +166,7 @@
|
|
167 |
right: auto; }
|
168 |
|
169 |
.select2-container--default.select2-container--disabled .select2-selection--single {
|
170 |
-
background-color: #
|
171 |
cursor: default; }
|
172 |
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
173 |
display: none; }
|
@@ -177,12 +176,10 @@
|
|
177 |
border-width: 0 4px 5px 4px; }
|
178 |
|
179 |
.select2-container--default .select2-selection--multiple {
|
180 |
-
background-color:
|
181 |
-
border: 1px solid #
|
182 |
-
|
183 |
-
|
184 |
-
cursor: text;
|
185 |
-
padding-bottom: 2px; }
|
186 |
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
187 |
box-sizing: border-box;
|
188 |
list-style: none;
|
@@ -190,8 +187,7 @@
|
|
190 |
padding: 0 5px;
|
191 |
width: 100%; }
|
192 |
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
193 |
-
list-style: none;
|
194 |
-
margin-bottom: 0; }
|
195 |
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
196 |
color: #999;
|
197 |
margin-top: 5px;
|
@@ -203,23 +199,22 @@
|
|
203 |
margin-top: 5px;
|
204 |
margin-right: 10px; }
|
205 |
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
206 |
-
background-color: #
|
207 |
-
border: 1px solid #
|
208 |
-
border-radius:
|
209 |
cursor: default;
|
210 |
float: left;
|
211 |
margin-right: 5px;
|
212 |
margin-top: 5px;
|
213 |
-
margin-bottom: 0;
|
214 |
padding: 0 5px; }
|
215 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
216 |
-
color: #
|
217 |
cursor: pointer;
|
218 |
display: inline-block;
|
219 |
-
font-weight:
|
220 |
-
margin:
|
221 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
222 |
-
color: #
|
223 |
|
224 |
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
225 |
float: right; }
|
@@ -233,12 +228,11 @@
|
|
233 |
margin-right: auto; }
|
234 |
|
235 |
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
236 |
-
border: solid
|
237 |
-
box-shadow: 0 0 2px rgba(30,140,190,.8);
|
238 |
outline: 0; }
|
239 |
|
240 |
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
241 |
-
background-color: #
|
242 |
cursor: default; }
|
243 |
|
244 |
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
@@ -253,8 +247,7 @@
|
|
253 |
border-bottom-right-radius: 0; }
|
254 |
|
255 |
.select2-container--default .select2-search--dropdown .select2-search__field {
|
256 |
-
border: 1px solid #
|
257 |
-
box-shadow: inset 0 1px 2px rgba(0,0,0,.07); }
|
258 |
|
259 |
.select2-container--default .select2-search--inline .select2-search__field {
|
260 |
background: transparent;
|
@@ -271,10 +264,10 @@
|
|
271 |
padding: 0; }
|
272 |
|
273 |
.select2-container--default .select2-results__option[aria-disabled=true] {
|
274 |
-
color: #
|
275 |
|
276 |
.select2-container--default .select2-results__option[aria-selected=true] {
|
277 |
-
background-color: #
|
278 |
|
279 |
.select2-container--default .select2-results__option .select2-results__option {
|
280 |
padding-left: 1em; }
|
@@ -297,8 +290,8 @@
|
|
297 |
padding-left: 6em; }
|
298 |
|
299 |
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
300 |
-
background-color: #
|
301 |
-
color:
|
302 |
|
303 |
.select2-container--default .select2-results__group {
|
304 |
cursor: default;
|
@@ -307,18 +300,16 @@
|
|
307 |
|
308 |
.select2-container--classic .select2-selection--single {
|
309 |
background-color: #f7f7f7;
|
310 |
-
border: 1px solid #
|
311 |
-
|
312 |
-
border-radius: 0;
|
313 |
outline: 0;
|
314 |
-
background-image: -webkit-linear-gradient(top,
|
315 |
-
background-image: -o-linear-gradient(top,
|
316 |
-
background-image: linear-gradient(to bottom,
|
317 |
background-repeat: repeat-x;
|
318 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
319 |
.select2-container--classic .select2-selection--single:focus {
|
320 |
-
border: 1px solid #5897fb;
|
321 |
-
box-shadow: 0 0 2px rgba(30,140,190,.8); }
|
322 |
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
323 |
color: #444;
|
324 |
line-height: 28px; }
|
@@ -332,7 +323,7 @@
|
|
332 |
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
333 |
background-color: #ddd;
|
334 |
border: none;
|
335 |
-
border-left: 1px solid #
|
336 |
border-top-right-radius: 4px;
|
337 |
border-bottom-right-radius: 4px;
|
338 |
height: 26px;
|
@@ -362,7 +353,7 @@
|
|
362 |
|
363 |
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
364 |
border: none;
|
365 |
-
border-right: 1px solid #
|
366 |
border-radius: 0;
|
367 |
border-top-left-radius: 4px;
|
368 |
border-bottom-left-radius: 4px;
|
@@ -382,9 +373,9 @@
|
|
382 |
border-top: none;
|
383 |
border-top-left-radius: 0;
|
384 |
border-top-right-radius: 0;
|
385 |
-
background-image: -webkit-linear-gradient(top,
|
386 |
-
background-image: -o-linear-gradient(top,
|
387 |
-
background-image: linear-gradient(to bottom,
|
388 |
background-repeat: repeat-x;
|
389 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
390 |
|
@@ -392,22 +383,20 @@
|
|
392 |
border-bottom: none;
|
393 |
border-bottom-left-radius: 0;
|
394 |
border-bottom-right-radius: 0;
|
395 |
-
background-image: -webkit-linear-gradient(top, #eeeeee 50%,
|
396 |
-
background-image: -o-linear-gradient(top, #eeeeee 50%,
|
397 |
-
background-image: linear-gradient(to bottom, #eeeeee 50%,
|
398 |
background-repeat: repeat-x;
|
399 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
400 |
|
401 |
.select2-container--classic .select2-selection--multiple {
|
402 |
-
background-color:
|
403 |
-
border: 1px solid #
|
404 |
-
|
405 |
-
border-radius: 0;
|
406 |
cursor: text;
|
407 |
outline: 0; }
|
408 |
.select2-container--classic .select2-selection--multiple:focus {
|
409 |
-
border: 1px solid #5897fb;
|
410 |
-
box-shadow: 0 0 2px rgba(30,140,190,.8); }
|
411 |
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
412 |
list-style: none;
|
413 |
margin: 0;
|
@@ -415,15 +404,13 @@
|
|
415 |
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
416 |
display: none; }
|
417 |
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
418 |
-
background-color: #
|
419 |
-
border: 1px solid #
|
420 |
-
|
421 |
-
border-radius: 0;
|
422 |
cursor: default;
|
423 |
float: left;
|
424 |
margin-right: 5px;
|
425 |
margin-top: 5px;
|
426 |
-
margin-bottom: 0;
|
427 |
padding: 0 5px; }
|
428 |
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
429 |
color: #888;
|
@@ -435,9 +422,7 @@
|
|
435 |
color: #555; }
|
436 |
|
437 |
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
438 |
-
float: right;
|
439 |
-
|
440 |
-
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
441 |
margin-left: 5px;
|
442 |
margin-right: auto; }
|
443 |
|
@@ -459,8 +444,7 @@
|
|
459 |
border-bottom-right-radius: 0; }
|
460 |
|
461 |
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
462 |
-
border: 1px solid #
|
463 |
-
box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
|
464 |
outline: 0; }
|
465 |
|
466 |
.select2-container--classic .select2-search--inline .select2-search__field {
|
@@ -468,7 +452,7 @@
|
|
468 |
box-shadow: none; }
|
469 |
|
470 |
.select2-container--classic .select2-dropdown {
|
471 |
-
background-color:
|
472 |
border: 1px solid transparent; }
|
473 |
|
474 |
.select2-container--classic .select2-dropdown--above {
|
@@ -488,8 +472,8 @@
|
|
488 |
color: grey; }
|
489 |
|
490 |
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
491 |
-
background-color: #
|
492 |
-
color:
|
493 |
|
494 |
.select2-container--classic .select2-results__group {
|
495 |
cursor: default;
|
48 |
-webkit-appearance: none; }
|
49 |
|
50 |
.select2-dropdown {
|
51 |
+
background-color: white;
|
52 |
+
border: 1px solid #aaa;
|
53 |
+
border-radius: 4px;
|
|
|
54 |
box-sizing: border-box;
|
55 |
display: block;
|
56 |
position: absolute;
|
68 |
|
69 |
.select2-results__option {
|
70 |
padding: 6px;
|
|
|
71 |
user-select: none;
|
72 |
-webkit-user-select: none; }
|
73 |
.select2-results__option[aria-selected] {
|
118 |
.select2-hidden-accessible {
|
119 |
border: 0 !important;
|
120 |
clip: rect(0 0 0 0) !important;
|
121 |
+
-webkit-clip-path: inset(50%) !important;
|
122 |
+
clip-path: inset(50%) !important;
|
123 |
height: 1px !important;
|
|
|
124 |
overflow: hidden !important;
|
125 |
padding: 0 !important;
|
126 |
position: absolute !important;
|
127 |
+
width: 1px !important;
|
128 |
+
white-space: nowrap !important; }
|
129 |
|
130 |
.select2-container--default .select2-selection--single {
|
131 |
background-color: #fff;
|
132 |
+
border: 1px solid #aaa;
|
133 |
+
border-radius: 4px; }
|
|
|
134 |
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
135 |
color: #444;
|
136 |
line-height: 28px; }
|
166 |
right: auto; }
|
167 |
|
168 |
.select2-container--default.select2-container--disabled .select2-selection--single {
|
169 |
+
background-color: #eee;
|
170 |
cursor: default; }
|
171 |
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
172 |
display: none; }
|
176 |
border-width: 0 4px 5px 4px; }
|
177 |
|
178 |
.select2-container--default .select2-selection--multiple {
|
179 |
+
background-color: white;
|
180 |
+
border: 1px solid #aaa;
|
181 |
+
border-radius: 4px;
|
182 |
+
cursor: text; }
|
|
|
|
|
183 |
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
184 |
box-sizing: border-box;
|
185 |
list-style: none;
|
187 |
padding: 0 5px;
|
188 |
width: 100%; }
|
189 |
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
190 |
+
list-style: none; }
|
|
|
191 |
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
192 |
color: #999;
|
193 |
margin-top: 5px;
|
199 |
margin-top: 5px;
|
200 |
margin-right: 10px; }
|
201 |
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
202 |
+
background-color: #e4e4e4;
|
203 |
+
border: 1px solid #aaa;
|
204 |
+
border-radius: 4px;
|
205 |
cursor: default;
|
206 |
float: left;
|
207 |
margin-right: 5px;
|
208 |
margin-top: 5px;
|
|
|
209 |
padding: 0 5px; }
|
210 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
211 |
+
color: #999;
|
212 |
cursor: pointer;
|
213 |
display: inline-block;
|
214 |
+
font-weight: bold;
|
215 |
+
margin-right: 2px; }
|
216 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
217 |
+
color: #333; }
|
218 |
|
219 |
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
220 |
float: right; }
|
228 |
margin-right: auto; }
|
229 |
|
230 |
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
231 |
+
border: solid black 1px;
|
|
|
232 |
outline: 0; }
|
233 |
|
234 |
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
235 |
+
background-color: #eee;
|
236 |
cursor: default; }
|
237 |
|
238 |
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
247 |
border-bottom-right-radius: 0; }
|
248 |
|
249 |
.select2-container--default .select2-search--dropdown .select2-search__field {
|
250 |
+
border: 1px solid #aaa; }
|
|
|
251 |
|
252 |
.select2-container--default .select2-search--inline .select2-search__field {
|
253 |
background: transparent;
|
264 |
padding: 0; }
|
265 |
|
266 |
.select2-container--default .select2-results__option[aria-disabled=true] {
|
267 |
+
color: #999; }
|
268 |
|
269 |
.select2-container--default .select2-results__option[aria-selected=true] {
|
270 |
+
background-color: #ddd; }
|
271 |
|
272 |
.select2-container--default .select2-results__option .select2-results__option {
|
273 |
padding-left: 1em; }
|
290 |
padding-left: 6em; }
|
291 |
|
292 |
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
293 |
+
background-color: #5897fb;
|
294 |
+
color: white; }
|
295 |
|
296 |
.select2-container--default .select2-results__group {
|
297 |
cursor: default;
|
300 |
|
301 |
.select2-container--classic .select2-selection--single {
|
302 |
background-color: #f7f7f7;
|
303 |
+
border: 1px solid #aaa;
|
304 |
+
border-radius: 4px;
|
|
|
305 |
outline: 0;
|
306 |
+
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
307 |
+
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
308 |
+
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
309 |
background-repeat: repeat-x;
|
310 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
311 |
.select2-container--classic .select2-selection--single:focus {
|
312 |
+
border: 1px solid #5897fb; }
|
|
|
313 |
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
314 |
color: #444;
|
315 |
line-height: 28px; }
|
323 |
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
324 |
background-color: #ddd;
|
325 |
border: none;
|
326 |
+
border-left: 1px solid #aaa;
|
327 |
border-top-right-radius: 4px;
|
328 |
border-bottom-right-radius: 4px;
|
329 |
height: 26px;
|
353 |
|
354 |
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
355 |
border: none;
|
356 |
+
border-right: 1px solid #aaa;
|
357 |
border-radius: 0;
|
358 |
border-top-left-radius: 4px;
|
359 |
border-bottom-left-radius: 4px;
|
373 |
border-top: none;
|
374 |
border-top-left-radius: 0;
|
375 |
border-top-right-radius: 0;
|
376 |
+
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
377 |
+
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
378 |
+
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
379 |
background-repeat: repeat-x;
|
380 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
381 |
|
383 |
border-bottom: none;
|
384 |
border-bottom-left-radius: 0;
|
385 |
border-bottom-right-radius: 0;
|
386 |
+
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
387 |
+
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
388 |
+
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
389 |
background-repeat: repeat-x;
|
390 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
391 |
|
392 |
.select2-container--classic .select2-selection--multiple {
|
393 |
+
background-color: white;
|
394 |
+
border: 1px solid #aaa;
|
395 |
+
border-radius: 4px;
|
|
|
396 |
cursor: text;
|
397 |
outline: 0; }
|
398 |
.select2-container--classic .select2-selection--multiple:focus {
|
399 |
+
border: 1px solid #5897fb; }
|
|
|
400 |
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
401 |
list-style: none;
|
402 |
margin: 0;
|
404 |
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
405 |
display: none; }
|
406 |
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
407 |
+
background-color: #e4e4e4;
|
408 |
+
border: 1px solid #aaa;
|
409 |
+
border-radius: 4px;
|
|
|
410 |
cursor: default;
|
411 |
float: left;
|
412 |
margin-right: 5px;
|
413 |
margin-top: 5px;
|
|
|
414 |
padding: 0 5px; }
|
415 |
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
416 |
color: #888;
|
422 |
color: #555; }
|
423 |
|
424 |
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
425 |
+
float: right;
|
|
|
|
|
426 |
margin-left: 5px;
|
427 |
margin-right: auto; }
|
428 |
|
444 |
border-bottom-right-radius: 0; }
|
445 |
|
446 |
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
447 |
+
border: 1px solid #aaa;
|
|
|
448 |
outline: 0; }
|
449 |
|
450 |
.select2-container--classic .select2-search--inline .select2-search__field {
|
452 |
box-shadow: none; }
|
453 |
|
454 |
.select2-container--classic .select2-dropdown {
|
455 |
+
background-color: white;
|
456 |
border: 1px solid transparent; }
|
457 |
|
458 |
.select2-container--classic .select2-dropdown--above {
|
472 |
color: grey; }
|
473 |
|
474 |
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
475 |
+
background-color: #3875d7;
|
476 |
+
color: white; }
|
477 |
|
478 |
.select2-container--classic .select2-results__group {
|
479 |
cursor: default;
|
assets/select2/css/select2.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir=rtl] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;margin-bottom:0;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--classic .select2-results>.select2-results__options,.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#ddd;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background-color:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0;cursor:text;padding-bottom:2px}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none;margin-bottom:0}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#f1f1f1;border:1px solid #ddd;border-radius:2px;cursor:default;float:left;margin-right:5px;margin-top:5px;margin-bottom:0;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#0073aa;cursor:pointer;display:inline-block;font-weight:400;margin:0 2px 1px 0}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#5b9dd9}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-search--inline,.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__placeholder{float:right}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:1px solid #5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8);outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#ddd;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--above .select2-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.select2-container--default .select2-search--inline .select2-search__field{background:0 0;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#e5e5e5}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#f1f1f1}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#00a0d2;color:#fff}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0;outline:0;background-image:-webkit-linear-gradient(top,#fff 50%,#eee 100%);background-image:-o-linear-gradient(top,#fff 50%,#eee 100%);background-image:linear-gradient(to bottom,#fff 50%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb;box-shadow:0 0 2px rgba(30,140,190,.8)}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #ddd;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top,#eee 50%,#ccc 100%);background-image:-o-linear-gradient(top,#eee 50%,#ccc 100%);background-image:linear-gradient(to bottom,#eee 50%,#ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #ddd;border-radius:4px 0 0 4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:0 0;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top,#fff 0,#eee 50%);background-image:-o-linear-gradient(top,#fff 0,#eee 50%);background-image:linear-gradient(to bottom,#fff 0,#eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top,#eee 50%,#fff 100%);background-image:-o-linear-gradient(top,#eee 50%,#fff 100%);background-image:linear-gradient(to bottom,#eee 50%,#fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:#fff;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb;box-shadow:0 0 2px rgba(30,140,190,.8)}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#f1f1f1;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);border-radius:0;cursor:default;float:left;margin-right:5px;margin-top:5px;margin-bottom:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
|
1 |
+
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
|
assets/select2/js/i18n/af.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Verwyders asseblief "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Voer asseblief "+t+" of meer karakters";return n},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var t="Kies asseblief net "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Verwyders asseblief "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Voer asseblief "+t+" of meer karakters";return n},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var t="Kies asseblief net "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/ar.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum;return"الرجاء حذف "+t+" عناصر"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"الرجاء إضافة "+t+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){return"تستطيع إختيار "+e.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum;return"الرجاء حذف "+t+" عناصر"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"الرجاء إضافة "+t+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){return"تستطيع إختيار "+e.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/az.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/bg.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/bs.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bs",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bs",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/ca.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/cs.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadejte o jeden znak méně.":n<=4?"Prosím, zadejte o "+e(n,!0)+" znaky méně.":"Prosím, zadejte o "+n+" znaků méně."},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadejte ještě jeden znak.":n<=4?"Prosím, zadejte ještě další "+e(n,!0)+" znaky.":"Prosím, zadejte ještě dalších "+n+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku.":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky.":"Můžete zvolit maximálně "+n+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadejte o jeden znak méně.":n<=4?"Prosím, zadejte o "+e(n,!0)+" znaky méně.":"Prosím, zadejte o "+n+" znaků méně."},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadejte ještě jeden znak.":n<=4?"Prosím, zadejte ještě další "+e(n,!0)+" znaky.":"Prosím, zadejte ještě dalších "+n+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku.":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky.":"Můžete zvolit maximálně "+n+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/da.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Angiv venligst "+t+" tegn mindre"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Angiv venligst "+t+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Angiv venligst "+t+" tegn mindre"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Angiv venligst "+t+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/de.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/dsb.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/dsb",[],function(){var e=["znamuško","znamušce","znamuška","znamuškow"],t=["zapisk","zapiska","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Pšosym lašuj "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Pšosym zapódaj nanejmjenjej "+r+" "+n(r,e)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(e){return"Móžoš jano "+e.maximum+" "+n(e.maximum,t)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/dsb",[],function(){var e=["znamuško","znamušce","znamuška","znamuškow"],t=["zapisk","zapiska","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Pšosym lašuj "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Pšosym zapódaj nanejmjenjej "+r+" "+n(r,e)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(e){return"Móžoš jano "+e.maximum+" "+n(e.maximum,t)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/el.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/en.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/es.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/et.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/eu.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/fa.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها میتوانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها میتوانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/fi.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/fr.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
-
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Supprimez "+t+" caractère"+(t>1
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Supprimez "+t+" caractère"+(t>1?"s":"")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Saisissez au moins "+t+" caractère"+(t>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/gl.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var t=e.input.length-e.maximum;return t===1?"Elimine un carácter":"Elimine "+t+" caracteres"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t===1?"Engada un carácter":"Engada "+t+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return e.maximum===1?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var t=e.input.length-e.maximum;return t===1?"Elimine un carácter":"Elimine "+t+" caracteres"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t===1?"Engada un carácter":"Engada "+t+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return e.maximum===1?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/he.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/hi.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/hr.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/hsb.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hsb",[],function(){var e=["znamješko","znamješce","znamješka","znamješkow"],t=["zapisk","zapiskaj","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Prošu zhašej "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Prošu zapodaj znajmjeńša "+r+" "+n(r,e)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(e){return"Móžeš jenož "+e.maximum+" "+n(e.maximum,t)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hsb",[],function(){var e=["znamješko","znamješce","znamješka","znamješkow"],t=["zapisk","zapiskaj","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Prošu zhašej "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Prošu zapodaj znajmjeńša "+r+" "+n(r,e)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(e){return"Móžeš jenož "+e.maximum+" "+n(e.maximum,t)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/hu.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/hy.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Խնդրում ենք հեռացնել "+t+" նշան";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Խնդրում ենք մուտքագրել "+t+" կամ ավել նշաններ";return n},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(e){var t="Դուք կարող եք ընտրել առավելագույնը "+e.maximum+" կետ";return t},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Խնդրում ենք հեռացնել "+t+" նշան";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Խնդրում ենք մուտքագրել "+t+" կամ ավել նշաններ";return n},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(e){var t="Դուք կարող եք ընտրել առավելագույնը "+e.maximum+" կետ";return t},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/id.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/is.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/it.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/ja.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/km.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/ko.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/lt.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/lv.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/mk.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/ms.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/nb.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
-
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
+
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Vennligst skriv inn "+t+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/nl.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/pl.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/ps.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="د مهربانۍ لمخي "+t+" توری ړنګ کړئ";return t!=1&&(n=n.replace("توری","توري")),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لږ تر لږه "+t+" يا ډېر توري وليکئ";return n},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(e){var t="تاسو يوازي "+e.maximum+" قلم په نښه کولای سی";return e.maximum!=1&&(t=t.replace("قلم","قلمونه")),t},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="د مهربانۍ لمخي "+t+" توری ړنګ کړئ";return t!=1&&(n=n.replace("توری","توري")),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لږ تر لږه "+t+" يا ډېر توري وليکئ";return n},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(e){var t="تاسو يوازي "+e.maximum+" قلم په نښه کولای سی";return e.maximum!=1&&(t=t.replace("قلم","قلمونه")),t},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/pt-BR.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/pt.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"caractere",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"caractere",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/ro.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+" sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+" sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/ru.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/sk.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/sl.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Prosim zbrišite "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Prosim vpišite še "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var t="Označite lahko največ "+e.maximum+" predmet";return e.maximum==2?t+="a":e.maximum!=1&&(t+="e"),t},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Prosim zbrišite "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Prosim vpišite še "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var t="Označite lahko največ "+e.maximum+" predmet";return e.maximum==2?t+="a":e.maximum!=1&&(t+="e"),t},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/sr-Cyrl.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/sr.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/sv.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/th.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/tk.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
|
3 |
+
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" harp bozuň.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ýene-de iň az "+t+" harp ýazyň.";return n},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){var t="Diňe "+e.maximum+" sanysyny saýlaň.";return t},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/tr.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/uk.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/vi.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+" ký tự";return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+" ký tự";return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/zh-CN.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/i18n/zh-TW.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! Select2 4.0.6-rc.
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
|
3 |
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
|
assets/select2/js/select2.full.js
ADDED
@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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Select2 4.0.6-rc.1
|
3 |
+
* https://select2.github.io
|
4 |
+
*
|
5 |
+
* Released under the MIT license
|
6 |
+
* https://github.com/select2/select2/blob/master/LICENSE.md
|
7 |
+
*/
|
8 |
+
;(function (factory) {
|
9 |
+
if (typeof define === 'function' && define.amd) {
|
10 |
+
// AMD. Register as an anonymous module.
|
11 |
+
define(['jquery'], factory);
|
12 |
+
} else if (typeof module === 'object' && module.exports) {
|
13 |
+
// Node/CommonJS
|
14 |
+
module.exports = function (root, jQuery) {
|
15 |
+
if (jQuery === undefined) {
|
16 |
+
// require('jQuery') returns a factory that requires window to
|
17 |
+
// build a jQuery instance, we normalize how we use modules
|
18 |
+
// that require this pattern but the window provided is a noop
|
19 |
+
// if it's defined (how jquery works)
|
20 |
+
if (typeof window !== 'undefined') {
|
21 |
+
jQuery = require('jquery');
|
22 |
+
}
|
23 |
+
else {
|
24 |
+
jQuery = require('jquery')(root);
|
25 |
+
}
|
26 |
+
}
|
27 |
+
factory(jQuery);
|
28 |
+
return jQuery;
|
29 |
+
};
|
30 |
+
} else {
|
31 |
+
// Browser globals
|
32 |
+
factory(jQuery);
|
33 |
+
}
|
34 |
+
} (function (jQuery) {
|
35 |
+
// This is needed so we can catch the AMD loader configuration and use it
|
36 |
+
// The inner file should be wrapped (by `banner.start.js`) in a function that
|
37 |
+
// returns the AMD loader references.
|
38 |
+
var S2 =(function () {
|
39 |
+
// Restore the Select2 AMD loader so it can be used
|
40 |
+
// Needed mostly in the language files, where the loader is not inserted
|
41 |
+
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
|
42 |
+
var S2 = jQuery.fn.select2.amd;
|
43 |
+
}
|
44 |
+
var S2;(function () { if (!S2 || !S2.requirejs) {
|
45 |
+
if (!S2) { S2 = {}; } else { require = S2; }
|
46 |
+
/**
|
47 |
+
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
|
48 |
+
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
|
49 |
+
*/
|
50 |
+
//Going sloppy to avoid 'use strict' string cost, but strict practices should
|
51 |
+
//be followed.
|
52 |
+
/*global setTimeout: false */
|
53 |
+
|
54 |
+
var requirejs, require, define;
|
55 |
+
(function (undef) {
|
56 |
+
var main, req, makeMap, handlers,
|
57 |
+
defined = {},
|
58 |
+
waiting = {},
|
59 |
+
config = {},
|
60 |
+
defining = {},
|
61 |
+
hasOwn = Object.prototype.hasOwnProperty,
|
62 |
+
aps = [].slice,
|
63 |
+
jsSuffixRegExp = /\.js$/;
|
64 |
+
|
65 |
+
function hasProp(obj, prop) {
|
66 |
+
return hasOwn.call(obj, prop);
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Given a relative module name, like ./something, normalize it to
|
71 |
+
* a real name that can be mapped to a path.
|
72 |
+
* @param {String} name the relative name
|
73 |
+
* @param {String} baseName a real name that the name arg is relative
|
74 |
+
* to.
|
75 |
+
* @returns {String} normalized name
|
76 |
+
*/
|
77 |
+
function normalize(name, baseName) {
|
78 |
+
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
|
79 |
+
foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
|
80 |
+
baseParts = baseName && baseName.split("/"),
|
81 |
+
map = config.map,
|
82 |
+
starMap = (map && map['*']) || {};
|
83 |
+
|
84 |
+
//Adjust any relative paths.
|
85 |
+
if (name) {
|
86 |
+
name = name.split('/');
|
87 |
+
lastIndex = name.length - 1;
|
88 |
+
|
89 |
+
// If wanting node ID compatibility, strip .js from end
|
90 |
+
// of IDs. Have to do this here, and not in nameToUrl
|
91 |
+
// because node allows either .js or non .js to map
|
92 |
+
// to same file.
|
93 |
+
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
|
94 |
+
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
|
95 |
+
}
|
96 |
+
|
97 |
+
// Starts with a '.' so need the baseName
|
98 |
+
if (name[0].charAt(0) === '.' && baseParts) {
|
99 |
+
//Convert baseName to array, and lop off the last part,
|
100 |
+
//so that . matches that 'directory' and not name of the baseName's
|
101 |
+
//module. For instance, baseName of 'one/two/three', maps to
|
102 |
+
//'one/two/three.js', but we want the directory, 'one/two' for
|
103 |
+
//this normalization.
|
104 |
+
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
|
105 |
+
name = normalizedBaseParts.concat(name);
|
106 |
+
}
|
107 |
+
|
108 |
+
//start trimDots
|
109 |
+
for (i = 0; i < name.length; i++) {
|
110 |
+
part = name[i];
|
111 |
+
if (part === '.') {
|
112 |
+
name.splice(i, 1);
|
113 |
+
i -= 1;
|
114 |
+
} else if (part === '..') {
|
115 |
+
// If at the start, or previous value is still ..,
|
116 |
+
// keep them so that when converted to a path it may
|
117 |
+
// still work when converted to a path, even though
|
118 |
+
// as an ID it is less than ideal. In larger point
|
119 |
+
// releases, may be better to just kick out an error.
|
120 |
+
if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
|
121 |
+
continue;
|
122 |
+
} else if (i > 0) {
|
123 |
+
name.splice(i - 1, 2);
|
124 |
+
i -= 2;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
128 |
+
//end trimDots
|
129 |
+
|
130 |
+
name = name.join('/');
|
131 |
+
}
|
132 |
+
|
133 |
+
//Apply map config if available.
|
134 |
+
if ((baseParts || starMap) && map) {
|
135 |
+
nameParts = name.split('/');
|
136 |
+
|
137 |
+
for (i = nameParts.length; i > 0; i -= 1) {
|
138 |
+
nameSegment = nameParts.slice(0, i).join("/");
|
139 |
+
|
140 |
+
if (baseParts) {
|
141 |
+
//Find the longest baseName segment match in the config.
|
142 |
+
//So, do joins on the biggest to smallest lengths of baseParts.
|
143 |
+
for (j = baseParts.length; j > 0; j -= 1) {
|
144 |
+
mapValue = map[baseParts.slice(0, j).join('/')];
|
145 |
+
|
146 |
+
//baseName segment has config, find if it has one for
|
147 |
+
//this name.
|
148 |
+
if (mapValue) {
|
149 |
+
mapValue = mapValue[nameSegment];
|
150 |
+
if (mapValue) {
|
151 |
+
//Match, update name to the new value.
|
152 |
+
foundMap = mapValue;
|
153 |
+
foundI = i;
|
154 |
+
break;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
if (foundMap) {
|
161 |
+
break;
|
162 |
+
}
|
163 |
+
|
164 |
+
//Check for a star map match, but just hold on to it,
|
165 |
+
//if there is a shorter segment match later in a matching
|
166 |
+
//config, then favor over this star map.
|
167 |
+
if (!foundStarMap && starMap && starMap[nameSegment]) {
|
168 |
+
foundStarMap = starMap[nameSegment];
|
169 |
+
starI = i;
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
if (!foundMap && foundStarMap) {
|
174 |
+
foundMap = foundStarMap;
|
175 |
+
foundI = starI;
|
176 |
+
}
|
177 |
+
|
178 |
+
if (foundMap) {
|
179 |
+
nameParts.splice(0, foundI, foundMap);
|
180 |
+
name = nameParts.join('/');
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
return name;
|
185 |
+
}
|
186 |
+
|
187 |
+
function makeRequire(relName, forceSync) {
|
188 |
+
return function () {
|
189 |
+
//A version of a require function that passes a moduleName
|
190 |
+
//value for items that may need to
|
191 |
+
//look up paths relative to the moduleName
|
192 |
+
var args = aps.call(arguments, 0);
|
193 |
+
|
194 |
+
//If first arg is not require('string'), and there is only
|
195 |
+
//one arg, it is the array form without a callback. Insert
|
196 |
+
//a null so that the following concat is correct.
|
197 |
+
if (typeof args[0] !== 'string' && args.length === 1) {
|
198 |
+
args.push(null);
|
199 |
+
}
|
200 |
+
return req.apply(undef, args.concat([relName, forceSync]));
|
201 |
+
};
|
202 |
+
}
|
203 |
+
|
204 |
+
function makeNormalize(relName) {
|
205 |
+
return function (name) {
|
206 |
+
return normalize(name, relName);
|
207 |
+
};
|
208 |
+
}
|
209 |
+
|
210 |
+
function makeLoad(depName) {
|
211 |
+
return function (value) {
|
212 |
+
defined[depName] = value;
|
213 |
+
};
|
214 |
+
}
|
215 |
+
|
216 |
+
function callDep(name) {
|
217 |
+
if (hasProp(waiting, name)) {
|
218 |
+
var args = waiting[name];
|
219 |
+
delete waiting[name];
|
220 |
+
defining[name] = true;
|
221 |
+
main.apply(undef, args);
|
222 |
+
}
|
223 |
+
|
224 |
+
if (!hasProp(defined, name) && !hasProp(defining, name)) {
|
225 |
+
throw new Error('No ' + name);
|
226 |
+
}
|
227 |
+
return defined[name];
|
228 |
+
}
|
229 |
+
|
230 |
+
//Turns a plugin!resource to [plugin, resource]
|
231 |
+
//with the plugin being undefined if the name
|
232 |
+
//did not have a plugin prefix.
|
233 |
+
function splitPrefix(name) {
|
234 |
+
var prefix,
|
235 |
+
index = name ? name.indexOf('!') : -1;
|
236 |
+
if (index > -1) {
|
237 |
+
prefix = name.substring(0, index);
|
238 |
+
name = name.substring(index + 1, name.length);
|
239 |
+
}
|
240 |
+
return [prefix, name];
|
241 |
+
}
|
242 |
+
|
243 |
+
//Creates a parts array for a relName where first part is plugin ID,
|
244 |
+
//second part is resource ID. Assumes relName has already been normalized.
|
245 |
+
function makeRelParts(relName) {
|
246 |
+
return relName ? splitPrefix(relName) : [];
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Makes a name map, normalizing the name, and using a plugin
|
251 |
+
* for normalization if necessary. Grabs a ref to plugin
|
252 |
+
* too, as an optimization.
|
253 |
+
*/
|
254 |
+
makeMap = function (name, relParts) {
|
255 |
+
var plugin,
|
256 |
+
parts = splitPrefix(name),
|
257 |
+
prefix = parts[0],
|
258 |
+
relResourceName = relParts[1];
|
259 |
+
|
260 |
+
name = parts[1];
|
261 |
+
|
262 |
+
if (prefix) {
|
263 |
+
prefix = normalize(prefix, relResourceName);
|
264 |
+
plugin = callDep(prefix);
|
265 |
+
}
|
266 |
+
|
267 |
+
//Normalize according
|
268 |
+
if (prefix) {
|
269 |
+
if (plugin && plugin.normalize) {
|
270 |
+
name = plugin.normalize(name, makeNormalize(relResourceName));
|
271 |
+
} else {
|
272 |
+
name = normalize(name, relResourceName);
|
273 |
+
}
|
274 |
+
} else {
|
275 |
+
name = normalize(name, relResourceName);
|
276 |
+
parts = splitPrefix(name);
|
277 |
+
prefix = parts[0];
|
278 |
+
name = parts[1];
|
279 |
+
if (prefix) {
|
280 |
+
plugin = callDep(prefix);
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
284 |
+
//Using ridiculous property names for space reasons
|
285 |
+
return {
|
286 |
+
f: prefix ? prefix + '!' + name : name, //fullName
|
287 |
+
n: name,
|
288 |
+
pr: prefix,
|
289 |
+
p: plugin
|
290 |
+
};
|
291 |
+
};
|
292 |
+
|
293 |
+
function makeConfig(name) {
|
294 |
+
return function () {
|
295 |
+
return (config && config.config && config.config[name]) || {};
|
296 |
+
};
|
297 |
+
}
|
298 |
+
|
299 |
+
handlers = {
|
300 |
+
require: function (name) {
|
301 |
+
return makeRequire(name);
|
302 |
+
},
|
303 |
+
exports: function (name) {
|
304 |
+
var e = defined[name];
|
305 |
+
if (typeof e !== 'undefined') {
|
306 |
+
return e;
|
307 |
+
} else {
|
308 |
+
return (defined[name] = {});
|
309 |
+
}
|
310 |
+
},
|
311 |
+
module: function (name) {
|
312 |
+
return {
|
313 |
+
id: name,
|
314 |
+
uri: '',
|
315 |
+
exports: defined[name],
|
316 |
+
config: makeConfig(name)
|
317 |
+
};
|
318 |
+
}
|
319 |
+
};
|
320 |
+
|
321 |
+
main = function (name, deps, callback, relName) {
|
322 |
+
var cjsModule, depName, ret, map, i, relParts,
|
323 |
+
args = [],
|
324 |
+
callbackType = typeof callback,
|
325 |
+
usingExports;
|
326 |
+
|
327 |
+
//Use name if no relName
|
328 |
+
relName = relName || name;
|
329 |
+
relParts = makeRelParts(relName);
|
330 |
+
|
331 |
+
//Call the callback to define the module, if necessary.
|
332 |
+
if (callbackType === 'undefined' || callbackType === 'function') {
|
333 |
+
//Pull out the defined dependencies and pass the ordered
|
334 |
+
//values to the callback.
|
335 |
+
//Default to [require, exports, module] if no deps
|
336 |
+
deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
|
337 |
+
for (i = 0; i < deps.length; i += 1) {
|
338 |
+
map = makeMap(deps[i], relParts);
|
339 |
+
depName = map.f;
|
340 |
+
|
341 |
+
//Fast path CommonJS standard dependencies.
|
342 |
+
if (depName === "require") {
|
343 |
+
args[i] = handlers.require(name);
|
344 |
+
} else if (depName === "exports") {
|
345 |
+
//CommonJS module spec 1.1
|
346 |
+
args[i] = handlers.exports(name);
|
347 |
+
usingExports = true;
|
348 |
+
} else if (depName === "module") {
|
349 |
+
//CommonJS module spec 1.1
|
350 |
+
cjsModule = args[i] = handlers.module(name);
|
351 |
+
} else if (hasProp(defined, depName) ||
|
352 |
+
hasProp(waiting, depName) ||
|
353 |
+
hasProp(defining, depName)) {
|
354 |
+
args[i] = callDep(depName);
|
355 |
+
} else if (map.p) {
|
356 |
+
map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
|
357 |
+
args[i] = defined[depName];
|
358 |
+
} else {
|
359 |
+
throw new Error(name + ' missing ' + depName);
|
360 |
+
}
|
361 |
+
}
|
362 |
+
|
363 |
+
ret = callback ? callback.apply(defined[name], args) : undefined;
|
364 |
+
|
365 |
+
if (name) {
|
366 |
+
//If setting exports via "module" is in play,
|
367 |
+
//favor that over return value and exports. After that,
|
368 |
+
//favor a non-undefined return value over exports use.
|
369 |
+
if (cjsModule && cjsModule.exports !== undef &&
|
370 |
+
cjsModule.exports !== defined[name]) {
|
371 |
+
defined[name] = cjsModule.exports;
|
372 |
+
} else if (ret !== undef || !usingExports) {
|
373 |
+
//Use the return value from the function.
|
374 |
+
defined[name] = ret;
|
375 |
+
}
|
376 |
+
}
|
377 |
+
} else if (name) {
|
378 |
+
//May just be an object definition for the module. Only
|
379 |
+
//worry about defining if have a module name.
|
380 |
+
defined[name] = callback;
|
381 |
+
}
|
382 |
+
};
|
383 |
+
|
384 |
+
requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
|
385 |
+
if (typeof deps === "string") {
|
386 |
+
if (handlers[deps]) {
|
387 |
+
//callback in this case is really relName
|
388 |
+
return handlers[deps](callback);
|
389 |
+
}
|
390 |
+
//Just return the module wanted. In this scenario, the
|
391 |
+
//deps arg is the module name, and second arg (if passed)
|
392 |
+
//is just the relName.
|
393 |
+
//Normalize module name, if it contains . or ..
|
394 |
+
return callDep(makeMap(deps, makeRelParts(callback)).f);
|
395 |
+
} else if (!deps.splice) {
|
396 |
+
//deps is a config object, not an array.
|
397 |
+
config = deps;
|
398 |
+
if (config.deps) {
|
399 |
+
req(config.deps, config.callback);
|
400 |
+
}
|
401 |
+
if (!callback) {
|
402 |
+
return;
|
403 |
+
}
|
404 |
+
|
405 |
+
if (callback.splice) {
|
406 |
+
//callback is an array, which means it is a dependency list.
|
407 |
+
//Adjust args if there are dependencies
|
408 |
+
deps = callback;
|
409 |
+
callback = relName;
|
410 |
+
relName = null;
|
411 |
+
} else {
|
412 |
+
deps = undef;
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
//Support require(['a'])
|
417 |
+
callback = callback || function () {};
|
418 |
+
|
419 |
+
//If relName is a function, it is an errback handler,
|
420 |
+
//so remove it.
|
421 |
+
if (typeof relName === 'function') {
|
422 |
+
relName = forceSync;
|
423 |
+
forceSync = alt;
|
424 |
+
}
|
425 |
+
|
426 |
+
//Simulate async callback;
|
427 |
+
if (forceSync) {
|
428 |
+
main(undef, deps, callback, relName);
|
429 |
+
} else {
|
430 |
+
//Using a non-zero value because of concern for what old browsers
|
431 |
+
//do, and latest browsers "upgrade" to 4 if lower value is used:
|
432 |
+
//http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
|
433 |
+
//If want a value immediately, use require('id') instead -- something
|
434 |
+
//that works in almond on the global level, but not guaranteed and
|
435 |
+
//unlikely to work in other AMD implementations.
|
436 |
+
setTimeout(function () {
|
437 |
+
main(undef, deps, callback, relName);
|
438 |
+
}, 4);
|
439 |
+
}
|
440 |
+
|
441 |
+
return req;
|
442 |
+
};
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Just drops the config on the floor, but returns req in case
|
446 |
+
* the config return value is used.
|
447 |
+
*/
|
448 |
+
req.config = function (cfg) {
|
449 |
+
return req(cfg);
|
450 |
+
};
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Expose module registry for debugging and tooling
|
454 |
+
*/
|
455 |
+
requirejs._defined = defined;
|
456 |
+
|
457 |
+
define = function (name, deps, callback) {
|
458 |
+
if (typeof name !== 'string') {
|
459 |
+
throw new Error('See almond README: incorrect module build, no module name');
|
460 |
+
}
|
461 |
+
|
462 |
+
//This module may not have dependencies
|
463 |
+
if (!deps.splice) {
|
464 |
+
//deps is not an array, so probably means
|
465 |
+
//an object literal or factory function for
|
466 |
+
//the value. Adjust args.
|
467 |
+
callback = deps;
|
468 |
+
deps = [];
|
469 |
+
}
|
470 |
+
|
471 |
+
if (!hasProp(defined, name) && !hasProp(waiting, name)) {
|
472 |
+
waiting[name] = [name, deps, callback];
|
473 |
+
}
|
474 |
+
};
|
475 |
+
|
476 |
+
define.amd = {
|
477 |
+
jQuery: true
|
478 |
+
};
|
479 |
+
}());
|
480 |
+
|
481 |
+
S2.requirejs = requirejs;S2.require = require;S2.define = define;
|
482 |
+
}
|
483 |
+
}());
|
484 |
+
S2.define("almond", function(){});
|
485 |
+
|
486 |
+
/* global jQuery:false, $:false */
|
487 |
+
S2.define('jquery',[],function () {
|
488 |
+
var _$ = jQuery || $;
|
489 |
+
|
490 |
+
if (_$ == null && console && console.error) {
|
491 |
+
console.error(
|
492 |
+
'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
|
493 |
+
'found. Make sure that you are including jQuery before Select2 on your ' +
|
494 |
+
'web page.'
|
495 |
+
);
|
496 |
+
}
|
497 |
+
|
498 |
+
return _$;
|
499 |
+
});
|
500 |
+
|
501 |
+
S2.define('select2/utils',[
|
502 |
+
'jquery'
|
503 |
+
], function ($) {
|
504 |
+
var Utils = {};
|
505 |
+
|
506 |
+
Utils.Extend = function (ChildClass, SuperClass) {
|
507 |
+
var __hasProp = {}.hasOwnProperty;
|
508 |
+
|
509 |
+
function BaseConstructor () {
|
510 |
+
this.constructor = ChildClass;
|
511 |
+
}
|
512 |
+
|
513 |
+
for (var key in SuperClass) {
|
514 |
+
if (__hasProp.call(SuperClass, key)) {
|
515 |
+
ChildClass[key] = SuperClass[key];
|
516 |
+
}
|
517 |
+
}
|
518 |
+
|
519 |
+
BaseConstructor.prototype = SuperClass.prototype;
|
520 |
+
ChildClass.prototype = new BaseConstructor();
|
521 |
+
ChildClass.__super__ = SuperClass.prototype;
|
522 |
+
|
523 |
+
return ChildClass;
|
524 |
+
};
|
525 |
+
|
526 |
+
function getMethods (theClass) {
|
527 |
+
var proto = theClass.prototype;
|
528 |
+
|
529 |
+
var methods = [];
|
530 |
+
|
531 |
+
for (var methodName in proto) {
|
532 |
+
var m = proto[methodName];
|
533 |
+
|
534 |
+
if (typeof m !== 'function') {
|
535 |
+
continue;
|
536 |
+
}
|
537 |
+
|
538 |
+
if (methodName === 'constructor') {
|
539 |
+
continue;
|
540 |
+
}
|
541 |
+
|
542 |
+
methods.push(methodName);
|
543 |
+
}
|
544 |
+
|
545 |
+
return methods;
|
546 |
+
}
|
547 |
+
|
548 |
+
Utils.Decorate = function (SuperClass, DecoratorClass) {
|
549 |
+
var decoratedMethods = getMethods(DecoratorClass);
|
550 |
+
var superMethods = getMethods(SuperClass);
|
551 |
+
|
552 |
+
function DecoratedClass () {
|
553 |
+
var unshift = Array.prototype.unshift;
|
554 |
+
|
555 |
+
var argCount = DecoratorClass.prototype.constructor.length;
|
556 |
+
|
557 |
+
var calledConstructor = SuperClass.prototype.constructor;
|
558 |
+
|
559 |
+
if (argCount > 0) {
|
560 |
+
unshift.call(arguments, SuperClass.prototype.constructor);
|
561 |
+
|
562 |
+
calledConstructor = DecoratorClass.prototype.constructor;
|
563 |
+
}
|
564 |
+
|
565 |
+
calledConstructor.apply(this, arguments);
|
566 |
+
}
|
567 |
+
|
568 |
+
DecoratorClass.displayName = SuperClass.displayName;
|
569 |
+
|
570 |
+
function ctr () {
|
571 |
+
this.constructor = DecoratedClass;
|
572 |
+
}
|
573 |
+
|
574 |
+
DecoratedClass.prototype = new ctr();
|
575 |
+
|
576 |
+
for (var m = 0; m < superMethods.length; m++) {
|
577 |
+
var superMethod = superMethods[m];
|
578 |
+
|
579 |
+
DecoratedClass.prototype[superMethod] =
|
580 |
+
SuperClass.prototype[superMethod];
|
581 |
+
}
|
582 |
+
|
583 |
+
var calledMethod = function (methodName) {
|
584 |
+
// Stub out the original method if it's not decorating an actual method
|
585 |
+
var originalMethod = function () {};
|
586 |
+
|
587 |
+
if (methodName in DecoratedClass.prototype) {
|
588 |
+
originalMethod = DecoratedClass.prototype[methodName];
|
589 |
+
}
|
590 |
+
|
591 |
+
var decoratedMethod = DecoratorClass.prototype[methodName];
|
592 |
+
|
593 |
+
return function () {
|
594 |
+
var unshift = Array.prototype.unshift;
|
595 |
+
|
596 |
+
unshift.call(arguments, originalMethod);
|
597 |
+
|
598 |
+
return decoratedMethod.apply(this, arguments);
|
599 |
+
};
|
600 |
+
};
|
601 |
+
|
602 |
+
for (var d = 0; d < decoratedMethods.length; d++) {
|
603 |
+
var decoratedMethod = decoratedMethods[d];
|
604 |
+
|
605 |
+
DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
|
606 |
+
}
|
607 |
+
|
608 |
+
return DecoratedClass;
|
609 |
+
};
|
610 |
+
|
611 |
+
var Observable = function () {
|
612 |
+
this.listeners = {};
|
613 |
+
};
|
614 |
+
|
615 |
+
Observable.prototype.on = function (event, callback) {
|
616 |
+
this.listeners = this.listeners || {};
|
617 |
+
|
618 |
+
if (event in this.listeners) {
|
619 |
+
this.listeners[event].push(callback);
|
620 |
+
} else {
|
621 |
+
this.listeners[event] = [callback];
|
622 |
+
}
|
623 |
+
};
|
624 |
+
|
625 |
+
Observable.prototype.trigger = function (event) {
|
626 |
+
var slice = Array.prototype.slice;
|
627 |
+
var params = slice.call(arguments, 1);
|
628 |
+
|
629 |
+
this.listeners = this.listeners || {};
|
630 |
+
|
631 |
+
// Params should always come in as an array
|
632 |
+
if (params == null) {
|
633 |
+
params = [];
|
634 |
+
}
|
635 |
+
|
636 |
+
// If there are no arguments to the event, use a temporary object
|
637 |
+
if (params.length === 0) {
|
638 |
+
params.push({});
|
639 |
+
}
|
640 |
+
|
641 |
+
// Set the `_type` of the first object to the event
|
642 |
+
params[0]._type = event;
|
643 |
+
|
644 |
+
if (event in this.listeners) {
|
645 |
+
this.invoke(this.listeners[event], slice.call(arguments, 1));
|
646 |
+
}
|
647 |
+
|
648 |
+
if ('*' in this.listeners) {
|
649 |
+
this.invoke(this.listeners['*'], arguments);
|
650 |
+
}
|
651 |
+
};
|
652 |
+
|
653 |
+
Observable.prototype.invoke = function (listeners, params) {
|
654 |
+
for (var i = 0, len = listeners.length; i < len; i++) {
|
655 |
+
listeners[i].apply(this, params);
|
656 |
+
}
|
657 |
+
};
|
658 |
+
|
659 |
+
Utils.Observable = Observable;
|
660 |
+
|
661 |
+
Utils.generateChars = function (length) {
|
662 |
+
var chars = '';
|
663 |
+
|
664 |
+
for (var i = 0; i < length; i++) {
|
665 |
+
var randomChar = Math.floor(Math.random() * 36);
|
666 |
+
chars += randomChar.toString(36);
|
667 |
+
}
|
668 |
+
|
669 |
+
return chars;
|
670 |
+
};
|
671 |
+
|
672 |
+
Utils.bind = function (func, context) {
|
673 |
+
return function () {
|
674 |
+
func.apply(context, arguments);
|
675 |
+
};
|
676 |
+
};
|
677 |
+
|
678 |
+
Utils._convertData = function (data) {
|
679 |
+
for (var originalKey in data) {
|
680 |
+
var keys = originalKey.split('-');
|
681 |
+
|
682 |
+
var dataLevel = data;
|
683 |
+
|
684 |
+
if (keys.length === 1) {
|
685 |
+
continue;
|
686 |
+
}
|
687 |
+
|
688 |
+
for (var k = 0; k < keys.length; k++) {
|
689 |
+
var key = keys[k];
|
690 |
+
|
691 |
+
// Lowercase the first letter
|
692 |
+
// By default, dash-separated becomes camelCase
|
693 |
+
key = key.substring(0, 1).toLowerCase() + key.substring(1);
|
694 |
+
|
695 |
+
if (!(key in dataLevel)) {
|
696 |
+
dataLevel[key] = {};
|
697 |
+
}
|
698 |
+
|
699 |
+
if (k == keys.length - 1) {
|
700 |
+
dataLevel[key] = data[originalKey];
|
701 |
+
}
|
702 |
+
|
703 |
+
dataLevel = dataLevel[key];
|
704 |
+
}
|
705 |
+
|
706 |
+
delete data[originalKey];
|
707 |
+
}
|
708 |
+
|
709 |
+
return data;
|
710 |
+
};
|
711 |
+
|
712 |
+
Utils.hasScroll = function (index, el) {
|
713 |
+
// Adapted from the function created by @ShadowScripter
|
714 |
+
// and adapted by @BillBarry on the Stack Exchange Code Review website.
|
715 |
+
// The original code can be found at
|
716 |
+
// http://codereview.stackexchange.com/q/13338
|
717 |
+
// and was designed to be used with the Sizzle selector engine.
|
718 |
+
|
719 |
+
var $el = $(el);
|
720 |
+
var overflowX = el.style.overflowX;
|
721 |
+
var overflowY = el.style.overflowY;
|
722 |
+
|
723 |
+
//Check both x and y declarations
|
724 |
+
if (overflowX === overflowY &&
|
725 |
+
(overflowY === 'hidden' || overflowY === 'visible')) {
|
726 |
+
return false;
|
727 |
+
}
|
728 |
+
|
729 |
+
if (overflowX === 'scroll' || overflowY === 'scroll') {
|
730 |
+
return true;
|
731 |
+
}
|
732 |
+
|
733 |
+
return ($el.innerHeight() < el.scrollHeight ||
|
734 |
+
$el.innerWidth() < el.scrollWidth);
|
735 |
+
};
|
736 |
+
|
737 |
+
Utils.escapeMarkup = function (markup) {
|
738 |
+
var replaceMap = {
|
739 |
+
'\\': '\',
|
740 |
+
'&': '&',
|
741 |
+
'<': '<',
|
742 |
+
'>': '>',
|
743 |
+
'"': '"',
|
744 |
+
'\'': ''',
|
745 |
+
'/': '/'
|
746 |
+
};
|
747 |
+
|
748 |
+
// Do not try to escape the markup if it's not a string
|
749 |
+
if (typeof markup !== 'string') {
|
750 |
+
return markup;
|
751 |
+
}
|
752 |
+
|
753 |
+
return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
|
754 |
+
return replaceMap[match];
|
755 |
+
});
|
756 |
+
};
|
757 |
+
|
758 |
+
// Append an array of jQuery nodes to a given element.
|
759 |
+
Utils.appendMany = function ($element, $nodes) {
|
760 |
+
// jQuery 1.7.x does not support $.fn.append() with an array
|
761 |
+
// Fall back to a jQuery object collection using $.fn.add()
|
762 |
+
if ($.fn.jquery.substr(0, 3) === '1.7') {
|
763 |
+
var $jqNodes = $();
|
764 |
+
|
765 |
+
$.map($nodes, function (node) {
|
766 |
+
$jqNodes = $jqNodes.add(node);
|
767 |
+
});
|
768 |
+
|
769 |
+
$nodes = $jqNodes;
|
770 |
+
}
|
771 |
+
|
772 |
+
$element.append($nodes);
|
773 |
+
};
|
774 |
+
|
775 |
+
// Cache objects in Utils.__cache instead of $.data (see #4346)
|
776 |
+
Utils.__cache = {};
|
777 |
+
|
778 |
+
var id = 0;
|
779 |
+
Utils.GetUniqueElementId = function (element) {
|
780 |
+
// Get a unique element Id. If element has no id,
|
781 |
+
// creates a new unique number, stores it in the id
|
782 |
+
// attribute and returns the new id.
|
783 |
+
// If an id already exists, it simply returns it.
|
784 |
+
|
785 |
+
var select2Id = element.getAttribute('data-select2-id');
|
786 |
+
if (select2Id == null) {
|
787 |
+
// If element has id, use it.
|
788 |
+
if (element.id) {
|
789 |
+
select2Id = element.id;
|
790 |
+
element.setAttribute('data-select2-id', select2Id);
|
791 |
+
} else {
|
792 |
+
element.setAttribute('data-select2-id', ++id);
|
793 |
+
select2Id = id.toString();
|
794 |
+
}
|
795 |
+
}
|
796 |
+
return select2Id;
|
797 |
+
};
|
798 |
+
|
799 |
+
Utils.StoreData = function (element, name, value) {
|
800 |
+
// Stores an item in the cache for a specified element.
|
801 |
+
// name is the cache key.
|
802 |
+
var id = Utils.GetUniqueElementId(element);
|
803 |
+
if (!Utils.__cache[id]) {
|
804 |
+
Utils.__cache[id] = {};
|
805 |
+
}
|
806 |
+
|
807 |
+
Utils.__cache[id][name] = value;
|
808 |
+
};
|
809 |
+
|
810 |
+
Utils.GetData = function (element, name) {
|
811 |
+
// Retrieves a value from the cache by its key (name)
|
812 |
+
// name is optional. If no name specified, return
|
813 |
+
// all cache items for the specified element.
|
814 |
+
// and for a specified element.
|
815 |
+
var id = Utils.GetUniqueElementId(element);
|
816 |
+
if (name) {
|
817 |
+
if (Utils.__cache[id]) {
|
818 |
+
return Utils.__cache[id][name] != null ?
|
819 |
+
Utils.__cache[id][name]:
|
820 |
+
$(element).data(name); // Fallback to HTML5 data attribs.
|
821 |
+
}
|
822 |
+
return $(element).data(name); // Fallback to HTML5 data attribs.
|
823 |
+
} else {
|
824 |
+
return Utils.__cache[id];
|
825 |
+
}
|
826 |
+
};
|
827 |
+
|
828 |
+
Utils.RemoveData = function (element) {
|
829 |
+
// Removes all cached items for a specified element.
|
830 |
+
var id = Utils.GetUniqueElementId(element);
|
831 |
+
if (Utils.__cache[id] != null) {
|
832 |
+
delete Utils.__cache[id];
|
833 |
+
}
|
834 |
+
};
|
835 |
+
|
836 |
+
return Utils;
|
837 |
+
});
|
838 |
+
|
839 |
+
S2.define('select2/results',[
|
840 |
+
'jquery',
|
841 |
+
'./utils'
|
842 |
+
], function ($, Utils) {
|
843 |
+
function Results ($element, options, dataAdapter) {
|
844 |
+
this.$element = $element;
|
845 |
+
this.data = dataAdapter;
|
846 |
+
this.options = options;
|
847 |
+
|
848 |
+
Results.__super__.constructor.call(this);
|
849 |
+
}
|
850 |
+
|
851 |
+
Utils.Extend(Results, Utils.Observable);
|
852 |
+
|
853 |
+
Results.prototype.render = function () {
|
854 |
+
var $results = $(
|
855 |
+
'<ul class="select2-results__options" role="tree"></ul>'
|
856 |
+
);
|
857 |
+
|
858 |
+
if (this.options.get('multiple')) {
|
859 |
+
$results.attr('aria-multiselectable', 'true');
|
860 |
+
}
|
861 |
+
|
862 |
+
this.$results = $results;
|
863 |
+
|
864 |
+
return $results;
|
865 |
+
};
|
866 |
+
|
867 |
+
Results.prototype.clear = function () {
|
868 |
+
this.$results.empty();
|
869 |
+
};
|
870 |
+
|
871 |
+
Results.prototype.displayMessage = function (params) {
|
872 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
873 |
+
|
874 |
+
this.clear();
|
875 |
+
this.hideLoading();
|
876 |
+
|
877 |
+
var $message = $(
|
878 |
+
'<li role="treeitem" aria-live="assertive"' +
|
879 |
+
' class="select2-results__option"></li>'
|
880 |
+
);
|
881 |
+
|
882 |
+
var message = this.options.get('translations').get(params.message);
|
883 |
+
|
884 |
+
$message.append(
|
885 |
+
escapeMarkup(
|
886 |
+
message(params.args)
|
887 |
+
)
|
888 |
+
);
|
889 |
+
|
890 |
+
$message[0].className += ' select2-results__message';
|
891 |
+
|
892 |
+
this.$results.append($message);
|
893 |
+
};
|
894 |
+
|
895 |
+
Results.prototype.hideMessages = function () {
|
896 |
+
this.$results.find('.select2-results__message').remove();
|
897 |
+
};
|
898 |
+
|
899 |
+
Results.prototype.append = function (data) {
|
900 |
+
this.hideLoading();
|
901 |
+
|
902 |
+
var $options = [];
|
903 |
+
|
904 |
+
if (data.results == null || data.results.length === 0) {
|
905 |
+
if (this.$results.children().length === 0) {
|
906 |
+
this.trigger('results:message', {
|
907 |
+
message: 'noResults'
|
908 |
+
});
|
909 |
+
}
|
910 |
+
|
911 |
+
return;
|
912 |
+
}
|
913 |
+
|
914 |
+
data.results = this.sort(data.results);
|
915 |
+
|
916 |
+
for (var d = 0; d < data.results.length; d++) {
|
917 |
+
var item = data.results[d];
|
918 |
+
|
919 |
+
var $option = this.option(item);
|
920 |
+
|
921 |
+
$options.push($option);
|
922 |
+
}
|
923 |
+
|
924 |
+
this.$results.append($options);
|
925 |
+
};
|
926 |
+
|
927 |
+
Results.prototype.position = function ($results, $dropdown) {
|
928 |
+
var $resultsContainer = $dropdown.find('.select2-results');
|
929 |
+
$resultsContainer.append($results);
|
930 |
+
};
|
931 |
+
|
932 |
+
Results.prototype.sort = function (data) {
|
933 |
+
var sorter = this.options.get('sorter');
|
934 |
+
|
935 |
+
return sorter(data);
|
936 |
+
};
|
937 |
+
|
938 |
+
Results.prototype.highlightFirstItem = function () {
|
939 |
+
var $options = this.$results
|
940 |
+
.find('.select2-results__option[aria-selected]');
|
941 |
+
|
942 |
+
var $selected = $options.filter('[aria-selected=true]');
|
943 |
+
|
944 |
+
// Check if there are any selected options
|
945 |
+
if ($selected.length > 0) {
|
946 |
+
// If there are selected options, highlight the first
|
947 |
+
$selected.first().trigger('mouseenter');
|
948 |
+
} else {
|
949 |
+
// If there are no selected options, highlight the first option
|
950 |
+
// in the dropdown
|
951 |
+
$options.first().trigger('mouseenter');
|
952 |
+
}
|
953 |
+
|
954 |
+
this.ensureHighlightVisible();
|
955 |
+
};
|
956 |
+
|
957 |
+
Results.prototype.setClasses = function () {
|
958 |
+
var self = this;
|
959 |
+
|
960 |
+
this.data.current(function (selected) {
|
961 |
+
var selectedIds = $.map(selected, function (s) {
|
962 |
+
return s.id.toString();
|
963 |
+
});
|
964 |
+
|
965 |
+
var $options = self.$results
|
966 |
+
.find('.select2-results__option[aria-selected]');
|
967 |
+
|
968 |
+
$options.each(function () {
|
969 |
+
var $option = $(this);
|
970 |
+
|
971 |
+
var item = Utils.GetData(this, 'data');
|
972 |
+
|
973 |
+
// id needs to be converted to a string when comparing
|
974 |
+
var id = '' + item.id;
|
975 |
+
|
976 |
+
if ((item.element != null && item.element.selected) ||
|
977 |
+
(item.element == null && $.inArray(id, selectedIds) > -1)) {
|
978 |
+
$option.attr('aria-selected', 'true');
|
979 |
+
} else {
|
980 |
+
$option.attr('aria-selected', 'false');
|
981 |
+
}
|
982 |
+
});
|
983 |
+
|
984 |
+
});
|
985 |
+
};
|
986 |
+
|
987 |
+
Results.prototype.showLoading = function (params) {
|
988 |
+
this.hideLoading();
|
989 |
+
|
990 |
+
var loadingMore = this.options.get('translations').get('searching');
|
991 |
+
|
992 |
+
var loading = {
|
993 |
+
disabled: true,
|
994 |
+
loading: true,
|
995 |
+
text: loadingMore(params)
|
996 |
+
};
|
997 |
+
var $loading = this.option(loading);
|
998 |
+
$loading.className += ' loading-results';
|
999 |
+
|
1000 |
+
this.$results.prepend($loading);
|
1001 |
+
};
|
1002 |
+
|
1003 |
+
Results.prototype.hideLoading = function () {
|
1004 |
+
this.$results.find('.loading-results').remove();
|
1005 |
+
};
|
1006 |
+
|
1007 |
+
Results.prototype.option = function (data) {
|
1008 |
+
var option = document.createElement('li');
|
1009 |
+
option.className = 'select2-results__option';
|
1010 |
+
|
1011 |
+
var attrs = {
|
1012 |
+
'role': 'treeitem',
|
1013 |
+
'aria-selected': 'false'
|
1014 |
+
};
|
1015 |
+
|
1016 |
+
if (data.disabled) {
|
1017 |
+
delete attrs['aria-selected'];
|
1018 |
+
attrs['aria-disabled'] = 'true';
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
if (data.id == null) {
|
1022 |
+
delete attrs['aria-selected'];
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
if (data._resultId != null) {
|
1026 |
+
option.id = data._resultId;
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
if (data.title) {
|
1030 |
+
option.title = data.title;
|
1031 |
+
}
|
1032 |
+
|
1033 |
+
if (data.children) {
|
1034 |
+
attrs.role = 'group';
|
1035 |
+
attrs['aria-label'] = data.text;
|
1036 |
+
delete attrs['aria-selected'];
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
for (var attr in attrs) {
|
1040 |
+
var val = attrs[attr];
|
1041 |
+
|
1042 |
+
option.setAttribute(attr, val);
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
if (data.children) {
|
1046 |
+
var $option = $(option);
|
1047 |
+
|
1048 |
+
var label = document.createElement('strong');
|
1049 |
+
label.className = 'select2-results__group';
|
1050 |
+
|
1051 |
+
var $label = $(label);
|
1052 |
+
this.template(data, label);
|
1053 |
+
|
1054 |
+
var $children = [];
|
1055 |
+
|
1056 |
+
for (var c = 0; c < data.children.length; c++) {
|
1057 |
+
var child = data.children[c];
|
1058 |
+
|
1059 |
+
var $child = this.option(child);
|
1060 |
+
|
1061 |
+
$children.push($child);
|
1062 |
+
}
|
1063 |
+
|
1064 |
+
var $childrenContainer = $('<ul></ul>', {
|
1065 |
+
'class': 'select2-results__options select2-results__options--nested'
|
1066 |
+
});
|
1067 |
+
|
1068 |
+
$childrenContainer.append($children);
|
1069 |
+
|
1070 |
+
$option.append(label);
|
1071 |
+
$option.append($childrenContainer);
|
1072 |
+
} else {
|
1073 |
+
this.template(data, option);
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
Utils.StoreData(option, 'data', data);
|
1077 |
+
|
1078 |
+
return option;
|
1079 |
+
};
|
1080 |
+
|
1081 |
+
Results.prototype.bind = function (container, $container) {
|
1082 |
+
var self = this;
|
1083 |
+
|
1084 |
+
var id = container.id + '-results';
|
1085 |
+
|
1086 |
+
this.$results.attr('id', id);
|
1087 |
+
|
1088 |
+
container.on('results:all', function (params) {
|
1089 |
+
self.clear();
|
1090 |
+
self.append(params.data);
|
1091 |
+
|
1092 |
+
if (container.isOpen()) {
|
1093 |
+
self.setClasses();
|
1094 |
+
self.highlightFirstItem();
|
1095 |
+
}
|
1096 |
+
});
|
1097 |
+
|
1098 |
+
container.on('results:append', function (params) {
|
1099 |
+
self.append(params.data);
|
1100 |
+
|
1101 |
+
if (container.isOpen()) {
|
1102 |
+
self.setClasses();
|
1103 |
+
}
|
1104 |
+
});
|
1105 |
+
|
1106 |
+
container.on('query', function (params) {
|
1107 |
+
self.hideMessages();
|
1108 |
+
self.showLoading(params);
|
1109 |
+
});
|
1110 |
+
|
1111 |
+
container.on('select', function () {
|
1112 |
+
if (!container.isOpen()) {
|
1113 |
+
return;
|
1114 |
+
}
|
1115 |
+
|
1116 |
+
self.setClasses();
|
1117 |
+
self.highlightFirstItem();
|
1118 |
+
});
|
1119 |
+
|
1120 |
+
container.on('unselect', function () {
|
1121 |
+
if (!container.isOpen()) {
|
1122 |
+
return;
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
self.setClasses();
|
1126 |
+
self.highlightFirstItem();
|
1127 |
+
});
|
1128 |
+
|
1129 |
+
container.on('open', function () {
|
1130 |
+
// When the dropdown is open, aria-expended="true"
|
1131 |
+
self.$results.attr('aria-expanded', 'true');
|
1132 |
+
self.$results.attr('aria-hidden', 'false');
|
1133 |
+
|
1134 |
+
self.setClasses();
|
1135 |
+
self.ensureHighlightVisible();
|
1136 |
+
});
|
1137 |
+
|
1138 |
+
container.on('close', function () {
|
1139 |
+
// When the dropdown is closed, aria-expended="false"
|
1140 |
+
self.$results.attr('aria-expanded', 'false');
|
1141 |
+
self.$results.attr('aria-hidden', 'true');
|
1142 |
+
self.$results.removeAttr('aria-activedescendant');
|
1143 |
+
});
|
1144 |
+
|
1145 |
+
container.on('results:toggle', function () {
|
1146 |
+
var $highlighted = self.getHighlightedResults();
|
1147 |
+
|
1148 |
+
if ($highlighted.length === 0) {
|
1149 |
+
return;
|
1150 |
+
}
|
1151 |
+
|
1152 |
+
$highlighted.trigger('mouseup');
|
1153 |
+
});
|
1154 |
+
|
1155 |
+
container.on('results:select', function () {
|
1156 |
+
var $highlighted = self.getHighlightedResults();
|
1157 |
+
|
1158 |
+
if ($highlighted.length === 0) {
|
1159 |
+
return;
|
1160 |
+
}
|
1161 |
+
|
1162 |
+
var data = Utils.GetData($highlighted[0], 'data');
|
1163 |
+
|
1164 |
+
if ($highlighted.attr('aria-selected') == 'true') {
|
1165 |
+
self.trigger('close', {});
|
1166 |
+
} else {
|
1167 |
+
self.trigger('select', {
|
1168 |
+
data: data
|
1169 |
+
});
|
1170 |
+
}
|
1171 |
+
});
|
1172 |
+
|
1173 |
+
container.on('results:previous', function () {
|
1174 |
+
var $highlighted = self.getHighlightedResults();
|
1175 |
+
|
1176 |
+
var $options = self.$results.find('[aria-selected]');
|
1177 |
+
|
1178 |
+
var currentIndex = $options.index($highlighted);
|
1179 |
+
|
1180 |
+
// If we are already at te top, don't move further
|
1181 |
+
// If no options, currentIndex will be -1
|
1182 |
+
if (currentIndex <= 0) {
|
1183 |
+
return;
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
var nextIndex = currentIndex - 1;
|
1187 |
+
|
1188 |
+
// If none are highlighted, highlight the first
|
1189 |
+
if ($highlighted.length === 0) {
|
1190 |
+
nextIndex = 0;
|
1191 |
+
}
|
1192 |
+
|
1193 |
+
var $next = $options.eq(nextIndex);
|
1194 |
+
|
1195 |
+
$next.trigger('mouseenter');
|
1196 |
+
|
1197 |
+
var currentOffset = self.$results.offset().top;
|
1198 |
+
var nextTop = $next.offset().top;
|
1199 |
+
var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
|
1200 |
+
|
1201 |
+
if (nextIndex === 0) {
|
1202 |
+
self.$results.scrollTop(0);
|
1203 |
+
} else if (nextTop - currentOffset < 0) {
|
1204 |
+
self.$results.scrollTop(nextOffset);
|
1205 |
+
}
|
1206 |
+
});
|
1207 |
+
|
1208 |
+
container.on('results:next', function () {
|
1209 |
+
var $highlighted = self.getHighlightedResults();
|
1210 |
+
|
1211 |
+
var $options = self.$results.find('[aria-selected]');
|
1212 |
+
|
1213 |
+
var currentIndex = $options.index($highlighted);
|
1214 |
+
|
1215 |
+
var nextIndex = currentIndex + 1;
|
1216 |
+
|
1217 |
+
// If we are at the last option, stay there
|
1218 |
+
if (nextIndex >= $options.length) {
|
1219 |
+
return;
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
var $next = $options.eq(nextIndex);
|
1223 |
+
|
1224 |
+
$next.trigger('mouseenter');
|
1225 |
+
|
1226 |
+
var currentOffset = self.$results.offset().top +
|
1227 |
+
self.$results.outerHeight(false);
|
1228 |
+
var nextBottom = $next.offset().top + $next.outerHeight(false);
|
1229 |
+
var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
|
1230 |
+
|
1231 |
+
if (nextIndex === 0) {
|
1232 |
+
self.$results.scrollTop(0);
|
1233 |
+
} else if (nextBottom > currentOffset) {
|
1234 |
+
self.$results.scrollTop(nextOffset);
|
1235 |
+
}
|
1236 |
+
});
|
1237 |
+
|
1238 |
+
container.on('results:focus', function (params) {
|
1239 |
+
params.element.addClass('select2-results__option--highlighted');
|
1240 |
+
});
|
1241 |
+
|
1242 |
+
container.on('results:message', function (params) {
|
1243 |
+
self.displayMessage(params);
|
1244 |
+
});
|
1245 |
+
|
1246 |
+
if ($.fn.mousewheel) {
|
1247 |
+
this.$results.on('mousewheel', function (e) {
|
1248 |
+
var top = self.$results.scrollTop();
|
1249 |
+
|
1250 |
+
var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
|
1251 |
+
|
1252 |
+
var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
|
1253 |
+
var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
|
1254 |
+
|
1255 |
+
if (isAtTop) {
|
1256 |
+
self.$results.scrollTop(0);
|
1257 |
+
|
1258 |
+
e.preventDefault();
|
1259 |
+
e.stopPropagation();
|
1260 |
+
} else if (isAtBottom) {
|
1261 |
+
self.$results.scrollTop(
|
1262 |
+
self.$results.get(0).scrollHeight - self.$results.height()
|
1263 |
+
);
|
1264 |
+
|
1265 |
+
e.preventDefault();
|
1266 |
+
e.stopPropagation();
|
1267 |
+
}
|
1268 |
+
});
|
1269 |
+
}
|
1270 |
+
|
1271 |
+
this.$results.on('mouseup', '.select2-results__option[aria-selected]',
|
1272 |
+
function (evt) {
|
1273 |
+
var $this = $(this);
|
1274 |
+
|
1275 |
+
var data = Utils.GetData(this, 'data');
|
1276 |
+
|
1277 |
+
if ($this.attr('aria-selected') === 'true') {
|
1278 |
+
if (self.options.get('multiple')) {
|
1279 |
+
self.trigger('unselect', {
|
1280 |
+
originalEvent: evt,
|
1281 |
+
data: data
|
1282 |
+
});
|
1283 |
+
} else {
|
1284 |
+
self.trigger('close', {});
|
1285 |
+
}
|
1286 |
+
|
1287 |
+
return;
|
1288 |
+
}
|
1289 |
+
|
1290 |
+
self.trigger('select', {
|
1291 |
+
originalEvent: evt,
|
1292 |
+
data: data
|
1293 |
+
});
|
1294 |
+
});
|
1295 |
+
|
1296 |
+
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
1297 |
+
function (evt) {
|
1298 |
+
var data = Utils.GetData(this, 'data');
|
1299 |
+
|
1300 |
+
self.getHighlightedResults()
|
1301 |
+
.removeClass('select2-results__option--highlighted');
|
1302 |
+
|
1303 |
+
self.trigger('results:focus', {
|
1304 |
+
data: data,
|
1305 |
+
element: $(this)
|
1306 |
+
});
|
1307 |
+
});
|
1308 |
+
};
|
1309 |
+
|
1310 |
+
Results.prototype.getHighlightedResults = function () {
|
1311 |
+
var $highlighted = this.$results
|
1312 |
+
.find('.select2-results__option--highlighted');
|
1313 |
+
|
1314 |
+
return $highlighted;
|
1315 |
+
};
|
1316 |
+
|
1317 |
+
Results.prototype.destroy = function () {
|
1318 |
+
this.$results.remove();
|
1319 |
+
};
|
1320 |
+
|
1321 |
+
Results.prototype.ensureHighlightVisible = function () {
|
1322 |
+
var $highlighted = this.getHighlightedResults();
|
1323 |
+
|
1324 |
+
if ($highlighted.length === 0) {
|
1325 |
+
return;
|
1326 |
+
}
|
1327 |
+
|
1328 |
+
var $options = this.$results.find('[aria-selected]');
|
1329 |
+
|
1330 |
+
var currentIndex = $options.index($highlighted);
|
1331 |
+
|
1332 |
+
var currentOffset = this.$results.offset().top;
|
1333 |
+
var nextTop = $highlighted.offset().top;
|
1334 |
+
var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
|
1335 |
+
|
1336 |
+
var offsetDelta = nextTop - currentOffset;
|
1337 |
+
nextOffset -= $highlighted.outerHeight(false) * 2;
|
1338 |
+
|
1339 |
+
if (currentIndex <= 2) {
|
1340 |
+
this.$results.scrollTop(0);
|
1341 |
+
} else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
|
1342 |
+
this.$results.scrollTop(nextOffset);
|
1343 |
+
}
|
1344 |
+
};
|
1345 |
+
|
1346 |
+
Results.prototype.template = function (result, container) {
|
1347 |
+
var template = this.options.get('templateResult');
|
1348 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1349 |
+
|
1350 |
+
var content = template(result, container);
|
1351 |
+
|
1352 |
+
if (content == null) {
|
1353 |
+
container.style.display = 'none';
|
1354 |
+
} else if (typeof content === 'string') {
|
1355 |
+
container.innerHTML = escapeMarkup(content);
|
1356 |
+
} else {
|
1357 |
+
$(container).append(content);
|
1358 |
+
}
|
1359 |
+
};
|
1360 |
+
|
1361 |
+
return Results;
|
1362 |
+
});
|
1363 |
+
|
1364 |
+
S2.define('select2/keys',[
|
1365 |
+
|
1366 |
+
], function () {
|
1367 |
+
var KEYS = {
|
1368 |
+
BACKSPACE: 8,
|
1369 |
+
TAB: 9,
|
1370 |
+
ENTER: 13,
|
1371 |
+
SHIFT: 16,
|
1372 |
+
CTRL: 17,
|
1373 |
+
ALT: 18,
|
1374 |
+
ESC: 27,
|
1375 |
+
SPACE: 32,
|
1376 |
+
PAGE_UP: 33,
|
1377 |
+
PAGE_DOWN: 34,
|
1378 |
+
END: 35,
|
1379 |
+
HOME: 36,
|
1380 |
+
LEFT: 37,
|
1381 |
+
UP: 38,
|
1382 |
+
RIGHT: 39,
|
1383 |
+
DOWN: 40,
|
1384 |
+
DELETE: 46
|
1385 |
+
};
|
1386 |
+
|
1387 |
+
return KEYS;
|
1388 |
+
});
|
1389 |
+
|
1390 |
+
S2.define('select2/selection/base',[
|
1391 |
+
'jquery',
|
1392 |
+
'../utils',
|
1393 |
+
'../keys'
|
1394 |
+
], function ($, Utils, KEYS) {
|
1395 |
+
function BaseSelection ($element, options) {
|
1396 |
+
this.$element = $element;
|
1397 |
+
this.options = options;
|
1398 |
+
|
1399 |
+
BaseSelection.__super__.constructor.call(this);
|
1400 |
+
}
|
1401 |
+
|
1402 |
+
Utils.Extend(BaseSelection, Utils.Observable);
|
1403 |
+
|
1404 |
+
BaseSelection.prototype.render = function () {
|
1405 |
+
var $selection = $(
|
1406 |
+
'<span class="select2-selection" role="combobox" ' +
|
1407 |
+
' aria-haspopup="true" aria-expanded="false">' +
|
1408 |
+
'</span>'
|
1409 |
+
);
|
1410 |
+
|
1411 |
+
this._tabindex = 0;
|
1412 |
+
|
1413 |
+
if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
|
1414 |
+
this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
|
1415 |
+
} else if (this.$element.attr('tabindex') != null) {
|
1416 |
+
this._tabindex = this.$element.attr('tabindex');
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
$selection.attr('title', this.$element.attr('title'));
|
1420 |
+
$selection.attr('tabindex', this._tabindex);
|
1421 |
+
|
1422 |
+
this.$selection = $selection;
|
1423 |
+
|
1424 |
+
return $selection;
|
1425 |
+
};
|
1426 |
+
|
1427 |
+
BaseSelection.prototype.bind = function (container, $container) {
|
1428 |
+
var self = this;
|
1429 |
+
|
1430 |
+
var id = container.id + '-container';
|
1431 |
+
var resultsId = container.id + '-results';
|
1432 |
+
|
1433 |
+
this.container = container;
|
1434 |
+
|
1435 |
+
this.$selection.on('focus', function (evt) {
|
1436 |
+
self.trigger('focus', evt);
|
1437 |
+
});
|
1438 |
+
|
1439 |
+
this.$selection.on('blur', function (evt) {
|
1440 |
+
self._handleBlur(evt);
|
1441 |
+
});
|
1442 |
+
|
1443 |
+
this.$selection.on('keydown', function (evt) {
|
1444 |
+
self.trigger('keypress', evt);
|
1445 |
+
|
1446 |
+
if (evt.which === KEYS.SPACE) {
|
1447 |
+
evt.preventDefault();
|
1448 |
+
}
|
1449 |
+
});
|
1450 |
+
|
1451 |
+
container.on('results:focus', function (params) {
|
1452 |
+
self.$selection.attr('aria-activedescendant', params.data._resultId);
|
1453 |
+
});
|
1454 |
+
|
1455 |
+
container.on('selection:update', function (params) {
|
1456 |
+
self.update(params.data);
|
1457 |
+
});
|
1458 |
+
|
1459 |
+
container.on('open', function () {
|
1460 |
+
// When the dropdown is open, aria-expanded="true"
|
1461 |
+
self.$selection.attr('aria-expanded', 'true');
|
1462 |
+
self.$selection.attr('aria-owns', resultsId);
|
1463 |
+
|
1464 |
+
self._attachCloseHandler(container);
|
1465 |
+
});
|
1466 |
+
|
1467 |
+
container.on('close', function () {
|
1468 |
+
// When the dropdown is closed, aria-expanded="false"
|
1469 |
+
self.$selection.attr('aria-expanded', 'false');
|
1470 |
+
self.$selection.removeAttr('aria-activedescendant');
|
1471 |
+
self.$selection.removeAttr('aria-owns');
|
1472 |
+
|
1473 |
+
self.$selection.focus();
|
1474 |
+
window.setTimeout(function () {
|
1475 |
+
self.$selection.focus();
|
1476 |
+
}, 0);
|
1477 |
+
|
1478 |
+
self._detachCloseHandler(container);
|
1479 |
+
});
|
1480 |
+
|
1481 |
+
container.on('enable', function () {
|
1482 |
+
self.$selection.attr('tabindex', self._tabindex);
|
1483 |
+
});
|
1484 |
+
|
1485 |
+
container.on('disable', function () {
|
1486 |
+
self.$selection.attr('tabindex', '-1');
|
1487 |
+
});
|
1488 |
+
};
|
1489 |
+
|
1490 |
+
BaseSelection.prototype._handleBlur = function (evt) {
|
1491 |
+
var self = this;
|
1492 |
+
|
1493 |
+
// This needs to be delayed as the active element is the body when the tab
|
1494 |
+
// key is pressed, possibly along with others.
|
1495 |
+
window.setTimeout(function () {
|
1496 |
+
// Don't trigger `blur` if the focus is still in the selection
|
1497 |
+
if (
|
1498 |
+
(document.activeElement == self.$selection[0]) ||
|
1499 |
+
($.contains(self.$selection[0], document.activeElement))
|
1500 |
+
) {
|
1501 |
+
return;
|
1502 |
+
}
|
1503 |
+
|
1504 |
+
self.trigger('blur', evt);
|
1505 |
+
}, 1);
|
1506 |
+
};
|
1507 |
+
|
1508 |
+
BaseSelection.prototype._attachCloseHandler = function (container) {
|
1509 |
+
var self = this;
|
1510 |
+
|
1511 |
+
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
1512 |
+
var $target = $(e.target);
|
1513 |
+
|
1514 |
+
var $select = $target.closest('.select2');
|
1515 |
+
|
1516 |
+
var $all = $('.select2.select2-container--open');
|
1517 |
+
|
1518 |
+
$all.each(function () {
|
1519 |
+
var $this = $(this);
|
1520 |
+
|
1521 |
+
if (this == $select[0]) {
|
1522 |
+
return;
|
1523 |
+
}
|
1524 |
+
|
1525 |
+
var $element = Utils.GetData(this, 'element');
|
1526 |
+
|
1527 |
+
$element.select2('close');
|
1528 |
+
});
|
1529 |
+
});
|
1530 |
+
};
|
1531 |
+
|
1532 |
+
BaseSelection.prototype._detachCloseHandler = function (container) {
|
1533 |
+
$(document.body).off('mousedown.select2.' + container.id);
|
1534 |
+
};
|
1535 |
+
|
1536 |
+
BaseSelection.prototype.position = function ($selection, $container) {
|
1537 |
+
var $selectionContainer = $container.find('.selection');
|
1538 |
+
$selectionContainer.append($selection);
|
1539 |
+
};
|
1540 |
+
|
1541 |
+
BaseSelection.prototype.destroy = function () {
|
1542 |
+
this._detachCloseHandler(this.container);
|
1543 |
+
};
|
1544 |
+
|
1545 |
+
BaseSelection.prototype.update = function (data) {
|
1546 |
+
throw new Error('The `update` method must be defined in child classes.');
|
1547 |
+
};
|
1548 |
+
|
1549 |
+
return BaseSelection;
|
1550 |
+
});
|
1551 |
+
|
1552 |
+
S2.define('select2/selection/single',[
|
1553 |
+
'jquery',
|
1554 |
+
'./base',
|
1555 |
+
'../utils',
|
1556 |
+
'../keys'
|
1557 |
+
], function ($, BaseSelection, Utils, KEYS) {
|
1558 |
+
function SingleSelection () {
|
1559 |
+
SingleSelection.__super__.constructor.apply(this, arguments);
|
1560 |
+
}
|
1561 |
+
|
1562 |
+
Utils.Extend(SingleSelection, BaseSelection);
|
1563 |
+
|
1564 |
+
SingleSelection.prototype.render = function () {
|
1565 |
+
var $selection = SingleSelection.__super__.render.call(this);
|
1566 |
+
|
1567 |
+
$selection.addClass('select2-selection--single');
|
1568 |
+
|
1569 |
+
$selection.html(
|
1570 |
+
'<span class="select2-selection__rendered"></span>' +
|
1571 |
+
'<span class="select2-selection__arrow" role="presentation">' +
|
1572 |
+
'<b role="presentation"></b>' +
|
1573 |
+
'</span>'
|
1574 |
+
);
|
1575 |
+
|
1576 |
+
return $selection;
|
1577 |
+
};
|
1578 |
+
|
1579 |
+
SingleSelection.prototype.bind = function (container, $container) {
|
1580 |
+
var self = this;
|
1581 |
+
|
1582 |
+
SingleSelection.__super__.bind.apply(this, arguments);
|
1583 |
+
|
1584 |
+
var id = container.id + '-container';
|
1585 |
+
|
1586 |
+
this.$selection.find('.select2-selection__rendered')
|
1587 |
+
.attr('id', id)
|
1588 |
+
.attr('role', 'textbox')
|
1589 |
+
.attr('aria-readonly', 'true');
|
1590 |
+
this.$selection.attr('aria-labelledby', id);
|
1591 |
+
|
1592 |
+
this.$selection.on('mousedown', function (evt) {
|
1593 |
+
// Only respond to left clicks
|
1594 |
+
if (evt.which !== 1) {
|
1595 |
+
return;
|
1596 |
+
}
|
1597 |
+
|
1598 |
+
self.trigger('toggle', {
|
1599 |
+
originalEvent: evt
|
1600 |
+
});
|
1601 |
+
});
|
1602 |
+
|
1603 |
+
this.$selection.on('focus', function (evt) {
|
1604 |
+
// User focuses on the container
|
1605 |
+
});
|
1606 |
+
|
1607 |
+
this.$selection.on('blur', function (evt) {
|
1608 |
+
// User exits the container
|
1609 |
+
});
|
1610 |
+
|
1611 |
+
container.on('focus', function (evt) {
|
1612 |
+
if (!container.isOpen()) {
|
1613 |
+
self.$selection.focus();
|
1614 |
+
}
|
1615 |
+
});
|
1616 |
+
};
|
1617 |
+
|
1618 |
+
SingleSelection.prototype.clear = function () {
|
1619 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1620 |
+
$rendered.empty();
|
1621 |
+
$rendered.removeAttr('title'); // clear tooltip on empty
|
1622 |
+
};
|
1623 |
+
|
1624 |
+
SingleSelection.prototype.display = function (data, container) {
|
1625 |
+
var template = this.options.get('templateSelection');
|
1626 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1627 |
+
|
1628 |
+
return escapeMarkup(template(data, container));
|
1629 |
+
};
|
1630 |
+
|
1631 |
+
SingleSelection.prototype.selectionContainer = function () {
|
1632 |
+
return $('<span></span>');
|
1633 |
+
};
|
1634 |
+
|
1635 |
+
SingleSelection.prototype.update = function (data) {
|
1636 |
+
if (data.length === 0) {
|
1637 |
+
this.clear();
|
1638 |
+
return;
|
1639 |
+
}
|
1640 |
+
|
1641 |
+
var selection = data[0];
|
1642 |
+
|
1643 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1644 |
+
var formatted = this.display(selection, $rendered);
|
1645 |
+
|
1646 |
+
$rendered.empty().append(formatted);
|
1647 |
+
$rendered.attr('title', selection.title || selection.text);
|
1648 |
+
};
|
1649 |
+
|
1650 |
+
return SingleSelection;
|
1651 |
+
});
|
1652 |
+
|
1653 |
+
S2.define('select2/selection/multiple',[
|
1654 |
+
'jquery',
|
1655 |
+
'./base',
|
1656 |
+
'../utils'
|
1657 |
+
], function ($, BaseSelection, Utils) {
|
1658 |
+
function MultipleSelection ($element, options) {
|
1659 |
+
MultipleSelection.__super__.constructor.apply(this, arguments);
|
1660 |
+
}
|
1661 |
+
|
1662 |
+
Utils.Extend(MultipleSelection, BaseSelection);
|
1663 |
+
|
1664 |
+
MultipleSelection.prototype.render = function () {
|
1665 |
+
var $selection = MultipleSelection.__super__.render.call(this);
|
1666 |
+
|
1667 |
+
$selection.addClass('select2-selection--multiple');
|
1668 |
+
|
1669 |
+
$selection.html(
|
1670 |
+
'<ul class="select2-selection__rendered"></ul>'
|
1671 |
+
);
|
1672 |
+
|
1673 |
+
return $selection;
|
1674 |
+
};
|
1675 |
+
|
1676 |
+
MultipleSelection.prototype.bind = function (container, $container) {
|
1677 |
+
var self = this;
|
1678 |
+
|
1679 |
+
MultipleSelection.__super__.bind.apply(this, arguments);
|
1680 |
+
|
1681 |
+
this.$selection.on('click', function (evt) {
|
1682 |
+
self.trigger('toggle', {
|
1683 |
+
originalEvent: evt
|
1684 |
+
});
|
1685 |
+
});
|
1686 |
+
|
1687 |
+
this.$selection.on(
|
1688 |
+
'click',
|
1689 |
+
'.select2-selection__choice__remove',
|
1690 |
+
function (evt) {
|
1691 |
+
// Ignore the event if it is disabled
|
1692 |
+
if (self.options.get('disabled')) {
|
1693 |
+
return;
|
1694 |
+
}
|
1695 |
+
|
1696 |
+
var $remove = $(this);
|
1697 |
+
var $selection = $remove.parent();
|
1698 |
+
|
1699 |
+
var data = Utils.GetData($selection[0], 'data');
|
1700 |
+
|
1701 |
+
self.trigger('unselect', {
|
1702 |
+
originalEvent: evt,
|
1703 |
+
data: data
|
1704 |
+
});
|
1705 |
+
}
|
1706 |
+
);
|
1707 |
+
};
|
1708 |
+
|
1709 |
+
MultipleSelection.prototype.clear = function () {
|
1710 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1711 |
+
$rendered.empty();
|
1712 |
+
$rendered.removeAttr('title');
|
1713 |
+
};
|
1714 |
+
|
1715 |
+
MultipleSelection.prototype.display = function (data, container) {
|
1716 |
+
var template = this.options.get('templateSelection');
|
1717 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1718 |
+
|
1719 |
+
return escapeMarkup(template(data, container));
|
1720 |
+
};
|
1721 |
+
|
1722 |
+
MultipleSelection.prototype.selectionContainer = function () {
|
1723 |
+
var $container = $(
|
1724 |
+
'<li class="select2-selection__choice">' +
|
1725 |
+
'<span class="select2-selection__choice__remove" role="presentation">' +
|
1726 |
+
'×' +
|
1727 |
+
'</span>' +
|
1728 |
+
'</li>'
|
1729 |
+
);
|
1730 |
+
|
1731 |
+
return $container;
|
1732 |
+
};
|
1733 |
+
|
1734 |
+
MultipleSelection.prototype.update = function (data) {
|
1735 |
+
this.clear();
|
1736 |
+
|
1737 |
+
if (data.length === 0) {
|
1738 |
+
return;
|
1739 |
+
}
|
1740 |
+
|
1741 |
+
var $selections = [];
|
1742 |
+
|
1743 |
+
for (var d = 0; d < data.length; d++) {
|
1744 |
+
var selection = data[d];
|
1745 |
+
|
1746 |
+
var $selection = this.selectionContainer();
|
1747 |
+
var formatted = this.display(selection, $selection);
|
1748 |
+
|
1749 |
+
$selection.append(formatted);
|
1750 |
+
$selection.attr('title', selection.title || selection.text);
|
1751 |
+
|
1752 |
+
Utils.StoreData($selection[0], 'data', selection);
|
1753 |
+
|
1754 |
+
$selections.push($selection);
|
1755 |
+
}
|
1756 |
+
|
1757 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1758 |
+
|
1759 |
+
Utils.appendMany($rendered, $selections);
|
1760 |
+
};
|
1761 |
+
|
1762 |
+
return MultipleSelection;
|
1763 |
+
});
|
1764 |
+
|
1765 |
+
S2.define('select2/selection/placeholder',[
|
1766 |
+
'../utils'
|
1767 |
+
], function (Utils) {
|
1768 |
+
function Placeholder (decorated, $element, options) {
|
1769 |
+
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
|
1770 |
+
|
1771 |
+
decorated.call(this, $element, options);
|
1772 |
+
}
|
1773 |
+
|
1774 |
+
Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
|
1775 |
+
if (typeof placeholder === 'string') {
|
1776 |
+
placeholder = {
|
1777 |
+
id: '',
|
1778 |
+
text: placeholder
|
1779 |
+
};
|
1780 |
+
}
|
1781 |
+
|
1782 |
+
return placeholder;
|
1783 |
+
};
|
1784 |
+
|
1785 |
+
Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
|
1786 |
+
var $placeholder = this.selectionContainer();
|
1787 |
+
|
1788 |
+
$placeholder.html(this.display(placeholder));
|
1789 |
+
$placeholder.addClass('select2-selection__placeholder')
|
1790 |
+
.removeClass('select2-selection__choice');
|
1791 |
+
|
1792 |
+
return $placeholder;
|
1793 |
+
};
|
1794 |
+
|
1795 |
+
Placeholder.prototype.update = function (decorated, data) {
|
1796 |
+
var singlePlaceholder = (
|
1797 |
+
data.length == 1 && data[0].id != this.placeholder.id
|
1798 |
+
);
|
1799 |
+
var multipleSelections = data.length > 1;
|
1800 |
+
|
1801 |
+
if (multipleSelections || singlePlaceholder) {
|
1802 |
+
return decorated.call(this, data);
|
1803 |
+
}
|
1804 |
+
|
1805 |
+
this.clear();
|
1806 |
+
|
1807 |
+
var $placeholder = this.createPlaceholder(this.placeholder);
|
1808 |
+
|
1809 |
+
this.$selection.find('.select2-selection__rendered').append($placeholder);
|
1810 |
+
};
|
1811 |
+
|
1812 |
+
return Placeholder;
|
1813 |
+
});
|
1814 |
+
|
1815 |
+
S2.define('select2/selection/allowClear',[
|
1816 |
+
'jquery',
|
1817 |
+
'../keys',
|
1818 |
+
'../utils'
|
1819 |
+
], function ($, KEYS, Utils) {
|
1820 |
+
function AllowClear () { }
|
1821 |
+
|
1822 |
+
AllowClear.prototype.bind = function (decorated, container, $container) {
|
1823 |
+
var self = this;
|
1824 |
+
|
1825 |
+
decorated.call(this, container, $container);
|
1826 |
+
|
1827 |
+
if (this.placeholder == null) {
|
1828 |
+
if (this.options.get('debug') && window.console && console.error) {
|
1829 |
+
console.error(
|
1830 |
+
'Select2: The `allowClear` option should be used in combination ' +
|
1831 |
+
'with the `placeholder` option.'
|
1832 |
+
);
|
1833 |
+
}
|
1834 |
+
}
|
1835 |
+
|
1836 |
+
this.$selection.on('mousedown', '.select2-selection__clear',
|
1837 |
+
function (evt) {
|
1838 |
+
self._handleClear(evt);
|
1839 |
+
});
|
1840 |
+
|
1841 |
+
container.on('keypress', function (evt) {
|
1842 |
+
self._handleKeyboardClear(evt, container);
|
1843 |
+
});
|
1844 |
+
};
|
1845 |
+
|
1846 |
+
AllowClear.prototype._handleClear = function (_, evt) {
|
1847 |
+
// Ignore the event if it is disabled
|
1848 |
+
if (this.options.get('disabled')) {
|
1849 |
+
return;
|
1850 |
+
}
|
1851 |
+
|
1852 |
+
var $clear = this.$selection.find('.select2-selection__clear');
|
1853 |
+
|
1854 |
+
// Ignore the event if nothing has been selected
|
1855 |
+
if ($clear.length === 0) {
|
1856 |
+
return;
|
1857 |
+
}
|
1858 |
+
|
1859 |
+
evt.stopPropagation();
|
1860 |
+
|
1861 |
+
var data = Utils.GetData($clear[0], 'data');
|
1862 |
+
|
1863 |
+
var previousVal = this.$element.val();
|
1864 |
+
this.$element.val(this.placeholder.id);
|
1865 |
+
|
1866 |
+
var unselectData = {
|
1867 |
+
data: data
|
1868 |
+
};
|
1869 |
+
this.trigger('clear', unselectData);
|
1870 |
+
if (unselectData.prevented) {
|
1871 |
+
this.$element.val(previousVal);
|
1872 |
+
return;
|
1873 |
+
}
|
1874 |
+
|
1875 |
+
for (var d = 0; d < data.length; d++) {
|
1876 |
+
unselectData = {
|
1877 |
+
data: data[d]
|
1878 |
+
};
|
1879 |
+
|
1880 |
+
// Trigger the `unselect` event, so people can prevent it from being
|
1881 |
+
// cleared.
|
1882 |
+
this.trigger('unselect', unselectData);
|
1883 |
+
|
1884 |
+
// If the event was prevented, don't clear it out.
|
1885 |
+
if (unselectData.prevented) {
|
1886 |
+
this.$element.val(previousVal);
|
1887 |
+
return;
|
1888 |
+
}
|
1889 |
+
}
|
1890 |
+
|
1891 |
+
this.$element.trigger('change');
|
1892 |
+
|
1893 |
+
this.trigger('toggle', {});
|
1894 |
+
};
|
1895 |
+
|
1896 |
+
AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
|
1897 |
+
if (container.isOpen()) {
|
1898 |
+
return;
|
1899 |
+
}
|
1900 |
+
|
1901 |
+
if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
|
1902 |
+
this._handleClear(evt);
|
1903 |
+
}
|
1904 |
+
};
|
1905 |
+
|
1906 |
+
AllowClear.prototype.update = function (decorated, data) {
|
1907 |
+
decorated.call(this, data);
|
1908 |
+
|
1909 |
+
if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
|
1910 |
+
data.length === 0) {
|
1911 |
+
return;
|
1912 |
+
}
|
1913 |
+
|
1914 |
+
var $remove = $(
|
1915 |
+
'<span class="select2-selection__clear">' +
|
1916 |
+
'×' +
|
1917 |
+
'</span>'
|
1918 |
+
);
|
1919 |
+
Utils.StoreData($remove[0], 'data', data);
|
1920 |
+
|
1921 |
+
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
1922 |
+
};
|
1923 |
+
|
1924 |
+
return AllowClear;
|
1925 |
+
});
|
1926 |
+
|
1927 |
+
S2.define('select2/selection/search',[
|
1928 |
+
'jquery',
|
1929 |
+
'../utils',
|
1930 |
+
'../keys'
|
1931 |
+
], function ($, Utils, KEYS) {
|
1932 |
+
function Search (decorated, $element, options) {
|
1933 |
+
decorated.call(this, $element, options);
|
1934 |
+
}
|
1935 |
+
|
1936 |
+
Search.prototype.render = function (decorated) {
|
1937 |
+
var $search = $(
|
1938 |
+
'<li class="select2-search select2-search--inline">' +
|
1939 |
+
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
1940 |
+
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
1941 |
+
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
|
1942 |
+
'</li>'
|
1943 |
+
);
|
1944 |
+
|
1945 |
+
this.$searchContainer = $search;
|
1946 |
+
this.$search = $search.find('input');
|
1947 |
+
|
1948 |
+
var $rendered = decorated.call(this);
|
1949 |
+
|
1950 |
+
this._transferTabIndex();
|
1951 |
+
|
1952 |
+
return $rendered;
|
1953 |
+
};
|
1954 |
+
|
1955 |
+
Search.prototype.bind = function (decorated, container, $container) {
|
1956 |
+
var self = this;
|
1957 |
+
|
1958 |
+
decorated.call(this, container, $container);
|
1959 |
+
|
1960 |
+
container.on('open', function () {
|
1961 |
+
self.$search.trigger('focus');
|
1962 |
+
});
|
1963 |
+
|
1964 |
+
container.on('close', function () {
|
1965 |
+
self.$search.val('');
|
1966 |
+
self.$search.removeAttr('aria-activedescendant');
|
1967 |
+
self.$search.trigger('focus');
|
1968 |
+
});
|
1969 |
+
|
1970 |
+
container.on('enable', function () {
|
1971 |
+
self.$search.prop('disabled', false);
|
1972 |
+
|
1973 |
+
self._transferTabIndex();
|
1974 |
+
});
|
1975 |
+
|
1976 |
+
container.on('disable', function () {
|
1977 |
+
self.$search.prop('disabled', true);
|
1978 |
+
});
|
1979 |
+
|
1980 |
+
container.on('focus', function (evt) {
|
1981 |
+
self.$search.trigger('focus');
|
1982 |
+
});
|
1983 |
+
|
1984 |
+
container.on('results:focus', function (params) {
|
1985 |
+
self.$search.attr('aria-activedescendant', params.id);
|
1986 |
+
});
|
1987 |
+
|
1988 |
+
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
1989 |
+
self.trigger('focus', evt);
|
1990 |
+
});
|
1991 |
+
|
1992 |
+
this.$selection.on('focusout', '.select2-search--inline', function (evt) {
|
1993 |
+
self._handleBlur(evt);
|
1994 |
+
});
|
1995 |
+
|
1996 |
+
this.$selection.on('keydown', '.select2-search--inline', function (evt) {
|
1997 |
+
evt.stopPropagation();
|
1998 |
+
|
1999 |
+
self.trigger('keypress', evt);
|
2000 |
+
|
2001 |
+
self._keyUpPrevented = evt.isDefaultPrevented();
|
2002 |
+
|
2003 |
+
var key = evt.which;
|
2004 |
+
|
2005 |
+
if (key === KEYS.BACKSPACE && self.$search.val() === '') {
|
2006 |
+
var $previousChoice = self.$searchContainer
|
2007 |
+
.prev('.select2-selection__choice');
|
2008 |
+
|
2009 |
+
if ($previousChoice.length > 0) {
|
2010 |
+
var item = Utils.GetData($previousChoice[0], 'data');
|
2011 |
+
|
2012 |
+
self.searchRemoveChoice(item);
|
2013 |
+
|
2014 |
+
evt.preventDefault();
|
2015 |
+
}
|
2016 |
+
}
|
2017 |
+
});
|
2018 |
+
|
2019 |
+
// Try to detect the IE version should the `documentMode` property that
|
2020 |
+
// is stored on the document. This is only implemented in IE and is
|
2021 |
+
// slightly cleaner than doing a user agent check.
|
2022 |
+
// This property is not available in Edge, but Edge also doesn't have
|
2023 |
+
// this bug.
|
2024 |
+
var msie = document.documentMode;
|
2025 |
+
var disableInputEvents = msie && msie <= 11;
|
2026 |
+
|
2027 |
+
// Workaround for browsers which do not support the `input` event
|
2028 |
+
// This will prevent double-triggering of events for browsers which support
|
2029 |
+
// both the `keyup` and `input` events.
|
2030 |
+
this.$selection.on(
|
2031 |
+
'input.searchcheck',
|
2032 |
+
'.select2-search--inline',
|
2033 |
+
function (evt) {
|
2034 |
+
// IE will trigger the `input` event when a placeholder is used on a
|
2035 |
+
// search box. To get around this issue, we are forced to ignore all
|
2036 |
+
// `input` events in IE and keep using `keyup`.
|
2037 |
+
if (disableInputEvents) {
|
2038 |
+
self.$selection.off('input.search input.searchcheck');
|
2039 |
+
return;
|
2040 |
+
}
|
2041 |
+
|
2042 |
+
// Unbind the duplicated `keyup` event
|
2043 |
+
self.$selection.off('keyup.search');
|
2044 |
+
}
|
2045 |
+
);
|
2046 |
+
|
2047 |
+
this.$selection.on(
|
2048 |
+
'keyup.search input.search',
|
2049 |
+
'.select2-search--inline',
|
2050 |
+
function (evt) {
|
2051 |
+
// IE will trigger the `input` event when a placeholder is used on a
|
2052 |
+
// search box. To get around this issue, we are forced to ignore all
|
2053 |
+
// `input` events in IE and keep using `keyup`.
|
2054 |
+
if (disableInputEvents && evt.type === 'input') {
|
2055 |
+
self.$selection.off('input.search input.searchcheck');
|
2056 |
+
return;
|
2057 |
+
}
|
2058 |
+
|
2059 |
+
var key = evt.which;
|
2060 |
+
|
2061 |
+
// We can freely ignore events from modifier keys
|
2062 |
+
if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
|
2063 |
+
return;
|
2064 |
+
}
|
2065 |
+
|
2066 |
+
// Tabbing will be handled during the `keydown` phase
|
2067 |
+
if (key == KEYS.TAB) {
|
2068 |
+
return;
|
2069 |
+
}
|
2070 |
+
|
2071 |
+
self.handleSearch(evt);
|
2072 |
+
}
|
2073 |
+
);
|
2074 |
+
};
|
2075 |
+
|
2076 |
+
/**
|
2077 |
+
* This method will transfer the tabindex attribute from the rendered
|
2078 |
+
* selection to the search box. This allows for the search box to be used as
|
2079 |
+
* the primary focus instead of the selection container.
|
2080 |
+
*
|
2081 |
+
* @private
|
2082 |
+
*/
|
2083 |
+
Search.prototype._transferTabIndex = function (decorated) {
|
2084 |
+
this.$search.attr('tabindex', this.$selection.attr('tabindex'));
|
2085 |
+
this.$selection.attr('tabindex', '-1');
|
2086 |
+
};
|
2087 |
+
|
2088 |
+
Search.prototype.createPlaceholder = function (decorated, placeholder) {
|
2089 |
+
this.$search.attr('placeholder', placeholder.text);
|
2090 |
+
};
|
2091 |
+
|
2092 |
+
Search.prototype.update = function (decorated, data) {
|
2093 |
+
var searchHadFocus = this.$search[0] == document.activeElement;
|
2094 |
+
|
2095 |
+
this.$search.attr('placeholder', '');
|
2096 |
+
|
2097 |
+
decorated.call(this, data);
|
2098 |
+
|
2099 |
+
this.$selection.find('.select2-selection__rendered')
|
2100 |
+
.append(this.$searchContainer);
|
2101 |
+
|
2102 |
+
this.resizeSearch();
|
2103 |
+
if (searchHadFocus) {
|
2104 |
+
var isTagInput = this.$element.find('[data-select2-tag]').length;
|
2105 |
+
if (isTagInput) {
|
2106 |
+
// fix IE11 bug where tag input lost focus
|
2107 |
+
this.$element.focus();
|
2108 |
+
} else {
|
2109 |
+
this.$search.focus();
|
2110 |
+
}
|
2111 |
+
}
|
2112 |
+
};
|
2113 |
+
|
2114 |
+
Search.prototype.handleSearch = function () {
|
2115 |
+
this.resizeSearch();
|
2116 |
+
|
2117 |
+
if (!this._keyUpPrevented) {
|
2118 |
+
var input = this.$search.val();
|
2119 |
+
|
2120 |
+
this.trigger('query', {
|
2121 |
+
term: input
|
2122 |
+
});
|
2123 |
+
}
|
2124 |
+
|
2125 |
+
this._keyUpPrevented = false;
|
2126 |
+
};
|
2127 |
+
|
2128 |
+
Search.prototype.searchRemoveChoice = function (decorated, item) {
|
2129 |
+
this.trigger('unselect', {
|
2130 |
+
data: item
|
2131 |
+
});
|
2132 |
+
|
2133 |
+
this.$search.val(item.text);
|
2134 |
+
this.handleSearch();
|
2135 |
+
};
|
2136 |
+
|
2137 |
+
Search.prototype.resizeSearch = function () {
|
2138 |
+
this.$search.css('width', '25px');
|
2139 |
+
|
2140 |
+
var width = '';
|
2141 |
+
|
2142 |
+
if (this.$search.attr('placeholder') !== '') {
|
2143 |
+
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
2144 |
+
} else {
|
2145 |
+
var minimumWidth = this.$search.val().length + 1;
|
2146 |
+
|
2147 |
+
width = (minimumWidth * 0.75) + 'em';
|
2148 |
+
}
|
2149 |
+
|
2150 |
+
this.$search.css('width', width);
|
2151 |
+
};
|
2152 |
+
|
2153 |
+
return Search;
|
2154 |
+
});
|
2155 |
+
|
2156 |
+
S2.define('select2/selection/eventRelay',[
|
2157 |
+
'jquery'
|
2158 |
+
], function ($) {
|
2159 |
+
function EventRelay () { }
|
2160 |
+
|
2161 |
+
EventRelay.prototype.bind = function (decorated, container, $container) {
|
2162 |
+
var self = this;
|
2163 |
+
var relayEvents = [
|
2164 |
+
'open', 'opening',
|
2165 |
+
'close', 'closing',
|
2166 |
+
'select', 'selecting',
|
2167 |
+
'unselect', 'unselecting',
|
2168 |
+
'clear', 'clearing'
|
2169 |
+
];
|
2170 |
+
|
2171 |
+
var preventableEvents = [
|
2172 |
+
'opening', 'closing', 'selecting', 'unselecting', 'clearing'
|
2173 |
+
];
|
2174 |
+
|
2175 |
+
decorated.call(this, container, $container);
|
2176 |
+
|
2177 |
+
container.on('*', function (name, params) {
|
2178 |
+
// Ignore events that should not be relayed
|
2179 |
+
if ($.inArray(name, relayEvents) === -1) {
|
2180 |
+
return;
|
2181 |
+
}
|
2182 |
+
|
2183 |
+
// The parameters should always be an object
|
2184 |
+
params = params || {};
|
2185 |
+
|
2186 |
+
// Generate the jQuery event for the Select2 event
|
2187 |
+
var evt = $.Event('select2:' + name, {
|
2188 |
+
params: params
|
2189 |
+
});
|
2190 |
+
|
2191 |
+
self.$element.trigger(evt);
|
2192 |
+
|
2193 |
+
// Only handle preventable events if it was one
|
2194 |
+
if ($.inArray(name, preventableEvents) === -1) {
|
2195 |
+
return;
|
2196 |
+
}
|
2197 |
+
|
2198 |
+
params.prevented = evt.isDefaultPrevented();
|
2199 |
+
});
|
2200 |
+
};
|
2201 |
+
|
2202 |
+
return EventRelay;
|
2203 |
+
});
|
2204 |
+
|
2205 |
+
S2.define('select2/translation',[
|
2206 |
+
'jquery',
|
2207 |
+
'require'
|
2208 |
+
], function ($, require) {
|
2209 |
+
function Translation (dict) {
|
2210 |
+
this.dict = dict || {};
|
2211 |
+
}
|
2212 |
+
|
2213 |
+
Translation.prototype.all = function () {
|
2214 |
+
return this.dict;
|
2215 |
+
};
|
2216 |
+
|
2217 |
+
Translation.prototype.get = function (key) {
|
2218 |
+
return this.dict[key];
|
2219 |
+
};
|
2220 |
+
|
2221 |
+
Translation.prototype.extend = function (translation) {
|
2222 |
+
this.dict = $.extend({}, translation.all(), this.dict);
|
2223 |
+
};
|
2224 |
+
|
2225 |
+
// Static functions
|
2226 |
+
|
2227 |
+
Translation._cache = {};
|
2228 |
+
|
2229 |
+
Translation.loadPath = function (path) {
|
2230 |
+
if (!(path in Translation._cache)) {
|
2231 |
+
var translations = require(path);
|
2232 |
+
|
2233 |
+
Translation._cache[path] = translations;
|
2234 |
+
}
|
2235 |
+
|
2236 |
+
return new Translation(Translation._cache[path]);
|
2237 |
+
};
|
2238 |
+
|
2239 |
+
return Translation;
|
2240 |
+
});
|
2241 |
+
|
2242 |
+
S2.define('select2/diacritics',[
|
2243 |
+
|
2244 |
+
], function () {
|
2245 |
+
var diacritics = {
|
2246 |
+
'\u24B6': 'A',
|
2247 |
+
'\uFF21': 'A',
|
2248 |
+
'\u00C0': 'A',
|
2249 |
+
'\u00C1': 'A',
|
2250 |
+
'\u00C2': 'A',
|
2251 |
+
'\u1EA6': 'A',
|
2252 |
+
'\u1EA4': 'A',
|
2253 |
+
'\u1EAA': 'A',
|
2254 |
+
'\u1EA8': 'A',
|
2255 |
+
'\u00C3': 'A',
|
2256 |
+
'\u0100': 'A',
|
2257 |
+
'\u0102': 'A',
|
2258 |
+
'\u1EB0': 'A',
|
2259 |
+
'\u1EAE': 'A',
|
2260 |
+
'\u1EB4': 'A',
|
2261 |
+
'\u1EB2': 'A',
|
2262 |
+
'\u0226': 'A',
|
2263 |
+
'\u01E0': 'A',
|
2264 |
+
'\u00C4': 'A',
|
2265 |
+
'\u01DE': 'A',
|
2266 |
+
'\u1EA2': 'A',
|
2267 |
+
'\u00C5': 'A',
|
2268 |
+
'\u01FA': 'A',
|
2269 |
+
'\u01CD': 'A',
|
2270 |
+
'\u0200': 'A',
|
2271 |
+
'\u0202': 'A',
|
2272 |
+
'\u1EA0': 'A',
|
2273 |
+
'\u1EAC': 'A',
|
2274 |
+
'\u1EB6': 'A',
|
2275 |
+
'\u1E00': 'A',
|
2276 |
+
'\u0104': 'A',
|
2277 |
+
'\u023A': 'A',
|
2278 |
+
'\u2C6F': 'A',
|
2279 |
+
'\uA732': 'AA',
|
2280 |
+
'\u00C6': 'AE',
|
2281 |
+
'\u01FC': 'AE',
|
2282 |
+
'\u01E2': 'AE',
|
2283 |
+
'\uA734': 'AO',
|
2284 |
+
'\uA736': 'AU',
|
2285 |
+
'\uA738': 'AV',
|
2286 |
+
'\uA73A': 'AV',
|
2287 |
+
'\uA73C': 'AY',
|
2288 |
+
'\u24B7': 'B',
|
2289 |
+
'\uFF22': 'B',
|
2290 |
+
'\u1E02': 'B',
|
2291 |
+
'\u1E04': 'B',
|
2292 |
+
'\u1E06': 'B',
|
2293 |
+
'\u0243': 'B',
|
2294 |
+
'\u0182': 'B',
|
2295 |
+
'\u0181': 'B',
|
2296 |
+
'\u24B8': 'C',
|
2297 |
+
'\uFF23': 'C',
|
2298 |
+
'\u0106': 'C',
|
2299 |
+
'\u0108': 'C',
|
2300 |
+
'\u010A': 'C',
|
2301 |
+
'\u010C': 'C',
|
2302 |
+
'\u00C7': 'C',
|
2303 |
+
'\u1E08': 'C',
|
2304 |
+
'\u0187': 'C',
|
2305 |
+
'\u023B': 'C',
|
2306 |
+
'\uA73E': 'C',
|
2307 |
+
'\u24B9': 'D',
|
2308 |
+
'\uFF24': 'D',
|
2309 |
+
'\u1E0A': 'D',
|
2310 |
+
'\u010E': 'D',
|
2311 |
+
'\u1E0C': 'D',
|
2312 |
+
'\u1E10': 'D',
|
2313 |
+
'\u1E12': 'D',
|
2314 |
+
'\u1E0E': 'D',
|
2315 |
+
'\u0110': 'D',
|
2316 |
+
'\u018B': 'D',
|
2317 |
+
'\u018A': 'D',
|
2318 |
+
'\u0189': 'D',
|
2319 |
+
'\uA779': 'D',
|
2320 |
+
'\u01F1': 'DZ',
|
2321 |
+
'\u01C4': 'DZ',
|
2322 |
+
'\u01F2': 'Dz',
|
2323 |
+
'\u01C5': 'Dz',
|
2324 |
+
'\u24BA': 'E',
|
2325 |
+
'\uFF25': 'E',
|
2326 |
+
'\u00C8': 'E',
|
2327 |
+
'\u00C9': 'E',
|
2328 |
+
'\u00CA': 'E',
|
2329 |
+
'\u1EC0': 'E',
|
2330 |
+
'\u1EBE': 'E',
|
2331 |
+
'\u1EC4': 'E',
|
2332 |
+
'\u1EC2': 'E',
|
2333 |
+
'\u1EBC': 'E',
|
2334 |
+
'\u0112': 'E',
|
2335 |
+
'\u1E14': 'E',
|
2336 |
+
'\u1E16': 'E',
|
2337 |
+
'\u0114': 'E',
|
2338 |
+
'\u0116': 'E',
|
2339 |
+
'\u00CB': 'E',
|
2340 |
+
'\u1EBA': 'E',
|
2341 |
+
'\u011A': 'E',
|
2342 |
+
'\u0204': 'E',
|
2343 |
+
'\u0206': 'E',
|
2344 |
+
'\u1EB8': 'E',
|
2345 |
+
'\u1EC6': 'E',
|
2346 |
+
'\u0228': 'E',
|
2347 |
+
'\u1E1C': 'E',
|
2348 |
+
'\u0118': 'E',
|
2349 |
+
'\u1E18': 'E',
|
2350 |
+
'\u1E1A': 'E',
|
2351 |
+
'\u0190': 'E',
|
2352 |
+
'\u018E': 'E',
|
2353 |
+
'\u24BB': 'F',
|
2354 |
+
'\uFF26': 'F',
|
2355 |
+
'\u1E1E': 'F',
|
2356 |
+
'\u0191': 'F',
|
2357 |
+
'\uA77B': 'F',
|
2358 |
+
'\u24BC': 'G',
|
2359 |
+
'\uFF27': 'G',
|
2360 |
+
'\u01F4': 'G',
|
2361 |
+
'\u011C': 'G',
|
2362 |
+
'\u1E20': 'G',
|
2363 |
+
'\u011E': 'G',
|
2364 |
+
'\u0120': 'G',
|
2365 |
+
'\u01E6': 'G',
|
2366 |
+
'\u0122': 'G',
|
2367 |
+
'\u01E4': 'G',
|
2368 |
+
'\u0193': 'G',
|
2369 |
+
'\uA7A0': 'G',
|
2370 |
+
'\uA77D': 'G',
|
2371 |
+
'\uA77E': 'G',
|
2372 |
+
'\u24BD': 'H',
|
2373 |
+
'\uFF28': 'H',
|
2374 |
+
'\u0124': 'H',
|
2375 |
+
'\u1E22': 'H',
|
2376 |
+
'\u1E26': 'H',
|
2377 |
+
'\u021E': 'H',
|
2378 |
+
'\u1E24': 'H',
|
2379 |
+
'\u1E28': 'H',
|
2380 |
+
'\u1E2A': 'H',
|
2381 |
+
'\u0126': 'H',
|
2382 |
+
'\u2C67': 'H',
|
2383 |
+
'\u2C75': 'H',
|
2384 |
+
'\uA78D': 'H',
|
2385 |
+
'\u24BE': 'I',
|
2386 |
+
'\uFF29': 'I',
|
2387 |
+
'\u00CC': 'I',
|
2388 |
+
'\u00CD': 'I',
|
2389 |
+
'\u00CE': 'I',
|
2390 |
+
'\u0128': 'I',
|
2391 |
+
'\u012A': 'I',
|
2392 |
+
'\u012C': 'I',
|
2393 |
+
'\u0130': 'I',
|
2394 |
+
'\u00CF': 'I',
|
2395 |
+
'\u1E2E': 'I',
|
2396 |
+
'\u1EC8': 'I',
|
2397 |
+
'\u01CF': 'I',
|
2398 |
+
'\u0208': 'I',
|
2399 |
+
'\u020A': 'I',
|
2400 |
+
'\u1ECA': 'I',
|
2401 |
+
'\u012E': 'I',
|
2402 |
+
'\u1E2C': 'I',
|
2403 |
+
'\u0197': 'I',
|
2404 |
+
'\u24BF': 'J',
|
2405 |
+
'\uFF2A': 'J',
|
2406 |
+
'\u0134': 'J',
|
2407 |
+
'\u0248': 'J',
|
2408 |
+
'\u24C0': 'K',
|
2409 |
+
'\uFF2B': 'K',
|
2410 |
+
'\u1E30': 'K',
|
2411 |
+
'\u01E8': 'K',
|
2412 |
+
'\u1E32': 'K',
|
2413 |
+
'\u0136': 'K',
|
2414 |
+
'\u1E34': 'K',
|
2415 |
+
'\u0198': 'K',
|
2416 |
+
'\u2C69': 'K',
|
2417 |
+
'\uA740': 'K',
|
2418 |
+
'\uA742': 'K',
|
2419 |
+
'\uA744': 'K',
|
2420 |
+
'\uA7A2': 'K',
|
2421 |
+
'\u24C1': 'L',
|
2422 |
+
'\uFF2C': 'L',
|
2423 |
+
'\u013F': 'L',
|
2424 |
+
'\u0139': 'L',
|
2425 |
+
'\u013D': 'L',
|
2426 |
+
'\u1E36': 'L',
|
2427 |
+
'\u1E38': 'L',
|
2428 |
+
'\u013B': 'L',
|
2429 |
+
'\u1E3C': 'L',
|
2430 |
+
'\u1E3A': 'L',
|
2431 |
+
'\u0141': 'L',
|
2432 |
+
'\u023D': 'L',
|
2433 |
+
'\u2C62': 'L',
|
2434 |
+
'\u2C60': 'L',
|
2435 |
+
'\uA748': 'L',
|
2436 |
+
'\uA746': 'L',
|
2437 |
+
'\uA780': 'L',
|
2438 |
+
'\u01C7': 'LJ',
|
2439 |
+
'\u01C8': 'Lj',
|
2440 |
+
'\u24C2': 'M',
|
2441 |
+
'\uFF2D': 'M',
|
2442 |
+
'\u1E3E': 'M',
|
2443 |
+
'\u1E40': 'M',
|
2444 |
+
'\u1E42': 'M',
|
2445 |
+
'\u2C6E': 'M',
|
2446 |
+
'\u019C': 'M',
|
2447 |
+
'\u24C3': 'N',
|
2448 |
+
'\uFF2E': 'N',
|
2449 |
+
'\u01F8': 'N',
|
2450 |
+
'\u0143': 'N',
|
2451 |
+
'\u00D1': 'N',
|
2452 |
+
'\u1E44': 'N',
|
2453 |
+
'\u0147': 'N',
|
2454 |
+
'\u1E46': 'N',
|
2455 |
+
'\u0145': 'N',
|
2456 |
+
'\u1E4A': 'N',
|
2457 |
+
'\u1E48': 'N',
|
2458 |
+
'\u0220': 'N',
|
2459 |
+
'\u019D': 'N',
|
2460 |
+
'\uA790': 'N',
|
2461 |
+
'\uA7A4': 'N',
|
2462 |
+
'\u01CA': 'NJ',
|
2463 |
+
'\u01CB': 'Nj',
|
2464 |
+
'\u24C4': 'O',
|
2465 |
+
'\uFF2F': 'O',
|
2466 |
+
'\u00D2': 'O',
|
2467 |
+
'\u00D3': 'O',
|
2468 |
+
'\u00D4': 'O',
|
2469 |
+
'\u1ED2': 'O',
|
2470 |
+
'\u1ED0': 'O',
|
2471 |
+
'\u1ED6': 'O',
|
2472 |
+
'\u1ED4': 'O',
|
2473 |
+
'\u00D5': 'O',
|
2474 |
+
'\u1E4C': 'O',
|
2475 |
+
'\u022C': 'O',
|
2476 |
+
'\u1E4E': 'O',
|
2477 |
+
'\u014C': 'O',
|
2478 |
+
'\u1E50': 'O',
|
2479 |
+
'\u1E52': 'O',
|
2480 |
+
'\u014E': 'O',
|
2481 |
+
'\u022E': 'O',
|
2482 |
+
'\u0230': 'O',
|
2483 |
+
'\u00D6': 'O',
|
2484 |
+
'\u022A': 'O',
|
2485 |
+
'\u1ECE': 'O',
|
2486 |
+
'\u0150': 'O',
|
2487 |
+
'\u01D1': 'O',
|
2488 |
+
'\u020C': 'O',
|
2489 |
+
'\u020E': 'O',
|
2490 |
+
'\u01A0': 'O',
|
2491 |
+
'\u1EDC': 'O',
|
2492 |
+
'\u1EDA': 'O',
|
2493 |
+
'\u1EE0': 'O',
|
2494 |
+
'\u1EDE': 'O',
|
2495 |
+
'\u1EE2': 'O',
|
2496 |
+
'\u1ECC': 'O',
|
2497 |
+
'\u1ED8': 'O',
|
2498 |
+
'\u01EA': 'O',
|
2499 |
+
'\u01EC': 'O',
|
2500 |
+
'\u00D8': 'O',
|
2501 |
+
'\u01FE': 'O',
|
2502 |
+
'\u0186': 'O',
|
2503 |
+
'\u019F': 'O',
|
2504 |
+
'\uA74A': 'O',
|
2505 |
+
'\uA74C': 'O',
|
2506 |
+
'\u01A2': 'OI',
|
2507 |
+
'\uA74E': 'OO',
|
2508 |
+
'\u0222': 'OU',
|
2509 |
+
'\u24C5': 'P',
|
2510 |
+
'\uFF30': 'P',
|
2511 |
+
'\u1E54': 'P',
|
2512 |
+
'\u1E56': 'P',
|
2513 |
+
'\u01A4': 'P',
|
2514 |
+
'\u2C63': 'P',
|
2515 |
+
'\uA750': 'P',
|
2516 |
+
'\uA752': 'P',
|
2517 |
+
'\uA754': 'P',
|
2518 |
+
'\u24C6': 'Q',
|
2519 |
+
'\uFF31': 'Q',
|
2520 |
+
'\uA756': 'Q',
|
2521 |
+
'\uA758': 'Q',
|
2522 |
+
'\u024A': 'Q',
|
2523 |
+
'\u24C7': 'R',
|
2524 |
+
'\uFF32': 'R',
|
2525 |
+
'\u0154': 'R',
|
2526 |
+
'\u1E58': 'R',
|
2527 |
+
'\u0158': 'R',
|
2528 |
+
'\u0210': 'R',
|
2529 |
+
'\u0212': 'R',
|
2530 |
+
'\u1E5A': 'R',
|
2531 |
+
'\u1E5C': 'R',
|
2532 |
+
'\u0156': 'R',
|
2533 |
+
'\u1E5E': 'R',
|
2534 |
+
'\u024C': 'R',
|
2535 |
+
'\u2C64': 'R',
|
2536 |
+
'\uA75A': 'R',
|
2537 |
+
'\uA7A6': 'R',
|
2538 |
+
'\uA782': 'R',
|
2539 |
+
'\u24C8': 'S',
|
2540 |
+
'\uFF33': 'S',
|
2541 |
+
'\u1E9E': 'S',
|
2542 |
+
'\u015A': 'S',
|
2543 |
+
'\u1E64': 'S',
|
2544 |
+
'\u015C': 'S',
|
2545 |
+
'\u1E60': 'S',
|
2546 |
+
'\u0160': 'S',
|
2547 |
+
'\u1E66': 'S',
|
2548 |
+
'\u1E62': 'S',
|
2549 |
+
'\u1E68': 'S',
|
2550 |
+
'\u0218': 'S',
|
2551 |
+
'\u015E': 'S',
|
2552 |
+
'\u2C7E': 'S',
|
2553 |
+
'\uA7A8': 'S',
|
2554 |
+
'\uA784': 'S',
|
2555 |
+
'\u24C9': 'T',
|
2556 |
+
'\uFF34': 'T',
|
2557 |
+
'\u1E6A': 'T',
|
2558 |
+
'\u0164': 'T',
|
2559 |
+
'\u1E6C': 'T',
|
2560 |
+
'\u021A': 'T',
|
2561 |
+
'\u0162': 'T',
|
2562 |
+
'\u1E70': 'T',
|
2563 |
+
'\u1E6E': 'T',
|
2564 |
+
'\u0166': 'T',
|
2565 |
+
'\u01AC': 'T',
|
2566 |
+
'\u01AE': 'T',
|
2567 |
+
'\u023E': 'T',
|
2568 |
+
'\uA786': 'T',
|
2569 |
+
'\uA728': 'TZ',
|
2570 |
+
'\u24CA': 'U',
|
2571 |
+
'\uFF35': 'U',
|
2572 |
+
'\u00D9': 'U',
|
2573 |
+
'\u00DA': 'U',
|
2574 |
+
'\u00DB': 'U',
|
2575 |
+
'\u0168': 'U',
|
2576 |
+
'\u1E78': 'U',
|
2577 |
+
'\u016A': 'U',
|
2578 |
+
'\u1E7A': 'U',
|
2579 |
+
'\u016C': 'U',
|
2580 |
+
'\u00DC': 'U',
|
2581 |
+
'\u01DB': 'U',
|
2582 |
+
'\u01D7': 'U',
|
2583 |
+
'\u01D5': 'U',
|
2584 |
+
'\u01D9': 'U',
|
2585 |
+
'\u1EE6': 'U',
|
2586 |
+
'\u016E': 'U',
|
2587 |
+
'\u0170': 'U',
|
2588 |
+
'\u01D3': 'U',
|
2589 |
+
'\u0214': 'U',
|
2590 |
+
'\u0216': 'U',
|
2591 |
+
'\u01AF': 'U',
|
2592 |
+
'\u1EEA': 'U',
|
2593 |
+
'\u1EE8': 'U',
|
2594 |
+
'\u1EEE': 'U',
|
2595 |
+
'\u1EEC': 'U',
|
2596 |
+
'\u1EF0': 'U',
|
2597 |
+
'\u1EE4': 'U',
|
2598 |
+
'\u1E72': 'U',
|
2599 |
+
'\u0172': 'U',
|
2600 |
+
'\u1E76': 'U',
|
2601 |
+
'\u1E74': 'U',
|
2602 |
+
'\u0244': 'U',
|
2603 |
+
'\u24CB': 'V',
|
2604 |
+
'\uFF36': 'V',
|
2605 |
+
'\u1E7C': 'V',
|
2606 |
+
'\u1E7E': 'V',
|
2607 |
+
'\u01B2': 'V',
|
2608 |
+
'\uA75E': 'V',
|
2609 |
+
'\u0245': 'V',
|
2610 |
+
'\uA760': 'VY',
|
2611 |
+
'\u24CC': 'W',
|
2612 |
+
'\uFF37': 'W',
|
2613 |
+
'\u1E80': 'W',
|
2614 |
+
'\u1E82': 'W',
|
2615 |
+
'\u0174': 'W',
|
2616 |
+
'\u1E86': 'W',
|
2617 |
+
'\u1E84': 'W',
|
2618 |
+
'\u1E88': 'W',
|
2619 |
+
'\u2C72': 'W',
|
2620 |
+
'\u24CD': 'X',
|
2621 |
+
'\uFF38': 'X',
|
2622 |
+
'\u1E8A': 'X',
|
2623 |
+
'\u1E8C': 'X',
|
2624 |
+
'\u24CE': 'Y',
|
2625 |
+
'\uFF39': 'Y',
|
2626 |
+
'\u1EF2': 'Y',
|
2627 |
+
'\u00DD': 'Y',
|
2628 |
+
'\u0176': 'Y',
|
2629 |
+
'\u1EF8': 'Y',
|
2630 |
+
'\u0232': 'Y',
|
2631 |
+
'\u1E8E': 'Y',
|
2632 |
+
'\u0178': 'Y',
|
2633 |
+
'\u1EF6': 'Y',
|
2634 |
+
'\u1EF4': 'Y',
|
2635 |
+
'\u01B3': 'Y',
|
2636 |
+
'\u024E': 'Y',
|
2637 |
+
'\u1EFE': 'Y',
|
2638 |
+
'\u24CF': 'Z',
|
2639 |
+
'\uFF3A': 'Z',
|
2640 |
+
'\u0179': 'Z',
|
2641 |
+
'\u1E90': 'Z',
|
2642 |
+
'\u017B': 'Z',
|
2643 |
+
'\u017D': 'Z',
|
2644 |
+
'\u1E92': 'Z',
|
2645 |
+
'\u1E94': 'Z',
|
2646 |
+
'\u01B5': 'Z',
|
2647 |
+
'\u0224': 'Z',
|
2648 |
+
'\u2C7F': 'Z',
|
2649 |
+
'\u2C6B': 'Z',
|
2650 |
+
'\uA762': 'Z',
|
2651 |
+
'\u24D0': 'a',
|
2652 |
+
'\uFF41': 'a',
|
2653 |
+
'\u1E9A': 'a',
|
2654 |
+
'\u00E0': 'a',
|
2655 |
+
'\u00E1': 'a',
|
2656 |
+
'\u00E2': 'a',
|
2657 |
+
'\u1EA7': 'a',
|
2658 |
+
'\u1EA5': 'a',
|
2659 |
+
'\u1EAB': 'a',
|
2660 |
+
'\u1EA9': 'a',
|
2661 |
+
'\u00E3': 'a',
|
2662 |
+
'\u0101': 'a',
|
2663 |
+
'\u0103': 'a',
|
2664 |
+
'\u1EB1': 'a',
|
2665 |
+
'\u1EAF': 'a',
|
2666 |
+
'\u1EB5': 'a',
|
2667 |
+
'\u1EB3': 'a',
|
2668 |
+
'\u0227': 'a',
|
2669 |
+
'\u01E1': 'a',
|
2670 |
+
'\u00E4': 'a',
|
2671 |
+
'\u01DF': 'a',
|
2672 |
+
'\u1EA3': 'a',
|
2673 |
+
'\u00E5': 'a',
|
2674 |
+
'\u01FB': 'a',
|
2675 |
+
'\u01CE': 'a',
|
2676 |
+
'\u0201': 'a',
|
2677 |
+
'\u0203': 'a',
|
2678 |
+
'\u1EA1': 'a',
|
2679 |
+
'\u1EAD': 'a',
|
2680 |
+
'\u1EB7': 'a',
|
2681 |
+
'\u1E01': 'a',
|
2682 |
+
'\u0105': 'a',
|
2683 |
+
'\u2C65': 'a',
|
2684 |
+
'\u0250': 'a',
|
2685 |
+
'\uA733': 'aa',
|
2686 |
+
'\u00E6': 'ae',
|
2687 |
+
'\u01FD': 'ae',
|
2688 |
+
'\u01E3': 'ae',
|
2689 |
+
'\uA735': 'ao',
|
2690 |
+
'\uA737': 'au',
|
2691 |
+
'\uA739': 'av',
|
2692 |
+
'\uA73B': 'av',
|
2693 |
+
'\uA73D': 'ay',
|
2694 |
+
'\u24D1': 'b',
|
2695 |
+
'\uFF42': 'b',
|
2696 |
+
'\u1E03': 'b',
|
2697 |
+
'\u1E05': 'b',
|
2698 |
+
'\u1E07': 'b',
|
2699 |
+
'\u0180': 'b',
|
2700 |
+
'\u0183': 'b',
|
2701 |
+
'\u0253': 'b',
|
2702 |
+
'\u24D2': 'c',
|
2703 |
+
'\uFF43': 'c',
|
2704 |
+
'\u0107': 'c',
|
2705 |
+
'\u0109': 'c',
|
2706 |
+
'\u010B': 'c',
|
2707 |
+
'\u010D': 'c',
|
2708 |
+
'\u00E7': 'c',
|
2709 |
+
'\u1E09': 'c',
|
2710 |
+
'\u0188': 'c',
|
2711 |
+
'\u023C': 'c',
|
2712 |
+
'\uA73F': 'c',
|
2713 |
+
'\u2184': 'c',
|
2714 |
+
'\u24D3': 'd',
|
2715 |
+
'\uFF44': 'd',
|
2716 |
+
'\u1E0B': 'd',
|
2717 |
+
'\u010F': 'd',
|
2718 |
+
'\u1E0D': 'd',
|
2719 |
+
'\u1E11': 'd',
|
2720 |
+
'\u1E13': 'd',
|
2721 |
+
'\u1E0F': 'd',
|
2722 |
+
'\u0111': 'd',
|
2723 |
+
'\u018C': 'd',
|
2724 |
+
'\u0256': 'd',
|
2725 |
+
'\u0257': 'd',
|
2726 |
+
'\uA77A': 'd',
|
2727 |
+
'\u01F3': 'dz',
|
2728 |
+
'\u01C6': 'dz',
|
2729 |
+
'\u24D4': 'e',
|
2730 |
+
'\uFF45': 'e',
|
2731 |
+
'\u00E8': 'e',
|
2732 |
+
'\u00E9': 'e',
|
2733 |
+
'\u00EA': 'e',
|
2734 |
+
'\u1EC1': 'e',
|
2735 |
+
'\u1EBF': 'e',
|
2736 |
+
'\u1EC5': 'e',
|
2737 |
+
'\u1EC3': 'e',
|
2738 |
+
'\u1EBD': 'e',
|
2739 |
+
'\u0113': 'e',
|
2740 |
+
'\u1E15': 'e',
|
2741 |
+
'\u1E17': 'e',
|
2742 |
+
'\u0115': 'e',
|
2743 |
+
'\u0117': 'e',
|
2744 |
+
'\u00EB': 'e',
|
2745 |
+
'\u1EBB': 'e',
|
2746 |
+
'\u011B': 'e',
|
2747 |
+
'\u0205': 'e',
|
2748 |
+
'\u0207': 'e',
|
2749 |
+
'\u1EB9': 'e',
|
2750 |
+
'\u1EC7': 'e',
|
2751 |
+
'\u0229': 'e',
|
2752 |
+
'\u1E1D': 'e',
|
2753 |
+
'\u0119': 'e',
|
2754 |
+
'\u1E19': 'e',
|
2755 |
+
'\u1E1B': 'e',
|
2756 |
+
'\u0247': 'e',
|
2757 |
+
'\u025B': 'e',
|
2758 |
+
'\u01DD': 'e',
|
2759 |
+
'\u24D5': 'f',
|
2760 |
+
'\uFF46': 'f',
|
2761 |
+
'\u1E1F': 'f',
|
2762 |
+
'\u0192': 'f',
|
2763 |
+
'\uA77C': 'f',
|
2764 |
+
'\u24D6': 'g',
|
2765 |
+
'\uFF47': 'g',
|
2766 |
+
'\u01F5': 'g',
|
2767 |
+
'\u011D': 'g',
|
2768 |
+
'\u1E21': 'g',
|
2769 |
+
'\u011F': 'g',
|
2770 |
+
'\u0121': 'g',
|
2771 |
+
'\u01E7': 'g',
|
2772 |
+
'\u0123': 'g',
|
2773 |
+
'\u01E5': 'g',
|
2774 |
+
'\u0260': 'g',
|
2775 |
+
'\uA7A1': 'g',
|
2776 |
+
'\u1D79': 'g',
|
2777 |
+
'\uA77F': 'g',
|
2778 |
+
'\u24D7': 'h',
|
2779 |
+
'\uFF48': 'h',
|
2780 |
+
'\u0125': 'h',
|
2781 |
+
'\u1E23': 'h',
|
2782 |
+
'\u1E27': 'h',
|
2783 |
+
'\u021F': 'h',
|
2784 |
+
'\u1E25': 'h',
|
2785 |
+
'\u1E29': 'h',
|
2786 |
+
'\u1E2B': 'h',
|
2787 |
+
'\u1E96': 'h',
|
2788 |
+
'\u0127': 'h',
|
2789 |
+
'\u2C68': 'h',
|
2790 |
+
'\u2C76': 'h',
|
2791 |
+
'\u0265': 'h',
|
2792 |
+
'\u0195': 'hv',
|
2793 |
+
'\u24D8': 'i',
|
2794 |
+
'\uFF49': 'i',
|
2795 |
+
'\u00EC': 'i',
|
2796 |
+
'\u00ED': 'i',
|
2797 |
+
'\u00EE': 'i',
|
2798 |
+
'\u0129': 'i',
|
2799 |
+
'\u012B': 'i',
|
2800 |
+
'\u012D': 'i',
|
2801 |
+
'\u00EF': 'i',
|
2802 |
+
'\u1E2F': 'i',
|
2803 |
+
'\u1EC9': 'i',
|
2804 |
+
'\u01D0': 'i',
|
2805 |
+
'\u0209': 'i',
|
2806 |
+
'\u020B': 'i',
|
2807 |
+
'\u1ECB': 'i',
|
2808 |
+
'\u012F': 'i',
|
2809 |
+
'\u1E2D': 'i',
|
2810 |
+
'\u0268': 'i',
|
2811 |
+
'\u0131': 'i',
|
2812 |
+
'\u24D9': 'j',
|
2813 |
+
'\uFF4A': 'j',
|
2814 |
+
'\u0135': 'j',
|
2815 |
+
'\u01F0': 'j',
|
2816 |
+
'\u0249': 'j',
|
2817 |
+
'\u24DA': 'k',
|
2818 |
+
'\uFF4B': 'k',
|
2819 |
+
'\u1E31': 'k',
|
2820 |
+
'\u01E9': 'k',
|
2821 |
+
'\u1E33': 'k',
|
2822 |
+
'\u0137': 'k',
|
2823 |
+
'\u1E35': 'k',
|
2824 |
+
'\u0199': 'k',
|
2825 |
+
'\u2C6A': 'k',
|
2826 |
+
'\uA741': 'k',
|
2827 |
+
'\uA743': 'k',
|
2828 |
+
'\uA745': 'k',
|
2829 |
+
'\uA7A3': 'k',
|
2830 |
+
'\u24DB': 'l',
|
2831 |
+
'\uFF4C': 'l',
|
2832 |
+
'\u0140': 'l',
|
2833 |
+
'\u013A': 'l',
|
2834 |
+
'\u013E': 'l',
|
2835 |
+
'\u1E37': 'l',
|
2836 |
+
'\u1E39': 'l',
|
2837 |
+
'\u013C': 'l',
|
2838 |
+
'\u1E3D': 'l',
|
2839 |
+
'\u1E3B': 'l',
|
2840 |
+
'\u017F': 'l',
|
2841 |
+
'\u0142': 'l',
|
2842 |
+
'\u019A': 'l',
|
2843 |
+
'\u026B': 'l',
|
2844 |
+
'\u2C61': 'l',
|
2845 |
+
'\uA749': 'l',
|
2846 |
+
'\uA781': 'l',
|
2847 |
+
'\uA747': 'l',
|
2848 |
+
'\u01C9': 'lj',
|
2849 |
+
'\u24DC': 'm',
|
2850 |
+
'\uFF4D': 'm',
|
2851 |
+
'\u1E3F': 'm',
|
2852 |
+
'\u1E41': 'm',
|
2853 |
+
'\u1E43': 'm',
|
2854 |
+
'\u0271': 'm',
|
2855 |
+
'\u026F': 'm',
|
2856 |
+
'\u24DD': 'n',
|
2857 |
+
'\uFF4E': 'n',
|
2858 |
+
'\u01F9': 'n',
|
2859 |
+
'\u0144': 'n',
|
2860 |
+
'\u00F1': 'n',
|
2861 |
+
'\u1E45': 'n',
|
2862 |
+
'\u0148': 'n',
|
2863 |
+
'\u1E47': 'n',
|
2864 |
+
'\u0146': 'n',
|
2865 |
+
'\u1E4B': 'n',
|
2866 |
+
'\u1E49': 'n',
|
2867 |
+
'\u019E': 'n',
|
2868 |
+
'\u0272': 'n',
|
2869 |
+
'\u0149': 'n',
|
2870 |
+
'\uA791': 'n',
|
2871 |
+
'\uA7A5': 'n',
|
2872 |
+
'\u01CC': 'nj',
|
2873 |
+
'\u24DE': 'o',
|
2874 |
+
'\uFF4F': 'o',
|
2875 |
+
'\u00F2': 'o',
|
2876 |
+
'\u00F3': 'o',
|
2877 |
+
'\u00F4': 'o',
|
2878 |
+
'\u1ED3': 'o',
|
2879 |
+
'\u1ED1': 'o',
|
2880 |
+
'\u1ED7': 'o',
|
2881 |
+
'\u1ED5': 'o',
|
2882 |
+
'\u00F5': 'o',
|
2883 |
+
'\u1E4D': 'o',
|
2884 |
+
'\u022D': 'o',
|
2885 |
+
'\u1E4F': 'o',
|
2886 |
+
'\u014D': 'o',
|
2887 |
+
'\u1E51': 'o',
|
2888 |
+
'\u1E53': 'o',
|
2889 |
+
'\u014F': 'o',
|
2890 |
+
'\u022F': 'o',
|
2891 |
+
'\u0231': 'o',
|
2892 |
+
'\u00F6': 'o',
|
2893 |
+
'\u022B': 'o',
|
2894 |
+
'\u1ECF': 'o',
|
2895 |
+
'\u0151': 'o',
|
2896 |
+
'\u01D2': 'o',
|
2897 |
+
'\u020D': 'o',
|
2898 |
+
'\u020F': 'o',
|
2899 |
+
'\u01A1': 'o',
|
2900 |
+
'\u1EDD': 'o',
|
2901 |
+
'\u1EDB': 'o',
|
2902 |
+
'\u1EE1': 'o',
|
2903 |
+
'\u1EDF': 'o',
|
2904 |
+
'\u1EE3': 'o',
|
2905 |
+
'\u1ECD': 'o',
|
2906 |
+
'\u1ED9': 'o',
|
2907 |
+
'\u01EB': 'o',
|
2908 |
+
'\u01ED': 'o',
|
2909 |
+
'\u00F8': 'o',
|
2910 |
+
'\u01FF': 'o',
|
2911 |
+
'\u0254': 'o',
|
2912 |
+
'\uA74B': 'o',
|
2913 |
+
'\uA74D': 'o',
|
2914 |
+
'\u0275': 'o',
|
2915 |
+
'\u01A3': 'oi',
|
2916 |
+
'\u0223': 'ou',
|
2917 |
+
'\uA74F': 'oo',
|
2918 |
+
'\u24DF': 'p',
|
2919 |
+
'\uFF50': 'p',
|
2920 |
+
'\u1E55': 'p',
|
2921 |
+
'\u1E57': 'p',
|
2922 |
+
'\u01A5': 'p',
|
2923 |
+
'\u1D7D': 'p',
|
2924 |
+
'\uA751': 'p',
|
2925 |
+
'\uA753': 'p',
|
2926 |
+
'\uA755': 'p',
|
2927 |
+
'\u24E0': 'q',
|
2928 |
+
'\uFF51': 'q',
|
2929 |
+
'\u024B': 'q',
|
2930 |
+
'\uA757': 'q',
|
2931 |
+
'\uA759': 'q',
|
2932 |
+
'\u24E1': 'r',
|
2933 |
+
'\uFF52': 'r',
|
2934 |
+
'\u0155': 'r',
|
2935 |
+
'\u1E59': 'r',
|
2936 |
+
'\u0159': 'r',
|
2937 |
+
'\u0211': 'r',
|
2938 |
+
'\u0213': 'r',
|
2939 |
+
'\u1E5B': 'r',
|
2940 |
+
'\u1E5D': 'r',
|
2941 |
+
'\u0157': 'r',
|
2942 |
+
'\u1E5F': 'r',
|
2943 |
+
'\u024D': 'r',
|
2944 |
+
'\u027D': 'r',
|
2945 |
+
'\uA75B': 'r',
|
2946 |
+
'\uA7A7': 'r',
|
2947 |
+
'\uA783': 'r',
|
2948 |
+
'\u24E2': 's',
|
2949 |
+
'\uFF53': 's',
|
2950 |
+
'\u00DF': 's',
|
2951 |
+
'\u015B': 's',
|
2952 |
+
'\u1E65': 's',
|
2953 |
+
'\u015D': 's',
|
2954 |
+
'\u1E61': 's',
|
2955 |
+
'\u0161': 's',
|
2956 |
+
'\u1E67': 's',
|
2957 |
+
'\u1E63': 's',
|
2958 |
+
'\u1E69': 's',
|
2959 |
+
'\u0219': 's',
|
2960 |
+
'\u015F': 's',
|
2961 |
+
'\u023F': 's',
|
2962 |
+
'\uA7A9': 's',
|
2963 |
+
'\uA785': 's',
|
2964 |
+
'\u1E9B': 's',
|
2965 |
+
'\u24E3': 't',
|
2966 |
+
'\uFF54': 't',
|
2967 |
+
'\u1E6B': 't',
|
2968 |
+
'\u1E97': 't',
|
2969 |
+
'\u0165': 't',
|
2970 |
+
'\u1E6D': 't',
|
2971 |
+
'\u021B': 't',
|
2972 |
+
'\u0163': 't',
|
2973 |
+
'\u1E71': 't',
|
2974 |
+
'\u1E6F': 't',
|
2975 |
+
'\u0167': 't',
|
2976 |
+
'\u01AD': 't',
|
2977 |
+
'\u0288': 't',
|
2978 |
+
'\u2C66': 't',
|
2979 |
+
'\uA787': 't',
|
2980 |
+
'\uA729': 'tz',
|
2981 |
+
'\u24E4': 'u',
|
2982 |
+
'\uFF55': 'u',
|
2983 |
+
'\u00F9': 'u',
|
2984 |
+
'\u00FA': 'u',
|
2985 |
+
'\u00FB': 'u',
|
2986 |
+
'\u0169': 'u',
|
2987 |
+
'\u1E79': 'u',
|
2988 |
+
'\u016B': 'u',
|
2989 |
+
'\u1E7B': 'u',
|
2990 |
+
'\u016D': 'u',
|
2991 |
+
'\u00FC': 'u',
|
2992 |
+
'\u01DC': 'u',
|
2993 |
+
'\u01D8': 'u',
|
2994 |
+
'\u01D6': 'u',
|
2995 |
+
'\u01DA': 'u',
|
2996 |
+
'\u1EE7': 'u',
|
2997 |
+
'\u016F': 'u',
|
2998 |
+
'\u0171': 'u',
|
2999 |
+
'\u01D4': 'u',
|
3000 |
+
'\u0215': 'u',
|
3001 |
+
'\u0217': 'u',
|
3002 |
+
'\u01B0': 'u',
|
3003 |
+
'\u1EEB': 'u',
|
3004 |
+
'\u1EE9': 'u',
|
3005 |
+
'\u1EEF': 'u',
|
3006 |
+
'\u1EED': 'u',
|
3007 |
+
'\u1EF1': 'u',
|
3008 |
+
'\u1EE5': 'u',
|
3009 |
+
'\u1E73': 'u',
|
3010 |
+
'\u0173': 'u',
|
3011 |
+
'\u1E77': 'u',
|
3012 |
+
'\u1E75': 'u',
|
3013 |
+
'\u0289': 'u',
|
3014 |
+
'\u24E5': 'v',
|
3015 |
+
'\uFF56': 'v',
|
3016 |
+
'\u1E7D': 'v',
|
3017 |
+
'\u1E7F': 'v',
|
3018 |
+
'\u028B': 'v',
|
3019 |
+
'\uA75F': 'v',
|
3020 |
+
'\u028C': 'v',
|
3021 |
+
'\uA761': 'vy',
|
3022 |
+
'\u24E6': 'w',
|
3023 |
+
'\uFF57': 'w',
|
3024 |
+
'\u1E81': 'w',
|
3025 |
+
'\u1E83': 'w',
|
3026 |
+
'\u0175': 'w',
|
3027 |
+
'\u1E87': 'w',
|
3028 |
+
'\u1E85': 'w',
|
3029 |
+
'\u1E98': 'w',
|
3030 |
+
'\u1E89': 'w',
|
3031 |
+
'\u2C73': 'w',
|
3032 |
+
'\u24E7': 'x',
|
3033 |
+
'\uFF58': 'x',
|
3034 |
+
'\u1E8B': 'x',
|
3035 |
+
'\u1E8D': 'x',
|
3036 |
+
'\u24E8': 'y',
|
3037 |
+
'\uFF59': 'y',
|
3038 |
+
'\u1EF3': 'y',
|
3039 |
+
'\u00FD': 'y',
|
3040 |
+
'\u0177': 'y',
|
3041 |
+
'\u1EF9': 'y',
|
3042 |
+
'\u0233': 'y',
|
3043 |
+
'\u1E8F': 'y',
|
3044 |
+
'\u00FF': 'y',
|
3045 |
+
'\u1EF7': 'y',
|
3046 |
+
'\u1E99': 'y',
|
3047 |
+
'\u1EF5': 'y',
|
3048 |
+
'\u01B4': 'y',
|
3049 |
+
'\u024F': 'y',
|
3050 |
+
'\u1EFF': 'y',
|
3051 |
+
'\u24E9': 'z',
|
3052 |
+
'\uFF5A': 'z',
|
3053 |
+
'\u017A': 'z',
|
3054 |
+
'\u1E91': 'z',
|
3055 |
+
'\u017C': 'z',
|
3056 |
+
'\u017E': 'z',
|
3057 |
+
'\u1E93': 'z',
|
3058 |
+
'\u1E95': 'z',
|
3059 |
+
'\u01B6': 'z',
|
3060 |
+
'\u0225': 'z',
|
3061 |
+
'\u0240': 'z',
|
3062 |
+
'\u2C6C': 'z',
|
3063 |
+
'\uA763': 'z',
|
3064 |
+
'\u0386': '\u0391',
|
3065 |
+
'\u0388': '\u0395',
|
3066 |
+
'\u0389': '\u0397',
|
3067 |
+
'\u038A': '\u0399',
|
3068 |
+
'\u03AA': '\u0399',
|
3069 |
+
'\u038C': '\u039F',
|
3070 |
+
'\u038E': '\u03A5',
|
3071 |
+
'\u03AB': '\u03A5',
|
3072 |
+
'\u038F': '\u03A9',
|
3073 |
+
'\u03AC': '\u03B1',
|
3074 |
+
'\u03AD': '\u03B5',
|
3075 |
+
'\u03AE': '\u03B7',
|
3076 |
+
'\u03AF': '\u03B9',
|
3077 |
+
'\u03CA': '\u03B9',
|
3078 |
+
'\u0390': '\u03B9',
|
3079 |
+
'\u03CC': '\u03BF',
|
3080 |
+
'\u03CD': '\u03C5',
|
3081 |
+
'\u03CB': '\u03C5',
|
3082 |
+
'\u03B0': '\u03C5',
|
3083 |
+
'\u03C9': '\u03C9',
|
3084 |
+
'\u03C2': '\u03C3'
|
3085 |
+
};
|
3086 |
+
|
3087 |
+
return diacritics;
|
3088 |
+
});
|
3089 |
+
|
3090 |
+
S2.define('select2/data/base',[
|
3091 |
+
'../utils'
|
3092 |
+
], function (Utils) {
|
3093 |
+
function BaseAdapter ($element, options) {
|
3094 |
+
BaseAdapter.__super__.constructor.call(this);
|
3095 |
+
}
|
3096 |
+
|
3097 |
+
Utils.Extend(BaseAdapter, Utils.Observable);
|
3098 |
+
|
3099 |
+
BaseAdapter.prototype.current = function (callback) {
|
3100 |
+
throw new Error('The `current` method must be defined in child classes.');
|
3101 |
+
};
|
3102 |
+
|
3103 |
+
BaseAdapter.prototype.query = function (params, callback) {
|
3104 |
+
throw new Error('The `query` method must be defined in child classes.');
|
3105 |
+
};
|
3106 |
+
|
3107 |
+
BaseAdapter.prototype.bind = function (container, $container) {
|
3108 |
+
// Can be implemented in subclasses
|
3109 |
+
};
|
3110 |
+
|
3111 |
+
BaseAdapter.prototype.destroy = function () {
|
3112 |
+
// Can be implemented in subclasses
|
3113 |
+
};
|
3114 |
+
|
3115 |
+
BaseAdapter.prototype.generateResultId = function (container, data) {
|
3116 |
+
var id = container.id + '-result-';
|
3117 |
+
|
3118 |
+
id += Utils.generateChars(4);
|
3119 |
+
|
3120 |
+
if (data.id != null) {
|
3121 |
+
id += '-' + data.id.toString();
|
3122 |
+
} else {
|
3123 |
+
id += '-' + Utils.generateChars(4);
|
3124 |
+
}
|
3125 |
+
return id;
|
3126 |
+
};
|
3127 |
+
|
3128 |
+
return BaseAdapter;
|
3129 |
+
});
|
3130 |
+
|
3131 |
+
S2.define('select2/data/select',[
|
3132 |
+
'./base',
|
3133 |
+
'../utils',
|
3134 |
+
'jquery'
|
3135 |
+
], function (BaseAdapter, Utils, $) {
|
3136 |
+
function SelectAdapter ($element, options) {
|
3137 |
+
this.$element = $element;
|
3138 |
+
this.options = options;
|
3139 |
+
|
3140 |
+
SelectAdapter.__super__.constructor.call(this);
|
3141 |
+
}
|
3142 |
+
|
3143 |
+
Utils.Extend(SelectAdapter, BaseAdapter);
|
3144 |
+
|
3145 |
+
SelectAdapter.prototype.current = function (callback) {
|
3146 |
+
var data = [];
|
3147 |
+
var self = this;
|
3148 |
+
|
3149 |
+
this.$element.find(':selected').each(function () {
|
3150 |
+
var $option = $(this);
|
3151 |
+
|
3152 |
+
var option = self.item($option);
|
3153 |
+
|
3154 |
+
data.push(option);
|
3155 |
+
});
|
3156 |
+
|
3157 |
+
callback(data);
|
3158 |
+
};
|
3159 |
+
|
3160 |
+
SelectAdapter.prototype.select = function (data) {
|
3161 |
+
var self = this;
|
3162 |
+
|
3163 |
+
data.selected = true;
|
3164 |
+
|
3165 |
+
// If data.element is a DOM node, use it instead
|
3166 |
+
if ($(data.element).is('option')) {
|
3167 |
+
data.element.selected = true;
|
3168 |
+
|
3169 |
+
this.$element.trigger('change');
|
3170 |
+
|
3171 |
+
return;
|
3172 |
+
}
|
3173 |
+
|
3174 |
+
if (this.$element.prop('multiple')) {
|
3175 |
+
this.current(function (currentData) {
|
3176 |
+
var val = [];
|
3177 |
+
|
3178 |
+
data = [data];
|
3179 |
+
data.push.apply(data, currentData);
|
3180 |
+
|
3181 |
+
for (var d = 0; d < data.length; d++) {
|
3182 |
+
var id = data[d].id;
|
3183 |
+
|
3184 |
+
if ($.inArray(id, val) === -1) {
|
3185 |
+
val.push(id);
|
3186 |
+
}
|
3187 |
+
}
|
3188 |
+
|
3189 |
+
self.$element.val(val);
|
3190 |
+
self.$element.trigger('change');
|
3191 |
+
});
|
3192 |
+
} else {
|
3193 |
+
var val = data.id;
|
3194 |
+
|
3195 |
+
this.$element.val(val);
|
3196 |
+
this.$element.trigger('change');
|
3197 |
+
}
|
3198 |
+
};
|
3199 |
+
|
3200 |
+
SelectAdapter.prototype.unselect = function (data) {
|
3201 |
+
var self = this;
|
3202 |
+
|
3203 |
+
if (!this.$element.prop('multiple')) {
|
3204 |
+
return;
|
3205 |
+
}
|
3206 |
+
|
3207 |
+
data.selected = false;
|
3208 |
+
|
3209 |
+
if ($(data.element).is('option')) {
|
3210 |
+
data.element.selected = false;
|
3211 |
+
|
3212 |
+
this.$element.trigger('change');
|
3213 |
+
|
3214 |
+
return;
|
3215 |
+
}
|
3216 |
+
|
3217 |
+
this.current(function (currentData) {
|
3218 |
+
var val = [];
|
3219 |
+
|
3220 |
+
for (var d = 0; d < currentData.length; d++) {
|
3221 |
+
var id = currentData[d].id;
|
3222 |
+
|
3223 |
+
if (id !== data.id && $.inArray(id, val) === -1) {
|
3224 |
+
val.push(id);
|
3225 |
+
}
|
3226 |
+
}
|
3227 |
+
|
3228 |
+
self.$element.val(val);
|
3229 |
+
|
3230 |
+
self.$element.trigger('change');
|
3231 |
+
});
|
3232 |
+
};
|
3233 |
+
|
3234 |
+
SelectAdapter.prototype.bind = function (container, $container) {
|
3235 |
+
var self = this;
|
3236 |
+
|
3237 |
+
this.container = container;
|
3238 |
+
|
3239 |
+
container.on('select', function (params) {
|
3240 |
+
self.select(params.data);
|
3241 |
+
});
|
3242 |
+
|
3243 |
+
container.on('unselect', function (params) {
|
3244 |
+
self.unselect(params.data);
|
3245 |
+
});
|
3246 |
+
};
|
3247 |
+
|
3248 |
+
SelectAdapter.prototype.destroy = function () {
|
3249 |
+
// Remove anything added to child elements
|
3250 |
+
this.$element.find('*').each(function () {
|
3251 |
+
// Remove any custom data set by Select2
|
3252 |
+
Utils.RemoveData(this);
|
3253 |
+
});
|
3254 |
+
};
|
3255 |
+
|
3256 |
+
SelectAdapter.prototype.query = function (params, callback) {
|
3257 |
+
var data = [];
|
3258 |
+
var self = this;
|
3259 |
+
|
3260 |
+
var $options = this.$element.children();
|
3261 |
+
|
3262 |
+
$options.each(function () {
|
3263 |
+
var $option = $(this);
|
3264 |
+
|
3265 |
+
if (!$option.is('option') && !$option.is('optgroup')) {
|
3266 |
+
return;
|
3267 |
+
}
|
3268 |
+
|
3269 |
+
var option = self.item($option);
|
3270 |
+
|
3271 |
+
var matches = self.matches(params, option);
|
3272 |
+
|
3273 |
+
if (matches !== null) {
|
3274 |
+
data.push(matches);
|
3275 |
+
}
|
3276 |
+
});
|
3277 |
+
|
3278 |
+
callback({
|
3279 |
+
results: data
|
3280 |
+
});
|
3281 |
+
};
|
3282 |
+
|
3283 |
+
SelectAdapter.prototype.addOptions = function ($options) {
|
3284 |
+
Utils.appendMany(this.$element, $options);
|
3285 |
+
};
|
3286 |
+
|
3287 |
+
SelectAdapter.prototype.option = function (data) {
|
3288 |
+
var option;
|
3289 |
+
|
3290 |
+
if (data.children) {
|
3291 |
+
option = document.createElement('optgroup');
|
3292 |
+
option.label = data.text;
|
3293 |
+
} else {
|
3294 |
+
option = document.createElement('option');
|
3295 |
+
|
3296 |
+
if (option.textContent !== undefined) {
|
3297 |
+
option.textContent = data.text;
|
3298 |
+
} else {
|
3299 |
+
option.innerText = data.text;
|
3300 |
+
}
|
3301 |
+
}
|
3302 |
+
|
3303 |
+
if (data.id !== undefined) {
|
3304 |
+
option.value = data.id;
|
3305 |
+
}
|
3306 |
+
|
3307 |
+
if (data.disabled) {
|
3308 |
+
option.disabled = true;
|
3309 |
+
}
|
3310 |
+
|
3311 |
+
if (data.selected) {
|
3312 |
+
option.selected = true;
|
3313 |
+
}
|
3314 |
+
|
3315 |
+
if (data.title) {
|
3316 |
+
option.title = data.title;
|
3317 |
+
}
|
3318 |
+
|
3319 |
+
var $option = $(option);
|
3320 |
+
|
3321 |
+
var normalizedData = this._normalizeItem(data);
|
3322 |
+
normalizedData.element = option;
|
3323 |
+
|
3324 |
+
// Override the option's data with the combined data
|
3325 |
+
Utils.StoreData(option, 'data', normalizedData);
|
3326 |
+
|
3327 |
+
return $option;
|
3328 |
+
};
|
3329 |
+
|
3330 |
+
SelectAdapter.prototype.item = function ($option) {
|
3331 |
+
var data = {};
|
3332 |
+
|
3333 |
+
data = Utils.GetData($option[0], 'data');
|
3334 |
+
|
3335 |
+
if (data != null) {
|
3336 |
+
return data;
|
3337 |
+
}
|
3338 |
+
|
3339 |
+
if ($option.is('option')) {
|
3340 |
+
data = {
|
3341 |
+
id: $option.val(),
|
3342 |
+
text: $option.text(),
|
3343 |
+
disabled: $option.prop('disabled'),
|
3344 |
+
selected: $option.prop('selected'),
|
3345 |
+
title: $option.prop('title')
|
3346 |
+
};
|
3347 |
+
} else if ($option.is('optgroup')) {
|
3348 |
+
data = {
|
3349 |
+
text: $option.prop('label'),
|
3350 |
+
children: [],
|
3351 |
+
title: $option.prop('title')
|
3352 |
+
};
|
3353 |
+
|
3354 |
+
var $children = $option.children('option');
|
3355 |
+
var children = [];
|
3356 |
+
|
3357 |
+
for (var c = 0; c < $children.length; c++) {
|
3358 |
+
var $child = $($children[c]);
|
3359 |
+
|
3360 |
+
var child = this.item($child);
|
3361 |
+
|
3362 |
+
children.push(child);
|
3363 |
+
}
|
3364 |
+
|
3365 |
+
data.children = children;
|
3366 |
+
}
|
3367 |
+
|
3368 |
+
data = this._normalizeItem(data);
|
3369 |
+
data.element = $option[0];
|
3370 |
+
|
3371 |
+
Utils.StoreData($option[0], 'data', data);
|
3372 |
+
|
3373 |
+
return data;
|
3374 |
+
};
|
3375 |
+
|
3376 |
+
SelectAdapter.prototype._normalizeItem = function (item) {
|
3377 |
+
if (item !== Object(item)) {
|
3378 |
+
item = {
|
3379 |
+
id: item,
|
3380 |
+
text: item
|
3381 |
+
};
|
3382 |
+
}
|
3383 |
+
|
3384 |
+
item = $.extend({}, {
|
3385 |
+
text: ''
|
3386 |
+
}, item);
|
3387 |
+
|
3388 |
+
var defaults = {
|
3389 |
+
selected: false,
|
3390 |
+
disabled: false
|
3391 |
+
};
|
3392 |
+
|
3393 |
+
if (item.id != null) {
|
3394 |
+
item.id = item.id.toString();
|
3395 |
+
}
|
3396 |
+
|
3397 |
+
if (item.text != null) {
|
3398 |
+
item.text = item.text.toString();
|
3399 |
+
}
|
3400 |
+
|
3401 |
+
if (item._resultId == null && item.id && this.container != null) {
|
3402 |
+
item._resultId = this.generateResultId(this.container, item);
|
3403 |
+
}
|
3404 |
+
|
3405 |
+
return $.extend({}, defaults, item);
|
3406 |
+
};
|
3407 |
+
|
3408 |
+
SelectAdapter.prototype.matches = function (params, data) {
|
3409 |
+
var matcher = this.options.get('matcher');
|
3410 |
+
|
3411 |
+
return matcher(params, data);
|
3412 |
+
};
|
3413 |
+
|
3414 |
+
return SelectAdapter;
|
3415 |
+
});
|
3416 |
+
|
3417 |
+
S2.define('select2/data/array',[
|
3418 |
+
'./select',
|
3419 |
+
'../utils',
|
3420 |
+
'jquery'
|
3421 |
+
], function (SelectAdapter, Utils, $) {
|
3422 |
+
function ArrayAdapter ($element, options) {
|
3423 |
+
var data = options.get('data') || [];
|
3424 |
+
|
3425 |
+
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
3426 |
+
|
3427 |
+
this.addOptions(this.convertToOptions(data));
|
3428 |
+
}
|
3429 |
+
|
3430 |
+
Utils.Extend(ArrayAdapter, SelectAdapter);
|
3431 |
+
|
3432 |
+
ArrayAdapter.prototype.select = function (data) {
|
3433 |
+
var $option = this.$element.find('option').filter(function (i, elm) {
|
3434 |
+
return elm.value == data.id.toString();
|
3435 |
+
});
|
3436 |
+
|
3437 |
+
if ($option.length === 0) {
|
3438 |
+
$option = this.option(data);
|
3439 |
+
|
3440 |
+
this.addOptions($option);
|
3441 |
+
}
|
3442 |
+
|
3443 |
+
ArrayAdapter.__super__.select.call(this, data);
|
3444 |
+
};
|
3445 |
+
|
3446 |
+
ArrayAdapter.prototype.convertToOptions = function (data) {
|
3447 |
+
var self = this;
|
3448 |
+
|
3449 |
+
var $existing = this.$element.find('option');
|
3450 |
+
var existingIds = $existing.map(function () {
|
3451 |
+
return self.item($(this)).id;
|
3452 |
+
}).get();
|
3453 |
+
|
3454 |
+
var $options = [];
|
3455 |
+
|
3456 |
+
// Filter out all items except for the one passed in the argument
|
3457 |
+
function onlyItem (item) {
|
3458 |
+
return function () {
|
3459 |
+
return $(this).val() == item.id;
|
3460 |
+
};
|
3461 |
+
}
|
3462 |
+
|
3463 |
+
for (var d = 0; d < data.length; d++) {
|
3464 |
+
var item = this._normalizeItem(data[d]);
|
3465 |
+
|
3466 |
+
// Skip items which were pre-loaded, only merge the data
|
3467 |
+
if ($.inArray(item.id, existingIds) >= 0) {
|
3468 |
+
var $existingOption = $existing.filter(onlyItem(item));
|
3469 |
+
|
3470 |
+
var existingData = this.item($existingOption);
|
3471 |
+
var newData = $.extend(true, {}, item, existingData);
|
3472 |
+
|
3473 |
+
var $newOption = this.option(newData);
|
3474 |
+
|
3475 |
+
$existingOption.replaceWith($newOption);
|
3476 |
+
|
3477 |
+
continue;
|
3478 |
+
}
|
3479 |
+
|
3480 |
+
var $option = this.option(item);
|
3481 |
+
|
3482 |
+
if (item.children) {
|
3483 |
+
var $children = this.convertToOptions(item.children);
|
3484 |
+
|
3485 |
+
Utils.appendMany($option, $children);
|
3486 |
+
}
|
3487 |
+
|
3488 |
+
$options.push($option);
|
3489 |
+
}
|
3490 |
+
|
3491 |
+
return $options;
|
3492 |
+
};
|
3493 |
+
|
3494 |
+
return ArrayAdapter;
|
3495 |
+
});
|
3496 |
+
|
3497 |
+
S2.define('select2/data/ajax',[
|
3498 |
+
'./array',
|
3499 |
+
'../utils',
|
3500 |
+
'jquery'
|
3501 |
+
], function (ArrayAdapter, Utils, $) {
|
3502 |
+
function AjaxAdapter ($element, options) {
|
3503 |
+
this.ajaxOptions = this._applyDefaults(options.get('ajax'));
|
3504 |
+
|
3505 |
+
if (this.ajaxOptions.processResults != null) {
|
3506 |
+
this.processResults = this.ajaxOptions.processResults;
|
3507 |
+
}
|
3508 |
+
|
3509 |
+
AjaxAdapter.__super__.constructor.call(this, $element, options);
|
3510 |
+
}
|
3511 |
+
|
3512 |
+
Utils.Extend(AjaxAdapter, ArrayAdapter);
|
3513 |
+
|
3514 |
+
AjaxAdapter.prototype._applyDefaults = function (options) {
|
3515 |
+
var defaults = {
|
3516 |
+
data: function (params) {
|
3517 |
+
return $.extend({}, params, {
|
3518 |
+
q: params.term
|
3519 |
+
});
|
3520 |
+
},
|
3521 |
+
transport: function (params, success, failure) {
|
3522 |
+
var $request = $.ajax(params);
|
3523 |
+
|
3524 |
+
$request.then(success);
|
3525 |
+
$request.fail(failure);
|
3526 |
+
|
3527 |
+
return $request;
|
3528 |
+
}
|
3529 |
+
};
|
3530 |
+
|
3531 |
+
return $.extend({}, defaults, options, true);
|
3532 |
+
};
|
3533 |
+
|
3534 |
+
AjaxAdapter.prototype.processResults = function (results) {
|
3535 |
+
return results;
|
3536 |
+
};
|
3537 |
+
|
3538 |
+
AjaxAdapter.prototype.query = function (params, callback) {
|
3539 |
+
var matches = [];
|
3540 |
+
var self = this;
|
3541 |
+
|
3542 |
+
if (this._request != null) {
|
3543 |
+
// JSONP requests cannot always be aborted
|
3544 |
+
if ($.isFunction(this._request.abort)) {
|
3545 |
+
this._request.abort();
|
3546 |
+
}
|
3547 |
+
|
3548 |
+
this._request = null;
|
3549 |
+
}
|
3550 |
+
|
3551 |
+
var options = $.extend({
|
3552 |
+
type: 'GET'
|
3553 |
+
}, this.ajaxOptions);
|
3554 |
+
|
3555 |
+
if (typeof options.url === 'function') {
|
3556 |
+
options.url = options.url.call(this.$element, params);
|
3557 |
+
}
|
3558 |
+
|
3559 |
+
if (typeof options.data === 'function') {
|
3560 |
+
options.data = options.data.call(this.$element, params);
|
3561 |
+
}
|
3562 |
+
|
3563 |
+
function request () {
|
3564 |
+
var $request = options.transport(options, function (data) {
|
3565 |
+
var results = self.processResults(data, params);
|
3566 |
+
|
3567 |
+
if (self.options.get('debug') && window.console && console.error) {
|
3568 |
+
// Check to make sure that the response included a `results` key.
|
3569 |
+
if (!results || !results.results || !$.isArray(results.results)) {
|
3570 |
+
console.error(
|
3571 |
+
'Select2: The AJAX results did not return an array in the ' +
|
3572 |
+
'`results` key of the response.'
|
3573 |
+
);
|
3574 |
+
}
|
3575 |
+
}
|
3576 |
+
|
3577 |
+
callback(results);
|
3578 |
+
}, function () {
|
3579 |
+
// Attempt to detect if a request was aborted
|
3580 |
+
// Only works if the transport exposes a status property
|
3581 |
+
if ('status' in $request &&
|
3582 |
+
($request.status === 0 || $request.status === '0')) {
|
3583 |
+
return;
|
3584 |
+
}
|
3585 |
+
|
3586 |
+
self.trigger('results:message', {
|
3587 |
+
message: 'errorLoading'
|
3588 |
+
});
|
3589 |
+
});
|
3590 |
+
|
3591 |
+
self._request = $request;
|
3592 |
+
}
|
3593 |
+
|
3594 |
+
if (this.ajaxOptions.delay && params.term != null) {
|
3595 |
+
if (this._queryTimeout) {
|
3596 |
+
window.clearTimeout(this._queryTimeout);
|
3597 |
+
}
|
3598 |
+
|
3599 |
+
this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
|
3600 |
+
} else {
|
3601 |
+
request();
|
3602 |
+
}
|
3603 |
+
};
|
3604 |
+
|
3605 |
+
return AjaxAdapter;
|
3606 |
+
});
|
3607 |
+
|
3608 |
+
S2.define('select2/data/tags',[
|
3609 |
+
'jquery'
|
3610 |
+
], function ($) {
|
3611 |
+
function Tags (decorated, $element, options) {
|
3612 |
+
var tags = options.get('tags');
|
3613 |
+
|
3614 |
+
var createTag = options.get('createTag');
|
3615 |
+
|
3616 |
+
if (createTag !== undefined) {
|
3617 |
+
this.createTag = createTag;
|
3618 |
+
}
|
3619 |
+
|
3620 |
+
var insertTag = options.get('insertTag');
|
3621 |
+
|
3622 |
+
if (insertTag !== undefined) {
|
3623 |
+
this.insertTag = insertTag;
|
3624 |
+
}
|
3625 |
+
|
3626 |
+
decorated.call(this, $element, options);
|
3627 |
+
|
3628 |
+
if ($.isArray(tags)) {
|
3629 |
+
for (var t = 0; t < tags.length; t++) {
|
3630 |
+
var tag = tags[t];
|
3631 |
+
var item = this._normalizeItem(tag);
|
3632 |
+
|
3633 |
+
var $option = this.option(item);
|
3634 |
+
|
3635 |
+
this.$element.append($option);
|
3636 |
+
}
|
3637 |
+
}
|
3638 |
+
}
|
3639 |
+
|
3640 |
+
Tags.prototype.query = function (decorated, params, callback) {
|
3641 |
+
var self = this;
|
3642 |
+
|
3643 |
+
this._removeOldTags();
|
3644 |
+
|
3645 |
+
if (params.term == null || params.page != null) {
|
3646 |
+
decorated.call(this, params, callback);
|
3647 |
+
return;
|
3648 |
+
}
|
3649 |
+
|
3650 |
+
function wrapper (obj, child) {
|
3651 |
+
var data = obj.results;
|
3652 |
+
|
3653 |
+
for (var i = 0; i < data.length; i++) {
|
3654 |
+
var option = data[i];
|
3655 |
+
|
3656 |
+
var checkChildren = (
|
3657 |
+
option.children != null &&
|
3658 |
+
!wrapper({
|
3659 |
+
results: option.children
|
3660 |
+
}, true)
|
3661 |
+
);
|
3662 |
+
|
3663 |
+
var optionText = (option.text || '').toUpperCase();
|
3664 |
+
var paramsTerm = (params.term || '').toUpperCase();
|
3665 |
+
|
3666 |
+
var checkText = optionText === paramsTerm;
|
3667 |
+
|
3668 |
+
if (checkText || checkChildren) {
|
3669 |
+
if (child) {
|
3670 |
+
return false;
|
3671 |
+
}
|
3672 |
+
|
3673 |
+
obj.data = data;
|
3674 |
+
callback(obj);
|
3675 |
+
|
3676 |
+
return;
|
3677 |
+
}
|
3678 |
+
}
|
3679 |
+
|
3680 |
+
if (child) {
|
3681 |
+
return true;
|
3682 |
+
}
|
3683 |
+
|
3684 |
+
var tag = self.createTag(params);
|
3685 |
+
|
3686 |
+
if (tag != null) {
|
3687 |
+
var $option = self.option(tag);
|
3688 |
+
$option.attr('data-select2-tag', true);
|
3689 |
+
|
3690 |
+
self.addOptions([$option]);
|
3691 |
+
|
3692 |
+
self.insertTag(data, tag);
|
3693 |
+
}
|
3694 |
+
|
3695 |
+
obj.results = data;
|
3696 |
+
|
3697 |
+
callback(obj);
|
3698 |
+
}
|
3699 |
+
|
3700 |
+
decorated.call(this, params, wrapper);
|
3701 |
+
};
|
3702 |
+
|
3703 |
+
Tags.prototype.createTag = function (decorated, params) {
|
3704 |
+
var term = $.trim(params.term);
|
3705 |
+
|
3706 |
+
if (term === '') {
|
3707 |
+
return null;
|
3708 |
+
}
|
3709 |
+
|
3710 |
+
return {
|
3711 |
+
id: term,
|
3712 |
+
text: term
|
3713 |
+
};
|
3714 |
+
};
|
3715 |
+
|
3716 |
+
Tags.prototype.insertTag = function (_, data, tag) {
|
3717 |
+
data.unshift(tag);
|
3718 |
+
};
|
3719 |
+
|
3720 |
+
Tags.prototype._removeOldTags = function (_) {
|
3721 |
+
var tag = this._lastTag;
|
3722 |
+
|
3723 |
+
var $options = this.$element.find('option[data-select2-tag]');
|
3724 |
+
|
3725 |
+
$options.each(function () {
|
3726 |
+
if (this.selected) {
|
3727 |
+
return;
|
3728 |
+
}
|
3729 |
+
|
3730 |
+
$(this).remove();
|
3731 |
+
});
|
3732 |
+
};
|
3733 |
+
|
3734 |
+
return Tags;
|
3735 |
+
});
|
3736 |
+
|
3737 |
+
S2.define('select2/data/tokenizer',[
|
3738 |
+
'jquery'
|
3739 |
+
], function ($) {
|
3740 |
+
function Tokenizer (decorated, $element, options) {
|
3741 |
+
var tokenizer = options.get('tokenizer');
|
3742 |
+
|
3743 |
+
if (tokenizer !== undefined) {
|
3744 |
+
this.tokenizer = tokenizer;
|
3745 |
+
}
|
3746 |
+
|
3747 |
+
decorated.call(this, $element, options);
|
3748 |
+
}
|
3749 |
+
|
3750 |
+
Tokenizer.prototype.bind = function (decorated, container, $container) {
|
3751 |
+
decorated.call(this, container, $container);
|
3752 |
+
|
3753 |
+
this.$search = container.dropdown.$search || container.selection.$search ||
|
3754 |
+
$container.find('.select2-search__field');
|
3755 |
+
};
|
3756 |
+
|
3757 |
+
Tokenizer.prototype.query = function (decorated, params, callback) {
|
3758 |
+
var self = this;
|
3759 |
+
|
3760 |
+
function createAndSelect (data) {
|
3761 |
+
// Normalize the data object so we can use it for checks
|
3762 |
+
var item = self._normalizeItem(data);
|
3763 |
+
|
3764 |
+
// Check if the data object already exists as a tag
|
3765 |
+
// Select it if it doesn't
|
3766 |
+
var $existingOptions = self.$element.find('option').filter(function () {
|
3767 |
+
return $(this).val() === item.id;
|
3768 |
+
});
|
3769 |
+
|
3770 |
+
// If an existing option wasn't found for it, create the option
|
3771 |
+
if (!$existingOptions.length) {
|
3772 |
+
var $option = self.option(item);
|
3773 |
+
$option.attr('data-select2-tag', true);
|
3774 |
+
|
3775 |
+
self._removeOldTags();
|
3776 |
+
self.addOptions([$option]);
|
3777 |
+
}
|
3778 |
+
|
3779 |
+
// Select the item, now that we know there is an option for it
|
3780 |
+
select(item);
|
3781 |
+
}
|
3782 |
+
|
3783 |
+
function select (data) {
|
3784 |
+
self.trigger('select', {
|
3785 |
+
data: data
|
3786 |
+
});
|
3787 |
+
}
|
3788 |
+
|
3789 |
+
params.term = params.term || '';
|
3790 |
+
|
3791 |
+
var tokenData = this.tokenizer(params, this.options, createAndSelect);
|
3792 |
+
|
3793 |
+
if (tokenData.term !== params.term) {
|
3794 |
+
// Replace the search term if we have the search box
|
3795 |
+
if (this.$search.length) {
|
3796 |
+
this.$search.val(tokenData.term);
|
3797 |
+
this.$search.focus();
|
3798 |
+
}
|
3799 |
+
|
3800 |
+
params.term = tokenData.term;
|
3801 |
+
}
|
3802 |
+
|
3803 |
+
decorated.call(this, params, callback);
|
3804 |
+
};
|
3805 |
+
|
3806 |
+
Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
|
3807 |
+
var separators = options.get('tokenSeparators') || [];
|
3808 |
+
var term = params.term;
|
3809 |
+
var i = 0;
|
3810 |
+
|
3811 |
+
var createTag = this.createTag || function (params) {
|
3812 |
+
return {
|
3813 |
+
id: params.term,
|
3814 |
+
text: params.term
|
3815 |
+
};
|
3816 |
+
};
|
3817 |
+
|
3818 |
+
while (i < term.length) {
|
3819 |
+
var termChar = term[i];
|
3820 |
+
|
3821 |
+
if ($.inArray(termChar, separators) === -1) {
|
3822 |
+
i++;
|
3823 |
+
|
3824 |
+
continue;
|
3825 |
+
}
|
3826 |
+
|
3827 |
+
var part = term.substr(0, i);
|
3828 |
+
var partParams = $.extend({}, params, {
|
3829 |
+
term: part
|
3830 |
+
});
|
3831 |
+
|
3832 |
+
var data = createTag(partParams);
|
3833 |
+
|
3834 |
+
if (data == null) {
|
3835 |
+
i++;
|
3836 |
+
continue;
|
3837 |
+
}
|
3838 |
+
|
3839 |
+
callback(data);
|
3840 |
+
|
3841 |
+
// Reset the term to not include the tokenized portion
|
3842 |
+
term = term.substr(i + 1) || '';
|
3843 |
+
i = 0;
|
3844 |
+
}
|
3845 |
+
|
3846 |
+
return {
|
3847 |
+
term: term
|
3848 |
+
};
|
3849 |
+
};
|
3850 |
+
|
3851 |
+
return Tokenizer;
|
3852 |
+
});
|
3853 |
+
|
3854 |
+
S2.define('select2/data/minimumInputLength',[
|
3855 |
+
|
3856 |
+
], function () {
|
3857 |
+
function MinimumInputLength (decorated, $e, options) {
|
3858 |
+
this.minimumInputLength = options.get('minimumInputLength');
|
3859 |
+
|
3860 |
+
decorated.call(this, $e, options);
|
3861 |
+
}
|
3862 |
+
|
3863 |
+
MinimumInputLength.prototype.query = function (decorated, params, callback) {
|
3864 |
+
params.term = params.term || '';
|
3865 |
+
|
3866 |
+
if (params.term.length < this.minimumInputLength) {
|
3867 |
+
this.trigger('results:message', {
|
3868 |
+
message: 'inputTooShort',
|
3869 |
+
args: {
|
3870 |
+
minimum: this.minimumInputLength,
|
3871 |
+
input: params.term,
|
3872 |
+
params: params
|
3873 |
+
}
|
3874 |
+
});
|
3875 |
+
|
3876 |
+
return;
|
3877 |
+
}
|
3878 |
+
|
3879 |
+
decorated.call(this, params, callback);
|
3880 |
+
};
|
3881 |
+
|
3882 |
+
return MinimumInputLength;
|
3883 |
+
});
|
3884 |
+
|
3885 |
+
S2.define('select2/data/maximumInputLength',[
|
3886 |
+
|
3887 |
+
], function () {
|
3888 |
+
function MaximumInputLength (decorated, $e, options) {
|
3889 |
+
this.maximumInputLength = options.get('maximumInputLength');
|
3890 |
+
|
3891 |
+
decorated.call(this, $e, options);
|
3892 |
+
}
|
3893 |
+
|
3894 |
+
MaximumInputLength.prototype.query = function (decorated, params, callback) {
|
3895 |
+
params.term = params.term || '';
|
3896 |
+
|
3897 |
+
if (this.maximumInputLength > 0 &&
|
3898 |
+
params.term.length > this.maximumInputLength) {
|
3899 |
+
this.trigger('results:message', {
|
3900 |
+
message: 'inputTooLong',
|
3901 |
+
args: {
|
3902 |
+
maximum: this.maximumInputLength,
|
3903 |
+
input: params.term,
|
3904 |
+
params: params
|
3905 |
+
}
|
3906 |
+
});
|
3907 |
+
|
3908 |
+
return;
|
3909 |
+
}
|
3910 |
+
|
3911 |
+
decorated.call(this, params, callback);
|
3912 |
+
};
|
3913 |
+
|
3914 |
+
return MaximumInputLength;
|
3915 |
+
});
|
3916 |
+
|
3917 |
+
S2.define('select2/data/maximumSelectionLength',[
|
3918 |
+
|
3919 |
+
], function (){
|
3920 |
+
function MaximumSelectionLength (decorated, $e, options) {
|
3921 |
+
this.maximumSelectionLength = options.get('maximumSelectionLength');
|
3922 |
+
|
3923 |
+
decorated.call(this, $e, options);
|
3924 |
+
}
|
3925 |
+
|
3926 |
+
MaximumSelectionLength.prototype.query =
|
3927 |
+
function (decorated, params, callback) {
|
3928 |
+
var self = this;
|
3929 |
+
|
3930 |
+
this.current(function (currentData) {
|
3931 |
+
var count = currentData != null ? currentData.length : 0;
|
3932 |
+
if (self.maximumSelectionLength > 0 &&
|
3933 |
+
count >= self.maximumSelectionLength) {
|
3934 |
+
self.trigger('results:message', {
|
3935 |
+
message: 'maximumSelected',
|
3936 |
+
args: {
|
3937 |
+
maximum: self.maximumSelectionLength
|
3938 |
+
}
|
3939 |
+
});
|
3940 |
+
return;
|
3941 |
+
}
|
3942 |
+
decorated.call(self, params, callback);
|
3943 |
+
});
|
3944 |
+
};
|
3945 |
+
|
3946 |
+
return MaximumSelectionLength;
|
3947 |
+
});
|
3948 |
+
|
3949 |
+
S2.define('select2/dropdown',[
|
3950 |
+
'jquery',
|
3951 |
+
'./utils'
|
3952 |
+
], function ($, Utils) {
|
3953 |
+
function Dropdown ($element, options) {
|
3954 |
+
this.$element = $element;
|
3955 |
+
this.options = options;
|
3956 |
+
|
3957 |
+
Dropdown.__super__.constructor.call(this);
|
3958 |
+
}
|
3959 |
+
|
3960 |
+
Utils.Extend(Dropdown, Utils.Observable);
|
3961 |
+
|
3962 |
+
Dropdown.prototype.render = function () {
|
3963 |
+
var $dropdown = $(
|
3964 |
+
'<span class="select2-dropdown">' +
|
3965 |
+
'<span class="select2-results"></span>' +
|
3966 |
+
'</span>'
|
3967 |
+
);
|
3968 |
+
|
3969 |
+
$dropdown.attr('dir', this.options.get('dir'));
|
3970 |
+
|
3971 |
+
this.$dropdown = $dropdown;
|
3972 |
+
|
3973 |
+
return $dropdown;
|
3974 |
+
};
|
3975 |
+
|
3976 |
+
Dropdown.prototype.bind = function () {
|
3977 |
+
// Should be implemented in subclasses
|
3978 |
+
};
|
3979 |
+
|
3980 |
+
Dropdown.prototype.position = function ($dropdown, $container) {
|
3981 |
+
// Should be implmented in subclasses
|
3982 |
+
};
|
3983 |
+
|
3984 |
+
Dropdown.prototype.destroy = function () {
|
3985 |
+
// Remove the dropdown from the DOM
|
3986 |
+
this.$dropdown.remove();
|
3987 |
+
};
|
3988 |
+
|
3989 |
+
return Dropdown;
|
3990 |
+
});
|
3991 |
+
|
3992 |
+
S2.define('select2/dropdown/search',[
|
3993 |
+
'jquery',
|
3994 |
+
'../utils'
|
3995 |
+
], function ($, Utils) {
|
3996 |
+
function Search () { }
|
3997 |
+
|
3998 |
+
Search.prototype.render = function (decorated) {
|
3999 |
+
var $rendered = decorated.call(this);
|
4000 |
+
|
4001 |
+
var $search = $(
|
4002 |
+
'<span class="select2-search select2-search--dropdown">' +
|
4003 |
+
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
4004 |
+
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
4005 |
+
' spellcheck="false" role="textbox" />' +
|
4006 |
+
'</span>'
|
4007 |
+
);
|
4008 |
+
|
4009 |
+
this.$searchContainer = $search;
|
4010 |
+
this.$search = $search.find('input');
|
4011 |
+
|
4012 |
+
$rendered.prepend($search);
|
4013 |
+
|
4014 |
+
return $rendered;
|
4015 |
+
};
|
4016 |
+
|
4017 |
+
Search.prototype.bind = function (decorated, container, $container) {
|
4018 |
+
var self = this;
|
4019 |
+
|
4020 |
+
decorated.call(this, container, $container);
|
4021 |
+
|
4022 |
+
this.$search.on('keydown', function (evt) {
|
4023 |
+
self.trigger('keypress', evt);
|
4024 |
+
|
4025 |
+
self._keyUpPrevented = evt.isDefaultPrevented();
|
4026 |
+
});
|
4027 |
+
|
4028 |
+
// Workaround for browsers which do not support the `input` event
|
4029 |
+
// This will prevent double-triggering of events for browsers which support
|
4030 |
+
// both the `keyup` and `input` events.
|
4031 |
+
this.$search.on('input', function (evt) {
|
4032 |
+
// Unbind the duplicated `keyup` event
|
4033 |
+
$(this).off('keyup');
|
4034 |
+
});
|
4035 |
+
|
4036 |
+
this.$search.on('keyup input', function (evt) {
|
4037 |
+
self.handleSearch(evt);
|
4038 |
+
});
|
4039 |
+
|
4040 |
+
container.on('open', function () {
|
4041 |
+
self.$search.attr('tabindex', 0);
|
4042 |
+
|
4043 |
+
self.$search.focus();
|
4044 |
+
|
4045 |
+
window.setTimeout(function () {
|
4046 |
+
self.$search.focus();
|
4047 |
+
}, 0);
|
4048 |
+
});
|
4049 |
+
|
4050 |
+
container.on('close', function () {
|
4051 |
+
self.$search.attr('tabindex', -1);
|
4052 |
+
|
4053 |
+
self.$search.val('');
|
4054 |
+
self.$search.blur();
|
4055 |
+
});
|
4056 |
+
|
4057 |
+
container.on('focus', function () {
|
4058 |
+
if (!container.isOpen()) {
|
4059 |
+
self.$search.focus();
|
4060 |
+
}
|
4061 |
+
});
|
4062 |
+
|
4063 |
+
container.on('results:all', function (params) {
|
4064 |
+
if (params.query.term == null || params.query.term === '') {
|
4065 |
+
var showSearch = self.showSearch(params);
|
4066 |
+
|
4067 |
+
if (showSearch) {
|
4068 |
+
self.$searchContainer.removeClass('select2-search--hide');
|
4069 |
+
} else {
|
4070 |
+
self.$searchContainer.addClass('select2-search--hide');
|
4071 |
+
}
|
4072 |
+
}
|
4073 |
+
});
|
4074 |
+
};
|
4075 |
+
|
4076 |
+
Search.prototype.handleSearch = function (evt) {
|
4077 |
+
if (!this._keyUpPrevented) {
|
4078 |
+
var input = this.$search.val();
|
4079 |
+
|
4080 |
+
this.trigger('query', {
|
4081 |
+
term: input
|
4082 |
+
});
|
4083 |
+
}
|
4084 |
+
|
4085 |
+
this._keyUpPrevented = false;
|
4086 |
+
};
|
4087 |
+
|
4088 |
+
Search.prototype.showSearch = function (_, params) {
|
4089 |
+
return true;
|
4090 |
+
};
|
4091 |
+
|
4092 |
+
return Search;
|
4093 |
+
});
|
4094 |
+
|
4095 |
+
S2.define('select2/dropdown/hidePlaceholder',[
|
4096 |
+
|
4097 |
+
], function () {
|
4098 |
+
function HidePlaceholder (decorated, $element, options, dataAdapter) {
|
4099 |
+
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
|
4100 |
+
|
4101 |
+
decorated.call(this, $element, options, dataAdapter);
|
4102 |
+
}
|
4103 |
+
|
4104 |
+
HidePlaceholder.prototype.append = function (decorated, data) {
|
4105 |
+
data.results = this.removePlaceholder(data.results);
|
4106 |
+
|
4107 |
+
decorated.call(this, data);
|
4108 |
+
};
|
4109 |
+
|
4110 |
+
HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
|
4111 |
+
if (typeof placeholder === 'string') {
|
4112 |
+
placeholder = {
|
4113 |
+
id: '',
|
4114 |
+
text: placeholder
|
4115 |
+
};
|
4116 |
+
}
|
4117 |
+
|
4118 |
+
return placeholder;
|
4119 |
+
};
|
4120 |
+
|
4121 |
+
HidePlaceholder.prototype.removePlaceholder = function (_, data) {
|
4122 |
+
var modifiedData = data.slice(0);
|
4123 |
+
|
4124 |
+
for (var d = data.length - 1; d >= 0; d--) {
|
4125 |
+
var item = data[d];
|
4126 |
+
|
4127 |
+
if (this.placeholder.id === item.id) {
|
4128 |
+
modifiedData.splice(d, 1);
|
4129 |
+
}
|
4130 |
+
}
|
4131 |
+
|
4132 |
+
return modifiedData;
|
4133 |
+
};
|
4134 |
+
|
4135 |
+
return HidePlaceholder;
|
4136 |
+
});
|
4137 |
+
|
4138 |
+
S2.define('select2/dropdown/infiniteScroll',[
|
4139 |
+
'jquery'
|
4140 |
+
], function ($) {
|
4141 |
+
function InfiniteScroll (decorated, $element, options, dataAdapter) {
|
4142 |
+
this.lastParams = {};
|
4143 |
+
|
4144 |
+
decorated.call(this, $element, options, dataAdapter);
|
4145 |
+
|
4146 |
+
this.$loadingMore = this.createLoadingMore();
|
4147 |
+
this.loading = false;
|
4148 |
+
}
|
4149 |
+
|
4150 |
+
InfiniteScroll.prototype.append = function (decorated, data) {
|
4151 |
+
this.$loadingMore.remove();
|
4152 |
+
this.loading = false;
|
4153 |
+
|
4154 |
+
decorated.call(this, data);
|
4155 |
+
|
4156 |
+
if (this.showLoadingMore(data)) {
|
4157 |
+
this.$results.append(this.$loadingMore);
|
4158 |
+
}
|
4159 |
+
};
|
4160 |
+
|
4161 |
+
InfiniteScroll.prototype.bind = function (decorated, container, $container) {
|
4162 |
+
var self = this;
|
4163 |
+
|
4164 |
+
decorated.call(this, container, $container);
|
4165 |
+
|
4166 |
+
container.on('query', function (params) {
|
4167 |
+
self.lastParams = params;
|
4168 |
+
self.loading = true;
|
4169 |
+
});
|
4170 |
+
|
4171 |
+
container.on('query:append', function (params) {
|
4172 |
+
self.lastParams = params;
|
4173 |
+
self.loading = true;
|
4174 |
+
});
|
4175 |
+
|
4176 |
+
this.$results.on('scroll', function () {
|
4177 |
+
var isLoadMoreVisible = $.contains(
|
4178 |
+
document.documentElement,
|
4179 |
+
self.$loadingMore[0]
|
4180 |
+
);
|
4181 |
+
|
4182 |
+
if (self.loading || !isLoadMoreVisible) {
|
4183 |
+
return;
|
4184 |
+
}
|
4185 |
+
|
4186 |
+
var currentOffset = self.$results.offset().top +
|
4187 |
+
self.$results.outerHeight(false);
|
4188 |
+
var loadingMoreOffset = self.$loadingMore.offset().top +
|
4189 |
+
self.$loadingMore.outerHeight(false);
|
4190 |
+
|
4191 |
+
if (currentOffset + 50 >= loadingMoreOffset) {
|
4192 |
+
self.loadMore();
|
4193 |
+
}
|
4194 |
+
});
|
4195 |
+
};
|
4196 |
+
|
4197 |
+
InfiniteScroll.prototype.loadMore = function () {
|
4198 |
+
this.loading = true;
|
4199 |
+
|
4200 |
+
var params = $.extend({}, {page: 1}, this.lastParams);
|
4201 |
+
|
4202 |
+
params.page++;
|
4203 |
+
|
4204 |
+
this.trigger('query:append', params);
|
4205 |
+
};
|
4206 |
+
|
4207 |
+
InfiniteScroll.prototype.showLoadingMore = function (_, data) {
|
4208 |
+
return data.pagination && data.pagination.more;
|
4209 |
+
};
|
4210 |
+
|
4211 |
+
InfiniteScroll.prototype.createLoadingMore = function () {
|
4212 |
+
var $option = $(
|
4213 |
+
'<li ' +
|
4214 |
+
'class="select2-results__option select2-results__option--load-more"' +
|
4215 |
+
'role="treeitem" aria-disabled="true"></li>'
|
4216 |
+
);
|
4217 |
+
|
4218 |
+
var message = this.options.get('translations').get('loadingMore');
|
4219 |
+
|
4220 |
+
$option.html(message(this.lastParams));
|
4221 |
+
|
4222 |
+
return $option;
|
4223 |
+
};
|
4224 |
+
|
4225 |
+
return InfiniteScroll;
|
4226 |
+
});
|
4227 |
+
|
4228 |
+
S2.define('select2/dropdown/attachBody',[
|
4229 |
+
'jquery',
|
4230 |
+
'../utils'
|
4231 |
+
], function ($, Utils) {
|
4232 |
+
function AttachBody (decorated, $element, options) {
|
4233 |
+
this.$dropdownParent = options.get('dropdownParent') || $(document.body);
|
4234 |
+
|
4235 |
+
decorated.call(this, $element, options);
|
4236 |
+
}
|
4237 |
+
|
4238 |
+
AttachBody.prototype.bind = function (decorated, container, $container) {
|
4239 |
+
var self = this;
|
4240 |
+
|
4241 |
+
var setupResultsEvents = false;
|
4242 |
+
|
4243 |
+
decorated.call(this, container, $container);
|
4244 |
+
|
4245 |
+
container.on('open', function () {
|
4246 |
+
self._showDropdown();
|
4247 |
+
self._attachPositioningHandler(container);
|
4248 |
+
|
4249 |
+
if (!setupResultsEvents) {
|
4250 |
+
setupResultsEvents = true;
|
4251 |
+
|
4252 |
+
container.on('results:all', function () {
|
4253 |
+
self._positionDropdown();
|
4254 |
+
self._resizeDropdown();
|
4255 |
+
});
|
4256 |
+
|
4257 |
+
container.on('results:append', function () {
|
4258 |
+
self._positionDropdown();
|
4259 |
+
self._resizeDropdown();
|
4260 |
+
});
|
4261 |
+
}
|
4262 |
+
});
|
4263 |
+
|
4264 |
+
container.on('close', function () {
|
4265 |
+
self._hideDropdown();
|
4266 |
+
self._detachPositioningHandler(container);
|
4267 |
+
});
|
4268 |
+
|
4269 |
+
this.$dropdownContainer.on('mousedown', function (evt) {
|
4270 |
+
evt.stopPropagation();
|
4271 |
+
});
|
4272 |
+
};
|
4273 |
+
|
4274 |
+
AttachBody.prototype.destroy = function (decorated) {
|
4275 |
+
decorated.call(this);
|
4276 |
+
|
4277 |
+
this.$dropdownContainer.remove();
|
4278 |
+
};
|
4279 |
+
|
4280 |
+
AttachBody.prototype.position = function (decorated, $dropdown, $container) {
|
4281 |
+
// Clone all of the container classes
|
4282 |
+
$dropdown.attr('class', $container.attr('class'));
|
4283 |
+
|
4284 |
+
$dropdown.removeClass('select2');
|
4285 |
+
$dropdown.addClass('select2-container--open');
|
4286 |
+
|
4287 |
+
$dropdown.css({
|
4288 |
+
position: 'absolute',
|
4289 |
+
top: -999999
|
4290 |
+
});
|
4291 |
+
|
4292 |
+
this.$container = $container;
|
4293 |
+
};
|
4294 |
+
|
4295 |
+
AttachBody.prototype.render = function (decorated) {
|
4296 |
+
var $container = $('<span></span>');
|
4297 |
+
|
4298 |
+
var $dropdown = decorated.call(this);
|
4299 |
+
$container.append($dropdown);
|
4300 |
+
|
4301 |
+
this.$dropdownContainer = $container;
|
4302 |
+
|
4303 |
+
return $container;
|
4304 |
+
};
|
4305 |
+
|
4306 |
+
AttachBody.prototype._hideDropdown = function (decorated) {
|
4307 |
+
this.$dropdownContainer.detach();
|
4308 |
+
};
|
4309 |
+
|
4310 |
+
AttachBody.prototype._attachPositioningHandler =
|
4311 |
+
function (decorated, container) {
|
4312 |
+
var self = this;
|
4313 |
+
|
4314 |
+
var scrollEvent = 'scroll.select2.' + container.id;
|
4315 |
+
var resizeEvent = 'resize.select2.' + container.id;
|
4316 |
+
var orientationEvent = 'orientationchange.select2.' + container.id;
|
4317 |
+
|
4318 |
+
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4319 |
+
$watchers.each(function () {
|
4320 |
+
Utils.StoreData(this, 'select2-scroll-position', {
|
4321 |
+
x: $(this).scrollLeft(),
|
4322 |
+
y: $(this).scrollTop()
|
4323 |
+
});
|
4324 |
+
});
|
4325 |
+
|
4326 |
+
$watchers.on(scrollEvent, function (ev) {
|
4327 |
+
var position = Utils.GetData(this, 'select2-scroll-position');
|
4328 |
+
$(this).scrollTop(position.y);
|
4329 |
+
});
|
4330 |
+
|
4331 |
+
$(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
|
4332 |
+
function (e) {
|
4333 |
+
self._positionDropdown();
|
4334 |
+
self._resizeDropdown();
|
4335 |
+
});
|
4336 |
+
};
|
4337 |
+
|
4338 |
+
AttachBody.prototype._detachPositioningHandler =
|
4339 |
+
function (decorated, container) {
|
4340 |
+
var scrollEvent = 'scroll.select2.' + container.id;
|
4341 |
+
var resizeEvent = 'resize.select2.' + container.id;
|
4342 |
+
var orientationEvent = 'orientationchange.select2.' + container.id;
|
4343 |
+
|
4344 |
+
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4345 |
+
$watchers.off(scrollEvent);
|
4346 |
+
|
4347 |
+
$(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
|
4348 |
+
};
|
4349 |
+
|
4350 |
+
AttachBody.prototype._positionDropdown = function () {
|
4351 |
+
var $window = $(window);
|
4352 |
+
|
4353 |
+
var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
|
4354 |
+
var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
|
4355 |
+
|
4356 |
+
var newDirection = null;
|
4357 |
+
|
4358 |
+
var offset = this.$container.offset();
|
4359 |
+
|
4360 |
+
offset.bottom = offset.top + this.$container.outerHeight(false);
|
4361 |
+
|
4362 |
+
var container = {
|
4363 |
+
height: this.$container.outerHeight(false)
|
4364 |
+
};
|
4365 |
+
|
4366 |
+
container.top = offset.top;
|
4367 |
+
container.bottom = offset.top + container.height;
|
4368 |
+
|
4369 |
+
var dropdown = {
|
4370 |
+
height: this.$dropdown.outerHeight(false)
|
4371 |
+
};
|
4372 |
+
|
4373 |
+
var viewport = {
|
4374 |
+
top: $window.scrollTop(),
|
4375 |
+
bottom: $window.scrollTop() + $window.height()
|
4376 |
+
};
|
4377 |
+
|
4378 |
+
var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
|
4379 |
+
var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
|
4380 |
+
|
4381 |
+
var css = {
|
4382 |
+
left: offset.left,
|
4383 |
+
top: container.bottom
|
4384 |
+
};
|
4385 |
+
|
4386 |
+
// Determine what the parent element is to use for calciulating the offset
|
4387 |
+
var $offsetParent = this.$dropdownParent;
|
4388 |
+
|
4389 |
+
// For statically positoned elements, we need to get the element
|
4390 |
+
// that is determining the offset
|
4391 |
+
if ($offsetParent.css('position') === 'static') {
|
4392 |
+
$offsetParent = $offsetParent.offsetParent();
|
4393 |
+
}
|
4394 |
+
|
4395 |
+
var parentOffset = $offsetParent.offset();
|
4396 |
+
|
4397 |
+
css.top -= parentOffset.top;
|
4398 |
+
css.left -= parentOffset.left;
|
4399 |
+
|
4400 |
+
if (!isCurrentlyAbove && !isCurrentlyBelow) {
|
4401 |
+
newDirection = 'below';
|
4402 |
+
}
|
4403 |
+
|
4404 |
+
if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
|
4405 |
+
newDirection = 'above';
|
4406 |
+
} else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
|
4407 |
+
newDirection = 'below';
|
4408 |
+
}
|
4409 |
+
|
4410 |
+
if (newDirection == 'above' ||
|
4411 |
+
(isCurrentlyAbove && newDirection !== 'below')) {
|
4412 |
+
css.top = container.top - parentOffset.top - dropdown.height;
|
4413 |
+
}
|
4414 |
+
|
4415 |
+
if (newDirection != null) {
|
4416 |
+
this.$dropdown
|
4417 |
+
.removeClass('select2-dropdown--below select2-dropdown--above')
|
4418 |
+
.addClass('select2-dropdown--' + newDirection);
|
4419 |
+
this.$container
|
4420 |
+
.removeClass('select2-container--below select2-container--above')
|
4421 |
+
.addClass('select2-container--' + newDirection);
|
4422 |
+
}
|
4423 |
+
|
4424 |
+
this.$dropdownContainer.css(css);
|
4425 |
+
};
|
4426 |
+
|
4427 |
+
AttachBody.prototype._resizeDropdown = function () {
|
4428 |
+
var css = {
|
4429 |
+
width: this.$container.outerWidth(false) + 'px'
|
4430 |
+
};
|
4431 |
+
|
4432 |
+
if (this.options.get('dropdownAutoWidth')) {
|
4433 |
+
css.minWidth = css.width;
|
4434 |
+
css.position = 'relative';
|
4435 |
+
css.width = 'auto';
|
4436 |
+
}
|
4437 |
+
|
4438 |
+
this.$dropdown.css(css);
|
4439 |
+
};
|
4440 |
+
|
4441 |
+
AttachBody.prototype._showDropdown = function (decorated) {
|
4442 |
+
this.$dropdownContainer.appendTo(this.$dropdownParent);
|
4443 |
+
|
4444 |
+
this._positionDropdown();
|
4445 |
+
this._resizeDropdown();
|
4446 |
+
};
|
4447 |
+
|
4448 |
+
return AttachBody;
|
4449 |
+
});
|
4450 |
+
|
4451 |
+
S2.define('select2/dropdown/minimumResultsForSearch',[
|
4452 |
+
|
4453 |
+
], function () {
|
4454 |
+
function countResults (data) {
|
4455 |
+
var count = 0;
|
4456 |
+
|
4457 |
+
for (var d = 0; d < data.length; d++) {
|
4458 |
+
var item = data[d];
|
4459 |
+
|
4460 |
+
if (item.children) {
|
4461 |
+
count += countResults(item.children);
|
4462 |
+
} else {
|
4463 |
+
count++;
|
4464 |
+
}
|
4465 |
+
}
|
4466 |
+
|
4467 |
+
return count;
|
4468 |
+
}
|
4469 |
+
|
4470 |
+
function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
|
4471 |
+
this.minimumResultsForSearch = options.get('minimumResultsForSearch');
|
4472 |
+
|
4473 |
+
if (this.minimumResultsForSearch < 0) {
|
4474 |
+
this.minimumResultsForSearch = Infinity;
|
4475 |
+
}
|
4476 |
+
|
4477 |
+
decorated.call(this, $element, options, dataAdapter);
|
4478 |
+
}
|
4479 |
+
|
4480 |
+
MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
|
4481 |
+
if (countResults(params.data.results) < this.minimumResultsForSearch) {
|
4482 |
+
return false;
|
4483 |
+
}
|
4484 |
+
|
4485 |
+
return decorated.call(this, params);
|
4486 |
+
};
|
4487 |
+
|
4488 |
+
return MinimumResultsForSearch;
|
4489 |
+
});
|
4490 |
+
|
4491 |
+
S2.define('select2/dropdown/selectOnClose',[
|
4492 |
+
'../utils'
|
4493 |
+
], function (Utils) {
|
4494 |
+
function SelectOnClose () { }
|
4495 |
+
|
4496 |
+
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
4497 |
+
var self = this;
|
4498 |
+
|
4499 |
+
decorated.call(this, container, $container);
|
4500 |
+
|
4501 |
+
container.on('close', function (params) {
|
4502 |
+
self._handleSelectOnClose(params);
|
4503 |
+
});
|
4504 |
+
};
|
4505 |
+
|
4506 |
+
SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
|
4507 |
+
if (params && params.originalSelect2Event != null) {
|
4508 |
+
var event = params.originalSelect2Event;
|
4509 |
+
|
4510 |
+
// Don't select an item if the close event was triggered from a select or
|
4511 |
+
// unselect event
|
4512 |
+
if (event._type === 'select' || event._type === 'unselect') {
|
4513 |
+
return;
|
4514 |
+
}
|
4515 |
+
}
|
4516 |
+
|
4517 |
+
var $highlightedResults = this.getHighlightedResults();
|
4518 |
+
|
4519 |
+
// Only select highlighted results
|
4520 |
+
if ($highlightedResults.length < 1) {
|
4521 |
+
return;
|
4522 |
+
}
|
4523 |
+
|
4524 |
+
var data = Utils.GetData($highlightedResults[0], 'data');
|
4525 |
+
|
4526 |
+
// Don't re-select already selected resulte
|
4527 |
+
if (
|
4528 |
+
(data.element != null && data.element.selected) ||
|
4529 |
+
(data.element == null && data.selected)
|
4530 |
+
) {
|
4531 |
+
return;
|
4532 |
+
}
|
4533 |
+
|
4534 |
+
this.trigger('select', {
|
4535 |
+
data: data
|
4536 |
+
});
|
4537 |
+
};
|
4538 |
+
|
4539 |
+
return SelectOnClose;
|
4540 |
+
});
|
4541 |
+
|
4542 |
+
S2.define('select2/dropdown/closeOnSelect',[
|
4543 |
+
|
4544 |
+
], function () {
|
4545 |
+
function CloseOnSelect () { }
|
4546 |
+
|
4547 |
+
CloseOnSelect.prototype.bind = function (decorated, container, $container) {
|
4548 |
+
var self = this;
|
4549 |
+
|
4550 |
+
decorated.call(this, container, $container);
|
4551 |
+
|
4552 |
+
container.on('select', function (evt) {
|
4553 |
+
self._selectTriggered(evt);
|
4554 |
+
});
|
4555 |
+
|
4556 |
+
container.on('unselect', function (evt) {
|
4557 |
+
self._selectTriggered(evt);
|
4558 |
+
});
|
4559 |
+
};
|
4560 |
+
|
4561 |
+
CloseOnSelect.prototype._selectTriggered = function (_, evt) {
|
4562 |
+
var originalEvent = evt.originalEvent;
|
4563 |
+
|
4564 |
+
// Don't close if the control key is being held
|
4565 |
+
if (originalEvent && originalEvent.ctrlKey) {
|
4566 |
+
return;
|
4567 |
+
}
|
4568 |
+
|
4569 |
+
this.trigger('close', {
|
4570 |
+
originalEvent: originalEvent,
|
4571 |
+
originalSelect2Event: evt
|
4572 |
+
});
|
4573 |
+
};
|
4574 |
+
|
4575 |
+
return CloseOnSelect;
|
4576 |
+
});
|
4577 |
+
|
4578 |
+
S2.define('select2/i18n/en',[],function () {
|
4579 |
+
// English
|
4580 |
+
return {
|
4581 |
+
errorLoading: function () {
|
4582 |
+
return 'The results could not be loaded.';
|
4583 |
+
},
|
4584 |
+
inputTooLong: function (args) {
|
4585 |
+
var overChars = args.input.length - args.maximum;
|
4586 |
+
|
4587 |
+
var message = 'Please delete ' + overChars + ' character';
|
4588 |
+
|
4589 |
+
if (overChars != 1) {
|
4590 |
+
message += 's';
|
4591 |
+
}
|
4592 |
+
|
4593 |
+
return message;
|
4594 |
+
},
|
4595 |
+
inputTooShort: function (args) {
|
4596 |
+
var remainingChars = args.minimum - args.input.length;
|
4597 |
+
|
4598 |
+
var message = 'Please enter ' + remainingChars + ' or more characters';
|
4599 |
+
|
4600 |
+
return message;
|
4601 |
+
},
|
4602 |
+
loadingMore: function () {
|
4603 |
+
return 'Loading more results…';
|
4604 |
+
},
|
4605 |
+
maximumSelected: function (args) {
|
4606 |
+
var message = 'You can only select ' + args.maximum + ' item';
|
4607 |
+
|
4608 |
+
if (args.maximum != 1) {
|
4609 |
+
message += 's';
|
4610 |
+
}
|
4611 |
+
|
4612 |
+
return message;
|
4613 |
+
},
|
4614 |
+
noResults: function () {
|
4615 |
+
return 'No results found';
|
4616 |
+
},
|
4617 |
+
searching: function () {
|
4618 |
+
return 'Searching…';
|
4619 |
+
}
|
4620 |
+
};
|
4621 |
+
});
|
4622 |
+
|
4623 |
+
S2.define('select2/defaults',[
|
4624 |
+
'jquery',
|
4625 |
+
'require',
|
4626 |
+
|
4627 |
+
'./results',
|
4628 |
+
|
4629 |
+
'./selection/single',
|
4630 |
+
'./selection/multiple',
|
4631 |
+
'./selection/placeholder',
|
4632 |
+
'./selection/allowClear',
|
4633 |
+
'./selection/search',
|
4634 |
+
'./selection/eventRelay',
|
4635 |
+
|
4636 |
+
'./utils',
|
4637 |
+
'./translation',
|
4638 |
+
'./diacritics',
|
4639 |
+
|
4640 |
+
'./data/select',
|
4641 |
+
'./data/array',
|
4642 |
+
'./data/ajax',
|
4643 |
+
'./data/tags',
|
4644 |
+
'./data/tokenizer',
|
4645 |
+
'./data/minimumInputLength',
|
4646 |
+
'./data/maximumInputLength',
|
4647 |
+
'./data/maximumSelectionLength',
|
4648 |
+
|
4649 |
+
'./dropdown',
|
4650 |
+
'./dropdown/search',
|
4651 |
+
'./dropdown/hidePlaceholder',
|
4652 |
+
'./dropdown/infiniteScroll',
|
4653 |
+
'./dropdown/attachBody',
|
4654 |
+
'./dropdown/minimumResultsForSearch',
|
4655 |
+
'./dropdown/selectOnClose',
|
4656 |
+
'./dropdown/closeOnSelect',
|
4657 |
+
|
4658 |
+
'./i18n/en'
|
4659 |
+
], function ($, require,
|
4660 |
+
|
4661 |
+
ResultsList,
|
4662 |
+
|
4663 |
+
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
4664 |
+
SelectionSearch, EventRelay,
|
4665 |
+
|
4666 |
+
Utils, Translation, DIACRITICS,
|
4667 |
+
|
4668 |
+
SelectData, ArrayData, AjaxData, Tags, Tokenizer,
|
4669 |
+
MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
|
4670 |
+
|
4671 |
+
Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
|
4672 |
+
AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
|
4673 |
+
|
4674 |
+
EnglishTranslation) {
|
4675 |
+
function Defaults () {
|
4676 |
+
this.reset();
|
4677 |
+
}
|
4678 |
+
|
4679 |
+
Defaults.prototype.apply = function (options) {
|
4680 |
+
options = $.extend(true, {}, this.defaults, options);
|
4681 |
+
|
4682 |
+
if (options.dataAdapter == null) {
|
4683 |
+
if (options.ajax != null) {
|
4684 |
+
options.dataAdapter = AjaxData;
|
4685 |
+
} else if (options.data != null) {
|
4686 |
+
options.dataAdapter = ArrayData;
|
4687 |
+
} else {
|
4688 |
+
options.dataAdapter = SelectData;
|
4689 |
+
}
|
4690 |
+
|
4691 |
+
if (options.minimumInputLength > 0) {
|
4692 |
+
options.dataAdapter = Utils.Decorate(
|
4693 |
+
options.dataAdapter,
|
4694 |
+
MinimumInputLength
|
4695 |
+
);
|
4696 |
+
}
|
4697 |
+
|
4698 |
+
if (options.maximumInputLength > 0) {
|
4699 |
+
options.dataAdapter = Utils.Decorate(
|
4700 |
+
options.dataAdapter,
|
4701 |
+
MaximumInputLength
|
4702 |
+
);
|
4703 |
+
}
|
4704 |
+
|
4705 |
+
if (options.maximumSelectionLength > 0) {
|
4706 |
+
options.dataAdapter = Utils.Decorate(
|
4707 |
+
options.dataAdapter,
|
4708 |
+
MaximumSelectionLength
|
4709 |
+
);
|
4710 |
+
}
|
4711 |
+
|
4712 |
+
if (options.tags) {
|
4713 |
+
options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
|
4714 |
+
}
|
4715 |
+
|
4716 |
+
if (options.tokenSeparators != null || options.tokenizer != null) {
|
4717 |
+
options.dataAdapter = Utils.Decorate(
|
4718 |
+
options.dataAdapter,
|
4719 |
+
Tokenizer
|
4720 |
+
);
|
4721 |
+
}
|
4722 |
+
|
4723 |
+
if (options.query != null) {
|
4724 |
+
var Query = require(options.amdBase + 'compat/query');
|
4725 |
+
|
4726 |
+
options.dataAdapter = Utils.Decorate(
|
4727 |
+
options.dataAdapter,
|
4728 |
+
Query
|
4729 |
+
);
|
4730 |
+
}
|
4731 |
+
|
4732 |
+
if (options.initSelection != null) {
|
4733 |
+
var InitSelection = require(options.amdBase + 'compat/initSelection');
|
4734 |
+
|
4735 |
+
options.dataAdapter = Utils.Decorate(
|
4736 |
+
options.dataAdapter,
|
4737 |
+
InitSelection
|
4738 |
+
);
|
4739 |
+
}
|
4740 |
+
}
|
4741 |
+
|
4742 |
+
if (options.resultsAdapter == null) {
|
4743 |
+
options.resultsAdapter = ResultsList;
|
4744 |
+
|
4745 |
+
if (options.ajax != null) {
|
4746 |
+
options.resultsAdapter = Utils.Decorate(
|
4747 |
+
options.resultsAdapter,
|
4748 |
+
InfiniteScroll
|
4749 |
+
);
|
4750 |
+
}
|
4751 |
+
|
4752 |
+
if (options.placeholder != null) {
|
4753 |
+
options.resultsAdapter = Utils.Decorate(
|
4754 |
+
options.resultsAdapter,
|
4755 |
+
HidePlaceholder
|
4756 |
+
);
|
4757 |
+
}
|
4758 |
+
|
4759 |
+
if (options.selectOnClose) {
|
4760 |
+
options.resultsAdapter = Utils.Decorate(
|
4761 |
+
options.resultsAdapter,
|
4762 |
+
SelectOnClose
|
4763 |
+
);
|
4764 |
+
}
|
4765 |
+
}
|
4766 |
+
|
4767 |
+
if (options.dropdownAdapter == null) {
|
4768 |
+
if (options.multiple) {
|
4769 |
+
options.dropdownAdapter = Dropdown;
|
4770 |
+
} else {
|
4771 |
+
var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
|
4772 |
+
|
4773 |
+
options.dropdownAdapter = SearchableDropdown;
|
4774 |
+
}
|
4775 |
+
|
4776 |
+
if (options.minimumResultsForSearch !== 0) {
|
4777 |
+
options.dropdownAdapter = Utils.Decorate(
|
4778 |
+
options.dropdownAdapter,
|
4779 |
+
MinimumResultsForSearch
|
4780 |
+
);
|
4781 |
+
}
|
4782 |
+
|
4783 |
+
if (options.closeOnSelect) {
|
4784 |
+
options.dropdownAdapter = Utils.Decorate(
|
4785 |
+
options.dropdownAdapter,
|
4786 |
+
CloseOnSelect
|
4787 |
+
);
|
4788 |
+
}
|
4789 |
+
|
4790 |
+
if (
|
4791 |
+
options.dropdownCssClass != null ||
|
4792 |
+
options.dropdownCss != null ||
|
4793 |
+
options.adaptDropdownCssClass != null
|
4794 |
+
) {
|
4795 |
+
var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
|
4796 |
+
|
4797 |
+
options.dropdownAdapter = Utils.Decorate(
|
4798 |
+
options.dropdownAdapter,
|
4799 |
+
DropdownCSS
|
4800 |
+
);
|
4801 |
+
}
|
4802 |
+
|
4803 |
+
options.dropdownAdapter = Utils.Decorate(
|
4804 |
+
options.dropdownAdapter,
|
4805 |
+
AttachBody
|
4806 |
+
);
|
4807 |
+
}
|
4808 |
+
|
4809 |
+
if (options.selectionAdapter == null) {
|
4810 |
+
if (options.multiple) {
|
4811 |
+
options.selectionAdapter = MultipleSelection;
|
4812 |
+
} else {
|
4813 |
+
options.selectionAdapter = SingleSelection;
|
4814 |
+
}
|
4815 |
+
|
4816 |
+
// Add the placeholder mixin if a placeholder was specified
|
4817 |
+
if (options.placeholder != null) {
|
4818 |
+
options.selectionAdapter = Utils.Decorate(
|
4819 |
+
options.selectionAdapter,
|
4820 |
+
Placeholder
|
4821 |
+
);
|
4822 |
+
}
|
4823 |
+
|
4824 |
+
if (options.allowClear) {
|
4825 |
+
options.selectionAdapter = Utils.Decorate(
|
4826 |
+
options.selectionAdapter,
|
4827 |
+
AllowClear
|
4828 |
+
);
|
4829 |
+
}
|
4830 |
+
|
4831 |
+
if (options.multiple) {
|
4832 |
+
options.selectionAdapter = Utils.Decorate(
|
4833 |
+
options.selectionAdapter,
|
4834 |
+
SelectionSearch
|
4835 |
+
);
|
4836 |
+
}
|
4837 |
+
|
4838 |
+
if (
|
4839 |
+
options.containerCssClass != null ||
|
4840 |
+
options.containerCss != null ||
|
4841 |
+
options.adaptContainerCssClass != null
|
4842 |
+
) {
|
4843 |
+
var ContainerCSS = require(options.amdBase + 'compat/containerCss');
|
4844 |
+
|
4845 |
+
options.selectionAdapter = Utils.Decorate(
|
4846 |
+
options.selectionAdapter,
|
4847 |
+
ContainerCSS
|
4848 |
+
);
|
4849 |
+
}
|
4850 |
+
|
4851 |
+
options.selectionAdapter = Utils.Decorate(
|
4852 |
+
options.selectionAdapter,
|
4853 |
+
EventRelay
|
4854 |
+
);
|
4855 |
+
}
|
4856 |
+
|
4857 |
+
if (typeof options.language === 'string') {
|
4858 |
+
// Check if the language is specified with a region
|
4859 |
+
if (options.language.indexOf('-') > 0) {
|
4860 |
+
// Extract the region information if it is included
|
4861 |
+
var languageParts = options.language.split('-');
|
4862 |
+
var baseLanguage = languageParts[0];
|
4863 |
+
|
4864 |
+
options.language = [options.language, baseLanguage];
|
4865 |
+
} else {
|
4866 |
+
options.language = [options.language];
|
4867 |
+
}
|
4868 |
+
}
|
4869 |
+
|
4870 |
+
if ($.isArray(options.language)) {
|
4871 |
+
var languages = new Translation();
|
4872 |
+
options.language.push('en');
|
4873 |
+
|
4874 |
+
var languageNames = options.language;
|
4875 |
+
|
4876 |
+
for (var l = 0; l < languageNames.length; l++) {
|
4877 |
+
var name = languageNames[l];
|
4878 |
+
var language = {};
|
4879 |
+
|
4880 |
+
try {
|
4881 |
+
// Try to load it with the original name
|
4882 |
+
language = Translation.loadPath(name);
|
4883 |
+
} catch (e) {
|
4884 |
+
try {
|
4885 |
+
// If we couldn't load it, check if it wasn't the full path
|
4886 |
+
name = this.defaults.amdLanguageBase + name;
|
4887 |
+
language = Translation.loadPath(name);
|
4888 |
+
} catch (ex) {
|
4889 |
+
// The translation could not be loaded at all. Sometimes this is
|
4890 |
+
// because of a configuration problem, other times this can be
|
4891 |
+
// because of how Select2 helps load all possible translation files.
|
4892 |
+
if (options.debug && window.console && console.warn) {
|
4893 |
+
console.warn(
|
4894 |
+
'Select2: The language file for "' + name + '" could not be ' +
|
4895 |
+
'automatically loaded. A fallback will be used instead.'
|
4896 |
+
);
|
4897 |
+
}
|
4898 |
+
|
4899 |
+
continue;
|
4900 |
+
}
|
4901 |
+
}
|
4902 |
+
|
4903 |
+
languages.extend(language);
|
4904 |
+
}
|
4905 |
+
|
4906 |
+
options.translations = languages;
|
4907 |
+
} else {
|
4908 |
+
var baseTranslation = Translation.loadPath(
|
4909 |
+
this.defaults.amdLanguageBase + 'en'
|
4910 |
+
);
|
4911 |
+
var customTranslation = new Translation(options.language);
|
4912 |
+
|
4913 |
+
customTranslation.extend(baseTranslation);
|
4914 |
+
|
4915 |
+
options.translations = customTranslation;
|
4916 |
+
}
|
4917 |
+
|
4918 |
+
return options;
|
4919 |
+
};
|
4920 |
+
|
4921 |
+
Defaults.prototype.reset = function () {
|
4922 |
+
function stripDiacritics (text) {
|
4923 |
+
// Used 'uni range + named function' from http://jsperf.com/diacritics/18
|
4924 |
+
function match(a) {
|
4925 |
+
return DIACRITICS[a] || a;
|
4926 |
+
}
|
4927 |
+
|
4928 |
+
return text.replace(/[^\u0000-\u007E]/g, match);
|
4929 |
+
}
|
4930 |
+
|
4931 |
+
function matcher (params, data) {
|
4932 |
+
// Always return the object if there is nothing to compare
|
4933 |
+
if ($.trim(params.term) === '') {
|
4934 |
+
return data;
|
4935 |
+
}
|
4936 |
+
|
4937 |
+
// Do a recursive check for options with children
|
4938 |
+
if (data.children && data.children.length > 0) {
|
4939 |
+
// Clone the data object if there are children
|
4940 |
+
// This is required as we modify the object to remove any non-matches
|
4941 |
+
var match = $.extend(true, {}, data);
|
4942 |
+
|
4943 |
+
// Check each child of the option
|
4944 |
+
for (var c = data.children.length - 1; c >= 0; c--) {
|
4945 |
+
var child = data.children[c];
|
4946 |
+
|
4947 |
+
var matches = matcher(params, child);
|
4948 |
+
|
4949 |
+
// If there wasn't a match, remove the object in the array
|
4950 |
+
if (matches == null) {
|
4951 |
+
match.children.splice(c, 1);
|
4952 |
+
}
|
4953 |
+
}
|
4954 |
+
|
4955 |
+
// If any children matched, return the new object
|
4956 |
+
if (match.children.length > 0) {
|
4957 |
+
return match;
|
4958 |
+
}
|
4959 |
+
|
4960 |
+
// If there were no matching children, check just the plain object
|
4961 |
+
return matcher(params, match);
|
4962 |
+
}
|
4963 |
+
|
4964 |
+
var original = stripDiacritics(data.text).toUpperCase();
|
4965 |
+
var term = stripDiacritics(params.term).toUpperCase();
|
4966 |
+
|
4967 |
+
// Check if the text contains the term
|
4968 |
+
if (original.indexOf(term) > -1) {
|
4969 |
+
return data;
|
4970 |
+
}
|
4971 |
+
|
4972 |
+
// If it doesn't contain the term, don't return anything
|
4973 |
+
return null;
|
4974 |
+
}
|
4975 |
+
|
4976 |
+
this.defaults = {
|
4977 |
+
amdBase: './',
|
4978 |
+
amdLanguageBase: './i18n/',
|
4979 |
+
closeOnSelect: true,
|
4980 |
+
debug: false,
|
4981 |
+
dropdownAutoWidth: false,
|
4982 |
+
escapeMarkup: Utils.escapeMarkup,
|
4983 |
+
language: EnglishTranslation,
|
4984 |
+
matcher: matcher,
|
4985 |
+
minimumInputLength: 0,
|
4986 |
+
maximumInputLength: 0,
|
4987 |
+
maximumSelectionLength: 0,
|
4988 |
+
minimumResultsForSearch: 0,
|
4989 |
+
selectOnClose: false,
|
4990 |
+
sorter: function (data) {
|
4991 |
+
return data;
|
4992 |
+
},
|
4993 |
+
templateResult: function (result) {
|
4994 |
+
return result.text;
|
4995 |
+
},
|
4996 |
+
templateSelection: function (selection) {
|
4997 |
+
return selection.text;
|
4998 |
+
},
|
4999 |
+
theme: 'default',
|
5000 |
+
width: 'resolve'
|
5001 |
+
};
|
5002 |
+
};
|
5003 |
+
|
5004 |
+
Defaults.prototype.set = function (key, value) {
|
5005 |
+
var camelKey = $.camelCase(key);
|
5006 |
+
|
5007 |
+
var data = {};
|
5008 |
+
data[camelKey] = value;
|
5009 |
+
|
5010 |
+
var convertedData = Utils._convertData(data);
|
5011 |
+
|
5012 |
+
$.extend(true, this.defaults, convertedData);
|
5013 |
+
};
|
5014 |
+
|
5015 |
+
var defaults = new Defaults();
|
5016 |
+
|
5017 |
+
return defaults;
|
5018 |
+
});
|
5019 |
+
|
5020 |
+
S2.define('select2/options',[
|
5021 |
+
'require',
|
5022 |
+
'jquery',
|
5023 |
+
'./defaults',
|
5024 |
+
'./utils'
|
5025 |
+
], function (require, $, Defaults, Utils) {
|
5026 |
+
function Options (options, $element) {
|
5027 |
+
this.options = options;
|
5028 |
+
|
5029 |
+
if ($element != null) {
|
5030 |
+
this.fromElement($element);
|
5031 |
+
}
|
5032 |
+
|
5033 |
+
this.options = Defaults.apply(this.options);
|
5034 |
+
|
5035 |
+
if ($element && $element.is('input')) {
|
5036 |
+
var InputCompat = require(this.get('amdBase') + 'compat/inputData');
|
5037 |
+
|
5038 |
+
this.options.dataAdapter = Utils.Decorate(
|
5039 |
+
this.options.dataAdapter,
|
5040 |
+
InputCompat
|
5041 |
+
);
|
5042 |
+
}
|
5043 |
+
}
|
5044 |
+
|
5045 |
+
Options.prototype.fromElement = function ($e) {
|
5046 |
+
var excludedData = ['select2'];
|
5047 |
+
|
5048 |
+
if (this.options.multiple == null) {
|
5049 |
+
this.options.multiple = $e.prop('multiple');
|
5050 |
+
}
|
5051 |
+
|
5052 |
+
if (this.options.disabled == null) {
|
5053 |
+
this.options.disabled = $e.prop('disabled');
|
5054 |
+
}
|
5055 |
+
|
5056 |
+
if (this.options.language == null) {
|
5057 |
+
if ($e.prop('lang')) {
|
5058 |
+
this.options.language = $e.prop('lang').toLowerCase();
|
5059 |
+
} else if ($e.closest('[lang]').prop('lang')) {
|
5060 |
+
this.options.language = $e.closest('[lang]').prop('lang');
|
5061 |
+
}
|
5062 |
+
}
|
5063 |
+
|
5064 |
+
if (this.options.dir == null) {
|
5065 |
+
if ($e.prop('dir')) {
|
5066 |
+
this.options.dir = $e.prop('dir');
|
5067 |
+
} else if ($e.closest('[dir]').prop('dir')) {
|
5068 |
+
this.options.dir = $e.closest('[dir]').prop('dir');
|
5069 |
+
} else {
|
5070 |
+
this.options.dir = 'ltr';
|
5071 |
+
}
|
5072 |
+
}
|
5073 |
+
|
5074 |
+
$e.prop('disabled', this.options.disabled);
|
5075 |
+
$e.prop('multiple', this.options.multiple);
|
5076 |
+
|
5077 |
+
if (Utils.GetData($e[0], 'select2Tags')) {
|
5078 |
+
if (this.options.debug && window.console && console.warn) {
|
5079 |
+
console.warn(
|
5080 |
+
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
5081 |
+
'use the `data-data` and `data-tags="true"` attributes and will be ' +
|
5082 |
+
'removed in future versions of Select2.'
|
5083 |
+
);
|
5084 |
+
}
|
5085 |
+
|
5086 |
+
Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));
|
5087 |
+
Utils.StoreData($e[0], 'tags', true);
|
5088 |
+
}
|
5089 |
+
|
5090 |
+
if (Utils.GetData($e[0], 'ajaxUrl')) {
|
5091 |
+
if (this.options.debug && window.console && console.warn) {
|
5092 |
+
console.warn(
|
5093 |
+
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
5094 |
+
'`data-ajax--url` and support for the old attribute will be removed' +
|
5095 |
+
' in future versions of Select2.'
|
5096 |
+
);
|
5097 |
+
}
|
5098 |
+
|
5099 |
+
$e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
|
5100 |
+
Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
|
5101 |
+
|
5102 |
+
}
|
5103 |
+
|
5104 |
+
var dataset = {};
|
5105 |
+
|
5106 |
+
// Prefer the element's `dataset` attribute if it exists
|
5107 |
+
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
5108 |
+
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
5109 |
+
dataset = $.extend(true, {}, $e[0].dataset, Utils.GetData($e[0]));
|
5110 |
+
} else {
|
5111 |
+
dataset = Utils.GetData($e[0]);
|
5112 |
+
}
|
5113 |
+
|
5114 |
+
var data = $.extend(true, {}, dataset);
|
5115 |
+
|
5116 |
+
data = Utils._convertData(data);
|
5117 |
+
|
5118 |
+
for (var key in data) {
|
5119 |
+
if ($.inArray(key, excludedData) > -1) {
|
5120 |
+
continue;
|
5121 |
+
}
|
5122 |
+
|
5123 |
+
if ($.isPlainObject(this.options[key])) {
|
5124 |
+
$.extend(this.options[key], data[key]);
|
5125 |
+
} else {
|
5126 |
+
this.options[key] = data[key];
|
5127 |
+
}
|
5128 |
+
}
|
5129 |
+
|
5130 |
+
return this;
|
5131 |
+
};
|
5132 |
+
|
5133 |
+
Options.prototype.get = function (key) {
|
5134 |
+
return this.options[key];
|
5135 |
+
};
|
5136 |
+
|
5137 |
+
Options.prototype.set = function (key, val) {
|
5138 |
+
this.options[key] = val;
|
5139 |
+
};
|
5140 |
+
|
5141 |
+
return Options;
|
5142 |
+
});
|
5143 |
+
|
5144 |
+
S2.define('select2/core',[
|
5145 |
+
'jquery',
|
5146 |
+
'./options',
|
5147 |
+
'./utils',
|
5148 |
+
'./keys'
|
5149 |
+
], function ($, Options, Utils, KEYS) {
|
5150 |
+
var Select2 = function ($element, options) {
|
5151 |
+
if (Utils.GetData($element[0], 'select2') != null) {
|
5152 |
+
Utils.GetData($element[0], 'select2').destroy();
|
5153 |
+
}
|
5154 |
+
|
5155 |
+
this.$element = $element;
|
5156 |
+
|
5157 |
+
this.id = this._generateId($element);
|
5158 |
+
|
5159 |
+
options = options || {};
|
5160 |
+
|
5161 |
+
this.options = new Options(options, $element);
|
5162 |
+
|
5163 |
+
Select2.__super__.constructor.call(this);
|
5164 |
+
|
5165 |
+
// Set up the tabindex
|
5166 |
+
|
5167 |
+
var tabindex = $element.attr('tabindex') || 0;
|
5168 |
+
Utils.StoreData($element[0], 'old-tabindex', tabindex);
|
5169 |
+
$element.attr('tabindex', '-1');
|
5170 |
+
|
5171 |
+
// Set up containers and adapters
|
5172 |
+
|
5173 |
+
var DataAdapter = this.options.get('dataAdapter');
|
5174 |
+
this.dataAdapter = new DataAdapter($element, this.options);
|
5175 |
+
|
5176 |
+
var $container = this.render();
|
5177 |
+
|
5178 |
+
this._placeContainer($container);
|
5179 |
+
|
5180 |
+
var SelectionAdapter = this.options.get('selectionAdapter');
|
5181 |
+
this.selection = new SelectionAdapter($element, this.options);
|
5182 |
+
this.$selection = this.selection.render();
|
5183 |
+
|
5184 |
+
this.selection.position(this.$selection, $container);
|
5185 |
+
|
5186 |
+
var DropdownAdapter = this.options.get('dropdownAdapter');
|
5187 |
+
this.dropdown = new DropdownAdapter($element, this.options);
|
5188 |
+
this.$dropdown = this.dropdown.render();
|
5189 |
+
|
5190 |
+
this.dropdown.position(this.$dropdown, $container);
|
5191 |
+
|
5192 |
+
var ResultsAdapter = this.options.get('resultsAdapter');
|
5193 |
+
this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
|
5194 |
+
this.$results = this.results.render();
|
5195 |
+
|
5196 |
+
this.results.position(this.$results, this.$dropdown);
|
5197 |
+
|
5198 |
+
// Bind events
|
5199 |
+
|
5200 |
+
var self = this;
|
5201 |
+
|
5202 |
+
// Bind the container to all of the adapters
|
5203 |
+
this._bindAdapters();
|
5204 |
+
|
5205 |
+
// Register any DOM event handlers
|
5206 |
+
this._registerDomEvents();
|
5207 |
+
|
5208 |
+
// Register any internal event handlers
|
5209 |
+
this._registerDataEvents();
|
5210 |
+
this._registerSelectionEvents();
|
5211 |
+
this._registerDropdownEvents();
|
5212 |
+
this._registerResultsEvents();
|
5213 |
+
this._registerEvents();
|
5214 |
+
|
5215 |
+
// Set the initial state
|
5216 |
+
this.dataAdapter.current(function (initialData) {
|
5217 |
+
self.trigger('selection:update', {
|
5218 |
+
data: initialData
|
5219 |
+
});
|
5220 |
+
});
|
5221 |
+
|
5222 |
+
// Hide the original select
|
5223 |
+
$element.addClass('select2-hidden-accessible');
|
5224 |
+
$element.attr('aria-hidden', 'true');
|
5225 |
+
|
5226 |
+
// Synchronize any monitored attributes
|
5227 |
+
this._syncAttributes();
|
5228 |
+
|
5229 |
+
Utils.StoreData($element[0], 'select2', this);
|
5230 |
+
|
5231 |
+
// Ensure backwards compatibility with $element.data('select2').
|
5232 |
+
$element.data('select2', this);
|
5233 |
+
};
|
5234 |
+
|
5235 |
+
Utils.Extend(Select2, Utils.Observable);
|
5236 |
+
|
5237 |
+
Select2.prototype._generateId = function ($element) {
|
5238 |
+
var id = '';
|
5239 |
+
|
5240 |
+
if ($element.attr('id') != null) {
|
5241 |
+
id = $element.attr('id');
|
5242 |
+
} else if ($element.attr('name') != null) {
|
5243 |
+
id = $element.attr('name') + '-' + Utils.generateChars(2);
|
5244 |
+
} else {
|
5245 |
+
id = Utils.generateChars(4);
|
5246 |
+
}
|
5247 |
+
|
5248 |
+
id = id.replace(/(:|\.|\[|\]|,)/g, '');
|
5249 |
+
id = 'select2-' + id;
|
5250 |
+
|
5251 |
+
return id;
|
5252 |
+
};
|
5253 |
+
|
5254 |
+
Select2.prototype._placeContainer = function ($container) {
|
5255 |
+
$container.insertAfter(this.$element);
|
5256 |
+
|
5257 |
+
var width = this._resolveWidth(this.$element, this.options.get('width'));
|
5258 |
+
|
5259 |
+
if (width != null) {
|
5260 |
+
$container.css('width', width);
|
5261 |
+
}
|
5262 |
+
};
|
5263 |
+
|
5264 |
+
Select2.prototype._resolveWidth = function ($element, method) {
|
5265 |
+
var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
|
5266 |
+
|
5267 |
+
if (method == 'resolve') {
|
5268 |
+
var styleWidth = this._resolveWidth($element, 'style');
|
5269 |
+
|
5270 |
+
if (styleWidth != null) {
|
5271 |
+
return styleWidth;
|
5272 |
+
}
|
5273 |
+
|
5274 |
+
return this._resolveWidth($element, 'element');
|
5275 |
+
}
|
5276 |
+
|
5277 |
+
if (method == 'element') {
|
5278 |
+
var elementWidth = $element.outerWidth(false);
|
5279 |
+
|
5280 |
+
if (elementWidth <= 0) {
|
5281 |
+
return 'auto';
|
5282 |
+
}
|
5283 |
+
|
5284 |
+
return elementWidth + 'px';
|
5285 |
+
}
|
5286 |
+
|
5287 |
+
if (method == 'style') {
|
5288 |
+
var style = $element.attr('style');
|
5289 |
+
|
5290 |
+
if (typeof(style) !== 'string') {
|
5291 |
+
return null;
|
5292 |
+
}
|
5293 |
+
|
5294 |
+
var attrs = style.split(';');
|
5295 |
+
|
5296 |
+
for (var i = 0, l = attrs.length; i < l; i = i + 1) {
|
5297 |
+
var attr = attrs[i].replace(/\s/g, '');
|
5298 |
+
var matches = attr.match(WIDTH);
|
5299 |
+
|
5300 |
+
if (matches !== null && matches.length >= 1) {
|
5301 |
+
return matches[1];
|
5302 |
+
}
|
5303 |
+
}
|
5304 |
+
|
5305 |
+
return null;
|
5306 |
+
}
|
5307 |
+
|
5308 |
+
return method;
|
5309 |
+
};
|
5310 |
+
|
5311 |
+
Select2.prototype._bindAdapters = function () {
|
5312 |
+
this.dataAdapter.bind(this, this.$container);
|
5313 |
+
this.selection.bind(this, this.$container);
|
5314 |
+
|
5315 |
+
this.dropdown.bind(this, this.$container);
|
5316 |
+
this.results.bind(this, this.$container);
|
5317 |
+
};
|
5318 |
+
|
5319 |
+
Select2.prototype._registerDomEvents = function () {
|
5320 |
+
var self = this;
|
5321 |
+
|
5322 |
+
this.$element.on('change.select2', function () {
|
5323 |
+
self.dataAdapter.current(function (data) {
|
5324 |
+
self.trigger('selection:update', {
|
5325 |
+
data: data
|
5326 |
+
});
|
5327 |
+
});
|
5328 |
+
});
|
5329 |
+
|
5330 |
+
this.$element.on('focus.select2', function (evt) {
|
5331 |
+
self.trigger('focus', evt);
|
5332 |
+
});
|
5333 |
+
|
5334 |
+
this._syncA = Utils.bind(this._syncAttributes, this);
|
5335 |
+
this._syncS = Utils.bind(this._syncSubtree, this);
|
5336 |
+
|
5337 |
+
if (this.$element[0].attachEvent) {
|
5338 |
+
this.$element[0].attachEvent('onpropertychange', this._syncA);
|
5339 |
+
}
|
5340 |
+
|
5341 |
+
var observer = window.MutationObserver ||
|
5342 |
+
window.WebKitMutationObserver ||
|
5343 |
+
window.MozMutationObserver
|
5344 |
+
;
|
5345 |
+
|
5346 |
+
if (observer != null) {
|
5347 |
+
this._observer = new observer(function (mutations) {
|
5348 |
+
$.each(mutations, self._syncA);
|
5349 |
+
$.each(mutations, self._syncS);
|
5350 |
+
});
|
5351 |
+
this._observer.observe(this.$element[0], {
|
5352 |
+
attributes: true,
|
5353 |
+
childList: true,
|
5354 |
+
subtree: false
|
5355 |
+
});
|
5356 |
+
} else if (this.$element[0].addEventListener) {
|
5357 |
+
this.$element[0].addEventListener(
|
5358 |
+
'DOMAttrModified',
|
5359 |
+
self._syncA,
|
5360 |
+
false
|
5361 |
+
);
|
5362 |
+
this.$element[0].addEventListener(
|
5363 |
+
'DOMNodeInserted',
|
5364 |
+
self._syncS,
|
5365 |
+
false
|
5366 |
+
);
|
5367 |
+
this.$element[0].addEventListener(
|
5368 |
+
'DOMNodeRemoved',
|
5369 |
+
self._syncS,
|
5370 |
+
false
|
5371 |
+
);
|
5372 |
+
}
|
5373 |
+
};
|
5374 |
+
|
5375 |
+
Select2.prototype._registerDataEvents = function () {
|
5376 |
+
var self = this;
|
5377 |
+
|
5378 |
+
this.dataAdapter.on('*', function (name, params) {
|
5379 |
+
self.trigger(name, params);
|
5380 |
+
});
|
5381 |
+
};
|
5382 |
+
|
5383 |
+
Select2.prototype._registerSelectionEvents = function () {
|
5384 |
+
var self = this;
|
5385 |
+
var nonRelayEvents = ['toggle', 'focus'];
|
5386 |
+
|
5387 |
+
this.selection.on('toggle', function () {
|
5388 |
+
self.toggleDropdown();
|
5389 |
+
});
|
5390 |
+
|
5391 |
+
this.selection.on('focus', function (params) {
|
5392 |
+
self.focus(params);
|
5393 |
+
});
|
5394 |
+
|
5395 |
+
this.selection.on('*', function (name, params) {
|
5396 |
+
if ($.inArray(name, nonRelayEvents) !== -1) {
|
5397 |
+
return;
|
5398 |
+
}
|
5399 |
+
|
5400 |
+
self.trigger(name, params);
|
5401 |
+
});
|
5402 |
+
};
|
5403 |
+
|
5404 |
+
Select2.prototype._registerDropdownEvents = function () {
|
5405 |
+
var self = this;
|
5406 |
+
|
5407 |
+
this.dropdown.on('*', function (name, params) {
|
5408 |
+
self.trigger(name, params);
|
5409 |
+
});
|
5410 |
+
};
|
5411 |
+
|
5412 |
+
Select2.prototype._registerResultsEvents = function () {
|
5413 |
+
var self = this;
|
5414 |
+
|
5415 |
+
this.results.on('*', function (name, params) {
|
5416 |
+
self.trigger(name, params);
|
5417 |
+
});
|
5418 |
+
};
|
5419 |
+
|
5420 |
+
Select2.prototype._registerEvents = function () {
|
5421 |
+
var self = this;
|
5422 |
+
|
5423 |
+
this.on('open', function () {
|
5424 |
+
self.$container.addClass('select2-container--open');
|
5425 |
+
});
|
5426 |
+
|
5427 |
+
this.on('close', function () {
|
5428 |
+
self.$container.removeClass('select2-container--open');
|
5429 |
+
});
|
5430 |
+
|
5431 |
+
this.on('enable', function () {
|
5432 |
+
self.$container.removeClass('select2-container--disabled');
|
5433 |
+
});
|
5434 |
+
|
5435 |
+
this.on('disable', function () {
|
5436 |
+
self.$container.addClass('select2-container--disabled');
|
5437 |
+
});
|
5438 |
+
|
5439 |
+
this.on('blur', function () {
|
5440 |
+
self.$container.removeClass('select2-container--focus');
|
5441 |
+
});
|
5442 |
+
|
5443 |
+
this.on('query', function (params) {
|
5444 |
+
if (!self.isOpen()) {
|
5445 |
+
self.trigger('open', {});
|
5446 |
+
}
|
5447 |
+
|
5448 |
+
this.dataAdapter.query(params, function (data) {
|
5449 |
+
self.trigger('results:all', {
|
5450 |
+
data: data,
|
5451 |
+
query: params
|
5452 |
+
});
|
5453 |
+
});
|
5454 |
+
});
|
5455 |
+
|
5456 |
+
this.on('query:append', function (params) {
|
5457 |
+
this.dataAdapter.query(params, function (data) {
|
5458 |
+
self.trigger('results:append', {
|
5459 |
+
data: data,
|
5460 |
+
query: params
|
5461 |
+
});
|
5462 |
+
});
|
5463 |
+
});
|
5464 |
+
|
5465 |
+
this.on('keypress', function (evt) {
|
5466 |
+
var key = evt.which;
|
5467 |
+
|
5468 |
+
if (self.isOpen()) {
|
5469 |
+
if (key === KEYS.ESC || key === KEYS.TAB ||
|
5470 |
+
(key === KEYS.UP && evt.altKey)) {
|
5471 |
+
self.close();
|
5472 |
+
|
5473 |
+
evt.preventDefault();
|
5474 |
+
} else if (key === KEYS.ENTER) {
|
5475 |
+
self.trigger('results:select', {});
|
5476 |
+
|
5477 |
+
evt.preventDefault();
|
5478 |
+
} else if ((key === KEYS.SPACE && evt.ctrlKey)) {
|
5479 |
+
self.trigger('results:toggle', {});
|
5480 |
+
|
5481 |
+
evt.preventDefault();
|
5482 |
+
} else if (key === KEYS.UP) {
|
5483 |
+
self.trigger('results:previous', {});
|
5484 |
+
|
5485 |
+
evt.preventDefault();
|
5486 |
+
} else if (key === KEYS.DOWN) {
|
5487 |
+
self.trigger('results:next', {});
|
5488 |
+
|
5489 |
+
evt.preventDefault();
|
5490 |
+
}
|
5491 |
+
} else {
|
5492 |
+
if (key === KEYS.ENTER || key === KEYS.SPACE ||
|
5493 |
+
(key === KEYS.DOWN && evt.altKey)) {
|
5494 |
+
self.open();
|
5495 |
+
|
5496 |
+
evt.preventDefault();
|
5497 |
+
}
|
5498 |
+
}
|
5499 |
+
});
|
5500 |
+
};
|
5501 |
+
|
5502 |
+
Select2.prototype._syncAttributes = function () {
|
5503 |
+
this.options.set('disabled', this.$element.prop('disabled'));
|
5504 |
+
|
5505 |
+
if (this.options.get('disabled')) {
|
5506 |
+
if (this.isOpen()) {
|
5507 |
+
this.close();
|
5508 |
+
}
|
5509 |
+
|
5510 |
+
this.trigger('disable', {});
|
5511 |
+
} else {
|
5512 |
+
this.trigger('enable', {});
|
5513 |
+
}
|
5514 |
+
};
|
5515 |
+
|
5516 |
+
Select2.prototype._syncSubtree = function (evt, mutations) {
|
5517 |
+
var changed = false;
|
5518 |
+
var self = this;
|
5519 |
+
|
5520 |
+
// Ignore any mutation events raised for elements that aren't options or
|
5521 |
+
// optgroups. This handles the case when the select element is destroyed
|
5522 |
+
if (
|
5523 |
+
evt && evt.target && (
|
5524 |
+
evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
|
5525 |
+
)
|
5526 |
+
) {
|
5527 |
+
return;
|
5528 |
+
}
|
5529 |
+
|
5530 |
+
if (!mutations) {
|
5531 |
+
// If mutation events aren't supported, then we can only assume that the
|
5532 |
+
// change affected the selections
|
5533 |
+
changed = true;
|
5534 |
+
} else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
|
5535 |
+
for (var n = 0; n < mutations.addedNodes.length; n++) {
|
5536 |
+
var node = mutations.addedNodes[n];
|
5537 |
+
|
5538 |
+
if (node.selected) {
|
5539 |
+
changed = true;
|
5540 |
+
}
|
5541 |
+
}
|
5542 |
+
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
5543 |
+
changed = true;
|
5544 |
+
}
|
5545 |
+
|
5546 |
+
// Only re-pull the data if we think there is a change
|
5547 |
+
if (changed) {
|
5548 |
+
this.dataAdapter.current(function (currentData) {
|
5549 |
+
self.trigger('selection:update', {
|
5550 |
+
data: currentData
|
5551 |
+
});
|
5552 |
+
});
|
5553 |
+
}
|
5554 |
+
};
|
5555 |
+
|
5556 |
+
/**
|
5557 |
+
* Override the trigger method to automatically trigger pre-events when
|
5558 |
+
* there are events that can be prevented.
|
5559 |
+
*/
|
5560 |
+
Select2.prototype.trigger = function (name, args) {
|
5561 |
+
var actualTrigger = Select2.__super__.trigger;
|
5562 |
+
var preTriggerMap = {
|
5563 |
+
'open': 'opening',
|
5564 |
+
'close': 'closing',
|
5565 |
+
'select': 'selecting',
|
5566 |
+
'unselect': 'unselecting',
|
5567 |
+
'clear': 'clearing'
|
5568 |
+
};
|
5569 |
+
|
5570 |
+
if (args === undefined) {
|
5571 |
+
args = {};
|
5572 |
+
}
|
5573 |
+
|
5574 |
+
if (name in preTriggerMap) {
|
5575 |
+
var preTriggerName = preTriggerMap[name];
|
5576 |
+
var preTriggerArgs = {
|
5577 |
+
prevented: false,
|
5578 |
+
name: name,
|
5579 |
+
args: args
|
5580 |
+
};
|
5581 |
+
|
5582 |
+
actualTrigger.call(this, preTriggerName, preTriggerArgs);
|
5583 |
+
|
5584 |
+
if (preTriggerArgs.prevented) {
|
5585 |
+
args.prevented = true;
|
5586 |
+
|
5587 |
+
return;
|
5588 |
+
}
|
5589 |
+
}
|
5590 |
+
|
5591 |
+
actualTrigger.call(this, name, args);
|
5592 |
+
};
|
5593 |
+
|
5594 |
+
Select2.prototype.toggleDropdown = function () {
|
5595 |
+
if (this.options.get('disabled')) {
|
5596 |
+
return;
|
5597 |
+
}
|
5598 |
+
|
5599 |
+
if (this.isOpen()) {
|
5600 |
+
this.close();
|
5601 |
+
} else {
|
5602 |
+
this.open();
|
5603 |
+
}
|
5604 |
+
};
|
5605 |
+
|
5606 |
+
Select2.prototype.open = function () {
|
5607 |
+
if (this.isOpen()) {
|
5608 |
+
return;
|
5609 |
+
}
|
5610 |
+
|
5611 |
+
this.trigger('query', {});
|
5612 |
+
};
|
5613 |
+
|
5614 |
+
Select2.prototype.close = function () {
|
5615 |
+
if (!this.isOpen()) {
|
5616 |
+
return;
|
5617 |
+
}
|
5618 |
+
|
5619 |
+
this.trigger('close', {});
|
5620 |
+
};
|
5621 |
+
|
5622 |
+
Select2.prototype.isOpen = function () {
|
5623 |
+
return this.$container.hasClass('select2-container--open');
|
5624 |
+
};
|
5625 |
+
|
5626 |
+
Select2.prototype.hasFocus = function () {
|
5627 |
+
return this.$container.hasClass('select2-container--focus');
|
5628 |
+
};
|
5629 |
+
|
5630 |
+
Select2.prototype.focus = function (data) {
|
5631 |
+
// No need to re-trigger focus events if we are already focused
|
5632 |
+
if (this.hasFocus()) {
|
5633 |
+
return;
|
5634 |
+
}
|
5635 |
+
|
5636 |
+
this.$container.addClass('select2-container--focus');
|
5637 |
+
this.trigger('focus', {});
|
5638 |
+
};
|
5639 |
+
|
5640 |
+
Select2.prototype.enable = function (args) {
|
5641 |
+
if (this.options.get('debug') && window.console && console.warn) {
|
5642 |
+
console.warn(
|
5643 |
+
'Select2: The `select2("enable")` method has been deprecated and will' +
|
5644 |
+
' be removed in later Select2 versions. Use $element.prop("disabled")' +
|
5645 |
+
' instead.'
|
5646 |
+
);
|
5647 |
+
}
|
5648 |
+
|
5649 |
+
if (args == null || args.length === 0) {
|
5650 |
+
args = [true];
|
5651 |
+
}
|
5652 |
+
|
5653 |
+
var disabled = !args[0];
|
5654 |
+
|
5655 |
+
this.$element.prop('disabled', disabled);
|
5656 |
+
};
|
5657 |
+
|
5658 |
+
Select2.prototype.data = function () {
|
5659 |
+
if (this.options.get('debug') &&
|
5660 |
+
arguments.length > 0 && window.console && console.warn) {
|
5661 |
+
console.warn(
|
5662 |
+
'Select2: Data can no longer be set using `select2("data")`. You ' +
|
5663 |
+
'should consider setting the value instead using `$element.val()`.'
|
5664 |
+
);
|
5665 |
+
}
|
5666 |
+
|
5667 |
+
var data = [];
|
5668 |
+
|
5669 |
+
this.dataAdapter.current(function (currentData) {
|
5670 |
+
data = currentData;
|
5671 |
+
});
|
5672 |
+
|
5673 |
+
return data;
|
5674 |
+
};
|
5675 |
+
|
5676 |
+
Select2.prototype.val = function (args) {
|
5677 |
+
if (this.options.get('debug') && window.console && console.warn) {
|
5678 |
+
console.warn(
|
5679 |
+
'Select2: The `select2("val")` method has been deprecated and will be' +
|
5680 |
+
' removed in later Select2 versions. Use $element.val() instead.'
|
5681 |
+
);
|
5682 |
+
}
|
5683 |
+
|
5684 |
+
if (args == null || args.length === 0) {
|
5685 |
+
return this.$element.val();
|
5686 |
+
}
|
5687 |
+
|
5688 |
+
var newVal = args[0];
|
5689 |
+
|
5690 |
+
if ($.isArray(newVal)) {
|
5691 |
+
newVal = $.map(newVal, function (obj) {
|
5692 |
+
return obj.toString();
|
5693 |
+
});
|
5694 |
+
}
|
5695 |
+
|
5696 |
+
this.$element.val(newVal).trigger('change');
|
5697 |
+
};
|
5698 |
+
|
5699 |
+
Select2.prototype.destroy = function () {
|
5700 |
+
this.$container.remove();
|
5701 |
+
|
5702 |
+
if (this.$element[0].detachEvent) {
|
5703 |
+
this.$element[0].detachEvent('onpropertychange', this._syncA);
|
5704 |
+
}
|
5705 |
+
|
5706 |
+
if (this._observer != null) {
|
5707 |
+
this._observer.disconnect();
|
5708 |
+
this._observer = null;
|
5709 |
+
} else if (this.$element[0].removeEventListener) {
|
5710 |
+
this.$element[0]
|
5711 |
+
.removeEventListener('DOMAttrModified', this._syncA, false);
|
5712 |
+
this.$element[0]
|
5713 |
+
.removeEventListener('DOMNodeInserted', this._syncS, false);
|
5714 |
+
this.$element[0]
|
5715 |
+
.removeEventListener('DOMNodeRemoved', this._syncS, false);
|
5716 |
+
}
|
5717 |
+
|
5718 |
+
this._syncA = null;
|
5719 |
+
this._syncS = null;
|
5720 |
+
|
5721 |
+
this.$element.off('.select2');
|
5722 |
+
this.$element.attr('tabindex',
|
5723 |
+
Utils.GetData(this.$element[0], 'old-tabindex'));
|
5724 |
+
|
5725 |
+
this.$element.removeClass('select2-hidden-accessible');
|
5726 |
+
this.$element.attr('aria-hidden', 'false');
|
5727 |
+
Utils.RemoveData(this.$element[0]);
|
5728 |
+
this.$element.removeData('select2');
|
5729 |
+
|
5730 |
+
this.dataAdapter.destroy();
|
5731 |
+
this.selection.destroy();
|
5732 |
+
this.dropdown.destroy();
|
5733 |
+
this.results.destroy();
|
5734 |
+
|
5735 |
+
this.dataAdapter = null;
|
5736 |
+
this.selection = null;
|
5737 |
+
this.dropdown = null;
|
5738 |
+
this.results = null;
|
5739 |
+
};
|
5740 |
+
|
5741 |
+
Select2.prototype.render = function () {
|
5742 |
+
var $container = $(
|
5743 |
+
'<span class="select2 select2-container">' +
|
5744 |
+
'<span class="selection"></span>' +
|
5745 |
+
'<span class="dropdown-wrapper" aria-hidden="true"></span>' +
|
5746 |
+
'</span>'
|
5747 |
+
);
|
5748 |
+
|
5749 |
+
$container.attr('dir', this.options.get('dir'));
|
5750 |
+
|
5751 |
+
this.$container = $container;
|
5752 |
+
|
5753 |
+
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
5754 |
+
|
5755 |
+
Utils.StoreData($container[0], 'element', this.$element);
|
5756 |
+
|
5757 |
+
return $container;
|
5758 |
+
};
|
5759 |
+
|
5760 |
+
return Select2;
|
5761 |
+
});
|
5762 |
+
|
5763 |
+
S2.define('select2/compat/utils',[
|
5764 |
+
'jquery'
|
5765 |
+
], function ($) {
|
5766 |
+
function syncCssClasses ($dest, $src, adapter) {
|
5767 |
+
var classes, replacements = [], adapted;
|
5768 |
+
|
5769 |
+
classes = $.trim($dest.attr('class'));
|
5770 |
+
|
5771 |
+
if (classes) {
|
5772 |
+
classes = '' + classes; // for IE which returns object
|
5773 |
+
|
5774 |
+
$(classes.split(/\s+/)).each(function () {
|
5775 |
+
// Save all Select2 classes
|
5776 |
+
if (this.indexOf('select2-') === 0) {
|
5777 |
+
replacements.push(this);
|
5778 |
+
}
|
5779 |
+
});
|
5780 |
+
}
|
5781 |
+
|
5782 |
+
classes = $.trim($src.attr('class'));
|
5783 |
+
|
5784 |
+
if (classes) {
|
5785 |
+
classes = '' + classes; // for IE which returns object
|
5786 |
+
|
5787 |
+
$(classes.split(/\s+/)).each(function () {
|
5788 |
+
// Only adapt non-Select2 classes
|
5789 |
+
if (this.indexOf('select2-') !== 0) {
|
5790 |
+
adapted = adapter(this);
|
5791 |
+
|
5792 |
+
if (adapted != null) {
|
5793 |
+
replacements.push(adapted);
|
5794 |
+
}
|
5795 |
+
}
|
5796 |
+
});
|
5797 |
+
}
|
5798 |
+
|
5799 |
+
$dest.attr('class', replacements.join(' '));
|
5800 |
+
}
|
5801 |
+
|
5802 |
+
return {
|
5803 |
+
syncCssClasses: syncCssClasses
|
5804 |
+
};
|
5805 |
+
});
|
5806 |
+
|
5807 |
+
S2.define('select2/compat/containerCss',[
|
5808 |
+
'jquery',
|
5809 |
+
'./utils'
|
5810 |
+
], function ($, CompatUtils) {
|
5811 |
+
// No-op CSS adapter that discards all classes by default
|
5812 |
+
function _containerAdapter (clazz) {
|
5813 |
+
return null;
|
5814 |
+
}
|
5815 |
+
|
5816 |
+
function ContainerCSS () { }
|
5817 |
+
|
5818 |
+
ContainerCSS.prototype.render = function (decorated) {
|
5819 |
+
var $container = decorated.call(this);
|
5820 |
+
|
5821 |
+
var containerCssClass = this.options.get('containerCssClass') || '';
|
5822 |
+
|
5823 |
+
if ($.isFunction(containerCssClass)) {
|
5824 |
+
containerCssClass = containerCssClass(this.$element);
|
5825 |
+
}
|
5826 |
+
|
5827 |
+
var containerCssAdapter = this.options.get('adaptContainerCssClass');
|
5828 |
+
containerCssAdapter = containerCssAdapter || _containerAdapter;
|
5829 |
+
|
5830 |
+
if (containerCssClass.indexOf(':all:') !== -1) {
|
5831 |
+
containerCssClass = containerCssClass.replace(':all:', '');
|
5832 |
+
|
5833 |
+
var _cssAdapter = containerCssAdapter;
|
5834 |
+
|
5835 |
+
containerCssAdapter = function (clazz) {
|
5836 |
+
var adapted = _cssAdapter(clazz);
|
5837 |
+
|
5838 |
+
if (adapted != null) {
|
5839 |
+
// Append the old one along with the adapted one
|
5840 |
+
return adapted + ' ' + clazz;
|
5841 |
+
}
|
5842 |
+
|
5843 |
+
return clazz;
|
5844 |
+
};
|
5845 |
+
}
|
5846 |
+
|
5847 |
+
var containerCss = this.options.get('containerCss') || {};
|
5848 |
+
|
5849 |
+
if ($.isFunction(containerCss)) {
|
5850 |
+
containerCss = containerCss(this.$element);
|
5851 |
+
}
|
5852 |
+
|
5853 |
+
CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
|
5854 |
+
|
5855 |
+
$container.css(containerCss);
|
5856 |
+
$container.addClass(containerCssClass);
|
5857 |
+
|
5858 |
+
return $container;
|
5859 |
+
};
|
5860 |
+
|
5861 |
+
return ContainerCSS;
|
5862 |
+
});
|
5863 |
+
|
5864 |
+
S2.define('select2/compat/dropdownCss',[
|
5865 |
+
'jquery',
|
5866 |
+
'./utils'
|
5867 |
+
], function ($, CompatUtils) {
|
5868 |
+
// No-op CSS adapter that discards all classes by default
|
5869 |
+
function _dropdownAdapter (clazz) {
|
5870 |
+
return null;
|
5871 |
+
}
|
5872 |
+
|
5873 |
+
function DropdownCSS () { }
|
5874 |
+
|
5875 |
+
DropdownCSS.prototype.render = function (decorated) {
|
5876 |
+
var $dropdown = decorated.call(this);
|
5877 |
+
|
5878 |
+
var dropdownCssClass = this.options.get('dropdownCssClass') || '';
|
5879 |
+
|
5880 |
+
if ($.isFunction(dropdownCssClass)) {
|
5881 |
+
dropdownCssClass = dropdownCssClass(this.$element);
|
5882 |
+
}
|
5883 |
+
|
5884 |
+
var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');
|
5885 |
+
dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;
|
5886 |
+
|
5887 |
+
if (dropdownCssClass.indexOf(':all:') !== -1) {
|
5888 |
+
dropdownCssClass = dropdownCssClass.replace(':all:', '');
|
5889 |
+
|
5890 |
+
var _cssAdapter = dropdownCssAdapter;
|
5891 |
+
|
5892 |
+
dropdownCssAdapter = function (clazz) {
|
5893 |
+
var adapted = _cssAdapter(clazz);
|
5894 |
+
|
5895 |
+
if (adapted != null) {
|
5896 |
+
// Append the old one along with the adapted one
|
5897 |
+
return adapted + ' ' + clazz;
|
5898 |
+
}
|
5899 |
+
|
5900 |
+
return clazz;
|
5901 |
+
};
|
5902 |
+
}
|
5903 |
+
|
5904 |
+
var dropdownCss = this.options.get('dropdownCss') || {};
|
5905 |
+
|
5906 |
+
if ($.isFunction(dropdownCss)) {
|
5907 |
+
dropdownCss = dropdownCss(this.$element);
|
5908 |
+
}
|
5909 |
+
|
5910 |
+
CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);
|
5911 |
+
|
5912 |
+
$dropdown.css(dropdownCss);
|
5913 |
+
$dropdown.addClass(dropdownCssClass);
|
5914 |
+
|
5915 |
+
return $dropdown;
|
5916 |
+
};
|
5917 |
+
|
5918 |
+
return DropdownCSS;
|
5919 |
+
});
|
5920 |
+
|
5921 |
+
S2.define('select2/compat/initSelection',[
|
5922 |
+
'jquery'
|
5923 |
+
], function ($) {
|
5924 |
+
function InitSelection (decorated, $element, options) {
|
5925 |
+
if (options.get('debug') && window.console && console.warn) {
|
5926 |
+
console.warn(
|
5927 |
+
'Select2: The `initSelection` option has been deprecated in favor' +
|
5928 |
+
' of a custom data adapter that overrides the `current` method. ' +
|
5929 |
+
'This method is now called multiple times instead of a single ' +
|
5930 |
+
'time when the instance is initialized. Support will be removed ' +
|
5931 |
+
'for the `initSelection` option in future versions of Select2'
|
5932 |
+
);
|
5933 |
+
}
|
5934 |
+
|
5935 |
+
this.initSelection = options.get('initSelection');
|
5936 |
+
this._isInitialized = false;
|
5937 |
+
|
5938 |
+
decorated.call(this, $element, options);
|
5939 |
+
}
|
5940 |
+
|
5941 |
+
InitSelection.prototype.current = function (decorated, callback) {
|
5942 |
+
var self = this;
|
5943 |
+
|
5944 |
+
if (this._isInitialized) {
|
5945 |
+
decorated.call(this, callback);
|
5946 |
+
|
5947 |
+
return;
|
5948 |
+
}
|
5949 |
+
|
5950 |
+
this.initSelection.call(null, this.$element, function (data) {
|
5951 |
+
self._isInitialized = true;
|
5952 |
+
|
5953 |
+
if (!$.isArray(data)) {
|
5954 |
+
data = [data];
|
5955 |
+
}
|
5956 |
+
|
5957 |
+
callback(data);
|
5958 |
+
});
|
5959 |
+
};
|
5960 |
+
|
5961 |
+
return InitSelection;
|
5962 |
+
});
|
5963 |
+
|
5964 |
+
S2.define('select2/compat/inputData',[
|
5965 |
+
'jquery',
|
5966 |
+
'../utils'
|
5967 |
+
], function ($, Utils) {
|
5968 |
+
function InputData (decorated, $element, options) {
|
5969 |
+
this._currentData = [];
|
5970 |
+
this._valueSeparator = options.get('valueSeparator') || ',';
|
5971 |
+
|
5972 |
+
if ($element.prop('type') === 'hidden') {
|
5973 |
+
if (options.get('debug') && console && console.warn) {
|
5974 |
+
console.warn(
|
5975 |
+
'Select2: Using a hidden input with Select2 is no longer ' +
|
5976 |
+
'supported and may stop working in the future. It is recommended ' +
|
5977 |
+
'to use a `<select>` element instead.'
|
5978 |
+
);
|
5979 |
+
}
|
5980 |
+
}
|
5981 |
+
|
5982 |
+
decorated.call(this, $element, options);
|
5983 |
+
}
|
5984 |
+
|
5985 |
+
InputData.prototype.current = function (_, callback) {
|
5986 |
+
function getSelected (data, selectedIds) {
|
5987 |
+
var selected = [];
|
5988 |
+
|
5989 |
+
if (data.selected || $.inArray(data.id, selectedIds) !== -1) {
|
5990 |
+
data.selected = true;
|
5991 |
+
selected.push(data);
|
5992 |
+
} else {
|
5993 |
+
data.selected = false;
|
5994 |
+
}
|
5995 |
+
|
5996 |
+
if (data.children) {
|
5997 |
+
selected.push.apply(selected, getSelected(data.children, selectedIds));
|
5998 |
+
}
|
5999 |
+
|
6000 |
+
return selected;
|
6001 |
+
}
|
6002 |
+
|
6003 |
+
var selected = [];
|
6004 |
+
|
6005 |
+
for (var d = 0; d < this._currentData.length; d++) {
|
6006 |
+
var data = this._currentData[d];
|
6007 |
+
|
6008 |
+
selected.push.apply(
|
6009 |
+
selected,
|
6010 |
+
getSelected(
|
6011 |
+
data,
|
6012 |
+
this.$element.val().split(
|
6013 |
+
this._valueSeparator
|
6014 |
+
)
|
6015 |
+
)
|
6016 |
+
);
|
6017 |
+
}
|
6018 |
+
|
6019 |
+
callback(selected);
|
6020 |
+
};
|
6021 |
+
|
6022 |
+
InputData.prototype.select = function (_, data) {
|
6023 |
+
if (!this.options.get('multiple')) {
|
6024 |
+
this.current(function (allData) {
|
6025 |
+
$.map(allData, function (data) {
|
6026 |
+
data.selected = false;
|
6027 |
+
});
|
6028 |
+
});
|
6029 |
+
|
6030 |
+
this.$element.val(data.id);
|
6031 |
+
this.$element.trigger('change');
|
6032 |
+
} else {
|
6033 |
+
var value = this.$element.val();
|
6034 |
+
value += this._valueSeparator + data.id;
|
6035 |
+
|
6036 |
+
this.$element.val(value);
|
6037 |
+
this.$element.trigger('change');
|
6038 |
+
}
|
6039 |
+
};
|
6040 |
+
|
6041 |
+
InputData.prototype.unselect = function (_, data) {
|
6042 |
+
var self = this;
|
6043 |
+
|
6044 |
+
data.selected = false;
|
6045 |
+
|
6046 |
+
this.current(function (allData) {
|
6047 |
+
var values = [];
|
6048 |
+
|
6049 |
+
for (var d = 0; d < allData.length; d++) {
|
6050 |
+
var item = allData[d];
|
6051 |
+
|
6052 |
+
if (data.id == item.id) {
|
6053 |
+
continue;
|
6054 |
+
}
|
6055 |
+
|
6056 |
+
values.push(item.id);
|
6057 |
+
}
|
6058 |
+
|
6059 |
+
self.$element.val(values.join(self._valueSeparator));
|
6060 |
+
self.$element.trigger('change');
|
6061 |
+
});
|
6062 |
+
};
|
6063 |
+
|
6064 |
+
InputData.prototype.query = function (_, params, callback) {
|
6065 |
+
var results = [];
|
6066 |
+
|
6067 |
+
for (var d = 0; d < this._currentData.length; d++) {
|
6068 |
+
var data = this._currentData[d];
|
6069 |
+
|
6070 |
+
var matches = this.matches(params, data);
|
6071 |
+
|
6072 |
+
if (matches !== null) {
|
6073 |
+
results.push(matches);
|
6074 |
+
}
|
6075 |
+
}
|
6076 |
+
|
6077 |
+
callback({
|
6078 |
+
results: results
|
6079 |
+
});
|
6080 |
+
};
|
6081 |
+
|
6082 |
+
InputData.prototype.addOptions = function (_, $options) {
|
6083 |
+
var options = $.map($options, function ($option) {
|
6084 |
+
return Utils.GetData($option[0], 'data');
|
6085 |
+
});
|
6086 |
+
|
6087 |
+
this._currentData.push.apply(this._currentData, options);
|
6088 |
+
};
|
6089 |
+
|
6090 |
+
return InputData;
|
6091 |
+
});
|
6092 |
+
|
6093 |
+
S2.define('select2/compat/matcher',[
|
6094 |
+
'jquery'
|
6095 |
+
], function ($) {
|
6096 |
+
function oldMatcher (matcher) {
|
6097 |
+
function wrappedMatcher (params, data) {
|
6098 |
+
var match = $.extend(true, {}, data);
|
6099 |
+
|
6100 |
+
if (params.term == null || $.trim(params.term) === '') {
|
6101 |
+
return match;
|
6102 |
+
}
|
6103 |
+
|
6104 |
+
if (data.children) {
|
6105 |
+
for (var c = data.children.length - 1; c >= 0; c--) {
|
6106 |
+
var child = data.children[c];
|
6107 |
+
|
6108 |
+
// Check if the child object matches
|
6109 |
+
// The old matcher returned a boolean true or false
|
6110 |
+
var doesMatch = matcher(params.term, child.text, child);
|
6111 |
+
|
6112 |
+
// If the child didn't match, pop it off
|
6113 |
+
if (!doesMatch) {
|
6114 |
+
match.children.splice(c, 1);
|
6115 |
+
}
|
6116 |
+
}
|
6117 |
+
|
6118 |
+
if (match.children.length > 0) {
|
6119 |
+
return match;
|
6120 |
+
}
|
6121 |
+
}
|
6122 |
+
|
6123 |
+
if (matcher(params.term, data.text, data)) {
|
6124 |
+
return match;
|
6125 |
+
}
|
6126 |
+
|
6127 |
+
return null;
|
6128 |
+
}
|
6129 |
+
|
6130 |
+
return wrappedMatcher;
|
6131 |
+
}
|
6132 |
+
|
6133 |
+
return oldMatcher;
|
6134 |
+
});
|
6135 |
+
|
6136 |
+
S2.define('select2/compat/query',[
|
6137 |
+
|
6138 |
+
], function () {
|
6139 |
+
function Query (decorated, $element, options) {
|
6140 |
+
if (options.get('debug') && window.console && console.warn) {
|
6141 |
+
console.warn(
|
6142 |
+
'Select2: The `query` option has been deprecated in favor of a ' +
|
6143 |
+
'custom data adapter that overrides the `query` method. Support ' +
|
6144 |
+
'will be removed for the `query` option in future versions of ' +
|
6145 |
+
'Select2.'
|
6146 |
+
);
|
6147 |
+
}
|
6148 |
+
|
6149 |
+
decorated.call(this, $element, options);
|
6150 |
+
}
|
6151 |
+
|
6152 |
+
Query.prototype.query = function (_, params, callback) {
|
6153 |
+
params.callback = callback;
|
6154 |
+
|
6155 |
+
var query = this.options.get('query');
|
6156 |
+
|
6157 |
+
query.call(null, params);
|
6158 |
+
};
|
6159 |
+
|
6160 |
+
return Query;
|
6161 |
+
});
|
6162 |
+
|
6163 |
+
S2.define('select2/dropdown/attachContainer',[
|
6164 |
+
|
6165 |
+
], function () {
|
6166 |
+
function AttachContainer (decorated, $element, options) {
|
6167 |
+
decorated.call(this, $element, options);
|
6168 |
+
}
|
6169 |
+
|
6170 |
+
AttachContainer.prototype.position =
|
6171 |
+
function (decorated, $dropdown, $container) {
|
6172 |
+
var $dropdownContainer = $container.find('.dropdown-wrapper');
|
6173 |
+
$dropdownContainer.append($dropdown);
|
6174 |
+
|
6175 |
+
$dropdown.addClass('select2-dropdown--below');
|
6176 |
+
$container.addClass('select2-container--below');
|
6177 |
+
};
|
6178 |
+
|
6179 |
+
return AttachContainer;
|
6180 |
+
});
|
6181 |
+
|
6182 |
+
S2.define('select2/dropdown/stopPropagation',[
|
6183 |
+
|
6184 |
+
], function () {
|
6185 |
+
function StopPropagation () { }
|
6186 |
+
|
6187 |
+
StopPropagation.prototype.bind = function (decorated, container, $container) {
|
6188 |
+
decorated.call(this, container, $container);
|
6189 |
+
|
6190 |
+
var stoppedEvents = [
|
6191 |
+
'blur',
|
6192 |
+
'change',
|
6193 |
+
'click',
|
6194 |
+
'dblclick',
|
6195 |
+
'focus',
|
6196 |
+
'focusin',
|
6197 |
+
'focusout',
|
6198 |
+
'input',
|
6199 |
+
'keydown',
|
6200 |
+
'keyup',
|
6201 |
+
'keypress',
|
6202 |
+
'mousedown',
|
6203 |
+
'mouseenter',
|
6204 |
+
'mouseleave',
|
6205 |
+
'mousemove',
|
6206 |
+
'mouseover',
|
6207 |
+
'mouseup',
|
6208 |
+
'search',
|
6209 |
+
'touchend',
|
6210 |
+
'touchstart'
|
6211 |
+
];
|
6212 |
+
|
6213 |
+
this.$dropdown.on(stoppedEvents.join(' '), function (evt) {
|
6214 |
+
evt.stopPropagation();
|
6215 |
+
});
|
6216 |
+
};
|
6217 |
+
|
6218 |
+
return StopPropagation;
|
6219 |
+
});
|
6220 |
+
|
6221 |
+
S2.define('select2/selection/stopPropagation',[
|
6222 |
+
|
6223 |
+
], function () {
|
6224 |
+
function StopPropagation () { }
|
6225 |
+
|
6226 |
+
StopPropagation.prototype.bind = function (decorated, container, $container) {
|
6227 |
+
decorated.call(this, container, $container);
|
6228 |
+
|
6229 |
+
var stoppedEvents = [
|
6230 |
+
'blur',
|
6231 |
+
'change',
|
6232 |
+
'click',
|
6233 |
+
'dblclick',
|
6234 |
+
'focus',
|
6235 |
+
'focusin',
|
6236 |
+
'focusout',
|
6237 |
+
'input',
|
6238 |
+
'keydown',
|
6239 |
+
'keyup',
|
6240 |
+
'keypress',
|
6241 |
+
'mousedown',
|
6242 |
+
'mouseenter',
|
6243 |
+
'mouseleave',
|
6244 |
+
'mousemove',
|
6245 |
+
'mouseover',
|
6246 |
+
'mouseup',
|
6247 |
+
'search',
|
6248 |
+
'touchend',
|
6249 |
+
'touchstart'
|
6250 |
+
];
|
6251 |
+
|
6252 |
+
this.$selection.on(stoppedEvents.join(' '), function (evt) {
|
6253 |
+
evt.stopPropagation();
|
6254 |
+
});
|
6255 |
+
};
|
6256 |
+
|
6257 |
+
return StopPropagation;
|
6258 |
+
});
|
6259 |
+
|
6260 |
+
/*!
|
6261 |
+
* jQuery Mousewheel 3.1.13
|
6262 |
+
*
|
6263 |
+
* Copyright jQuery Foundation and other contributors
|
6264 |
+
* Released under the MIT license
|
6265 |
+
* http://jquery.org/license
|
6266 |
+
*/
|
6267 |
+
|
6268 |
+
(function (factory) {
|
6269 |
+
if ( typeof S2.define === 'function' && S2.define.amd ) {
|
6270 |
+
// AMD. Register as an anonymous module.
|
6271 |
+
S2.define('jquery-mousewheel',['jquery'], factory);
|
6272 |
+
} else if (typeof exports === 'object') {
|
6273 |
+
// Node/CommonJS style for Browserify
|
6274 |
+
module.exports = factory;
|
6275 |
+
} else {
|
6276 |
+
// Browser globals
|
6277 |
+
factory(jQuery);
|
6278 |
+
}
|
6279 |
+
}(function ($) {
|
6280 |
+
|
6281 |
+
var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
|
6282 |
+
toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
|
6283 |
+
['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
|
6284 |
+
slice = Array.prototype.slice,
|
6285 |
+
nullLowestDeltaTimeout, lowestDelta;
|
6286 |
+
|
6287 |
+
if ( $.event.fixHooks ) {
|
6288 |
+
for ( var i = toFix.length; i; ) {
|
6289 |
+
$.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
|
6290 |
+
}
|
6291 |
+
}
|
6292 |
+
|
6293 |
+
var special = $.event.special.mousewheel = {
|
6294 |
+
version: '3.1.12',
|
6295 |
+
|
6296 |
+
setup: function() {
|
6297 |
+
if ( this.addEventListener ) {
|
6298 |
+
for ( var i = toBind.length; i; ) {
|
6299 |
+
this.addEventListener( toBind[--i], handler, false );
|
6300 |
+
}
|
6301 |
+
} else {
|
6302 |
+
this.onmousewheel = handler;
|
6303 |
+
}
|
6304 |
+
// Store the line height and page height for this particular element
|
6305 |
+
$.data(this, 'mousewheel-line-height', special.getLineHeight(this));
|
6306 |
+
$.data(this, 'mousewheel-page-height', special.getPageHeight(this));
|
6307 |
+
},
|
6308 |
+
|
6309 |
+
teardown: function() {
|
6310 |
+
if ( this.removeEventListener ) {
|
6311 |
+
for ( var i = toBind.length; i; ) {
|
6312 |
+
this.removeEventListener( toBind[--i], handler, false );
|
6313 |
+
}
|
6314 |
+
} else {
|
6315 |
+
this.onmousewheel = null;
|
6316 |
+
}
|
6317 |
+
// Clean up the data we added to the element
|
6318 |
+
$.removeData(this, 'mousewheel-line-height');
|
6319 |
+
$.removeData(this, 'mousewheel-page-height');
|
6320 |
+
},
|
6321 |
+
|
6322 |
+
getLineHeight: function(elem) {
|
6323 |
+
var $elem = $(elem),
|
6324 |
+
$parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
|
6325 |
+
if (!$parent.length) {
|
6326 |
+
$parent = $('body');
|
6327 |
+
}
|
6328 |
+
return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
|
6329 |
+
},
|
6330 |
+
|
6331 |
+
getPageHeight: function(elem) {
|
6332 |
+
return $(elem).height();
|
6333 |
+
},
|
6334 |
+
|
6335 |
+
settings: {
|
6336 |
+
adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
|
6337 |
+
normalizeOffset: true // calls getBoundingClientRect for each event
|
6338 |
+
}
|
6339 |
+
};
|
6340 |
+
|
6341 |
+
$.fn.extend({
|
6342 |
+
mousewheel: function(fn) {
|
6343 |
+
return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
|
6344 |
+
},
|
6345 |
+
|
6346 |
+
unmousewheel: function(fn) {
|
6347 |
+
return this.unbind('mousewheel', fn);
|
6348 |
+
}
|
6349 |
+
});
|
6350 |
+
|
6351 |
+
|
6352 |
+
function handler(event) {
|
6353 |
+
var orgEvent = event || window.event,
|
6354 |
+
args = slice.call(arguments, 1),
|
6355 |
+
delta = 0,
|
6356 |
+
deltaX = 0,
|
6357 |
+
deltaY = 0,
|
6358 |
+
absDelta = 0,
|
6359 |
+
offsetX = 0,
|
6360 |
+
offsetY = 0;
|
6361 |
+
event = $.event.fix(orgEvent);
|
6362 |
+
event.type = 'mousewheel';
|
6363 |
+
|
6364 |
+
// Old school scrollwheel delta
|
6365 |
+
if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
|
6366 |
+
if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
|
6367 |
+
if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
|
6368 |
+
if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
|
6369 |
+
|
6370 |
+
// Firefox < 17 horizontal scrolling related to DOMMouseScroll event
|
6371 |
+
if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
|
6372 |
+
deltaX = deltaY * -1;
|
6373 |
+
deltaY = 0;
|
6374 |
+
}
|
6375 |
+
|
6376 |
+
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
|
6377 |
+
delta = deltaY === 0 ? deltaX : deltaY;
|
6378 |
+
|
6379 |
+
// New school wheel delta (wheel event)
|
6380 |
+
if ( 'deltaY' in orgEvent ) {
|
6381 |
+
deltaY = orgEvent.deltaY * -1;
|
6382 |
+
delta = deltaY;
|
6383 |
+
}
|
6384 |
+
if ( 'deltaX' in orgEvent ) {
|
6385 |
+
deltaX = orgEvent.deltaX;
|
6386 |
+
if ( deltaY === 0 ) { delta = deltaX * -1; }
|
6387 |
+
}
|
6388 |
+
|
6389 |
+
// No change actually happened, no reason to go any further
|
6390 |
+
if ( deltaY === 0 && deltaX === 0 ) { return; }
|
6391 |
+
|
6392 |
+
// Need to convert lines and pages to pixels if we aren't already in pixels
|
6393 |
+
// There are three delta modes:
|
6394 |
+
// * deltaMode 0 is by pixels, nothing to do
|
6395 |
+
// * deltaMode 1 is by lines
|
6396 |
+
// * deltaMode 2 is by pages
|
6397 |
+
if ( orgEvent.deltaMode === 1 ) {
|
6398 |
+
var lineHeight = $.data(this, 'mousewheel-line-height');
|
6399 |
+
delta *= lineHeight;
|
6400 |
+
deltaY *= lineHeight;
|
6401 |
+
deltaX *= lineHeight;
|
6402 |
+
} else if ( orgEvent.deltaMode === 2 ) {
|
6403 |
+
var pageHeight = $.data(this, 'mousewheel-page-height');
|
6404 |
+
delta *= pageHeight;
|
6405 |
+
deltaY *= pageHeight;
|
6406 |
+
deltaX *= pageHeight;
|
6407 |
+
}
|
6408 |
+
|
6409 |
+
// Store lowest absolute delta to normalize the delta values
|
6410 |
+
absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
|
6411 |
+
|
6412 |
+
if ( !lowestDelta || absDelta < lowestDelta ) {
|
6413 |
+
lowestDelta = absDelta;
|
6414 |
+
|
6415 |
+
// Adjust older deltas if necessary
|
6416 |
+
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
|
6417 |
+
lowestDelta /= 40;
|
6418 |
+
}
|
6419 |
+
}
|
6420 |
+
|
6421 |
+
// Adjust older deltas if necessary
|
6422 |
+
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
|
6423 |
+
// Divide all the things by 40!
|
6424 |
+
delta /= 40;
|
6425 |
+
deltaX /= 40;
|
6426 |
+
deltaY /= 40;
|
6427 |
+
}
|
6428 |
+
|
6429 |
+
// Get a whole, normalized value for the deltas
|
6430 |
+
delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
|
6431 |
+
deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
|
6432 |
+
deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
|
6433 |
+
|
6434 |
+
// Normalise offsetX and offsetY properties
|
6435 |
+
if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
|
6436 |
+
var boundingRect = this.getBoundingClientRect();
|
6437 |
+
offsetX = event.clientX - boundingRect.left;
|
6438 |
+
offsetY = event.clientY - boundingRect.top;
|
6439 |
+
}
|
6440 |
+
|
6441 |
+
// Add information to the event object
|
6442 |
+
event.deltaX = deltaX;
|
6443 |
+
event.deltaY = deltaY;
|
6444 |
+
event.deltaFactor = lowestDelta;
|
6445 |
+
event.offsetX = offsetX;
|
6446 |
+
event.offsetY = offsetY;
|
6447 |
+
// Go ahead and set deltaMode to 0 since we converted to pixels
|
6448 |
+
// Although this is a little odd since we overwrite the deltaX/Y
|
6449 |
+
// properties with normalized deltas.
|
6450 |
+
event.deltaMode = 0;
|
6451 |
+
|
6452 |
+
// Add event and delta to the front of the arguments
|
6453 |
+
args.unshift(event, delta, deltaX, deltaY);
|
6454 |
+
|
6455 |
+
// Clearout lowestDelta after sometime to better
|
6456 |
+
// handle multiple device types that give different
|
6457 |
+
// a different lowestDelta
|
6458 |
+
// Ex: trackpad = 3 and mouse wheel = 120
|
6459 |
+
if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
|
6460 |
+
nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
|
6461 |
+
|
6462 |
+
return ($.event.dispatch || $.event.handle).apply(this, args);
|
6463 |
+
}
|
6464 |
+
|
6465 |
+
function nullLowestDelta() {
|
6466 |
+
lowestDelta = null;
|
6467 |
+
}
|
6468 |
+
|
6469 |
+
function shouldAdjustOldDeltas(orgEvent, absDelta) {
|
6470 |
+
// If this is an older event and the delta is divisable by 120,
|
6471 |
+
// then we are assuming that the browser is treating this as an
|
6472 |
+
// older mouse wheel event and that we should divide the deltas
|
6473 |
+
// by 40 to try and get a more usable deltaFactor.
|
6474 |
+
// Side note, this actually impacts the reported scroll distance
|
6475 |
+
// in older browsers and can cause scrolling to be slower than native.
|
6476 |
+
// Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
|
6477 |
+
return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
|
6478 |
+
}
|
6479 |
+
|
6480 |
+
}));
|
6481 |
+
|
6482 |
+
S2.define('jquery.select2',[
|
6483 |
+
'jquery',
|
6484 |
+
'jquery-mousewheel',
|
6485 |
+
|
6486 |
+
'./select2/core',
|
6487 |
+
'./select2/defaults',
|
6488 |
+
'./select2/utils'
|
6489 |
+
], function ($, _, Select2, Defaults, Utils) {
|
6490 |
+
if ($.fn.select2 == null) {
|
6491 |
+
// All methods that should return the element
|
6492 |
+
var thisMethods = ['open', 'close', 'destroy'];
|
6493 |
+
|
6494 |
+
$.fn.select2 = function (options) {
|
6495 |
+
options = options || {};
|
6496 |
+
|
6497 |
+
if (typeof options === 'object') {
|
6498 |
+
this.each(function () {
|
6499 |
+
var instanceOptions = $.extend(true, {}, options);
|
6500 |
+
|
6501 |
+
var instance = new Select2($(this), instanceOptions);
|
6502 |
+
});
|
6503 |
+
|
6504 |
+
return this;
|
6505 |
+
} else if (typeof options === 'string') {
|
6506 |
+
var ret;
|
6507 |
+
var args = Array.prototype.slice.call(arguments, 1);
|
6508 |
+
|
6509 |
+
this.each(function () {
|
6510 |
+
var instance = Utils.GetData(this, 'select2');
|
6511 |
+
|
6512 |
+
if (instance == null && window.console && console.error) {
|
6513 |
+
console.error(
|
6514 |
+
'The select2(\'' + options + '\') method was called on an ' +
|
6515 |
+
'element that is not using Select2.'
|
6516 |
+
);
|
6517 |
+
}
|
6518 |
+
|
6519 |
+
ret = instance[options].apply(instance, args);
|
6520 |
+
});
|
6521 |
+
|
6522 |
+
// Check if we should be returning `this`
|
6523 |
+
if ($.inArray(options, thisMethods) > -1) {
|
6524 |
+
return this;
|
6525 |
+
}
|
6526 |
+
|
6527 |
+
return ret;
|
6528 |
+
} else {
|
6529 |
+
throw new Error('Invalid arguments for Select2: ' + options);
|
6530 |
+
}
|
6531 |
+
};
|
6532 |
+
}
|
6533 |
+
|
6534 |
+
if ($.fn.select2.defaults == null) {
|
6535 |
+
$.fn.select2.defaults = Defaults;
|
6536 |
+
}
|
6537 |
+
|
6538 |
+
return Select2;
|
6539 |
+
});
|
6540 |
+
|
6541 |
+
// Return the AMD loader configuration so it can be used outside of this file
|
6542 |
+
return {
|
6543 |
+
define: S2.define,
|
6544 |
+
require: S2.require
|
6545 |
+
};
|
6546 |
+
}());
|
6547 |
+
|
6548 |
+
// Autoload the jQuery bindings
|
6549 |
+
// We know that all of the modules exist above this, so we're safe
|
6550 |
+
var select2 = S2.require('jquery.select2');
|
6551 |
+
|
6552 |
+
// Hold the AMD module references on the jQuery function that was just loaded
|
6553 |
+
// This allows Select2 to use the internal loader outside of this file, such
|
6554 |
+
// as in the language files.
|
6555 |
+
jQuery.fn.select2.amd = S2;
|
6556 |
+
|
6557 |
+
// Return the Select2 instance for anyone who is importing it.
|
6558 |
+
return select2;
|
6559 |
+
}));
|
assets/select2/js/select2.full.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),k-=1;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if(n=p(c[o],t),"require"===(k=n.f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)h=w[o]=q.module(a);else if(e(r,k)||e(s,k)||e(u,k))w[o]=j(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,g(f,!0),i(k),{}),w[o]=r[k]}m=d?d.apply(r[a],w):void 0,a&&(h&&h.exports!==b&&h.exports!==r[a]?r[a]=h.exports:m===b&&v||(r[a]=m))}else a&&(r[a]=d)},a=c=o=function(a,c,d,e,f){if("string"==typeof a)return q[a]?q[a](c):j(p(a,l(c)).f);if(!a.splice){if(t=a,t.deps&&o(t.deps,t.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?n(b,a,c,d):setTimeout(function(){n(b,a,c,d)},4),o},o.config=function(a){return o(a)},a._defined=r,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(r,a)||e(s,a)||(s[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){"function"==typeof b[d]&&("constructor"!==d&&c.push(d))}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;c<a;c++){b+=Math.floor(36*Math.random()).toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return(e!==f||"hidden"!==f&&"visible"!==f)&&("scroll"===e||"scroll"===f||(d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth))},c.escapeMarkup=function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.__cache={};var e=0;return c.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},c.StoreData=function(a,b,d){var e=c.GetUniqueElementId(a);c.__cache[e]||(c.__cache[e]={}),c.__cache[e][b]=d},c.GetData=function(b,d){var e=c.GetUniqueElementId(b);return d?c.__cache[e]&&null!=c.__cache[e][d]?c.__cache[e][d]:a(b).data(d):c.__cache[e]},c.RemoveData=function(a){var b=c.GetUniqueElementId(a);null!=c.__cache[b]&&delete c.__cache[b]},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&a.inArray(f,e)>-1?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"treeitem","aria-selected":"false"};c.disabled&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]);for(var f in e){var g=e[f];d.setAttribute(f,g)}if(c.children){var h=a(d),i=document.createElement("strong");i.className="select2-results__group";a(i);this.template(c,i);for(var j=[],k=0;k<c.children.length;k++){var l=c.children[k],m=this.option(l);j.push(m)}var n=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});n.append(j),h.append(i),h.append(n)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(!(c<=0)){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a),d=c+1;if(!(d>=b.length)){var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top+e.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=e.$results.scrollTop()+h-g;0===d?e.$results.scrollTop(0):h>g&&e.$results.scrollTop(i)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");if("true"===d.attr("aria-selected"))return void(e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{}));e.trigger("select",{originalEvent:c,data:f})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var c=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),this.$selection=c,c},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),window.setTimeout(function(){d.$selection.focus()},0),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target),e=d.closest(".select2");a(".select2.select2-container--open").each(function(){a(this),this!=e[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.attr("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.options.get("disabled")){var d=a(this),e=d.parent(),g=c.GetData(e[0],"data");f.trigger("unselect",{originalEvent:b,data:g})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.attr("title",e.title||e.text),c.StoreData(f[0],"data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id;if(b.length>1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},d.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)return void this.$element.val(f);for(var h=0;h<e.length;h++)if(g={data:e[h]},this.trigger("unselect",g),g.prevented)return void this.$element.val(f);this.$element.trigger("change"),this.trigger("toggle",{})}}},d.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},d.prototype.update=function(b,d){if(b.call(this,d),!(this.$selection.find(".select2-selection__placeholder").length>0||0===d.length)){var e=a('<span class="select2-selection__clear">×</span>');c.StoreData(e[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(e)}},d}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,d,e){var f=this;a.call(this,d,e),d.on("open",function(){f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){f.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void f.$selection.off("input.search input.searchcheck");f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void f.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;if(this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c){this.$element.find("[data-select2-tag]").length?this.$element.focus():this.$search.focus()}},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","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"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("change");this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})}},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){b.RemoveData(this)})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var d;a.children?(d=document.createElement("optgroup"),d.label=a.text):(d=document.createElement("option"),void 0!==d.textContent?d.textContent=a.text:d.innerText=a.text),void 0!==a.id&&(d.value=a.id),a.disabled&&(d.disabled=!0),a.selected&&(d.selected=!0),a.title&&(d.title=a.title);var e=c(d),f=this._normalizeItem(a);return f.element=d,b.StoreData(d,"data",f),e},d.prototype.item=function(a){var d={};if(null!=(d=b.GetData(a[0],"data")))return d;if(a.is("option"))d={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){d={text:a.prop("label"),children:[],title:a.prop("title")};for(var e=a.children("option"),f=[],g=0;g<e.length;g++){var h=c(e[g]),i=this.item(h);f.push(i)}d.children=f}return d=this._normalizeItem(d),d.element=a[0],b.StoreData(a[0],"data",d),d},d.prototype._normalizeItem=function(a){a!==Object(a)&&(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){"status"in d&&(0===d.status||"0"===d.status)||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(a.data=g,void c(a))}if(f)return!0;var k=e.createTag(b);if(null!=k){var l=e.option(k);l.attr("data-select2-tag",!0),e.addOptions([l]),e.insertTag(g,k)}a.results=g,c(a)}var e=this;if(this._removeOldTags(),null==b.term||null!=b.page)return void a.call(this,b,c);a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b);if(!g.$element.find("option").filter(function(){return a(this).val()===c.id}).length){var d=g.option(c);d.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([d])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",b.term.length<this.minimumInputLength)return void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val(""),e.$search.blur()}),c.on("focus",function(){c.isOpen()||e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return!(a(c.data.results)<this.minimumResultsForSearch)&&b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",["../utils"],function(a){function b(){}return b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},b.prototype._handleSelectOnClose=function(b,c){if(c&&null!=c.originalSelect2Event){var d=c.originalSelect2Event;if("select"===d._type||"unselect"===d._type)return}var e=this.getHighlightedResults();if(!(e.length<1)){var f=a.GetData(e[0],"data");null!=f.element&&f.element.selected||null==f.element&&f.selected||this.trigger("select",{data:f})}},b}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}return D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(a){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(a){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var O=k.loadPath(this.defaults.amdLanguageBase+"en"),P=new k(l.language);P.extend(O),l.translations=P}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(!0,this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),d.GetData(a[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,d.GetData(a[0])):d.GetData(a[0]);var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(b[0],"element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(f=d(this))&&g.push(f)})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;if(this._isInitialized)return void b.call(this,c);this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery","../utils"],function(a,b){function c(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return c.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},c.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("change")},c.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("change")})},c.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},c.prototype.addOptions=function(c,d){var e=a.map(d,function(a){return b.GetData(a[0],"data")});this._currentData.push.apply(this._currentData,e)},c}),b.define("select2/compat/matcher",["jquery"],function(a){function b(b){function c(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;f>=0;f--){var g=d.children[f];b(c.term,g.text,g)||e.children.splice(f,1)}if(e.children.length>0)return e}return b(c.term,d.text,d)?e:null}return c}return b}),b.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c,this.options.get("query").call(null,b)},a}),b.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){c.find(".dropdown-wrapper").append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),b.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(d.join(" "),function(a){a.stopPropagation()})},a}),function(c){"function"==typeof b.define&&b.define.amd?b.define("jquery-mousewheel",["jquery"],c):"object"==typeof exports?module.exports=c:c(a)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-heigh
|