Mercurial > lada > lada-client
changeset 636:f4f76fc04e28
merged.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 16 Mar 2015 17:32:15 +0100 |
parents | def8def373e8 (diff) b8d55860824d (current diff) |
children | 8acb3123b46c |
files | |
diffstat | 12 files changed, 83 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/panel/Map.js Mon Mar 16 13:20:36 2015 +0100 +++ b/app/view/panel/Map.js Mon Mar 16 17:32:15 2015 +0100 @@ -57,6 +57,7 @@ keyControl.activate(); this.bodyStyle = {background: '#fff'}; this.initData(); + this.tbar = Ext.create('Lada.view.widget.MapToolbar'); this.callParent(arguments); },
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/widget/MapToolbar.js Mon Mar 16 17:32:15 2015 +0100 @@ -0,0 +1,21 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +Ext.define('Lada.view.widget.MapToolbar', { + extend: 'Ext.toolbar.Toolbar', + alias: 'widget.maptoolbar', + + initComponent: function() { + this.items = [{ + icon: 'resources/img/list-add.png', + tooltip: 'Neuen Ort hinzufügen', + action: 'add' + }]; + this.callParent(arguments); + } +});
--- a/app/view/widget/base/CheckBox.js Mon Mar 16 13:20:36 2015 +0100 +++ b/app/view/widget/base/CheckBox.js Mon Mar 16 17:32:15 2015 +0100 @@ -30,16 +30,16 @@ }, { xtype: 'image', name: 'warnImg', - src: 'resources/img/icon-warning.gif', - width: 12, - height: 12, + src: 'resources/img/dialog-warning.png', + width: 14, + height: 14, hidden: true }, { xtype: 'image', name: 'errorImg', - src: 'resources/img/icon-error.gif', - width: 12, - height: 12, + src: 'resources/img/emblem-important.png', + width: 14, + height: 14, hidden: true }]; this.callParent(arguments); @@ -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); } },
--- a/app/view/widget/base/ComboBox.js Mon Mar 16 13:20:36 2015 +0100 +++ b/app/view/widget/base/ComboBox.js Mon Mar 16 17:32:15 2015 +0100 @@ -40,16 +40,16 @@ }, { xtype: 'image', name: 'warnImg', - src: 'resources/img/icon-warning.gif', - width: 12, - height: 12, + src: 'resources/img/dialog-warning.png', + width: 14, + height: 14, hidden: true }, { xtype: 'image', name: 'errorImg', - src: 'resources/img/icon-error.gif', - width: 12, - height: 12, + src: 'resources/img/emblem-important.png', + width: 14, + height: 14, hidden: true }]; this.callParent(arguments); @@ -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); } },
--- a/app/view/widget/base/Datetime.js Mon Mar 16 13:20:36 2015 +0100 +++ b/app/view/widget/base/Datetime.js Mon Mar 16 17:32:15 2015 +0100 @@ -35,16 +35,16 @@ this.items = [dateField, { xtype: 'image', name: 'warnImg', - src: 'resources/img/icon-warning.gif', - width: 12, - height: 12, + src: 'resources/img/dialog-warning.png', + width: 14, + height: 14, hidden: true }, { xtype: 'image', name: 'errorImg', - src: 'resources/img/icon-error.gif', - width: 12, - height: 12, + src: 'resources/img/emblem-important.png', + width: 14, + height: 14, hidden: true }]; this.callParent(arguments); @@ -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); } },
--- a/app/view/widget/base/FieldSet.js Mon Mar 16 13:20:36 2015 +0100 +++ b/app/view/widget/base/FieldSet.js Mon Mar 16 17:32:15 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; @@ -26,7 +36,7 @@ this.getEl().dom.style['border-color'] = '#FF0000'; this.getEl().dom.firstChild.firstChild.firstChild .children[ndx].innerHTML = - '<img src="resources/img/icon-error.gif" width="12" height="12" /> ' + + '<img src="resources/img/emblem-important.png" width="13" height="13" /> ' + this.plainTitle; if (errorText) { Ext.create('Ext.tip.ToolTip', { @@ -40,7 +50,7 @@ this.getEl().dom.style['border-color'] = '#FFE25D'; this.getEl().dom.firstChild.firstChild.firstChild .children[ndx].innerHTML = - '<img src="resources/img/icon-warning.gif" width="12" height="12" /> ' + + '<img src="resources/img/dialog-warning.png" width="13" height="13" /> ' + this.plainTitle; if (warningText) { Ext.create('Ext.tip.ToolTip', {
--- a/app/view/widget/base/TextField.js Mon Mar 16 13:20:36 2015 +0100 +++ b/app/view/widget/base/TextField.js Mon Mar 16 17:32:15 2015 +0100 @@ -28,16 +28,16 @@ }, { xtype: 'image', name: 'warnImg', - src: 'resources/img/icon-warning.gif', - width: 12, - height: 12, + src: 'resources/img/dialog-warning.png', + width: 14, + height: 14, hidden: true }, { xtype: 'image', name: 'errorImg', - src: 'resources/img/icon-error.gif', - width: 12, - height: 12, + src: 'resources/img/emblem-important.png', + width: 14, + height: 14, hidden: true }]; this.callParent(arguments); @@ -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); } },