Fix undefined element in select dropdown menus

pull/1/head
yflory 8 years ago
parent 298e34a9de
commit 30bdb9881c

@ -53,7 +53,7 @@ define([
if (exp.$language) {
var name = exp.$language.find('a[data-value="' + mode + '"]').text() || undefined;
name = name ? Messages.languageButton + ' ('+name+')' : Messages.languageButton;
exp.$language.setValue(name);
exp.$language.setValue(mode, name);
}
if(cb) { cb(mode); }
};
@ -86,7 +86,7 @@ define([
if ($select) {
var name = theme || undefined;
name = name ? Messages.themeButton + ' ('+theme+')' : Messages.themeButton;
$select.setValue(name);
$select.setValue(theme, name);
}
};
}());

@ -1197,10 +1197,10 @@ define([
}, 1000);
});
$container.setValue = function (val) {
$container.setValue = function (val, name) {
value = val;
var $val = $innerblock.find('[data-value="'+val+'"]');
var textValue = $val.html() || val;
var textValue = name || $val.html() || val;
$button.find('.buttonTitle').html(textValue);
};
$container.getValue = function () {

Loading…
Cancel
Save