|
@@ -65,7 +65,7 @@ var idTree = {
|
|
nodes[i].nextSibling = (i === nodes.length - 1) ? null : nodes[i + 1];
|
|
nodes[i].nextSibling = (i === nodes.length - 1) ? null : nodes[i + 1];
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 在nodes中,从iIndex(包括)开始全部移除
|
|
|
|
|
|
+ // 锟斤拷nodes锟叫o拷锟斤拷iIndex锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷始全锟斤拷锟狡筹拷
|
|
removeNodes: function (tree, parent, iIndex, count) {
|
|
removeNodes: function (tree, parent, iIndex, count) {
|
|
var children = parent ? parent.children : tree.roots;
|
|
var children = parent ? parent.children : tree.roots;
|
|
var pre = (iIndex < 0 || iIndex >= children.length) ? null : children[iIndex].preSibling;
|
|
var pre = (iIndex < 0 || iIndex >= children.length) ? null : children[iIndex].preSibling;
|
|
@@ -82,7 +82,7 @@ var idTree = {
|
|
children.splice(iIndex, children.length - iIndex);
|
|
children.splice(iIndex, children.length - iIndex);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 在nodes中增加addNodes, 位置从index开始
|
|
|
|
|
|
+ // 锟斤拷nodes锟斤拷锟斤拷锟斤拷addNodes, 位锟矫达拷index锟斤拷始
|
|
addNodes: function (tree, parent, nodes, iIndex) {
|
|
addNodes: function (tree, parent, nodes, iIndex) {
|
|
var children = parent ? parent.children : tree.roots;
|
|
var children = parent ? parent.children : tree.roots;
|
|
var pre, next, i;
|
|
var pre, next, i;
|
|
@@ -125,7 +125,7 @@ var idTree = {
|
|
};
|
|
};
|
|
|
|
|
|
var Node = function (tree, data) {
|
|
var Node = function (tree, data) {
|
|
- // 以下的属性,本单元外均不可直接修改
|
|
|
|
|
|
+ // ���µ����ԣ�����Ԫ�������ֱ����
|
|
this.tree = tree;
|
|
this.tree = tree;
|
|
this.data = data;
|
|
this.data = data;
|
|
this.children = [];
|
|
this.children = [];
|
|
@@ -449,8 +449,8 @@ var idTree = {
|
|
}
|
|
}
|
|
return success;
|
|
return success;
|
|
};
|
|
};
|
|
-
|
|
|
|
- Tree.prototype.editedData = function (field, id, newText) {
|
|
|
|
|
|
+ //willdel
|
|
|
|
+ /* Tree.prototype.editedData = function (field, id, newText) {
|
|
var node = this.findNode(id), result = {allow: false, nodes: []};
|
|
var node = this.findNode(id), result = {allow: false, nodes: []};
|
|
if (this.event[this.eventType.editedData]) {
|
|
if (this.event[this.eventType.editedData]) {
|
|
return this.event[this.eventType.editedData](field, node.data);
|
|
return this.event[this.eventType.editedData](field, node.data);
|
|
@@ -459,7 +459,7 @@ var idTree = {
|
|
result.allow = true;
|
|
result.allow = true;
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
- };
|
|
|
|
|
|
+ };*/
|
|
|
|
|
|
Tree.prototype.bind = function (eventName, eventFun) {
|
|
Tree.prototype.bind = function (eventName, eventFun) {
|
|
this.event[eventName] = eventFun;
|
|
this.event[eventName] = eventFun;
|