comparison app/controller/Orte.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 73a2c114db64
children 12231f31c112
comparison
equal deleted inserted replaced
361:8a3991b5c200 362:6a7a9267e00f
94 ort.set('probeId', button.probeId); 94 ort.set('probeId', button.probeId);
95 var view = Ext.widget('ortecreate', {model: ort}); 95 var view = Ext.widget('ortecreate', {model: ort});
96 }, 96 },
97 editItem: function(grid, record) { 97 editItem: function(grid, record) {
98 console.log('Editing Ort'); 98 console.log('Editing Ort');
99 record.getAuthInfo(this.initEditWindow)
100 console.log("Loaded Ort with ID " + record.getId()); //outputs ID
101 },
102 initEditWindow: function(record, readonly, owner) {
99 var view = Ext.widget('ortecreate', {model: record}); 103 var view = Ext.widget('ortecreate', {model: record});
100 console.log("Loaded Ort with ID " + record.getId()); //outputs ID 104 var ignore = Array();
105 if (readonly) {
106 var form = view.down('form');
107 form.setReadOnly(true, ignore);
108 }
101 }, 109 },
102 createSuccess: function(form, record, operation) { 110 createSuccess: function(form, record, operation) {
103 // Reload store 111 // Reload store
104 var store = this.getOrteStore(); 112 var store = this.getOrteStore();
105 store.reload(); 113 store.reload();

http://lada.wald.intevation.org