comparison app/view/widget/base/FieldSet.js @ 633:1e1534482bfd

Allow multiple warning- or error-messages in a fieldset.
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 16 Mar 2015 17:23:27 +0100
parents fead63bb5fb4
children f124d24c8ade
comparison
equal deleted inserted replaced
632:fead63bb5fb4 633:1e1534482bfd
10 extend: 'Ext.form.FieldSet', 10 extend: 'Ext.form.FieldSet',
11 alias: 'widget.fset', 11 alias: 'widget.fset',
12 12
13 plainTitle: '', 13 plainTitle: '',
14 origColor: '', 14 origColor: '',
15 errorText: '',
16 warningText: '',
15 17
16 showWarningOrError: function(warning, warningText, error, errorText) { 18 showWarningOrError: function(warning, warningText, error, errorText) {
17 var ndx = 0; 19 var ndx = 0;
18 if (this.collapsible === true) { 20 if (this.collapsible === true) {
19 ndx = 1; 21 ndx = 1;
20 } 22 }
23 if (this.errorText && this.errorText !== '') {
24 this.errorText += '\n';
25 }
26 this.errorText += errorText;
27 if (this.warningText && this.warningText !== '') {
28 this.warningText += '\n';
29 }
30 this.warningText += warningText;
21 this.plainTitle = this.getEl().dom.firstChild 31 this.plainTitle = this.getEl().dom.firstChild
22 .firstChild.firstChild 32 .firstChild.firstChild
23 .children[ndx].innerHTML; 33 .children[ndx].innerHTML;
24 this.origColor = this.getEl().dom.style['border-color']; 34 this.origColor = this.getEl().dom.style['border-color'];
25 if (error) { 35 if (error) {

http://lada.wald.intevation.org