mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Allowing success and error callbacks in refresh()
This commit is contained in:
parent
d96f2cb340
commit
77fa855cda
12
thirdparty/jstree/jquery.jstree.js
vendored
12
thirdparty/jstree/jquery.jstree.js
vendored
@ -523,7 +523,7 @@
|
||||
}
|
||||
this.__callback({});
|
||||
},
|
||||
refresh : function (obj) {
|
||||
refresh : function (obj, s_call, e_call) {
|
||||
var _this = this;
|
||||
this.save_opened();
|
||||
if(!obj) { obj = -1; }
|
||||
@ -531,7 +531,15 @@
|
||||
if(!obj) { obj = -1; }
|
||||
if(obj !== -1) { obj.children("UL").remove(); }
|
||||
else { this.get_container_ul().empty(); }
|
||||
this.load_node(obj, function () { _this.__callback({ "obj" : obj}); _this.reload_nodes(); });
|
||||
this.load_node(
|
||||
obj,
|
||||
function () {
|
||||
_this.__callback({ "obj" : obj});
|
||||
_this.reload_nodes();
|
||||
if(s_call) s_call.call(this);
|
||||
},
|
||||
e_call
|
||||
);
|
||||
},
|
||||
// Dummy function to fire after the first load (so that there is a jstree.loaded event)
|
||||
loaded : function () {
|
||||
|
Loading…
Reference in New Issue
Block a user