Skip to content
This repository
Browse code

Smarter concat of query params in LeftAndMain.js

Broke when CMS URL already had query params,
such as ?locale=en_US with the Translatable module enabled.
With this patch it doesn't double-concat ?locale....
Still doubles query params, but that's acceptable
until we find a more solid URL manipulation lib for JS.
  • Loading branch information...
commit fa62c1b0ba718ff8d781f6eea9ec50a523c6f293 1 parent c07d4ec
Ingo Schommer authored

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

  1. 2  admin/javascript/LeftAndMain.js
2  admin/javascript/LeftAndMain.js
@@ -670,7 +670,7 @@ jQuery.noConflict();
670 670
 			showDetailView: function(url) {
671 671
 				// Include any GET parameters from the current URL, as the view state might depend on it.
672 672
 				// For example, a list prefiltered through external search criteria might be passed to GridField.
673  
-				if(window.location.search) url += window.location.search;
  673
+				url = $.path.addSearchParams(url, window.location.search.replace(/^\?/, ''));
674 674
 				$('.cms-container').loadPanel(url);
675 675
 			}
676 676
 		});

0 notes on commit fa62c1b

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