diff app/view/proben/List.js @ 258:62e92e470a1e

Fixed Issue44: Show locked or unlocked icon in the first column of the probenlist depending on the readonly flag.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 25 Jul 2013 11:01:52 +0200
parents 81aca4dd5f0c
children 6007d11b81c2
line wrap: on
line diff
--- 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 '&#128274;'
+    } else {
+        return '&#128275;'
+    }
+}

http://lada.wald.intevation.org