diff app/view/grid/Messung.js @ 1033:e4b6b6c5fb89

Use 'owner' attribute to set messung grid and button RO status.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 18 Feb 2016 11:19:25 +0100
parents fa04558f35cd
children 4d4de99bbe53
line wrap: on
line diff
--- a/app/view/grid/Messung.js	Thu Feb 18 11:16:55 2016 +0100
+++ b/app/view/grid/Messung.js	Thu Feb 18 11:19:25 2016 +0100
@@ -273,7 +273,9 @@
     activateRemoveButton: function(selection, record) {
         var grid = this;
         //only enable the remove buttone, when the grid is editable.
-        if (! grid.readOnly) {
+        if (! grid.readOnly &&
+            record.get('statusWert') === 0 &&
+            record.get('owner')) {
             grid.down('button[action=delete]').enable();
         }
     },

http://lada.wald.intevation.org