← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16669: PT dim labels style.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16669 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-09-09 14:02:21 +0200
message:
  PT dim labels style.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js
  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/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2014-09-08 14:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2014-09-09 12:01:30 +0000
@@ -482,6 +482,11 @@
 			style: 'margin-bottom:' + checkboxBottomMargin + 'px',
 		});
 
+		showDimensionLabels = Ext.create('Ext.form.field.Checkbox', {
+			boxLabel: NS.i18n.show_dimension_labels,
+			style: 'margin-bottom:' + comboBottomMargin + 'px'
+		});
+
 		aggregationType = Ext.create('Ext.form.field.ComboBox', {
 			cls: 'ns-combo',
 			style: 'margin-top:3px; margin-bottom:' + comboBottomMargin + 'px',
@@ -512,14 +517,9 @@
 			style: 'margin-bottom:' + checkboxBottomMargin + 'px',
 		});
 
-		showDimensionLabels = Ext.create('Ext.form.field.Checkbox', {
-			boxLabel: NS.i18n.show_dimension_labels,
-			style: 'margin-bottom:' + comboBottomMargin + 'px'
-		});
-
 		displayDensity = Ext.create('Ext.form.field.ComboBox', {
 			cls: 'ns-combo',
-			style: 'margin-top:5px; margin-bottom:' + comboBottomMargin + 'px',
+			style: 'margin-bottom:' + comboBottomMargin + 'px',
 			width: comboboxWidth,
 			labelWidth: 130,
 			fieldLabel: NS.i18n.display_density,
@@ -672,6 +672,7 @@
 				showRowTotals,
 				showSubTotals,
 				hideEmptyRows,
+                showDimensionLabels,
                 aggregationType
 			]
 		};
@@ -688,7 +689,6 @@
 			bodyStyle: 'border:0 none',
 			style: 'margin-left:14px',
 			items: [
-                showDimensionLabels,
 				displayDensity,
 				fontSize,
 				digitGroupSeparator,

=== 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	2014-09-08 14:31:53 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js	2014-09-09 12:01:30 +0000
@@ -2181,15 +2181,15 @@
                             }
 
                             a.push(getEmptyNameTdConfig({
-                                cls: 'pivot-dim-label align-right',
-                                htmlValue: '&nbsp;&nbsp;' + dimConf.objectNameMap[xLayout.columnObjectNames[i]].name
+                                cls: 'pivot-dim-label',
+                                htmlValue: dimConf.objectNameMap[xLayout.columnObjectNames[i]].name
                             }));
                         }
                         else {
                             if (xRowAxis && xRowAxis.dims) {
                                 for (var j = 0; j < xRowAxis.dims - 1; j++) {
                                     a.push(getEmptyNameTdConfig({
-                                        cls: 'pivot-dim-label align-left',
+                                        cls: 'pivot-dim-label',
                                         htmlValue: dimConf.objectNameMap[xLayout.rowObjectNames[j]].name
                                     }));
                                 }
@@ -2197,9 +2197,7 @@
 
                             a.push(getEmptyNameTdConfig({
                                 cls: 'pivot-dim-label',
-                                htmlValue: '<span class="td-nobreak">' + dimConf.objectNameMap[xLayout.rowObjectNames[j]].name + '</span>' +
-                                           '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
-                                           '<span class="td-nobreak" style="float:right">' + dimConf.objectNameMap[xLayout.columnObjectNames[i]].name + '</span>'
+                                htmlValue: dimConf.objectNameMap[xLayout.rowObjectNames[j]].name + ', ' + dimConf.objectNameMap[xLayout.columnObjectNames[i]].name
                             }));
                         }
 
@@ -2214,10 +2212,6 @@
 					for (var i = 0, dimHtml; i < xColAxis.dims; i++) {
 						dimHtml = [];
 
-						//if (i === 0) {
-							//dimHtml.push(getEmptyHtmlArray());
-						//}
-
                         if (xLayout.showDimensionLabels) {
                             dimHtml = dimHtml.concat(getEmptyHtmlArray(i));
                         }

=== 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	2014-09-08 12:08:14 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/styles/style.css	2014-09-09 12:01:30 +0000
@@ -220,6 +220,7 @@
 .pivot-dim-label {
 	background-color: #f7f9fD;
 	white-space: nowrap;
+    text-align: center;
 }
 .pivot-empty {
 	background-color: #dae6f8;