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:
Niklas Forsdahl 2012-09-03 10:16:41 +03:00
parent c3c9f1f83f
commit 11b40d44ff

View File

@ -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=[^&]*/, ''),