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.
This commit is contained in:
Ingo Schommer 2012-06-29 13:47:12 +02:00
parent c07d4ec95e
commit fa62c1b0ba

View File

@ -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);
}
});