Permalink
Browse files

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
  • Loading branch information...
1 parent cb18958 commit 708f80ae6248bc9f4b33c65f3e0f87f9e9628d53 @chillu chillu committed Nov 21, 2009
Showing with 5 additions and 1 deletion.
  1. +5 −1 javascript/CMSMain.Translatable.js
@@ -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;
});
}

0 comments on commit 708f80a

Please sign in to comment.