Mercurial > lada > lada-client
comparison app/controller/Ort.js @ 1361:5c2d6812d85a
Merge behaviour of Stammdaten panel and ortszuordnungs grid
according to the recent changes in Ortszuordnung and Ortserstellung.
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Tue, 07 Feb 2017 19:50:36 +0100 |
parents | 053bd0cd9744 |
children | 993e542796fd |
comparison
equal
deleted
inserted
replaced
1360:d1dce50fa9a6 | 1361:5c2d6812d85a |
---|---|
53 var record = Ext.create('Lada.model.Ort'); | 53 var record = Ext.create('Lada.model.Ort'); |
54 map.activateDraw(record); | 54 map.activateDraw(record); |
55 }, | 55 }, |
56 | 56 |
57 addRecord: function(button) { | 57 addRecord: function(button) { |
58 var record = Ext.create('Lada.model.Ort'); | 58 Ext.create('Lada.view.window.Ortserstellung',{ |
59 record: Ext.create('Lada.model.Ort', {ortTyp: 1}), | |
60 parentWindow: button.up('ortpanel') | |
61 }).show(); | |
59 var grid = button.up('ortpanel').down('ortstammdatengrid'); | 62 var grid = button.up('ortpanel').down('ortstammdatengrid'); |
60 if (grid.getCollapsed()) { | 63 // if (grid.getCollapsed()) { |
61 grid.expand(); | 64 // grid.expand(); |
62 } | 65 // } |
63 if (!record.get('letzteAenderung')) { | |
64 record.data.letzteAenderung = new Date(); | |
65 } | |
66 grid.store.insert(0, record); | |
67 grid.rowEditing.startEdit(0, 1); | |
68 }, | 66 }, |
69 | 67 |
70 deleteItem: function(button) { | 68 deleteItem: function(button) { |
71 var grid = button.up('ortpanel').down('ortstammdatengrid'); | 69 var grid = button.up('ortpanel').down('ortstammdatengrid'); |
72 var selection = grid.getView().getSelectionModel().getSelection()[0]; | 70 var selection = grid.getView().getSelectionModel().getSelection()[0]; |