comparison app/view/zusatzwerte/List.js @ 545:7c9475119861 mockup-1.1

Enable the 'details' button only when an item is selected
author Roland Geider <roland.geider@intevation.de>
date Thu, 18 Dec 2014 15:59:47 +0100
parents 99e738c17b81
children
comparison
equal deleted inserted replaced
544:d2e90f117c20 545:7c9475119861
35 xtype: 'toolbar', 35 xtype: 'toolbar',
36 dock: 'bottom', 36 dock: 'bottom',
37 items: ['->', { 37 items: ['->', {
38 text: 'Details', 38 text: 'Details',
39 icon: 'gfx/document-open.png', 39 icon: 'gfx/document-open.png',
40 action: 'open' 40 action: 'open',
41 disabled: true
41 }, { 42 }, {
42 text: 'Hinzufügen', 43 text: 'Hinzufügen',
43 icon: 'gfx/list-add.png', 44 icon: 'gfx/list-add.png',
44 action: 'add', 45 action: 'add',
45 probeId: this.probeId 46 probeId: this.probeId
101 xtype: 'messeinheit', 102 xtype: 'messeinheit',
102 allowBlank: false 103 allowBlank: false
103 }*/ 104 }*/
104 }]; 105 }];
105 this.callParent(arguments); 106 this.callParent(arguments);
107 },
108 listeners: {
109 selectionchange: function(model, selected, eOpts) {
110 /*
111 * Enable the 'details' button only when an item is selected
112 */
113 if (selected.length > 0) {
114 this.down('button[action=open]').enable();
115 }
116 }
106 } 117 }
107 }); 118 });

http://lada.wald.intevation.org