Mercurial > lada > lada-client
changeset 875:13c0e64e1873
Applied Patch which was presented in the Workshop: Title of a Messung-Window contains more details
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Fri, 17 Jul 2015 15:10:30 +0200 |
parents | 031b4431b1b8 |
children | 6451d095ff4e |
files | app/view/window/MessungCreate.js app/view/window/MessungEdit.js |
diffstat | 2 files changed, 27 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/window/MessungCreate.js Fri Jul 17 15:05:37 2015 +0200 +++ b/app/view/window/MessungCreate.js Fri Jul 17 15:10:30 2015 +0200 @@ -7,7 +7,7 @@ */ /* - * Window to edit a Messung + * Window to create a Messung */ Ext.define('Lada.view.window.MessungCreate', { extend: 'Ext.window.Window', @@ -24,11 +24,26 @@ layout: 'fit', constrain: true, + probe: null, record: null, grid: null, initComponent: function() { - this.title = 'Messung'; + this.probe = this.record; + if (this.probe === null) { + Ext.Msg.alert('Zu der Messung existiert keine Probe!'); + this.callParent(arguments); + return; + } + + var messstelle = Ext.data.StoreManager.get('messstellen') + .getById(this.probe.get('mstId')); + + this.title = 'Neue Messung zu Probe: ' + + this.probe.get('probeIdAlt') + + ' Mst: ' + messstelle.get('messStelle') + + ' hinzufügen.'; + this.buttons = [{ text: 'Schließen', scope: this,
--- a/app/view/window/MessungEdit.js Fri Jul 17 15:05:37 2015 +0200 +++ b/app/view/window/MessungEdit.js Fri Jul 17 15:10:30 2015 +0200 @@ -43,7 +43,16 @@ this.callParent(arguments); return; } - this.title = 'Messung ' + this.record.get('nebenprobenNr'); + + var messstelle = Ext.data.StoreManager.get('messstellen') + .getById(this.probe.get('mstId')); + + this.title = 'Messung: ' + this.record.get('nebenprobenNr') + + ' zu Probe: ' + this.probe.get('probeIdAlt') + + ' Mst: ' + messstelle.get('messStelle') + + ' editieren.'; + + this.buttons = [{ text: 'Schließen', scope: this,