dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20872
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9726: (PT) Cell bgcolor fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 9726 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-02-05 10:28:05 +0100
message:
(PT) Cell bgcolor fixed.
modified:
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/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-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-02-05 08:16:05 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-02-05 09:27:19 +0000
@@ -398,6 +398,7 @@
getColItems,
getRowItems,
createTableArray,
+ addClasses,
initialize;
getDimensionItemsFromSettings = function() {
@@ -726,7 +727,7 @@
return {
colspan: pt.config.rows.dims,
rowspan: pt.config.cols.dims,
- baseCls: 'empty'
+ baseCls: 'pivot-empty'
};
};
@@ -744,14 +745,14 @@
colItems.push({
html: response.metaData[id],
colspan: colSpan,
- baseCls: 'dim'
+ baseCls: 'pivot-dim'
});
if (i === 0 && j === (dimItems.length - 1)) {
colItems.push({
html: 'Total',
rowspan: cols.dims,
- baseCls: 'dimtotal'
+ baseCls: 'pivot-dimtotal'
});
}
}
@@ -808,7 +809,7 @@
id: id,
value: value,
html: value.toString(),
- baseCls: 'value',
+ baseCls: 'pivot-value',
cls: cls
});
}
@@ -829,7 +830,7 @@
totalRowHtmlItems.push({
value: rowSum,
html: rowSum.toString(),
- baseCls: 'valuetotal'
+ baseCls: 'pivot-valuetotal'
});
}
@@ -851,7 +852,7 @@
totalColHtmlItems.push({
value: colSum,
html: colSum.toString(),
- baseCls: 'valuetotal'
+ baseCls: 'pivot-valuetotal'
});
}
@@ -862,7 +863,7 @@
grandTotalHtmlItem = {
value: grandTotalItem,
html: grandTotalItem.toString(),
- baseCls: 'valuegrandtotal'
+ baseCls: 'pivot-valuegrandtotal'
};
// GUI
@@ -876,7 +877,7 @@
dimHtmlItems.push({
html: response.metaData[object.id],
rowspan: object.rowSpan,
- baseCls: 'dim'
+ baseCls: 'pivot-dim'
});
}
}
@@ -889,7 +890,7 @@
dimHtmlItems.push({
html: 'Total',
colspan: rows.dims,
- baseCls: 'dimtotal'
+ baseCls: 'pivot-dimtotal'
});
dimHtmlItems = dimHtmlItems.concat(totalColHtmlItems);
@@ -919,6 +920,34 @@
return Ext.create('Ext.panel.Panel', config);
};
+ addClasses = function() {
+ var a = document.getElementsByTagName('td');
+
+ for (var i = 0, td, div; i < a.length; i++) {
+ td = Ext.get(a[i]);
+ div = td.child('*');
+
+ if (div.hasCls('pivot-empty')) {
+ td.addCls('pivot-empty-body');
+ }
+ else if (div.hasCls('pivot-dim')) {
+ td.addCls('pivot-dim-body');
+ }
+ else if (div.hasCls('pivot-dimtotal')) {
+ td.addCls('pivot-dimtotal-body');
+ }
+ else if (div.hasCls('pivot-value')) {
+ td.addCls('pivot-value-body');
+ }
+ else if (div.hasCls('pivot-valuetotal')) {
+ td.addCls('pivot-valuetotal-body');
+ }
+ else if (div.hasCls('pivot-valuegrandtotal')) {
+ td.addCls('pivot-valuegrandtotal-body');
+ }
+ }
+ };
+
initialize = function() {
var dimensionItems,
paramString;
@@ -965,6 +994,8 @@
container.removeAll();
container.add(panel);
}
+
+ addClasses();
}
});
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/styles/style.css'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/styles/style.css 2013-01-31 10:05:38 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/styles/style.css 2013-02-05 09:27:19 +0000
@@ -85,32 +85,37 @@
background-color: #dae6f8;
}
-
td div div {
padding: 5px;
text-align: center;
font-size: 12px;
}
-td .empty-body {
- background-color: #dae6f8;
+.pivot-empty-body,
+td .pivot-empty-body {
+ background-color: #fff;
border: 0 none;
}
-td .dim-body {
+.pivot-dim-body,
+td .pivot-dim-body {
background-color: #dae6f8;
}
-td .dimtotal-body {
+.pivot-dimtotal-body,
+td .pivot-dimtotal-body {
background-color: #b0c4de;
}
-td .value-body {
+.pivot-value-body,
+td .pivot-value-body {
background-color: #fff;
}
-td .valuetotal-body {
+.pivot-valuetotal-body,
+td .pivot-valuetotal-body {
background-color: #eee;
}
-td .valuegrandtotal-body {
+.pivot-valuegrandtotal-body,
+td .pivot-valuegrandtotal-body {
background-color: #ccc;
}