comparison app/controller/MKommentare.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 e95662994c50
children debfcc7713e3
comparison
equal deleted inserted replaced
361:8a3991b5c200 362:6a7a9267e00f
43 kommentar.set('messungsId', button.parentId); 43 kommentar.set('messungsId', button.parentId);
44 var view = Ext.widget('mkommentarecreate', {model: kommentar}); 44 var view = Ext.widget('mkommentarecreate', {model: kommentar});
45 }, 45 },
46 editItem: function(grid, record) { 46 editItem: function(grid, record) {
47 console.log('Editing Kommentar'); 47 console.log('Editing Kommentar');
48 record.getAuthInfo(this.initEditWindow)
49 console.log("Loaded MKommentar with ID " + record.getId()); //outputs ID
50 },
51 initEditWindow: function(record, readonly, owner) {
48 var view = Ext.widget('mkommentarecreate', {model: record}); 52 var view = Ext.widget('mkommentarecreate', {model: record});
49 console.log("Loaded MKommentar with ID " + record.getId()); //outputs ID 53 var ignore = Array();
54 if (readonly) {
55 var form = view.down('form');
56 form.setReadOnly(true, ignore);
57 }
50 }, 58 },
51 createSuccess: function(form, record, operation) { 59 createSuccess: function(form, record, operation) {
52 // Reload store 60 // Reload store
53 var store = this.getMKommentareStore(); 61 var store = this.getMKommentareStore();
54 store.reload(); 62 store.reload();

http://lada.wald.intevation.org