Skip to content

Commit

Permalink
Merge pull request #61 from EmchBerger/12_columnSelection_col_width0
Browse files Browse the repository at this point in the history
12 column selection col width0
  • Loading branch information
SimonHeimberg authored Feb 28, 2018
2 parents e4405e5 + e0038f3 commit 7e84eed
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/Resources/public/cubecommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@ if (typeof(cubetools) === 'undefined') {
if (hide) {
// for some browsers, it is enough to set collapse on col
colGroupRule.style.setProperty('visibility', 'collapse', 'important');
colGroupRule.style.setProperty('width', '0px', 'important');
colGroupRule.style.setProperty('max-width', '0px', 'important');
// for the others, we set visibility and size 0 to the cells
cellsRule.style.setProperty('visibility', 'hidden', 'important');
cellsRule.style.setProperty('width', '0px', 'important');
cellsRule.style.setProperty('max-width', '0px', 'important');
cellsRule.style.setProperty('line-height', '0px', 'important');
// looks not necessary set padding and margin to 0 also
cellsRule.style.setProperty('padding', '0px', 'important');
cellsRule.style.setProperty('overflow', 'hidden', 'important');
} else {
colGroupRule.style.visibility = '';
colGroupRule.style.width = '';
colGroupRule.style.setProperty('max-width', '');
cellsRule.style.visibility = '';
cellsRule.style.width = '';
cellsRule.style.setProperty('max-width', '');
cellsRule.style.setProperty('line-height', '');
cellsRule.style.padding = '';
cellsRule.style.overflow = '';
}
};

Expand Down Expand Up @@ -246,6 +249,11 @@ if (typeof(cubetools) === 'undefined') {

cs.updateColumnView = function (colId, hide) {
var col = $('#'+colId);
if (0 === col.length) {
console.error('column with id #'+colId+' not found');

return;
}
var table = col.closest('table');
var id = table.find('.colsSelector').attr('id') || '';
var settings = cs.getHidableSettings(id);
Expand Down

0 comments on commit 7e84eed

Please sign in to comment.