Mercurial > lada > lada-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
257:dbd96a7c31a3 | 258:62e92e470a1e |
---|---|
39 this.columns = []; | 39 this.columns = []; |
40 this.callParent(arguments); | 40 this.callParent(arguments); |
41 }, | 41 }, |
42 setupColumns: function(cols) { | 42 setupColumns: function(cols) { |
43 var rcols = [] | 43 var rcols = [] |
44 rcols.push({header: 'RW', dataIndex: 'readonly', width: 30, renderer: render_readonly}); | |
44 for (var i = cols.length - 1; i >= 0; i--){ | 45 for (var i = cols.length - 1; i >= 0; i--){ |
45 rcols.push(cols[i]); | 46 rcols.push(cols[i]); |
46 }; | 47 }; |
47 this.reconfigure(this.store, rcols); | 48 this.reconfigure(this.store, rcols); |
48 } | 49 } |
49 }); | 50 }); |
51 | |
52 function render_readonly (value) { | |
53 if (value) { | |
54 return '🔒' | |
55 } else { | |
56 return '🔓' | |
57 } | |
58 } |