From e2120bf6a22e8323893a50bd4c1690ceabd574b1 Mon Sep 17 00:00:00 2001 From: Max Guglielmi Date: Sun, 12 Apr 2015 20:24:32 +1000 Subject: [PATCH] Started columns visibility extension --- .../colsVisibility/colsVisibility.js | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src-es6/extensions/colsVisibility/colsVisibility.js b/src-es6/extensions/colsVisibility/colsVisibility.js index bcb58af8..065fa2fb 100644 --- a/src-es6/extensions/colsVisibility/colsVisibility.js +++ b/src-es6/extensions/colsVisibility/colsVisibility.js @@ -2,7 +2,7 @@ export class ColsVisibility{ /** - * SortableTable Adapter module + * Columns Visibility extension * @param {Object} tf TableFilter instance */ constructor(tf, ext){ @@ -21,5 +21,38 @@ export class ColsVisibility{ this.btnShowHideColsEl = null; //show/hide cols container div element this.showHideColsContEl = null; + + //tick to hide or show column + this.showHideColsTickToHide = Boolean( + f.showHide_cols_tick_to_hide || true); + //enables/disables cols manager generation + this.showHideColsManager = Boolean(f.showHide_cols_manager || true); + //only if external headers + this.showHideColsHeadersTbl = f.showHide_cols_headers_table || null; + //only if external headers + this.showHideColsHeadersIndex = f.showHide_cols_headers_index || 1; + //id of container element + this.showHideColsContElTgtId = + f.showHide_cols_container_target_id || null; + //alternative headers text + this.showHideColsHeadersText = f.showHide_cols_headers_text || null; + //id of button container element + this.btnShowHideColsTgtId = f.btn_showHide_cols_target_id || null; + //defines show/hide cols text + this.btnShowHideColsText = f.btn_showHide_cols_text || + 'Display columns▼'; + //defines show/hide cols button innerHtml + this.btnShowHideColsHtml = f.btn_showHide_cols_html || null; + //defines css class for show/hide cols button + this.btnShowHideColsCssClass = f.btn_showHide_cols_css_class || + 'showHideCols'; + //defines close link text + this.btnShowHideColsCloseText = f.btn_showHide_cols_close_text || + 'Close'; + //defines close button innerHtml + this.btnShowHideColsCloseHtml = f.btn_showHide_cols_close_html || null; + //defines css class for close button + this.btnShowHideColsCloseCssClass = + f.btn_showHide_cols_close_css_class || this.btnShowHideColsCssClass; } }