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

http://lada.wald.intevation.org