dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34560
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17718: Apps, get modules action, better implementation of comparator
------------------------------------------------------------
revno: 17718
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-12-16 18:42:43 +0100
message:
Apps, get modules action, better implementation of comparator
modified:
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/GetModulesAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java
dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml
--
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-commons/src/main/java/org/hisp/dhis/webportal/menu/action/GetModulesAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/GetModulesAction.java 2014-03-31 12:46:43 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/GetModulesAction.java 2014-12-16 17:42:43 +0000
@@ -76,10 +76,13 @@
@Override
public int compare( Module m1, Module m2 )
{
- Integer i1 = userApps.indexOf( m1.getName() );
- Integer i2 = userApps.indexOf( m2.getName() );
+ int i1 = userApps.indexOf( m1.getName() );
+ int i2 = userApps.indexOf( m2.getName() );
+
+ i1 = i1 == -1 ? 9999 : i1;
+ i2 = i2 == -1 ? 9999 : i2;
- return i1 != -1 ? ( i2 != -1 ? i1.compareTo( i2 ) : -1 ) : 1;
+ return Integer.valueOf( i1 ).compareTo( Integer.valueOf( i2 ) );
}
} );
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java 2014-12-16 13:31:39 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java 2014-12-16 17:42:43 +0000
@@ -37,7 +37,6 @@
import org.hisp.dhis.appmanager.AppManager;
import org.hisp.dhis.security.ActionAccessResolver;
import org.hisp.dhis.user.CurrentUserService;
-import org.hisp.dhis.user.User;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2014-12-04 06:39:46 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2014-12-16 17:42:43 +0000
@@ -20,26 +20,29 @@
class="org.hisp.dhis.webportal.module.ConfigurableModuleComparator">
<property name="order">
<list>
+ <value>dhis-web-dashboard-integration</value>
+ <value>dhis-web-pivot</value>
+ <value>dhis-web-visualizer</value>
+ <value>dhis-web-mapping</value>
+ <value>dhis-web-event-reports</value>
+ <value>dhis-web-event-visualizer</value>
+ <value>dhis-web-dataentry</value>
+ <value>dhis-web-event-capture</value>
+ <value>dhis-web-tracker-capture</value>
<value>dhis-web-maintenance-appmanager</value>
<value>dhis-web-maintenance-dataadmin</value>
<value>dhis-web-maintenance-datadictionary</value>
<value>dhis-web-maintenance-dataset</value>
+ <value>dhis-web-importexport</value>
+ <value>dhis-web-caseentry</value>
<value>dhis-web-maintenance-mobile</value>
<value>dhis-web-maintenance-organisationunit</value>
<value>dhis-web-maintenance-program</value>
<value>dhis-web-maintenance-settings</value>
<value>dhis-web-maintenance-user</value>
- <value>dhis-web-appmanager</value>
- <value>dhis-web-dashboard-integration</value>
- <value>dhis-web-dataentry</value>
<value>dhis-web-validationrule</value>
- <value>dhis-web-visualizer</value>
- <value>dhis-web-mapping</value>
- <value>dhis-web-importexport</value>
- <value>dhis-web-caseentry</value>
<value>dhis-web-light</value>
<value>dhis-web-mobile</value>
- <value>dhis-web-pivot</value>
<value>dhis-web-reporting</value>
<value>dhis-web-sms</value>
</list>