BUGFIX Fixed locale GET parameter concatenation in language selector javascript for the CMS

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92732 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 03:16:11 +00:00
parent cb1895866a
commit 708f80ae62

View File

@ -17,7 +17,11 @@
// whenever a new value is selected, reload the whole CMS in the new locale
this.find(':input[name=Locale]').bind('change', function(e) {
document.location = 'admin/?locale=' + $(e.target).val();
var url = document.location.href;
url += (url.indexOf('?') != -1) ? '&' : '?';
// TODO Replace existing locale GET params
url += 'locale=' + $(e.target).val();
document.location = url;
return false;
});
}