guy 7 years ago
parent
commit
0a259a65c0
  1. 6
      demo/js/category/sortTree/demo.sortTree.js
  2. 6
      dist/demo.js

6
demo/js/category/sortTree/demo.sortTree.js

@ -27,6 +27,7 @@ BI.shortcut("demo.sort_tree_expander", Demo.Expander);
Demo.SortTree = BI.inherit(BI.Widget, {
render: function () {
BI.$import("https://coding.net/u/fanruan/p/bi-components/git/raw/master/dist/jqueryui.js");
var self = this, o = this.options;
var tree = new BI.Tree();
tree.initTree(BI.Tree.transformToTreeFormat(Demo.CONSTANTS.TREEITEMS));
@ -47,8 +48,8 @@ Demo.SortTree = BI.inherit(BI.Widget, {
}]
}
});
this.tree.element.sortable({
BI.delay(function () {
self.tree.element.sortable({
items: ".sort-item",
placeholder: {
element: function ($currentItem) {
@ -105,6 +106,7 @@ Demo.SortTree = BI.inherit(BI.Widget, {
}
});
}, 2000);
},
_formatItems: function (layer, nodes) {

6
dist/demo.js vendored

@ -4350,6 +4350,7 @@ BI.shortcut("demo.sort_tree_expander", Demo.Expander);
Demo.SortTree = BI.inherit(BI.Widget, {
render: function () {
BI.$import("https://coding.net/u/fanruan/p/bi-components/git/raw/master/dist/jqueryui.js");
var self = this, o = this.options;
var tree = new BI.Tree();
tree.initTree(BI.Tree.transformToTreeFormat(Demo.CONSTANTS.TREEITEMS));
@ -4370,8 +4371,8 @@ Demo.SortTree = BI.inherit(BI.Widget, {
}]
}
});
this.tree.element.sortable({
BI.delay(function () {
self.tree.element.sortable({
items: ".sort-item",
placeholder: {
element: function ($currentItem) {
@ -4428,6 +4429,7 @@ Demo.SortTree = BI.inherit(BI.Widget, {
}
});
}, 2000);
},
_formatItems: function (layer, nodes) {

Loading…
Cancel
Save