Fix language selector in code

pull/1/head
yflory 5 years ago
parent b7c2d23a29
commit 202668f50f

@ -311,7 +311,14 @@ define([
common: Common
};
var $block = exp.$language = UIElements.createDropdown(dropdownConfig);
$block.find('button').attr('title', Messages.languageButtonTitle);
$block.find('button').attr('title', Messages.languageButtonTitle).click(function () {
var state = $block.find('.cp-dropdown-content').is(':visible');
var $c = $block.closest('.cp-toolbar-drawer-content');
$c.removeClass('cp-dropdown-visible');
if (!state) {
$c.addClass('cp-dropdown-visible');
}
});
var isHovering = false;
var $aLanguages = $block.find('a');

Loading…
Cancel
Save