← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 64: Fixed bug related to the start page in portal / system settings.

 

------------------------------------------------------------
revno: 64
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Sat 2009-03-14 10:02:39 +0100
message:
  Fixed bug related to the start page in portal / system settings.
removed:
  dhis-2/dhis-web/dhis-web-portal/src/main/java/org/hisp/dhis/wp/action/GetStartModuleAction.java
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm
  dhis-2/dhis-web/dhis-web-portal/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-portal/src/main/resources/xwork.xml

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2009-03-14 07:19:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2009-03-14 09:02:39 +0000
@@ -37,7 +37,7 @@
         
     <div id="header">
       <img id="header1" src="../dhis-web-commons/css/${stylesheetDirectory}/logo_left.png">
-      <img id="header2" src="../dhis-web-commons/css/${stylesheetDirectory}/logo_banner.png"#if( $startModule && $startModule != "null" ) onclick="window.location.href='../${startModule}/index.action'" style="cursor:pointer"#end>
+      <img id="header2" src="../dhis-web-commons/css/${stylesheetDirectory}/logo_banner.png"#if( $startModule ) onclick="window.location.href='../${startModule}/index.action'" style="cursor:pointer"#end>
       <img id="header3" src="../dhis-web-commons/css/${stylesheetDirectory}/logo_right.png">
 
       <img id="menuSeparator1" src="../dhis-web-commons/css/${stylesheetDirectory}/logo_separator.png">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java	2009-03-14 09:02:39 +0000
@@ -106,7 +106,7 @@
             flag = null;
         }
         
-        if ( startModule != null && startModule.trim().length() == 0 )
+        if ( startModule != null && startModule.equals( "NO_START_PAGE" ) )
         {
             startModule = null;
         }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties	2009-03-14 09:02:39 +0000
@@ -56,6 +56,7 @@
 portal = Portal
 start_page = Start page
 forum_integration = Forum integration
+no_start_page = No start page
 dhis-web-maintenance-datadictionary = Data Elements and Indicators
 dhis-web-maintenance-dataset = Datasets
 dhis-web-maintenance-organisationunit = Organisation Units

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm	2009-03-14 09:02:39 +0000
@@ -22,7 +22,7 @@
 
 <p>
 <select name="startModule" style="width:30em">
-    <option value="null">$i18n.getString( "portal" )</option>
+    <option value="NO_START_PAGE">$i18n.getString( "no_start_page" )</option>
 	#foreach ( $module in $modules )
 		<option value="$module.name" #if ( $currentStartModule == $module.name )selected#end>$i18n.getString( "$module.name" )</option>
 	#end

=== removed file 'dhis-2/dhis-web/dhis-web-portal/src/main/java/org/hisp/dhis/wp/action/GetStartModuleAction.java'
--- dhis-2/dhis-web/dhis-web-portal/src/main/java/org/hisp/dhis/wp/action/GetStartModuleAction.java	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-portal/src/main/java/org/hisp/dhis/wp/action/GetStartModuleAction.java	1970-01-01 00:00:00 +0000
@@ -1,89 +0,0 @@
-package org.hisp.dhis.wp.action;
-
-/*
- * Copyright (c) 2004-2007, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import static org.hisp.dhis.options.SystemSettingManager.KEY_START_MODULE;
-
-import org.hisp.dhis.options.SystemSettingManager;
-import org.hisp.dhis.webportal.module.Module;
-import org.hisp.dhis.webportal.module.ModuleManager;
-
-import com.opensymphony.xwork.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetStartModuleAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    
-    private SystemSettingManager systemSettingManager;
-
-    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
-    {
-        this.systemSettingManager = systemSettingManager;
-    }
-
-    private ModuleManager moduleManager;
-
-    public void setModuleManager( ModuleManager moduleManager )
-    {
-        this.moduleManager = moduleManager;
-    }
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-    
-    private Module startModule;
-
-    public Module getStartModule()
-    {
-        return startModule;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-    
-    public String execute()
-    {
-        String startModuleName = (String) systemSettingManager.getSystemSetting( KEY_START_MODULE );
-        
-        if ( startModuleName != null )
-        {
-            startModule = moduleManager.getModuleByName( startModuleName );
-        }
-        
-        return SUCCESS;
-    }
-}

=== modified file 'dhis-2/dhis-web/dhis-web-portal/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-portal/src/main/resources/META-INF/dhis/beans.xml	2009-03-08 05:33:34 +0000
+++ dhis-2/dhis-web/dhis-web-portal/src/main/resources/META-INF/dhis/beans.xml	2009-03-14 09:02:39 +0000
@@ -8,13 +8,4 @@
     class="org.hisp.dhis.wp.action.NoAction"
     scope="prototype"/>
   
-  <bean id="org.hisp.dhis.wp.action.GetStartModuleAction"
-    class="org.hisp.dhis.wp.action.GetStartModuleAction"
-    scope="prototype">
-    <property name="moduleManager"
-      ref="org.hisp.dhis.webportal.module.ModuleManager"/>
-    <property name="systemSettingManager"
-      ref="org.hisp.dhis.options.SystemSettingManager"/>
-  </bean>
-  
 </beans>

=== modified file 'dhis-2/dhis-web/dhis-web-portal/src/main/resources/xwork.xml'
--- dhis-2/dhis-web/dhis-web-portal/src/main/resources/xwork.xml	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-portal/src/main/resources/xwork.xml	2009-03-14 09:02:39 +0000
@@ -5,6 +5,11 @@
   
   <package name="dhis-web-portal" extends="dhis-web-commons" namespace="/dhis-web-portal">
     
+    <action name="redirect" class="org.hisp.dhis.wp.action.NoAction">
+      <result name="success" type="velocity">/main.vm</result>
+      <param name="page">/dhis-web-portal/redirect.vm</param>
+    </action>
+    
     <action name="intro" class="org.hisp.dhis.wp.action.NoAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-portal/intro.vm</param>
@@ -13,10 +18,5 @@
       <param name="javascripts">javascript/intro.js</param>
     </action>    
     
-    <action name="redirect" class="org.hisp.dhis.wp.action.GetStartModuleAction">
-      <result name="success" type="velocity">/main.vm</result>
-      <param name="page">/dhis-web-portal/redirect.vm</param>
-    </action>
-    
   </package>
 </xwork>



--

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.