=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js 2015-03-31 13:02:15 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js 2015-03-31 14:29:54 +0000 @@ -2168,8 +2168,6 @@ rowSpan = config.rowSpan ? 'rowspan="' + config.rowSpan + '" ' : ''; htmlValue = getHtmlValue(config); htmlValue = config.type !== 'dimension' ? support.prototype.number.prettyPrint(htmlValue, xLayout.digitGroupSeparator) : htmlValue; - displayDensity = conf.pivot.displayDensity[config.displayDensity] || conf.pivot.displayDensity[xLayout.displayDensity]; - fontSize = conf.pivot.fontSize[config.fontSize] || conf.pivot.fontSize[xLayout.fontSize]; cls += config.hidden ? ' td-hidden' : ''; cls += config.collapsed ? ' td-collapsed' : ''; @@ -2200,7 +2198,7 @@ //html += ''; //} //else { - html += 'style="' + (bgColor && isValue ? 'color:' + bgColor + '; ' : '') + 'padding:' + displayDensity + '; font-size:' + fontSize + ';"' + '>' + htmlValue + ''; + html += 'style="' + (bgColor && isValue ? 'color:' + bgColor + '; ' : '') + '">' + htmlValue + ''; //} return html; @@ -2844,13 +2842,19 @@ }; getHtml = function() { - var s = ''; + var cls = 'pivot', + table; + + cls += xLayout.displayDensity && xLayout.displayDensity !== 'normal' ? ' displaydensity-' + xLayout.displayDensity : ''; + cls += xLayout.fontSize && xLayout.fontSize !== 'normal' ? ' fontsize-' + xLayout.fontSize : ''; + + table = '
'; for (var i = 0; i < htmlArray.length; i++) { - s += '' + htmlArray[i].join('') + ''; + table += '' + htmlArray[i].join('') + ''; } - return s += '
'; + return table += ''; }; // get html === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/styles/style.css' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/styles/style.css 2015-03-09 13:00:44 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/styles/style.css 2015-03-31 14:29:54 +0000 @@ -189,6 +189,21 @@ -ms-user-select: all; user-select: all; } + +table.pivot.displaydensity-comfortable td { + padding: 7px; +} +table.pivot.displaydensity-compact td { + padding: 3px; +} + +table.pivot.fontsize-large td { + font-size: 13px; +} +table.pivot.fontsize-small td { + font-size: 10px; +} + .pivot td { padding: 5px; border: 1px solid #b2b2b2;