comparison app/controller/Status.js @ 500:ad7f574b382a

Fixed some js related issues (unused vars, arrays, etc.) and code style.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 06 Nov 2014 11:20:47 +0100
parents 8b4ec61c5752
children 6ad453afbc31
comparison
equal deleted inserted replaced
499:8b4ec61c5752 500:ad7f574b382a
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz 1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2 * Software engineering by Intevation GmbH 2 * Software engineering by Intevation GmbH
3 * 3 *
4 * This file is Free Software under the GNU GPL (v>=3) 4 * This file is Free Software under the GNU GPL (v>=3)
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 Ext.define('Lada.controller.Status', { 9 Ext.define('Lada.controller.Status', {
10 extend: 'Lada.controller.Base', 10 extend: 'Lada.controller.Base',
11 11
48 48
49 addItem: function(button) { 49 addItem: function(button) {
50 var zusatzwert = Ext.create('Lada.model.Status'); 50 var zusatzwert = Ext.create('Lada.model.Status');
51 zusatzwert.set('probeId', button.probeId); 51 zusatzwert.set('probeId', button.probeId);
52 zusatzwert.set('messungsId', button.parentId); 52 zusatzwert.set('messungsId', button.parentId);
53 var view = Ext.widget('statuscreate', { 53 Ext.widget('statuscreate', {
54 model: zusatzwert 54 model: zusatzwert
55 }); 55 });
56 }, 56 },
57 57
58 editItem: function(grid, record) { 58 editItem: function(grid, record) {
59 var mstore = Ext.data.StoreManager.get('Messungen'); 59 var mstore = Ext.data.StoreManager.get('Messungen');
60 var messung = mstore.getById(record.get('messungsId')); 60 var messung = mstore.getById(record.get('messungsId'));
61 record.getAuthInfo(this.initEditWindow, messung.get('probeId')); 61 record.getAuthInfo(this.initEditWindow, messung.get('probeId'));
62 }, 62 },
63 63
64 initEditWindow: function(record, readonly, owner) { 64 initEditWindow: function(record, readonly) {
65 var view = Ext.widget('statuscreate', { 65 var view = Ext.widget('statuscreate', {
66 model: record 66 model: record
67 }); 67 });
68 var ignore = Array(); 68 var ignore = [];
69 if (readonly) { 69 if (readonly) {
70 var form = view.down('form'); 70 var form = view.down('form');
71 form.setReadOnly(true, ignore); 71 form.setReadOnly(true, ignore);
72 } 72 }
73 }, 73 },
74 74
75 createSuccess: function(form, record, operation) { 75 createSuccess: function(form) {
76 // Reload store 76 // Reload store
77 var store = this.getStatusStore(); 77 var store = this.getStatusStore();
78 store.reload(); 78 store.reload();
79 var win = form.up('window'); 79 var win = form.up('window');
80 win.close(); 80 win.close();
81 }, 81 },
82 82
83 editSuccess: function(form, record, operation) { 83 editSuccess: function(form) {
84 // Reload store 84 // Reload store
85 var store = this.getStatusStore(); 85 var store = this.getStatusStore();
86 store.reload(); 86 store.reload();
87 var win = form.up('window'); 87 var win = form.up('window');
88 win.close(); 88 win.close();

http://lada.wald.intevation.org