Mercurial > lada > lada-client
changeset 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 | dbd96a7c31a3 |
children | d19ad9d28de5 |
files | app/view/proben/List.js |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
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 '🔒' + } else { + return '🔓' + } +}