← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16794: PT DV bug where assigned category dimension was not always available fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16794 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-09-24 13:09:57 +0200
message:
  PT DV bug where assigned category dimension was not always available fixed.
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-visualizer/scripts/app.js


--
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-24 10:11:27 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2014-09-24 11:07:10 +0000
@@ -5999,6 +5999,11 @@
 				}
 			}
 
+            // add assigned categories as dimension
+            if (!ns.app.layoutWindow.hasDimension(dimConf.category.dimensionName)) {
+                ns.app.stores.dimension.add({id: dimConf.category.dimensionName, name: dimConf.category.name});
+            }
+
             // add data as dimension
             if (!ns.app.layoutWindow.hasDimension(dimConf.data.dimensionName)) {
                 ns.app.stores.dimension.add({id: dimConf.data.dimensionName, name: dimConf.data.name});

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js	2014-09-24 10:11:27 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js	2014-09-24 11:07:10 +0000
@@ -5889,11 +5889,16 @@
 				}
 			}
 
+            // add assigned categories as dimension
+            if (!ns.app.layoutWindow.hasDimension(dimConf.category.dimensionName)) {
+                ns.app.stores.dimension.add({id: dimConf.category.dimensionName, name: dimConf.category.name});
+            }
+
             // add data as dimension
             if (!ns.app.layoutWindow.hasDimension(dimConf.data.dimensionName)) {
                 ns.app.stores.dimension.add({id: dimConf.data.dimensionName, name: dimConf.data.name});
             }
-
+            
             // add orgunit as dimension
             if (!ns.app.layoutWindow.hasDimension(dimConf.organisationUnit.dimensionName)) {
                 ns.app.stores.dimension.add({id: dimConf.organisationUnit.dimensionName, name: dimConf.organisationUnit.name});