From a80daef2c6c38d40a08028aead43b51cc2aeb742 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 9 Aug 2012 10:18:33 +1200 Subject: [PATCH] FIXED: Issue where urls with querystring arguments would not be properly 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. --- javascript/TreeDropdownField.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/javascript/TreeDropdownField.js b/javascript/TreeDropdownField.js index 4fda1b3aa..ea71d383d 100644 --- a/javascript/TreeDropdownField.js +++ b/javascript/TreeDropdownField.js @@ -193,11 +193,13 @@ 'data': this.getPanel().find('.tree-holder').html(), 'ajax': { '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) { + var query = $.query.load(self.data('urlTree')).keys; var params = self.getRequestParams(); - params = $.extend({}, params, {ajax: 1}); + params = $.extend({}, query, params, {ajax: 1}); return params; } }