Mercurial > lada > lada-client
changeset 526:381066c87ba8
Merge
author | Roland Geider <roland.geider@intevation.de> |
---|---|
date | Tue, 16 Dec 2014 18:22:04 +0100 (2014-12-16) |
parents | 16fbbad55589 (current diff) 5960189e4461 (diff) |
children | 8b4ec83ddca3 f6e26b782eb2 |
files | |
diffstat | 9 files changed, 104 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/MKommentare.js Tue Dec 16 18:16:25 2014 +0100 +++ b/app/controller/MKommentare.js Tue Dec 16 18:22:04 2014 +0100 @@ -30,9 +30,9 @@ addListeners: function() { this.control({ - 'mkommentarelist': { - itemdblclick: this.editItem - }, + //'mkommentarelist': { + // itemdblclick: this.editItem + //}, 'mkommentarelist toolbar button[action=add]': { click: this.addItem },
--- a/app/controller/Messwert.js Tue Dec 16 18:16:25 2014 +0100 +++ b/app/controller/Messwert.js Tue Dec 16 18:22:04 2014 +0100 @@ -28,9 +28,9 @@ addListeners: function() { this.control({ - 'messwertelist': { - itemdblclick: this.editItem - }, + //'messwertelist': { + // itemdblclick: this.editItem + //}, 'messwertelist toolbar button[action=add]': { click: this.addItem },
--- a/app/controller/Orte.js Tue Dec 16 18:16:25 2014 +0100 +++ b/app/controller/Orte.js Tue Dec 16 18:22:04 2014 +0100 @@ -32,9 +32,9 @@ addListeners: function() { this.control({ - //'ortelist': { - // itemdblclick: this.editItem - //}, + 'ortelist toolbar button[action=open]': { + click: this.editItem + }, 'ortelist toolbar button[action=add]': { click: this.addItem }, @@ -145,7 +145,12 @@ }); }, - editItem: function(grid, record) { + editItem: function(button) { + var grid = button.up('grid'); + var selection = grid.getView().getSelectionModel().getSelection()[0]; + var ortId = selection.getId(); + var record = selection.store.getById(ortId); + record.getAuthInfo(this.initEditWindow); },
--- a/app/controller/Status.js Tue Dec 16 18:16:25 2014 +0100 +++ b/app/controller/Status.js Tue Dec 16 18:22:04 2014 +0100 @@ -23,9 +23,9 @@ addListeners: function() { this.control({ - 'statuslist': { - itemdblclick: this.editItem - }, + //'statuslist': { + // itemdblclick: this.editItem + //}, 'statuslist toolbar button[action=add]': { click: this.addItem },
--- a/app/view/messungen/List.js Tue Dec 16 18:16:25 2014 +0100 +++ b/app/view/messungen/List.js Tue Dec 16 18:22:04 2014 +0100 @@ -35,6 +35,10 @@ xtype: 'toolbar', dock: 'bottom', items: ['->', { + text: 'Details', + icon: 'gfx/document-open.png', + action: 'open' + }, { text: 'Hinzufügen', icon: 'gfx/list-add.png', action: 'add', @@ -43,10 +47,6 @@ text: 'Löschen', icon: 'gfx/list-remove.png', action: 'delete' - }, { - text: 'Öffnen', - icon: 'gfx/document-open.png', - action: 'open' }] }]; this.columns = [{
--- a/app/view/messwerte/List.js Tue Dec 16 18:16:25 2014 +0100 +++ b/app/view/messwerte/List.js Tue Dec 16 18:22:04 2014 +0100 @@ -27,6 +27,13 @@ parentId: null, initComponent: function() { + var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { + clicksToMoveEditor: 1, + autoCancel: false + }); + + this.plugins = [rowEditing]; + this.dockedItems = [{ xtype: 'toolbar', dock: 'bottom', @@ -44,19 +51,34 @@ }]; this.columns = [{ header: '<NWG', - dataIndex: 'messwertNwg' + dataIndex: 'messwertNwg', + editor: { + allowBlank: false + } }, { header: 'Messwert', - dataIndex: 'messwert' + dataIndex: 'messwert', + editor: { + xtype: 'numberfield', + allowBlank: false + } }, { header: 'Messfehler', - dataIndex: 'messfehler' + dataIndex: 'messfehler', + editor: { + xtype: 'numberfield', + allowBlank: false + } }, { header: 'Messgröße', dataIndex: 'messgroesseId', renderer: function(value) { var store = Ext.data.StoreManager.get('staMessgroessen'); return store.findRecord('id', value).get('messgroesse'); + }, + editor: { + xtype: 'messgroesse', + allowBlank: false } }, { header: 'Messeinheit', @@ -64,6 +86,10 @@ renderer: function(value) { var store = Ext.data.StoreManager.get('staMesseinheiten'); return store.findRecord('id', value).get('einheit'); + }, + editor: { + xtype: 'messeinheit', + allowBlank: false } }, { header: 'Grenzwertüberschreitung', @@ -74,6 +100,9 @@ return 'Ja'; } return 'Nein'; + }, + editor: { + xtype: 'checkboxfield' } }]; this.callParent(arguments);
--- a/app/view/mkommentare/List.js Tue Dec 16 18:16:25 2014 +0100 +++ b/app/view/mkommentare/List.js Tue Dec 16 18:22:04 2014 +0100 @@ -27,6 +27,13 @@ parentId: null, initComponent: function() { + var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { + clicksToMoveEditor: 1, + autoCancel: false + }); + + this.plugins = [rowEditing]; + this.dockedItems = [{ xtype: 'toolbar', dock: 'bottom', @@ -44,14 +51,26 @@ }]; this.columns = [{ header: 'Erzeuger', - dataIndex: 'erzeuger' + dataIndex: 'erzeuger', + editor: { + allowBlank: false + } }, { header: 'Datum', - dataIndex: 'datum' + dataIndex: 'datum', + editor: { + xtype: 'datefield', + allowBlank: false, + format: 'd.m.Y', + maxValue: Ext.Date.format(new Date(), 'd.m.Y') + } }, { header: 'Text', dataIndex: 'text', - flex: 1 + flex: 1, + editor: { + allowBlank: false + } }]; this.callParent(arguments); }
--- a/app/view/orte/List.js Tue Dec 16 18:16:25 2014 +0100 +++ b/app/view/orte/List.js Tue Dec 16 18:22:04 2014 +0100 @@ -38,6 +38,10 @@ xtype: 'toolbar', dock: 'bottom', items: ['->', { + text: 'Details', + icon: 'gfx/document-open.png', + action: 'open' + }, { text: 'Hinzufügen', icon: 'gfx/list-add.png', action: 'add',
--- a/app/view/status/List.js Tue Dec 16 18:16:25 2014 +0100 +++ b/app/view/status/List.js Tue Dec 16 18:22:04 2014 +0100 @@ -27,6 +27,11 @@ probeId: null, initComponent: function() { + var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { + clicksToMoveEditor: 1, + autoCancel: false + }); + this.plugins = [rowEditing]; this.dockedItems = [{ xtype: 'toolbar', dock: 'bottom', @@ -44,17 +49,32 @@ }]; this.columns = [{ header: 'Erzeuger', - dataIndex: 'erzeuger' + dataIndex: 'erzeuger', + editor: { + allowBlank: false + } }, { header: 'Status', - dataIndex: 'status' + dataIndex: 'status', + editor: { + allowBlank: false + } }, { header: 'Datum', - dataIndex: 'datum' + dataIndex: 'datum', + editor: { + xtype: 'datefield', + allowBlank: false, + format: 'd.m.Y', + maxValue: Ext.Date.format(new Date(), 'd.m.Y') + } }, { header: 'Text', dataIndex: 'kommentar', - flex: 1 + flex: 1, + editor: { + allowBlank: true + } }]; this.callParent(arguments); }