Mercurial > lada > lada-client
diff app/view/form/Ortszuordnung.js @ 1022:6d33a84979e4 stammdatengrids
More work on the Ortszuordnung grid. Saving does not work yet
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Mon, 08 Feb 2016 10:33:25 +0100 |
parents | 1df6b6210b42 |
children | 1bd4c0709bd6 |
line wrap: on
line diff
--- a/app/view/form/Ortszuordnung.js Thu Feb 04 16:31:46 2016 +0100 +++ b/app/view/form/Ortszuordnung.js Mon Feb 08 10:33:25 2016 +0100 @@ -26,7 +26,7 @@ record: null, - //trackResetOnLoad: true, + trackResetOnLoad: true, initComponent: function() { var i18n = Lada.getApplication().bundle; @@ -83,6 +83,7 @@ fieldLabel: i18n.getMsg('ortszuordnung.form.field.ortszuordnungtyp'), }, { xtype: 'textfield', + submitValue: true, readOnly: true, hidden: true, name: 'ortId' @@ -119,12 +120,11 @@ else { this.setReadOnly(true); } - this.refreshOrt(); + var ortId = this.getRecord().get('ortId'); + this.refreshOrt(ortId); }, - refreshOrt: function() { - var ortId = this.getRecord().get('ortId'); - + refreshOrt: function(ortId) { var orteStore = Ext.StoreManager.get('orte'); var ort = orteStore.getById(ortId); var verwStore = Ext.StoreManager.get('verwaltungseinheiten'); @@ -145,18 +145,16 @@ */ setOrt: function(row, selRecord, index, opts) { - console.log('setOrt' + Date.now()); var newOrtId = selRecord.get('id'); var r = this.getRecord(); if (newOrtId) { if (newOrtId != r.get('ortId')) { this.getForm().setValues({ ortId: newOrtId}); - this.refreshOrt(); + this.refreshOrt(newOrtId); //set dirty... - //this.fireEvent('dirtychange', this.getForm(), true); + this.fireEvent('dirtychange', this.getForm(), true); } } - console.log('setOrtEnd' + Date.now()); }, setMessages: function(errors, warnings) {