dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21646
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10297: (PT) Layout dimension order fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 10297 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-18 21:40:31 +0100
message:
(PT) Layout dimension order fixed.
modified:
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/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-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-03-18 20:15:47 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-03-18 20:39:51 +0000
@@ -444,7 +444,6 @@
PT.app.LayoutWindow = function() {
var dimension,
dimensionStore,
- dimensionOrder,
row,
rowStore,
col,
@@ -470,17 +469,6 @@
dimConf = pt.conf.finals.dimension;
- dimensionOrder = function() {
- var order = [dimConf.data.dimensionName, dimConf.category.dimensionName, dimConf.period.dimensionName, dimConf.organisationUnit.dimensionName],
- ougsOrder = [];
-
- for (var i = 0; i < pt.init.ougs.length; i++) {
- ougsOrder.push(pt.init.ougs[i].id);
- }
-
- return order.concat(ougsOrder);
- }();
-
getData = function(all) {
var data = [];
@@ -495,7 +483,10 @@
data.push({id: dimConf.organisationUnit.dimensionName, name: dimConf.organisationUnit.name});
}
- return data.concat(pt.init.ougs, pt.init.degs);
+ return data.concat(
+ pt.util.array.sortObjectsByString(Ext.clone(pt.init.ougs)),
+ pt.util.array.sortObjectsByString(Ext.clone(pt.init.degs))
+ );
};
getStore = function(data) {