Add search for combo box with list of languages

This commit is contained in:
Julia Radzhabova 2020-09-27 00:27:07 +03:00
parent 3c43f8a8e3
commit e59e7c09c9
6 changed files with 19 additions and 9 deletions

View file

@ -350,11 +350,7 @@ define([
onAfterKeydownMenu: function(e) {
if (e.keyCode == Common.UI.Keys.DOWN && !this.editable && !this.isMenuOpen()) {
this.openMenu();
var me = this;
_.delay(function() {
me._skipInputChange = true;
me.cmpEl.find('ul li:first a').focus();
}, 10);
this.onAfterShowMenu();
return false;
}
else if (e.keyCode == Common.UI.Keys.RETURN && (this.editable || this.isMenuOpen())) {

View file

@ -101,7 +101,9 @@ define([
'</span>'
].join('')),
data: this.options.languages,
search: true
takeFocusOnClose: true,
search: true,
scrollAlwaysVisible: true
});
if (this.cmbLanguage.scroller) this.cmbLanguage.scroller.update({alwaysVisibleY: true});
@ -109,6 +111,11 @@ define([
var langname = Common.util.LanguageInfo.getLocalLanguageName(this.options.current);
this.cmbLanguage.setValue(langname[0], langname[1]);
this.onLangSelect(this.cmbLanguage, this.cmbLanguage.getSelectedRecord());
var me = this;
setTimeout(function(){
me.cmbLanguage.focus();
}, 100);
},
close: function(suppressevent) {

View file

@ -212,7 +212,9 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
menuStyle : 'min-width: 100%; max-height: 185px;',
cls : 'input-group-nr',
editable : false,
data : data
data : data,
search: true,
scrollAlwaysVisible: true
});
this.cmbLang.setValue(0x0409);
this.cmbLang.on('selected',function(combo, record) {

View file

@ -105,6 +105,7 @@ define([
editable : false,
takeFocusOnClose: true,
data : data,
search: true,
scrollAlwaysVisible: true
});
this.cmbLang.setValue(0x0409);

View file

@ -102,7 +102,9 @@ define([
menuStyle : 'min-width: 100%; max-height: 185px;',
cls : 'input-group-nr',
editable : false,
data : data
data : data,
search: true,
scrollAlwaysVisible: true
});
this.cmbLang.setValue(0x0409);
this.cmbLang.on('selected', _.bind(function(combo, record) {

View file

@ -136,7 +136,9 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
menuStyle : 'min-width: 100%; max-height: 185px;',
cls : 'input-group-nr',
editable : false,
data : data
data : data,
search: true,
scrollAlwaysVisible: true
});
this.cmbLang.setValue(0x0409);
this.cmbLang.on('selected', _.bind(function(combo, record) {