diff app/view/grid/Messung.js @ 1257:9a428be3907b

add action button in Messung grid and Ortszuordnung grid
author Michael Stanko <mstanko@bfs.de>
date Mon, 21 Nov 2016 08:07:54 +0100
parents 4270da0f7d3b
children 0e081a9badbc
line wrap: on
line diff
--- a/app/view/grid/Messung.js	Fri Nov 18 19:46:15 2016 +0100
+++ b/app/view/grid/Messung.js	Mon Nov 21 08:07:54 2016 +0100
@@ -45,6 +45,22 @@
             }]
         }];
         this.columns = [{
+            xtype: 'actioncolumn',
+            text: '',
+            dataIndex: 'readonly',
+            sortable: false,
+            width: 30,
+            getClass: function (val, meta, rec) {
+                if (rec.get('readonly') === false) {
+                        return 'edit';
+                }
+                return 'noedit';
+            },
+            handler: function(grid, rowIndex, colIndex) {
+                var rec = grid.getStore().getAt(rowIndex);
+                grid.fireEvent('itemdblclick', grid, rec);
+            }
+        }, {
             header: 'Nebenproben-Nr.',
             dataIndex: 'nebenprobenNr',
             flex: 1,

http://lada.wald.intevation.org