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) {
 | 
			
		||||
                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())) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -105,6 +105,7 @@ define([
 | 
			
		|||
                editable    : false,
 | 
			
		||||
                takeFocusOnClose: true,
 | 
			
		||||
                data        : data,
 | 
			
		||||
                search: true,
 | 
			
		||||
                scrollAlwaysVisible: true
 | 
			
		||||
            });
 | 
			
		||||
            this.cmbLang.setValue(0x0409);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue