From fa62c1b0ba718ff8d781f6eea9ec50a523c6f293 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 29 Jun 2012 13:47:12 +0200 Subject: [PATCH] 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. --- admin/javascript/LeftAndMain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/javascript/LeftAndMain.js b/admin/javascript/LeftAndMain.js index 1134714c0..387ece8f9 100644 --- a/admin/javascript/LeftAndMain.js +++ b/admin/javascript/LeftAndMain.js @@ -670,7 +670,7 @@ jQuery.noConflict(); showDetailView: function(url) { // Include any GET parameters from the current URL, as the view state might depend on it. // For example, a list prefiltered through external search criteria might be passed to GridField. - if(window.location.search) url += window.location.search; + url = $.path.addSearchParams(url, window.location.search.replace(/^\?/, '')); $('.cms-container').loadPanel(url); } });