comparison app/controller/Zusatzwerte.js @ 362:6a7a9267e00f

Issue56: Changed way how to set the form and window to readonly. Now all dialogs should habe proper readonly settings. Now the Save and Cancel button are displayed as needed.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 15 Aug 2013 14:07:35 +0200
parents 529da633b8e3
children d49a6fcd9f57
comparison
equal deleted inserted replaced
361:8a3991b5c200 362:6a7a9267e00f
42 zusatzwert.set('probeId', button.probeId); 42 zusatzwert.set('probeId', button.probeId);
43 var view = Ext.widget('zusatzwertecreate', {model: zusatzwert}); 43 var view = Ext.widget('zusatzwertecreate', {model: zusatzwert});
44 }, 44 },
45 editZusatzwert: function(grid, record) { 45 editZusatzwert: function(grid, record) {
46 console.log('Editing Zusatzwert'); 46 console.log('Editing Zusatzwert');
47 record.getAuthInfo(this.initEditWindow)
48 console.log("Loaded Zusatzwert with ID " + record.getId()); //outputs ID
49 },
50 initEditWindow: function(record, readonly, owner) {
47 var view = Ext.widget('zusatzwertecreate', {model: record}); 51 var view = Ext.widget('zusatzwertecreate', {model: record});
48 // Mark PZW Selection readonly. 52 // Mark PZW Selection readonly.
49 view.down('probenzusatzwert').disabled = true; 53 view.down('probenzusatzwert').disabled = true;
50 console.log("Loaded Zusatzwert with ID " + record.getId()); //outputs ID 54 var ignore = Array();
55 if (readonly) {
56 var form = view.down('form');
57 form.setReadOnly(true, ignore);
58 }
51 }, 59 },
52 createSuccess: function(form, record, operation) { 60 createSuccess: function(form, record, operation) {
53 // Reload store 61 // Reload store
54 var store = this.getZusatzwerteStore(); 62 var store = this.getZusatzwerteStore();
55 store.reload(); 63 store.reload();

http://lada.wald.intevation.org