# HG changeset patch # User Raimund Renkert # Date 1426523535 -3600 # Node ID f4f76fc04e2864cc5cf8e732e776011058013a9d # Parent def8def373e8e31e82c7cfb30055601b11f6f014# Parent b8d55860824d502ad4b48023fe06314b7438f659 merged. diff -r b8d55860824d -r f4f76fc04e28 app/view/panel/Map.js --- 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); }, diff -r b8d55860824d -r f4f76fc04e28 app/view/widget/MapToolbar.js --- /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); + } +}); diff -r b8d55860824d -r f4f76fc04e28 app/view/widget/base/CheckBox.js --- 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); } }, diff -r b8d55860824d -r f4f76fc04e28 app/view/widget/base/ComboBox.js --- 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); } }, diff -r b8d55860824d -r f4f76fc04e28 app/view/widget/base/Datetime.js --- 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); } }, diff -r b8d55860824d -r f4f76fc04e28 app/view/widget/base/FieldSet.js --- 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 = - ' ' + + ' ' + 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 = - ' ' + + ' ' + this.plainTitle; if (warningText) { Ext.create('Ext.tip.ToolTip', { diff -r b8d55860824d -r f4f76fc04e28 app/view/widget/base/TextField.js --- 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); } }, diff -r b8d55860824d -r f4f76fc04e28 resources/i18n/Lada_de-DE.properties --- a/resources/i18n/Lada_de-DE.properties Mon Mar 16 13:20:36 2015 +0100 +++ b/resources/i18n/Lada_de-DE.properties Mon Mar 16 17:32:15 2015 +0100 @@ -30,3 +30,4 @@ # Field names ## entnahmeOrt: Entnahmeort +test: Testdatensatz diff -r b8d55860824d -r f4f76fc04e28 resources/img/dialog-warning.png Binary file resources/img/dialog-warning.png has changed diff -r b8d55860824d -r f4f76fc04e28 resources/img/emblem-important.png Binary file resources/img/emblem-important.png has changed diff -r b8d55860824d -r f4f76fc04e28 resources/img/icon-error.gif Binary file resources/img/icon-error.gif has changed diff -r b8d55860824d -r f4f76fc04e28 resources/img/icon-warning.gif Binary file resources/img/icon-warning.gif has changed