[Lada-commits] [PATCH 2 of 5] Allow multiple warning- or error-messages in a fieldset
Wald Commits
scm-commit at wald.intevation.org
Mon Mar 16 17:31:22 CET 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1426523007 -3600
# Node ID 1e1534482bfd67645fd0c38c83409f9fdb4699ad
# Parent fead63bb5fb4307bc969d08b3428634fe1349586
Allow multiple warning- or error-messages in a fieldset.
diff -r fead63bb5fb4 -r 1e1534482bfd app/view/widget/base/FieldSet.js
--- a/app/view/widget/base/FieldSet.js Mon Mar 16 17:09:15 2015 +0100
+++ b/app/view/widget/base/FieldSet.js Mon Mar 16 17:23:27 2015 +0100
@@ -12,12 +12,22 @@
plainTitle: '',
origColor: '',
+ errorText: '',
+ warningText: '',
showWarningOrError: function(warning, warningText, error, errorText) {
var ndx = 0;
if (this.collapsible === true) {
ndx = 1;
}
+ if (this.errorText && this.errorText !== '') {
+ this.errorText += '\n';
+ }
+ this.errorText += errorText;
+ if (this.warningText && this.warningText !== '') {
+ this.warningText += '\n';
+ }
+ this.warningText += warningText;
this.plainTitle = this.getEl().dom.firstChild
.firstChild.firstChild
.children[ndx].innerHTML;
More information about the Lada-commits
mailing list