Mercurial > lada > lada-client
comparison app/controller/Messungen.js @ 499:8b4ec61c5752
Removed most log messages to make the application less verbose.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 06 Nov 2014 11:12:21 +0100 |
parents | 7c0653e8d9f7 |
children | 83a98b61546a |
comparison
equal
deleted
inserted
replaced
498:c1b77fb96b01 | 499:8b4ec61c5752 |
---|---|
24 'KommentareM', | 24 'KommentareM', |
25 'Status' | 25 'Status' |
26 ], | 26 ], |
27 | 27 |
28 init: function() { | 28 init: function() { |
29 console.log('Initialising the Messungen controller'); | |
30 this.callParent(); | 29 this.callParent(); |
31 }, | 30 }, |
32 | 31 |
33 addListeners: function() { | 32 addListeners: function() { |
34 this.control({ | 33 this.control({ |
57 } | 56 } |
58 }); | 57 }); |
59 }, | 58 }, |
60 | 59 |
61 saveItem: function(button) { | 60 saveItem: function(button) { |
62 console.log('Saving new Messung for Probe ' + button.probeId); | |
63 var form = button.up('window').down('form'); | 61 var form = button.up('window').down('form'); |
64 form.commit(); | 62 form.commit(); |
65 }, | 63 }, |
66 | 64 |
67 addItem: function(button) { | 65 addItem: function(button) { |
68 console.log('Adding new Messung for Probe ' + button.probeId); | |
69 var messung = Ext.create('Lada.model.Messung'); | 66 var messung = Ext.create('Lada.model.Messung'); |
70 messung.set('probeId', button.probeId); | 67 messung.set('probeId', button.probeId); |
71 Ext.widget('messungencreate', { | 68 Ext.widget('messungencreate', { |
72 model: messung | 69 model: messung |
73 }); | 70 }); |
74 }, | 71 }, |
75 | 72 |
76 editItem: function(grid, record) { | 73 editItem: function(grid, record) { |
77 console.log('Editing Messung'); | |
78 var kstore = this.getKommentareMStore(); | 74 var kstore = this.getKommentareMStore(); |
79 kstore.load({ | 75 kstore.load({ |
80 params: { | 76 params: { |
81 probeId: record.get('probeId'), | 77 probeId: record.get('probeId'), |
82 messungsId: record.get('id') | 78 messungsId: record.get('id') |
95 probeId: record.get('probeId'), | 91 probeId: record.get('probeId'), |
96 messungsId: record.get('id') | 92 messungsId: record.get('id') |
97 } | 93 } |
98 }); | 94 }); |
99 record.getAuthInfo(this.initEditWindow); | 95 record.getAuthInfo(this.initEditWindow); |
100 console.log('Loaded Messung with ID ' + record.getId()); | |
101 }, | 96 }, |
102 | 97 |
103 initEditWindow: function(record, readonly, owner) { | 98 initEditWindow: function(record, readonly, owner) { |
104 var view = Ext.widget('messungenedit', { | 99 var view = Ext.widget('messungenedit', { |
105 model: record | 100 model: record |
127 method: 'DELETE', | 122 method: 'DELETE', |
128 success: function() { | 123 success: function() { |
129 store.reload(); | 124 store.reload(); |
130 } | 125 } |
131 }); | 126 }); |
132 console.log('Deleting Messung'); | |
133 } | |
134 else { | |
135 console.log('Cancel Deleting Messung'); | |
136 } | 127 } |
137 }); | 128 }); |
138 }, | 129 }, |
139 | 130 |
140 createSuccess: function(form) { | 131 createSuccess: function(form) { |