comparison 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
comparison
equal deleted inserted replaced
874:031b4431b1b8 875:13c0e64e1873
5 * and comes with ABSOLUTELY NO WARRANTY! Check out 5 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details. 6 * the documentation coming with IMIS-Labordaten-Application for details.
7 */ 7 */
8 8
9 /* 9 /*
10 * Window to edit a Messung 10 * Window to create a Messung
11 */ 11 */
12 Ext.define('Lada.view.window.MessungCreate', { 12 Ext.define('Lada.view.window.MessungCreate', {
13 extend: 'Ext.window.Window', 13 extend: 'Ext.window.Window',
14 alias: 'widget.messungcreate', 14 alias: 'widget.messungcreate',
15 15
22 autoshow: true, 22 autoshow: true,
23 autoscroll: true, 23 autoscroll: true,
24 layout: 'fit', 24 layout: 'fit',
25 constrain: true, 25 constrain: true,
26 26
27 probe: null,
27 record: null, 28 record: null,
28 grid: null, 29 grid: null,
29 30
30 initComponent: function() { 31 initComponent: function() {
31 this.title = 'Messung'; 32 this.probe = this.record;
33 if (this.probe === null) {
34 Ext.Msg.alert('Zu der Messung existiert keine Probe!');
35 this.callParent(arguments);
36 return;
37 }
38
39 var messstelle = Ext.data.StoreManager.get('messstellen')
40 .getById(this.probe.get('mstId'));
41
42 this.title = 'Neue Messung zu Probe: '
43 + this.probe.get('probeIdAlt')
44 + ' Mst: ' + messstelle.get('messStelle')
45 + ' hinzufügen.';
46
32 this.buttons = [{ 47 this.buttons = [{
33 text: 'Schließen', 48 text: 'Schließen',
34 scope: this, 49 scope: this,
35 handler: this.close 50 handler: this.close
36 }]; 51 }];

http://lada.wald.intevation.org