dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36720
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18783: PT table classes.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18783 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-03-31 16:30:51 +0200
message:
PT table classes.
modified:
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/styles/style.css
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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 += '</div></div></div></td>';
//}
//else {
- html += 'style="' + (bgColor && isValue ? 'color:' + bgColor + '; ' : '') + 'padding:' + displayDensity + '; font-size:' + fontSize + ';"' + '>' + htmlValue + '</td>';
+ html += 'style="' + (bgColor && isValue ? 'color:' + bgColor + '; ' : '') + '">' + htmlValue + '</td>';
//}
return html;
@@ -2844,13 +2842,19 @@
};
getHtml = function() {
- var s = '<table id="' + xLayout.tableUuid + '" class="pivot">';
+ var cls = 'pivot',
+ table;
+
+ cls += xLayout.displayDensity && xLayout.displayDensity !== 'normal' ? ' displaydensity-' + xLayout.displayDensity : '';
+ cls += xLayout.fontSize && xLayout.fontSize !== 'normal' ? ' fontsize-' + xLayout.fontSize : '';
+
+ table = '<table id="' + xLayout.tableUuid + '" class="' + cls + '">';
for (var i = 0; i < htmlArray.length; i++) {
- s += '<tr>' + htmlArray[i].join('') + '</tr>';
+ table += '<tr>' + htmlArray[i].join('') + '</tr>';
}
- return s += '</table>';
+ return table += '</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;