Add search for combo box with list of languages
This commit is contained in:
parent
3c43f8a8e3
commit
e59e7c09c9
|
@ -350,11 +350,7 @@ define([
|
||||||
onAfterKeydownMenu: function(e) {
|
onAfterKeydownMenu: function(e) {
|
||||||
if (e.keyCode == Common.UI.Keys.DOWN && !this.editable && !this.isMenuOpen()) {
|
if (e.keyCode == Common.UI.Keys.DOWN && !this.editable && !this.isMenuOpen()) {
|
||||||
this.openMenu();
|
this.openMenu();
|
||||||
var me = this;
|
this.onAfterShowMenu();
|
||||||
_.delay(function() {
|
|
||||||
me._skipInputChange = true;
|
|
||||||
me.cmpEl.find('ul li:first a').focus();
|
|
||||||
}, 10);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (e.keyCode == Common.UI.Keys.RETURN && (this.editable || this.isMenuOpen())) {
|
else if (e.keyCode == Common.UI.Keys.RETURN && (this.editable || this.isMenuOpen())) {
|
||||||
|
|
|
@ -101,7 +101,9 @@ define([
|
||||||
'</span>'
|
'</span>'
|
||||||
].join('')),
|
].join('')),
|
||||||
data: this.options.languages,
|
data: this.options.languages,
|
||||||
search: true
|
takeFocusOnClose: true,
|
||||||
|
search: true,
|
||||||
|
scrollAlwaysVisible: true
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.cmbLanguage.scroller) this.cmbLanguage.scroller.update({alwaysVisibleY: 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);
|
var langname = Common.util.LanguageInfo.getLocalLanguageName(this.options.current);
|
||||||
this.cmbLanguage.setValue(langname[0], langname[1]);
|
this.cmbLanguage.setValue(langname[0], langname[1]);
|
||||||
this.onLangSelect(this.cmbLanguage, this.cmbLanguage.getSelectedRecord());
|
this.onLangSelect(this.cmbLanguage, this.cmbLanguage.getSelectedRecord());
|
||||||
|
|
||||||
|
var me = this;
|
||||||
|
setTimeout(function(){
|
||||||
|
me.cmbLanguage.focus();
|
||||||
|
}, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
close: function(suppressevent) {
|
close: function(suppressevent) {
|
||||||
|
|
|
@ -212,7 +212,9 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
||||||
menuStyle : 'min-width: 100%; max-height: 185px;',
|
menuStyle : 'min-width: 100%; max-height: 185px;',
|
||||||
cls : 'input-group-nr',
|
cls : 'input-group-nr',
|
||||||
editable : false,
|
editable : false,
|
||||||
data : data
|
data : data,
|
||||||
|
search: true,
|
||||||
|
scrollAlwaysVisible: true
|
||||||
});
|
});
|
||||||
this.cmbLang.setValue(0x0409);
|
this.cmbLang.setValue(0x0409);
|
||||||
this.cmbLang.on('selected',function(combo, record) {
|
this.cmbLang.on('selected',function(combo, record) {
|
||||||
|
|
|
@ -105,6 +105,7 @@ define([
|
||||||
editable : false,
|
editable : false,
|
||||||
takeFocusOnClose: true,
|
takeFocusOnClose: true,
|
||||||
data : data,
|
data : data,
|
||||||
|
search: true,
|
||||||
scrollAlwaysVisible: true
|
scrollAlwaysVisible: true
|
||||||
});
|
});
|
||||||
this.cmbLang.setValue(0x0409);
|
this.cmbLang.setValue(0x0409);
|
||||||
|
|
|
@ -102,7 +102,9 @@ define([
|
||||||
menuStyle : 'min-width: 100%; max-height: 185px;',
|
menuStyle : 'min-width: 100%; max-height: 185px;',
|
||||||
cls : 'input-group-nr',
|
cls : 'input-group-nr',
|
||||||
editable : false,
|
editable : false,
|
||||||
data : data
|
data : data,
|
||||||
|
search: true,
|
||||||
|
scrollAlwaysVisible: true
|
||||||
});
|
});
|
||||||
this.cmbLang.setValue(0x0409);
|
this.cmbLang.setValue(0x0409);
|
||||||
this.cmbLang.on('selected', _.bind(function(combo, record) {
|
this.cmbLang.on('selected', _.bind(function(combo, record) {
|
||||||
|
|
|
@ -136,7 +136,9 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
||||||
menuStyle : 'min-width: 100%; max-height: 185px;',
|
menuStyle : 'min-width: 100%; max-height: 185px;',
|
||||||
cls : 'input-group-nr',
|
cls : 'input-group-nr',
|
||||||
editable : false,
|
editable : false,
|
||||||
data : data
|
data : data,
|
||||||
|
search: true,
|
||||||
|
scrollAlwaysVisible: true
|
||||||
});
|
});
|
||||||
this.cmbLang.setValue(0x0409);
|
this.cmbLang.setValue(0x0409);
|
||||||
this.cmbLang.on('selected', _.bind(function(combo, record) {
|
this.cmbLang.on('selected', _.bind(function(combo, record) {
|
||||||
|
|
Loading…
Reference in a new issue