Ticket/InsdepUI/expand/jquery-easyui-etree/jquery.etree.js
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* etree - jQuery EasyUI
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2011 stworthy [ stworthy@gmail.com ]
*
* Dependencies:
* tree
* messager
*
*/
(function($){
function createTree(target){
var opts = $.data(target, 'etree').options;
$(target).tree($.extend({}, opts, {
onDblClick: function(node){
$(this).tree('beginEdit', node.target);
},
onBeforeEdit: function(node){
if (opts.onBeforeEdit.call(target, node) == false) return false;
$(this).tree('disableDnd');
},
onAfterEdit: function(node){
$.ajax({
url: opts.updateUrl,
type: 'post',
dataType: 'json',
data: {
id: node.id,
text: node.text
}
});
$(this).tree('enableDnd');
opts.onAfterEdit.call(target, node);
},
onCancelEdit: function(node){
$(this).tree('enableDnd');
opts.onCancelEdit.call(target, node);
},
onDrop: function(targetNode, source, point){
var targetId = $(target).tree('getNode', targetNode).id;
$.ajax({
url: opts.dndUrl,
type: 'post',
dataType: 'json',
data: {
id: source.id,
targetId: targetId,
point: point
}
});
opts.onDrop.call(target, targetNode, source, point);
}
}));
}
$.fn.etree = function(options, param){
后面还有 125 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。