Skip to content

Commit

Permalink
FIXED: Issue where urls with querystring arguments would not be prope…
Browse files Browse the repository at this point in the history
…rly concatenated with additional query parameters during ajax requests. The behaviour would not normally be noted except when using a module (such as Translatable) that adds parameters to data-url fields in forms.
  • Loading branch information
tractorcow committed Aug 8, 2012
1 parent 1432a8e commit a80daef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions javascript/TreeDropdownField.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -193,11 +193,13 @@
'data': this.getPanel().find('.tree-holder').html(), 'data': this.getPanel().find('.tree-holder').html(),
'ajax': { 'ajax': {
'url': function(node) { 'url': function(node) {
return self.data('urlTree') + '/' + ($(node).data("id") ? $(node).data("id") : 0); var url = $.path.parseUrl(self.data('urlTree')).hrefNoSearch;
return url + '/' + ($(node).data("id") ? $(node).data("id") : 0);
}, },
'data': function(node) { 'data': function(node) {
var query = $.query.load(self.data('urlTree')).keys;
var params = self.getRequestParams(); var params = self.getRequestParams();
params = $.extend({}, params, {ajax: 1}); params = $.extend({}, query, params, {ajax: 1});
return params; return params;
} }
} }
Expand Down

0 comments on commit a80daef

Please sign in to comment.