[Lada-commits] [PATCH] Made changes to the edit button

Wald Commits scm-commit at wald.intevation.org
Wed Jan 20 17:24:21 CET 2016


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1453307019 -3600
# Branch stammdatengrids
# Node ID 52b02b0225e838dea79377a47499d55ebe75fe96
# Parent  9ac03f461ab441e0b4724daa95969aebf16693d5
Made changes to the edit button

diff -r 9ac03f461ab4 -r 52b02b0225e8 app/view/widget/DynamicGrid.js
--- a/app/view/widget/DynamicGrid.js	Wed Jan 20 12:32:42 2016 +0100
+++ b/app/view/widget/DynamicGrid.js	Wed Jan 20 17:23:39 2016 +0100
@@ -86,7 +86,12 @@
             tooltip: 'Probe öffnen',
             width: 30,
             getClass: function (val, meta, rec) {
-                return rec.get('readonly') === false ? "edit" : "noedit";
+                if ( rec.get('readonly') === false || rec.get('owner') ) {
+                        return 'edit';
+                }
+                else {
+                        return 'noedit';
+                }
             },
             handler: function(grid, rowIndex, colIndex) {
                 var rec = grid.getStore().getAt(rowIndex);


More information about the Lada-commits mailing list