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