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