← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18143: ER EV options order issue fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18143 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-01-29 17:34:10 +0100
message:
  ER EV options order issue fixed.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.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-event-reports/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2014-11-03 15:01:20 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2015-01-29 16:31:21 +0000
@@ -1826,7 +1826,11 @@
 								});
                             }
 
-                            support.prototype.array.sort(objects, 'ASC', 'sortingId');
+                            // sort if not option set
+                            if (!header.optionSet) {
+                                support.prototype.array.sort(objects, 'ASC', 'sortingId');
+                            }
+                            
                             header.ids = Ext.Array.pluck(objects, 'id');
                         }
                     }

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js	2014-10-30 16:29:02 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js	2015-01-29 16:31:21 +0000
@@ -1859,7 +1859,11 @@
 								});
                             }
 
-                            support.prototype.array.sort(objects, 'ASC', 'sortingId');
+                            // sort if not option set
+                            if (!header.optionSet) {
+                                support.prototype.array.sort(objects, 'ASC', 'sortingId');
+                            }
+                            
                             header.ids = Ext.Array.pluck(objects, 'id');
                         }
                     }