[Lada-commits] [PATCH] Fixed Issue44: Show locked or unlocked icon in the first column of the

Wald Commits scm-commit at wald.intevation.org
Thu Jul 25 11:03:05 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1374742912 -7200
# Node ID 62e92e470a1ea8fb964826dd3c33b87f4c9c386d
# Parent  dbd96a7c31a337aa6eb652061d1062d60b1ec2be
Fixed Issue44: Show locked or unlocked icon in the first column of the
probenlist depending on the readonly flag.

diff -r dbd96a7c31a3 -r 62e92e470a1e app/view/proben/List.js
--- a/app/view/proben/List.js	Thu Jul 25 10:32:12 2013 +0200
+++ b/app/view/proben/List.js	Thu Jul 25 11:01:52 2013 +0200
@@ -41,9 +41,18 @@
     },
     setupColumns: function(cols) {
         var rcols = []
+        rcols.push({header: 'RW', dataIndex: 'readonly', width: 30, renderer: render_readonly});
         for (var i = cols.length - 1; i >= 0; i--){
             rcols.push(cols[i]);
         };
         this.reconfigure(this.store, rcols);
     }
 });
+
+function render_readonly (value) {
+    if (value) {
+        return '🔒'
+    } else {
+        return '🔓'
+    }
+}


More information about the Lada-commits mailing list