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, { Demo.SortTree = BI.inherit(BI.Widget, {
render: function () { 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 self = this, o = this.options;
var tree = new BI.Tree(); var tree = new BI.Tree();
tree.initTree(BI.Tree.transformToTreeFormat(Demo.CONSTANTS.TREEITEMS)); tree.initTree(BI.Tree.transformToTreeFormat(Demo.CONSTANTS.TREEITEMS));
@ -47,8 +48,8 @@ Demo.SortTree = BI.inherit(BI.Widget, {
}] }]
} }
}); });
BI.delay(function () {
this.tree.element.sortable({ self.tree.element.sortable({
items: ".sort-item", items: ".sort-item",
placeholder: { placeholder: {
element: function ($currentItem) { element: function ($currentItem) {
@ -105,6 +106,7 @@ Demo.SortTree = BI.inherit(BI.Widget, {
} }
}); });
}, 2000);
}, },
_formatItems: function (layer, nodes) { _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, { Demo.SortTree = BI.inherit(BI.Widget, {
render: function () { 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 self = this, o = this.options;
var tree = new BI.Tree(); var tree = new BI.Tree();
tree.initTree(BI.Tree.transformToTreeFormat(Demo.CONSTANTS.TREEITEMS)); tree.initTree(BI.Tree.transformToTreeFormat(Demo.CONSTANTS.TREEITEMS));
@ -4370,8 +4371,8 @@ Demo.SortTree = BI.inherit(BI.Widget, {
}] }]
} }
}); });
BI.delay(function () {
this.tree.element.sortable({ self.tree.element.sortable({
items: ".sort-item", items: ".sort-item",
placeholder: { placeholder: {
element: function ($currentItem) { element: function ($currentItem) {
@ -4428,6 +4429,7 @@ Demo.SortTree = BI.inherit(BI.Widget, {
} }
}); });
}, 2000);
}, },
_formatItems: function (layer, nodes) { _formatItems: function (layer, nodes) {

Loading…
Cancel
Save