mstanko@1107: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz mstanko@1107: * Software engineering by Intevation GmbH mstanko@1107: * mstanko@1107: * This file is Free Software under the GNU GPL (v>=3) mstanko@1107: * and comes with ABSOLUTELY NO WARRANTY! Check out mstanko@1107: * the documentation coming with IMIS-Labordaten-Application for details. mstanko@1107: */ mstanko@1107: mstanko@1107: /** mstanko@1107: * Combobox for MessprogrammLand mstanko@1107: */ mstanko@1107: Ext.define('Lada.view.widget.MessprogrammLand', { mstanko@1107: extend: 'Lada.view.widget.base.ComboBox', mstanko@1107: alias: 'widget.messprogrammland', mstanko@1107: store: 'messprogrammkategorie', mstanko@1116: displayField: 'id', mstanko@1128: valueField: 'mplId', mstanko@1116: editable: this.editable || false, mstanko@1116: forceSelection: true, mstanko@1107: // Enable filtering of comboboxes mstanko@1116: autoSelect: false, mstanko@1107: queryMode: 'local', mstanko@1107: triggerAction: 'all', mstanko@1116: typeAhead: false, mstanko@1107: minChars: 0, mstanko@1116: tpl: Ext.create("Ext.XTemplate", mstanko@1116: '
' + mstanko@1116: '{mplId} - {bezeichnung}
'), mstanko@1116: displayTpl: Ext.create('Ext.XTemplate', mstanko@1116: '{mplId} - {bezeichnung}'), mstanko@1107: mstanko@1107: initComponent: function() { mstanko@1128: var i18n = Lada.getApplication().bundle; mstanko@1128: this.emptyText = i18n.getMsg('emptytext.messprogrammland'); mstanko@1128: mstanko@1107: this.store = Ext.data.StoreManager.get('messprogrammkategorie'); mstanko@1107: if (!this.store) { mstanko@1107: this.store = Ext.create('Lada.store.MessprogrammKategorie'); mstanko@1107: } mstanko@1128: this.store.sort(); mstanko@1107: this.callParent(arguments); mstanko@1107: } mstanko@1107: });