js/jstree/misc.js
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* global jQuery */
// disable all events
(function ($, undefined) {
"use strict";
$.jstree.plugins.trigger = function (options, parent) {
this.init = function (el, options) {
// do not forget parent
parent.init.call(this, el, options);
this._data.trigger.disabled = false;
};
this.trigger = function (ev, data) {
if(!this._data.trigger.disabled) {
parent.trigger.call(this, ev, data);
}
};
this.disable_events = function () { this._data.trigger.disabled = true; };
this.enable_events = function () { this._data.trigger.disabled = false; };
};
})(jQuery);
// no hover
(function ($, undefined) {
"use strict";
$.jstree.plugins.nohover = function () {
this.hover_node = $.noop;
};
})(jQuery);
// conditional select
(function ($, undefined) {
"use strict";
$.jstree.defaults.conditionalselect = function () { return true; };
$.jstree.plugins.conditionalselect = function (options, parent) {
// own function
this.select_node = function (obj, supress_event, prevent_open) {
if(this.settings.conditionalselect.call(this, this.get_node(obj))) {
parent.select_node.call(this, obj, supress_event, prevent_open);
}
};
};
})(jQuery);
// real checkboxes
(function ($, undefined) {
"use strict";
var inp = document.createElement("INPUT");
inp.type = "checkbox";
inp.className = "jstree-realcheckbox";
$.jstree.defaults.realcheckboxes = {};
$.jstree.plugins.realcheckboxes = function (options, parent) {
this.bind = function () {
parent.bind.call(this);
this._data.realcheckboxes.uto = false;
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 ready.jstree loaded.jstree', $.proxy(function () {
后面还有 184 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
