[Lada-commits] [PATCH] Disable the statusresetbutton
Wald Commits
scm-commit at wald.intevation.org
Fri Jan 8 14:43:49 CET 2016
# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1452260621 -3600
# Node ID c943340176d45c9b10d39a272b53a465072007ec
# Parent bf7bb9583a4036684ec915694a4ae4f6782f9550
Disable the statusresetbutton
diff -r bf7bb9583a40 -r c943340176d4 app/view/form/Messung.js
--- a/app/view/form/Messung.js Fri Jan 08 14:34:27 2016 +0100
+++ b/app/view/form/Messung.js Fri Jan 08 14:43:41 2016 +0100
@@ -170,6 +170,7 @@
var i18n = Lada.getApplication().bundle;
var msg = i18n.getMsg('load.statuswert');
var textfield = this.down('[name=status]');
+ var messwin = this.up('window');
if(textfield) {
textfield.setRawValue(msg);
@@ -192,6 +193,17 @@
}
this.setStatusWert(sw);
this.setStatusStufe(ss);
+
+ // Enable / Disable the statusreset button of the statusgrid of the messungform
+ if (messwin.record.get('statusEdit') === true &&
+ sw != 0 &&
+ sw != 4) {
+ messwin.enableStatusReset();
+ }
+ else {
+ messwin.disableStatusReset();
+ }
+
},
scope: this
});
diff -r bf7bb9583a40 -r c943340176d4 app/view/window/MessungEdit.js
--- a/app/view/window/MessungEdit.js Fri Jan 08 14:34:27 2016 +0100
+++ b/app/view/window/MessungEdit.js Fri Jan 08 14:43:41 2016 +0100
@@ -178,14 +178,7 @@
else {
this.disableStatusEdit();
}
- //Check if it is allowed to reset Status
- // TODO additional requirements?
- if (this.record.get('statusEdit') === true) {
- this.enableStatusReset();
- }
- else {
- this.disableStatusReset();
- }
+ //Check if it is allowed to reset Status: done in Messungform
},
scope: this
});
More information about the Lada-commits
mailing list