# HG changeset patch # User Dustin Demuth # Date 1454584101 -3600 # Node ID d8e74bd89d6bc88b89072732e0ca45f796964044 # Parent d6e259e76de67ac0268a93d2820c542c3aa3a1eb Fixed Activation of StatusReset Button diff -r d6e259e76de6 -r d8e74bd89d6b app/view/form/Messung.js --- a/app/view/form/Messung.js Tue Feb 02 15:26:43 2016 +0100 +++ b/app/view/form/Messung.js Thu Feb 04 12:08:21 2016 +0100 @@ -182,7 +182,7 @@ messungsId: messungsId }, callback: function(records, operation, success) { - var sw, ss; + var sw, ss, se; var i18n = Lada.getApplication().bundle; if (sStore.getTotalCount() === 0 || !statusId) { sw = 0; @@ -190,14 +190,17 @@ else { sw = sStore.getById(statusId).get('statusWert'); ss = sStore.getById(statusId).get('statusStufe'); + se = sStore.getById(statusId).get('erzeuger'); } this.setStatusWert(sw); this.setStatusStufe(ss); - // Enable / Disable the statusreset button of the statusgrid of the messungform + // Enable / Disable the statusreset button of the statusgrid of the messungwindow if (messwin.record.get('statusEdit') === true && sw != 0 && - sw != 4) { + sw != 4 && + Ext.Array.contains(Lada.mst, se)) { + messwin.enableStatusReset(); } else { diff -r d6e259e76de6 -r d8e74bd89d6b app/view/grid/Status.js --- a/app/view/grid/Status.js Tue Feb 02 15:26:43 2016 +0100 +++ b/app/view/grid/Status.js Thu Feb 04 12:08:21 2016 +0100 @@ -177,6 +177,7 @@ }] }); } + this.store.load({ params: { messungsId: this.recordId, diff -r d6e259e76de6 -r d8e74bd89d6b app/view/window/MessungEdit.js --- a/app/view/window/MessungEdit.js Tue Feb 02 15:26:43 2016 +0100 +++ b/app/view/window/MessungEdit.js Thu Feb 04 12:08:21 2016 +0100 @@ -210,8 +210,8 @@ this.down('fset[name=messwerte]').down('messwertgrid').readOnly = true; this.down('fset[name=messungskommentare]').down('mkommentargrid').setReadOnly(true); this.down('fset[name=messungskommentare]').down('mkommentargrid').readOnly = true; - this.disableStatusEdit(); - this.disableStatusReset(); + //this.disableStatusEdit(); + //this.disableStatusReset(); }, /** @@ -222,8 +222,8 @@ this.down('fset[name=messwerte]').down('messwertgrid').readOnly = false; this.down('fset[name=messungskommentare]').down('mkommentargrid').setReadOnly(false); this.down('fset[name=messungskommentare]').down('mkommentargrid').readOnly = false; - this.enableStatusEdit(); - this.enableStatusReset(); + //this.enableStatusEdit(); + //this.enableStatusReset(); }, /**