Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/controller/Zusatzwerte.js Thu Aug 15 14:05:08 2013 +0200 +++ b/app/controller/Zusatzwerte.js Thu Aug 15 14:07:35 2013 +0200 @@ -44,10 +44,18 @@ }, editZusatzwert: function(grid, record) { console.log('Editing Zusatzwert'); + record.getAuthInfo(this.initEditWindow) + console.log("Loaded Zusatzwert with ID " + record.getId()); //outputs ID + }, + initEditWindow: function(record, readonly, owner) { var view = Ext.widget('zusatzwertecreate', {model: record}); // Mark PZW Selection readonly. view.down('probenzusatzwert').disabled = true; - console.log("Loaded Zusatzwert with ID " + record.getId()); //outputs ID + var ignore = Array(); + if (readonly) { + var form = view.down('form'); + form.setReadOnly(true, ignore); + } }, createSuccess: function(form, record, operation) { // Reload store