comparison app/view/widget/Deskriptor.js @ 850:43f3a53d07d3

Added templates to deskriptor cbs to display the sn number and a text.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 08 Jul 2015 12:41:55 +0200
parents 8de4ec66d0e6
children 81e7c847cb58
comparison
equal deleted inserted replaced
849:8de4ec66d0e6 850:43f3a53d07d3
10 * Combobox for Deskriptor 10 * Combobox for Deskriptor
11 */ 11 */
12 Ext.define('Lada.view.widget.Deskriptor', { 12 Ext.define('Lada.view.widget.Deskriptor', {
13 extend: 'Lada.view.widget.base.ComboBox', 13 extend: 'Lada.view.widget.base.ComboBox',
14 alias: 'widget.deskriptor', 14 alias: 'widget.deskriptor',
15 displayField: 'beschreibung', 15 displayField: 'id',
16 valueField: 'id', 16 valueField: 'id',
17 // Enable filtering of comboboxes 17 // Enable filtering of comboboxes
18 triggerAction: 'all', 18 triggerAction: 'all',
19 typeAhead: false, 19 typeAhead: false,
20 layer: null, 20 layer: null,
21 queryMode: 'remote', 21 queryMode: 'remote',
22 remoteFilter: true, 22 remoteFilter: true,
23 tpl: Ext.create('Ext.XTemplate',
24 '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' +
25 '{sn} - {beschreibung}</div></tpl>'),
26 displayTpl: Ext.create('Ext.XTemplate',
27 '<tpl for=".">{sn} - {beschreibung}</tpl>'),
23 28
24 listeners: { 29 listeners: {
25 focus: { 30 focus: {
26 fn: function(field) { 31 fn: function(field) {
27 if (field.up('deskriptor').layer === 0) { 32 if (field.up('deskriptor').layer === 0) {

http://lada.wald.intevation.org