X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=docs%2Fsrc%2FRoo_grid_ColumnModel.js.html;fp=docs%2Fsrc%2FRoo_grid_ColumnModel.js.html;h=8823ccaed6ec9ee4c6c9eb9c816a736acd4481a3;hp=1e16807401618ef7d3d12dbb8796edc9ab1165d5;hb=d81ddeecb21edfe27401017eb4d0cc01dfae425b;hpb=5a09638750d76b5c2f42753ab924401909761f61 diff --git a/docs/src/Roo_grid_ColumnModel.js.html b/docs/src/Roo_grid_ColumnModel.js.html index 1e16807401..8823ccaed6 100644 --- a/docs/src/Roo_grid_ColumnModel.js.html +++ b/docs/src/Roo_grid_ColumnModel.js.html @@ -108,6 +108,21 @@ Roo.extend(Roo.grid.ColumnModel, Roo.util.Observable, { /** * @cfg {String} header The header text to display in the Grid view. + */ + /** + * @cfg {String} xsHeader Header at Bootsrap Extra Small width (default for all) + */ + /** + * @cfg {String} smHeader Header at Bootsrap Small width + */ + /** + * @cfg {String} mdHeader Header at Bootsrap Medium width + */ + /** + * @cfg {String} lgHeader Header at Bootsrap Large width + */ + /** + * @cfg {String} xlHeader Header at Bootsrap extra Large width */ /** * @cfg {String} dataIndex (Optional) The name of the field in the grid's {@link Roo.data.Store}'s @@ -157,16 +172,19 @@ * @cfg {String} tooltip (Optional) */ /** - * @cfg {Number} xs (Optional) + * @cfg {Number} xs (Optional) can be '0' for hidden at this size (number less than 12) */ /** - * @cfg {Number} sm (Optional) + * @cfg {Number} sm (Optional) can be '0' for hidden at this size (number less than 12) */ /** - * @cfg {Number} md (Optional) + * @cfg {Number} md (Optional) can be '0' for hidden at this size (number less than 12) */ /** - * @cfg {Number} lg (Optional) + * @cfg {Number} lg (Optional) can be '0' for hidden at this size (number less than 12) + */ + /** + * @cfg {Number} xl (Optional) can be '0' for hidden at this size (number less than 12) */ /** * Returns the id of the column at the specified index. @@ -349,10 +367,29 @@ /** * Returns the width for the specified column. * @param {Number} col The column index + * @param (optional) {String} gridSize bootstrap width size. * @return {Number} */ - getColumnWidth : function(col){ - return this.config[col].width * 1 || this.defaultWidth; + getColumnWidth : function(col, gridSize) + { + var cfg = this.config[col]; + + if (typeof(gridSize) == 'undefined') { + return cfg.width * 1 || this.defaultWidth; + } + if (gridSize === false) { // if we set it.. + return cfg.width || false; + } + var sizes = ['xl', 'lg', 'md', 'sm', 'xs']; + + for(var i = sizes.indexOf(gridSize); i < sizes.length; i++) { + if (typeof(cfg[ sizes[i] ] ) == 'undefined') { + continue; + } + return cfg[ sizes[i] ]; + } + return 1; + }, /**