comparison app/view/form/Messung.js @ 1017:d8e74bd89d6b

Fixed Activation of StatusReset Button
author Dustin Demuth <dustin@intevation.de>
date Thu, 04 Feb 2016 12:08:21 +0100
parents c943340176d4
children 1be581a403b5
comparison
equal deleted inserted replaced
1016:d6e259e76de6 1017:d8e74bd89d6b
180 sStore.load({ 180 sStore.load({
181 params: { 181 params: {
182 messungsId: messungsId 182 messungsId: messungsId
183 }, 183 },
184 callback: function(records, operation, success) { 184 callback: function(records, operation, success) {
185 var sw, ss; 185 var sw, ss, se;
186 var i18n = Lada.getApplication().bundle; 186 var i18n = Lada.getApplication().bundle;
187 if (sStore.getTotalCount() === 0 || !statusId) { 187 if (sStore.getTotalCount() === 0 || !statusId) {
188 sw = 0; 188 sw = 0;
189 } 189 }
190 else { 190 else {
191 sw = sStore.getById(statusId).get('statusWert'); 191 sw = sStore.getById(statusId).get('statusWert');
192 ss = sStore.getById(statusId).get('statusStufe'); 192 ss = sStore.getById(statusId).get('statusStufe');
193 se = sStore.getById(statusId).get('erzeuger');
193 } 194 }
194 this.setStatusWert(sw); 195 this.setStatusWert(sw);
195 this.setStatusStufe(ss); 196 this.setStatusStufe(ss);
196 197
197 // Enable / Disable the statusreset button of the statusgrid of the messungform 198 // Enable / Disable the statusreset button of the statusgrid of the messungwindow
198 if (messwin.record.get('statusEdit') === true && 199 if (messwin.record.get('statusEdit') === true &&
199 sw != 0 && 200 sw != 0 &&
200 sw != 4) { 201 sw != 4 &&
202 Ext.Array.contains(Lada.mst, se)) {
203
201 messwin.enableStatusReset(); 204 messwin.enableStatusReset();
202 } 205 }
203 else { 206 else {
204 messwin.disableStatusReset(); 207 messwin.disableStatusReset();
205 } 208 }

http://lada.wald.intevation.org