[Lada-commits] [PATCH 3 of 5] Set translateable messages for the parent fieldset
Wald Commits
scm-commit at wald.intevation.org
Mon Mar 16 17:31:23 CET 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1426523473 -3600
# Node ID 291ac2e2bcf532dea125fc72bc6c5097dae65ef3
# Parent 1e1534482bfd67645fd0c38c83409f9fdb4699ad
Set translateable messages for the parent fieldset.
diff -r 1e1534482bfd -r 291ac2e2bcf5 app/view/widget/base/CheckBox.js
--- a/app/view/widget/base/CheckBox.js Mon Mar 16 17:23:27 2015 +0100
+++ b/app/view/widget/base/CheckBox.js Mon Mar 16 17:31:13 2015 +0100
@@ -56,7 +56,9 @@
img.show();
var fieldset = this.up('fieldset[collapsible=true]');
if (fieldset) {
- fieldset.showWarnings(warnings);
+ var i18n = Lada.getApplication().bundle;
+ var warningText = i18n.getMsg(this.name) + ': ' + warnings;
+ fieldset.showWarningOrError(true, warningText);
}
},
@@ -73,7 +75,9 @@
img.show();
var fieldset = this.up('fieldset[collapsible=true]');
if (fieldset) {
- fieldset.showErrors();
+ var i18n = Lada.getApplication().bundle;
+ var errorText = i18n.getMsg(this.name) + ': ' + errors;
+ fieldset.showWarningOrError(false, '', true, errorText);
}
},
diff -r 1e1534482bfd -r 291ac2e2bcf5 app/view/widget/base/ComboBox.js
--- a/app/view/widget/base/ComboBox.js Mon Mar 16 17:23:27 2015 +0100
+++ b/app/view/widget/base/ComboBox.js Mon Mar 16 17:31:13 2015 +0100
@@ -66,7 +66,9 @@
img.show();
var fieldset = this.up('fieldset[collapsible=true]');
if (fieldset) {
- fieldset.showWarnings(warnings);
+ var i18n = Lada.getApplication().bundle;
+ var warningText = i18n.getMsg(this.name) + ': ' + warnings;
+ fieldset.showWarningOrError(true, warningText);
}
},
@@ -83,7 +85,9 @@
img.show();
var fieldset = this.up('fieldset[collapsible=true]');
if (fieldset) {
- fieldset.showErrors();
+ var i18n = Lada.getApplication().bundle;
+ var errorText = i18n.getMsg(this.name) + ': ' + errors;
+ fieldset.showWarningOrError(false, '', true, errorText);
}
},
diff -r 1e1534482bfd -r 291ac2e2bcf5 app/view/widget/base/Datetime.js
--- a/app/view/widget/base/Datetime.js Mon Mar 16 17:23:27 2015 +0100
+++ b/app/view/widget/base/Datetime.js Mon Mar 16 17:31:13 2015 +0100
@@ -61,7 +61,9 @@
img.show();
var fieldset = this.up('fieldset[collapsible=true]');
if (fieldset) {
- fieldset.showWarnings(warnings);
+ var i18n = Lada.getApplication().bundle;
+ var warningText = i18n.getMsg(this.name) + ': ' + warnings;
+ fieldset.showWarningOrError(true, warningText);
}
},
@@ -78,7 +80,9 @@
img.show();
var fieldset = this.up('fieldset[collapsible=true]');
if (fieldset) {
- fieldset.showErrors();
+ var i18n = Lada.getApplication().bundle;
+ var errorText = i18n.getMsg(this.name) + ': ' + errors;
+ fieldset.showWarningOrError(false, '', true, errorText);
}
},
diff -r 1e1534482bfd -r 291ac2e2bcf5 app/view/widget/base/TextField.js
--- a/app/view/widget/base/TextField.js Mon Mar 16 17:23:27 2015 +0100
+++ b/app/view/widget/base/TextField.js Mon Mar 16 17:31:13 2015 +0100
@@ -54,7 +54,9 @@
this.down('textfield').markInvalid('');
var fieldset = this.up('fieldset[collapsible=true]');
if (fieldset) {
- fieldset.showWarnings(warnings);
+ var i18n = Lada.getApplication().bundle;
+ var warningText = i18n.getMsg(this.name) + ': ' + warnings;
+ fieldset.showWarningOrError(true, warningText);
}
},
@@ -71,7 +73,9 @@
img.show();
var fieldset = this.up('fieldset[collapsible=true]');
if (fieldset) {
- fieldset.showErrors();
+ var i18n = Lada.getApplication().bundle;
+ var errorText = i18n.getMsg(this.name) + ': ' + errors;
+ fieldset.showWarningOrError(false, '', true, errorText);
}
},
diff -r 1e1534482bfd -r 291ac2e2bcf5 resources/i18n/Lada_de-DE.properties
--- a/resources/i18n/Lada_de-DE.properties Mon Mar 16 17:23:27 2015 +0100
+++ b/resources/i18n/Lada_de-DE.properties Mon Mar 16 17:31:13 2015 +0100
@@ -30,3 +30,4 @@
# Field names
##
entnahmeOrt: Entnahmeort
+test: Testdatensatz
More information about the Lada-commits
mailing list