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 Umweltbereich mstanko@1107: */ mstanko@1107: Ext.define('Lada.view.widget.Probenehmer' ,{ mstanko@1107: extend: 'Lada.view.widget.base.ComboBox', mstanko@1107: alias: 'widget.probenehmer', mstanko@1107: store: 'Probenehmer', mstanko@1107: displayField: 'id', mstanko@1107: valueField: 'id', mstanko@1107: editable: this.editable || false, mstanko@1107: forceSelection: true, mstanko@1107: // Enable filtering of comboboxes mstanko@1107: autoSelect: false, mstanko@1107: queryMode: 'local', mstanko@1107: triggerAction: 'all', mstanko@1107: typeAhead: false, mstanko@1107: minChars: 0, mstanko@1107: tpl: Ext.create("Ext.XTemplate", mstanko@1107: '
' + mstanko@1116: '{prnId} - {kurzBezeichnung}
'), mstanko@1107: displayTpl: Ext.create('Ext.XTemplate', mstanko@1116: '{kurzBezeichnung}'), mstanko@1107: mstanko@1107: initComponent: function() { mstanko@1107: var i18n = Lada.getApplication().bundle; mstanko@1107: this.emptyText = i18n.getMsg('emptytext.probenehmer'); mstanko@1107: mstanko@1107: this.store = Ext.data.StoreManager.get('probenehmer'); mstanko@1107: if (!this.store) { mstanko@1107: this.store = Ext.create('Lada.store.Probenehmer'); mstanko@1107: } mstanko@1107: this.store.sort(); mstanko@1107: this.callParent(arguments); mstanko@1107: } mstanko@1107: });