comparison app/view/window/SetStatus.js @ 1228:d5b9a5c75872

Enable validation for SetStatus window.
author Tom Gottfried <tom@intevation.de>
date Fri, 28 Oct 2016 13:43:06 +0200
parents 66d4b392bc5f
children 38599f18c863
comparison
equal deleted inserted replaced
1227:848b50a4a4eb 1228:d5b9a5c75872
29 */ 29 */
30 initComponent: function() { 30 initComponent: function() {
31 var i18n = Lada.getApplication().bundle; 31 var i18n = Lada.getApplication().bundle;
32 var me = this; 32 var me = this;
33 this.items = [{ 33 this.items = [{
34 xtype: 'panel', 34 xtype: 'form',
35 name: 'valueselection', 35 name: 'valueselection',
36 border: 0, 36 border: 0,
37 items: [{ 37 items: [{
38 xtype: 'fieldset', 38 xtype: 'fieldset',
39 title: 'Status für ' + this.selection.length + ' Messung(en) setzen', 39 title: 'Status für ' + this.selection.length + ' Messung(en) setzen',
62 height: 100, 62 height: 100,
63 labelWidth: 100, 63 labelWidth: 100,
64 fieldLabel: i18n.getMsg('statusgrid.header.text'), 64 fieldLabel: i18n.getMsg('statusgrid.header.text'),
65 emptyText: 'Geben Sie einen Kommentar ein.' 65 emptyText: 'Geben Sie einen Kommentar ein.'
66 }] 66 }]
67 }],
68 buttons: [{
69 text: i18n.getMsg('statusSetzen'),
70 name: 'start',
71 icon: 'resources/img/mail-mark-notjunk.png',
72 formBind: true,
73 disabled: true,
74 handler: this.setStatus
75 }, {
76 text: i18n.getMsg('cancel'),
77 name: 'abort',
78 handler: this.closeWindow
67 }] 79 }]
68 }, { 80 }, {
69 xtype: 'panel', 81 xtype: 'panel',
70 hidden: true, 82 hidden: true,
71 margin: '5, 5, 5, 5', 83 margin: '5, 5, 5, 5',
76 margin: '5, 5, 5, 5', 88 margin: '5, 5, 5, 5',
77 hidden: true, 89 hidden: true,
78 text: 'Verarbeite Statusänderungen' 90 text: 'Verarbeite Statusänderungen'
79 }]; 91 }];
80 this.buttons = [{ 92 this.buttons = [{
81 text: i18n.getMsg('statusSetzen'),
82 name: 'start',
83 icon: 'resources/img/mail-mark-notjunk.png',
84 handler: this.setStatus
85 }, {
86 text: i18n.getMsg('cancel'),
87 name: 'abort',
88 handler: this.closeWindow
89 }, {
90 text: i18n.getMsg('close'), 93 text: i18n.getMsg('close'),
91 name: 'close', 94 name: 'close',
92 hidden: true, 95 hidden: true,
93 handler: this.closeWindow 96 handler: this.closeWindow
94 }]; 97 }];
95 98
96 this.callParent(arguments); 99 this.callParent(arguments);
100
101 // Initially validate to indicate mandatory fields clearly.
102 this.down('form').isValid();
97 }, 103 },
98 104
99 /** 105 /**
100 * @private 106 * @private
101 * A handler for a Abort-Button 107 * A handler for a Abort-Button

http://lada.wald.intevation.org