mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
BUG: locale dropdown sometimes hidden after panel reload
The locale dropdown was sometimes hidden after a panel reload via ajax, due to the caching behaviour for the panel. This was caused by the fact that the dropdown was hidden at the point in which the panel was cached (probably due to chosen). Fixed by always making sure the dropdown is shown on its onmatch function.
This commit is contained in:
parent
c3c9f1f83f
commit
11b40d44ff
@ -30,6 +30,11 @@
|
||||
* whenever a new value is selected, reload the whole CMS in the new locale
|
||||
*/
|
||||
$('.CMSMain #Form_LangForm :input[name=Locale]').entwine({
|
||||
onmatch: function() {
|
||||
// make sure this element is shown, since it might be hidden by chosen before the panel is cached
|
||||
$(this).show();
|
||||
this._super();
|
||||
},
|
||||
onchange: function(e) {
|
||||
var url = $.path.addSearchParams(
|
||||
document.location.href.replace(/locale=[^&]*/, ''),
|
||||
|
Loading…
Reference in New Issue
Block a user