Mercurial > lada > lada-client
diff app/view/window/MessungCreate.js @ 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 | 6f6d2df00130 |
children | def27cdd0dfa |
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,