Mercurial > lada > lada-client
diff app/view/proben/List.js @ 348:6007d11b81c2
Added documentation
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 13 Aug 2013 11:34:47 +0200 |
parents | 62e92e470a1e |
children | b8bd8d9a93ab |
line wrap: on
line diff
--- a/app/view/proben/List.js Tue Aug 13 11:23:51 2013 +0200 +++ b/app/view/proben/List.js Tue Aug 13 11:34:47 2013 +0200 @@ -1,3 +1,6 @@ +/* + * Grid to list Proben + */ Ext.define('Lada.view.proben.List' ,{ extend: 'Ext.grid.Panel', alias: 'widget.probenlist', @@ -39,6 +42,12 @@ this.columns = []; this.callParent(arguments); }, + /** + * Setup columns of the Grid dynamically based on a list of given cols. + * The function is called from the {@link Lada.controllers.Sql#selectSql + * select sql event} + * @parameter {Array} List of cols to show in the Grid. + */ setupColumns: function(cols) { var rcols = [] rcols.push({header: 'RW', dataIndex: 'readonly', width: 30, renderer: render_readonly}); @@ -49,6 +58,10 @@ } }); +/** + * Helper function to render a readonly symbol per row in the grid + * @param {Boolean} flag if the symbol is a readonly symbol. + */ function render_readonly (value) { if (value) { return '🔒'