|
13 | 13 | }(function ($, undefined) {
|
14 | 14 | "use strict";
|
15 | 15 | /*!
|
16 |
| - * jsTree 3.3.5 |
| 16 | + * jsTree 3.3.6 |
17 | 17 | * http://jstree.com/
|
18 | 18 | *
|
19 | 19 | * Copyright (c) 2014 Ivan Bozhanov (http://vakata.com)
|
|
54 | 54 | * specifies the jstree version in use
|
55 | 55 | * @name $.jstree.version
|
56 | 56 | */
|
57 |
| - version : '3.3.5', |
| 57 | + version : '3.3.6', |
58 | 58 | /**
|
59 | 59 | * holds all the default options used when creating new instances
|
60 | 60 | * @name $.jstree.defaults
|
|
430 | 430 | */
|
431 | 431 | force_text : false,
|
432 | 432 | /**
|
433 |
| - * Should the node should be toggled if the text is double clicked . Defaults to `true` |
| 433 | + * Should the node be toggled if the text is double clicked. Defaults to `true` |
434 | 434 | * @name $.jstree.defaults.core.dblclick_toggle
|
435 | 435 | */
|
436 | 436 | dblclick_toggle : true,
|
|
1331 | 1331 | return true;
|
1332 | 1332 | },
|
1333 | 1333 | /**
|
1334 |
| - * load an array of nodes (will also load unavailable nodes as soon as the appear in the structure). Used internally. |
| 1334 | + * load an array of nodes (will also load unavailable nodes as soon as they appear in the structure). Used internally. |
1335 | 1335 | * @private
|
1336 | 1336 | * @name _load_nodes(nodes [, callback])
|
1337 | 1337 | * @param {array} nodes
|
|
2608 | 2608 | return node;
|
2609 | 2609 | },
|
2610 | 2610 | /**
|
2611 |
| - * opens a node, revaling its children. If the node is not loaded it will be loaded and opened once ready. |
| 2611 | + * opens a node, revealing its children. If the node is not loaded it will be loaded and opened once ready. |
2612 | 2612 | * @name open_node(obj [, callback, animation])
|
2613 | 2613 | * @param {mixed} obj the node to open
|
2614 | 2614 | * @param {Function} callback a function to execute once the node is opened
|
|
2812 | 2812 | }
|
2813 | 2813 | },
|
2814 | 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. |
| 2815 | + * opens all nodes within a node (or the tree), revealing their children. If the node is not loaded it will be loaded and opened once ready. |
2816 | 2816 | * @name open_all([obj, animation, original_obj])
|
2817 | 2817 | * @param {mixed} obj the node to open recursively, omit to open all nodes in the tree
|
2818 | 2818 | * @param {Number} animation the animation duration in milliseconds when opening the nodes, the default is no animation
|
|
2853 | 2853 | }
|
2854 | 2854 | },
|
2855 | 2855 | /**
|
2856 |
| - * closes all nodes within a node (or the tree), revaling their children |
| 2856 | + * closes all nodes within a node (or the tree), revealing their children |
2857 | 2857 | * @name close_all([obj, animation])
|
2858 | 2858 | * @param {mixed} obj the node to close recursively, omit to close all nodes in the tree
|
2859 | 2859 | * @param {Number} animation the animation duration in milliseconds when closing the nodes, the default is no animation
|
|
4491 | 4491 | w2 = ai.width() * ai.length,
|
4492 | 4492 | */
|
4493 | 4493 | t = default_text;
|
4494 |
| - h1 = $("<"+"div />", { css : { "position" : "absolute", "top" : "-200px", "left" : (rtl ? "0px" : "-1000px"), "visibility" : "hidden" } }).appendTo("body"); |
| 4494 | + h1 = $("<"+"div />", { css : { "position" : "absolute", "top" : "-200px", "left" : (rtl ? "0px" : "-1000px"), "visibility" : "hidden" } }).appendTo(document.body); |
4495 | 4495 | h2 = $("<"+"input />", {
|
4496 | 4496 | "value" : t,
|
4497 | 4497 | "class" : "jstree-rename-input",
|
|
5922 | 5922 | return res;
|
5923 | 5923 | };
|
5924 | 5924 | this.refresh = function (skip_loading, forget_state) {
|
5925 |
| - if(!this.settings.checkbox.tie_selection) { |
| 5925 | + if(this.settings.checkbox.tie_selection) { |
5926 | 5926 | this._data.checkbox.selected = [];
|
5927 | 5927 | }
|
5928 | 5928 | return parent.refresh.apply(this, arguments);
|
|
6424 | 6424 | vakata_context.element.html(vakata_context.html);
|
6425 | 6425 | }
|
6426 | 6426 | if(vakata_context.items.length) {
|
6427 |
| - vakata_context.element.appendTo("body"); |
| 6427 | + vakata_context.element.appendTo(document.body); |
6428 | 6428 | e = vakata_context.element;
|
6429 | 6429 | x = vakata_context.position_x;
|
6430 | 6430 | y = vakata_context.position_y;
|
|
6480 | 6480 | }
|
6481 | 6481 | };
|
6482 | 6482 | $(function () {
|
6483 |
| - right_to_left = $("body").css("direction") === "rtl"; |
| 6483 | + right_to_left = $(document.body).css("direction") === "rtl"; |
6484 | 6484 | var to = false;
|
6485 | 6485 |
|
6486 | 6486 | vakata_context.element = $("<ul class='vakata-context'></ul>");
|
|
6768 | 6768 | marker = $('<div id="jstree-marker"> </div>').hide(); //.appendTo('body');
|
6769 | 6769 |
|
6770 | 6770 | $(document)
|
| 6771 | + .on('dragover.vakata.jstree', function (e) { |
| 6772 | + if (elm) { |
| 6773 | + $.vakata.dnd._trigger('move', e, { 'helper': $(), 'element': elm, 'data': drg }); |
| 6774 | + } |
| 6775 | + }) |
| 6776 | + .on('drop.vakata.jstree', function (e) { |
| 6777 | + if (elm) { |
| 6778 | + $.vakata.dnd._trigger('stop', e, { 'helper': $(), 'element': elm, 'data': drg }); |
| 6779 | + elm = null; |
| 6780 | + drg = null; |
| 6781 | + } |
| 6782 | + }) |
6771 | 6783 | .on('dnd_start.vakata.jstree', function (e, data) {
|
6772 | 6784 | lastmv = false;
|
6773 | 6785 | lastev = false;
|
6774 | 6786 | if(!data || !data.data || !data.data.jstree) { return; }
|
6775 |
| - marker.appendTo('body'); //.show(); |
| 6787 | + marker.appendTo(document.body); //.show(); |
6776 | 6788 | })
|
6777 | 6789 | .on('dnd_move.vakata.jstree', function (e, data) {
|
6778 | 6790 | var isDifferentNode = data.event.target !== lastev.target;
|
|
6906 | 6918 | lastmv = false;
|
6907 | 6919 | data.helper.find('.jstree-icon').removeClass('jstree-ok').addClass('jstree-er');
|
6908 | 6920 | if (data.event.originalEvent && data.event.originalEvent.dataTransfer) {
|
6909 |
| - data.event.originalEvent.dataTransfer.dropEffect = 'none'; |
| 6921 | + //data.event.originalEvent.dataTransfer.dropEffect = 'none'; |
6910 | 6922 | }
|
6911 | 6923 | marker.hide();
|
6912 | 6924 | })
|
|
7117 | 7129 | Math.abs(e.pageY - vakata_dnd.init_y) > (vakata_dnd.is_touch ? $.vakata.dnd.settings.threshold_touch : $.vakata.dnd.settings.threshold)
|
7118 | 7130 | ) {
|
7119 | 7131 | if(vakata_dnd.helper) {
|
7120 |
| - vakata_dnd.helper.appendTo("body"); |
| 7132 | + vakata_dnd.helper.appendTo(document.body); |
7121 | 7133 | vakata_dnd.helper_w = vakata_dnd.helper.outerWidth();
|
7122 | 7134 | }
|
7123 | 7135 | vakata_dnd.is_drag = true;
|
|
0 commit comments