[Lada-commits] [PATCH 2 of 6] Add detail button for 'Orte' table
Wald Commits
scm-commit at wald.intevation.org
Tue Dec 16 18:22:12 CET 2014
# HG changeset patch
# User Roland Geider <roland.geider at intevation.de>
# Date 1418741923 -3600
# Node ID de1acaf21db30f8717fe37cf78b6f0ac2cf058fd
# Parent 7a20e3054c9efbaee70d38c7adb99ec4fe7d9fa9
Add detail button for 'Orte' table
See LSB 3.5
diff -r 7a20e3054c9e -r de1acaf21db3 app/controller/Orte.js
--- a/app/controller/Orte.js Tue Dec 16 14:50:30 2014 +0100
+++ b/app/controller/Orte.js Tue Dec 16 15:58:43 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);
},
diff -r 7a20e3054c9e -r de1acaf21db3 app/view/orte/List.js
--- a/app/view/orte/List.js Tue Dec 16 14:50:30 2014 +0100
+++ b/app/view/orte/List.js Tue Dec 16 15:58:43 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',
More information about the Lada-commits
mailing list