Skip to content
This repository
Browse code

BUG: javascript tree node updating fails when Translatable is used

Automatic tree node updating fails when for example creating a new
translation, due to the update URL containing two question marks,
due to the locale get parameter.

Fixed by using the $.path.addSearchParams utility function, which properly
checks for existing query string parameters.
  • Loading branch information...
commit a85530991cfcde86e6e4d346e5d743785abf7aea 1 parent bbb0868
Niklas Forsdahl authored August 03, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  admin/javascript/LeftAndMain.Tree.js
2  admin/javascript/LeftAndMain.Tree.js
@@ -342,7 +342,7 @@
342 342
 				self.jstree('save_selected');
343 343
 
344 344
 				$.ajax({
345  
-					url: this.data('urlUpdatetreenodes') + '?ids=' + ids.join(','),
  345
+					url: $.path.addSearchParams(this.data('urlUpdatetreenodes'), 'ids=' + ids.join(',')),
346 346
 					dataType: 'json',
347 347
 					success: function(data, xhr) {
348 348
 						$.each(data, function(nodeId, nodeData) {

0 notes on commit a855309

Please sign in to comment.
Something went wrong with that request. Please try again.