BUGFIX Use tree/xxx instead of tree?ID=xxx when fetching subtrees for TreeDropdownField. Fix #7730

This commit is contained in:
jean 2012-08-01 19:58:11 +12:00 committed by Will Rossiter
parent c28c024dce
commit fb9e997b5e

View File

@ -192,10 +192,12 @@
// TODO Hack to avoid ajax load on init, see http://code.google.com/p/jstree/issues/detail?id=911
'data': this.getPanel().find('.tree-holder').html(),
'ajax': {
'url': this.data('urlTree'),
'url': function(node) {
return self.data('urlTree') + '/' + ($(node).data("id") ? $(node).data("id") : 0);
},
'data': function(node) {
var id = $(node).data("id") ? $(node).data("id") : 0, params = self.getRequestParams();
params = $.extend({}, params, {ID: id, ajax: 1});
var params = self.getRequestParams();
params = $.extend({}, params, {ajax: 1});
return params;
}
}