1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Revert treeList children function signature change

This commit is contained in:
Nick O'Leary 2019-05-27 21:11:50 +01:00
parent 423aba5bab
commit 390b86cd8e
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
3 changed files with 6 additions and 6 deletions

View File

@ -655,7 +655,7 @@ RED.clipboard = (function() {
// icon: 'fa fa-hdd-o',
// label: RED._("library.types.examples"),
// path: "",
// children: function(item,done) {
// children: function(done,item) {
// RED.library.loadLibraryFolder("_examples_","flows","",function(children) {
// item.children = children;
// done(children);
@ -670,7 +670,7 @@ RED.clipboard = (function() {
label: label,
path: "",
expanded: true,
children: function(item,done) {
children: function(done, item) {
RED.library.loadLibraryFolder(library,"flows","",function(children) {
item.children = children;
done(children);

View File

@ -34,7 +34,7 @@
* label: 'Local', // label for the item
* icon: 'fa fa-rocket', // (optional) icon for the item
* selected: true/false, // (optional) if present, display checkbox accordingly
* children: [] | function(item,done) // (optional) an array of child items, or a function
* children: [] | function(done,item) // (optional) an array of child items, or a function
* // that will call the `done` callback with an array
* // of child items
* }
@ -236,7 +236,7 @@
var childrenAdded = false;
var spinner;
var startTime = 0;
item.children(item,function(children) {
item.children(function(children) {
childrenAdded = true;
item.treeList.childList = that._addChildren(container,item,children,depth).hide();
var delta = Date.now() - startTime;
@ -255,7 +255,7 @@
}
done && done();
that._trigger("childrenloaded",null,item)
});
},item);
if (!childrenAdded) {
startTime = Date.now();
spinner = $('<div class="red-ui-treeList-spinner">').css({

View File

@ -133,7 +133,7 @@ RED.library = (function() {
icon: 'fa fa-folder',
label: d,
path: root+d+"/",
children: function(item,done) {
children: function(done, item) {
loadLibraryFolder(library,type,root+d+"/", function(children) {
item.children = children; // TODO: should this be done by treeList for us
done(children);