← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2222: Merged r 2060 from 2.0.5

 

------------------------------------------------------------
revno: 2222
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2010-11-29 17:47:26 +0100
message:
  Merged r 2060 from 2.0.5
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/comparator/DataSetSortOrderComparator.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/comparator/SectionOrderComparator.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/SaveDataSetSortOrderAction.java


--
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-api/src/main/java/org/hisp/dhis/dataset/comparator/DataSetSortOrderComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/comparator/DataSetSortOrderComparator.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/comparator/DataSetSortOrderComparator.java	2010-11-29 16:47:26 +0000
@@ -50,6 +50,6 @@
             return dataSet0.getName().compareTo( dataSet1.getName() );
         }
         
-        return dataSet1.getSortOrder() - dataSet0.getSortOrder();
+        return dataSet0.getSortOrder() - dataSet1.getSortOrder();
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/comparator/SectionOrderComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/comparator/SectionOrderComparator.java	2010-11-29 16:43:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/comparator/SectionOrderComparator.java	2010-11-29 16:47:26 +0000
@@ -36,6 +36,6 @@
 {
     public int compare( Section o1, Section o2 )
     {
-        return o2.getSortOrder() - o1.getSortOrder();
+        return o1.getSortOrder() - o2.getSortOrder();
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/SaveDataSetSortOrderAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/SaveDataSetSortOrderAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/SaveDataSetSortOrderAction.java	2010-11-29 16:47:26 +0000
@@ -27,7 +27,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collections;
 import java.util.List;
 
 import org.hisp.dhis.dataset.DataSet;
@@ -73,8 +72,6 @@
     {
         int sortOrder = 1;
         
-        Collections.reverse( dataSets );
-        
         for ( String id : dataSets )
         {
             DataSet dataSet = dataSetService.getDataSet( Integer.parseInt( id ) );