diff --git a/etemplate/js/et2_widget_tree.js b/etemplate/js/et2_widget_tree.js index eae0919271..29d2c0ef12 100644 --- a/etemplate/js/et2_widget_tree.js +++ b/etemplate/js/et2_widget_tree.js @@ -171,6 +171,9 @@ var et2_tree = et2_inputWidget.extend( image_path: widget.options.image_path, checkbox: widget.options.multiple, }); + // Add in the callback so we can keep the two in sync + widget.input.AJAX_callback = function() { widget._dhtmlxtree_json_callback(JSON.parse(this.response), widget.input.lastLoadedXMLId);}; + // attach all event handlers (attributs starting with "on"), if they are set for(var name in widget.options) { diff --git a/phpgwapi/js/dhtmlxtree/dhtmlxTree/sources/dhtmlxtree.js b/phpgwapi/js/dhtmlxtree/dhtmlxTree/sources/dhtmlxtree.js index d704b54677..5da220d702 100755 --- a/phpgwapi/js/dhtmlxtree/dhtmlxTree/sources/dhtmlxtree.js +++ b/phpgwapi/js/dhtmlxtree/dhtmlxTree/sources/dhtmlxtree.js @@ -435,6 +435,7 @@ function dhtmlXTreeItemObject(itemId,itemText,parentObject,treeObject,actionHand * @topic: 0 */ dhtmlXTreeObject.prototype.loadXML=function(file,afterCall){ + afterCall = afterCall || this.AJAX_callback; if (this._datamode && this._datamode!="xml") return this["load"+this._datamode.toUpperCase()](file,afterCall); var that=this; if (!this.parsCount) this.callEvent("onXLS",[that,this._ld_id]); @@ -3808,4 +3809,4 @@ dhtmlXTreeObject.prototype._dp_init=function(dp){ }; -//(c)dhtmlx ltd. www.dhtmlx.com \ No newline at end of file +//(c)dhtmlx ltd. www.dhtmlx.com