← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2057: Applied patch from Tran, changes style from being a user setting to a system setting. If we want ...

 

------------------------------------------------------------
revno: 2057
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Sat 2010-09-04 10:21:14 +0200
message:
  Applied patch from Tran, changes style from being a user setting to a system setting. If we want to deploy dhis2 under different brands we cannot rely on users to change style.
removed:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableStylesAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentStyleAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/javascript/
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/javascript/picker.js
modified:
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataEntryFormServiceTest.java
  dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/style/DefaultStyleManager.java
  dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java
  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/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml
  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/userSettings.vm


--
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-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataEntryFormServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataEntryFormServiceTest.java	2010-09-01 04:42:39 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataEntryFormServiceTest.java	2010-09-04 08:21:14 +0000
@@ -194,7 +194,7 @@
         dataSetService.addDataSet( dataSetA );
         dataSetService.addDataSet( dataSetB );
         dataSetService.addDataSet( dataSetC );
-
+        
         List<DataSet> dataSets = dataSetService.getAvailableDataSets();
 
         assertEquals( dataSets.size(), 1 );
@@ -216,7 +216,7 @@
         dataSetService.addDataSet( dataSetA );
         dataSetService.addDataSet( dataSetB );
         dataSetService.addDataSet( dataSetC );
-
+        
         List<DataSet> dataSets = dataSetService.getAssignedDataSets();
 
         assertEquals( dataSets.size(), 2 );

=== modified file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/style/DefaultStyleManager.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/style/DefaultStyleManager.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/style/DefaultStyleManager.java	2010-09-04 08:21:14 +0000
@@ -30,8 +30,7 @@
 import java.io.File;
 import java.util.SortedMap;
 
-import org.hisp.dhis.user.NoCurrentUserException;
-import org.hisp.dhis.user.UserSettingService;
+import org.hisp.dhis.options.SystemSettingManager;
 
 /**
  * @author Lars Helge Overland
@@ -41,19 +40,20 @@
     implements StyleManager
 {
     private static final String SETTING_NAME_STYLE = "currentStyle";
-        
+
     private static final String SEPARATOR = "/";
+
     private static final String SYSTEM_SEPARATOR = File.separator;
-    
+
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserSettingService userSettingService;
-    
-    public void setUserSettingService( UserSettingService userSettingService )
+    private SystemSettingManager systemSettingManager;
+
+    public void setSystemSettingManager( SystemSettingManager systemSettingManager )
     {
-        this.userSettingService = userSettingService;
+        this.systemSettingManager = systemSettingManager;
     }
 
     private String defaultStyle;
@@ -64,7 +64,7 @@
     }
 
     private SortedMap<String, String> styles;
-    
+
     public void setStyles( SortedMap<String, String> styles )
     {
         this.styles = styles;
@@ -76,37 +76,31 @@
 
     public void setCurrentStyle( String file )
     {
-        try
-        {
-            userSettingService.saveUserSetting( SETTING_NAME_STYLE, file );
-        }
-        catch ( NoCurrentUserException ex )
-        {   
-        }
+         systemSettingManager.saveSystemSetting( SETTING_NAME_STYLE, file );
     }
-    
+
     public String getCurrentStyle()
     {
-        return (String) userSettingService.getUserSetting( SETTING_NAME_STYLE, styles.get( defaultStyle ) );
+        return (String) systemSettingManager.getSystemSetting( SETTING_NAME_STYLE, styles.get( defaultStyle ) );
     }
-    
+
     public String getCurrentStyleDirectory()
     {
         String currentStyle = getCurrentStyle();
-        
+
         if ( currentStyle.lastIndexOf( SEPARATOR ) != -1 )
         {
             return currentStyle.substring( 0, currentStyle.lastIndexOf( SEPARATOR ) );
         }
-        
+
         if ( currentStyle.lastIndexOf( SYSTEM_SEPARATOR ) != -1 )
         {
             return currentStyle.substring( 0, currentStyle.lastIndexOf( SYSTEM_SEPARATOR ) );
         }
-        
+
         return currentStyle;
     }
-    
+
     public SortedMap<String, String> getStyles()
     {
         return styles;

=== modified file 'dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml	2010-08-26 05:39:32 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml	2010-09-04 08:21:14 +0000
@@ -148,8 +148,8 @@
 
   <bean id="org.hisp.dhis.options.style.StyleManager"
     class="org.hisp.dhis.options.style.DefaultStyleManager">
-    <property name="userSettingService"
-      ref="org.hisp.dhis.user.UserSettingService"/>
+    <property name="systemSettingManager"
+      ref="org.hisp.dhis.options.SystemSettingManager"/>
     <property name="defaultStyle" value="light_blue"/>
     <property name="styles">
       <map>

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2010-09-03 04:31:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2010-09-04 08:21:14 +0000
@@ -6,7 +6,6 @@
 {
   display:none; 
   position:absolute;
-  position:absolute;
   width: 15.5em;
   margin-left:1em; 
   margin-top:-1.5em;

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2010-09-03 04:31:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2010-09-04 08:21:14 +0000
@@ -214,12 +214,12 @@
 		<action name="setOrgunitByCode"
 			class="org.hisp.dhis.ouwt.action.GetOrganisationUnitByCodeAction">
 			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ouwt/responseSelect.vm</result>
+				/dhis-web-commons/ouwt/responseSuccess.vm</result>
 			<result name="input" type="velocity-xml">
 				/dhis-web-commons/ouwt/responseInput.vm</result>
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
-
+		
 	</package>
 
 	<!-- Menu -->

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java	2010-09-04 08:21:14 +0000
@@ -31,6 +31,7 @@
 import java.util.SortedMap;
 
 import org.hisp.dhis.options.SystemSettingManager;
+import org.hisp.dhis.options.style.StyleManager;
 import org.hisp.dhis.webportal.module.Module;
 import org.hisp.dhis.webportal.module.ModuleManager;
 
@@ -60,6 +61,14 @@
     {
         this.moduleManager = moduleManager;
     }
+    
+    private StyleManager styleManager;
+
+    public void setStyleManager( StyleManager styleManager )
+    {
+        this.styleManager = styleManager;
+    }
+
 
     // -------------------------------------------------------------------------
     // Output
@@ -79,6 +88,21 @@
         return modules;
     }
         
+
+    private SortedMap<String, String> styles;
+
+    public SortedMap<String, String> getStyles()
+    {
+        return styles;
+    }
+    
+    private String currentStyle;
+
+    public String getCurrentStyle()
+    {
+        return currentStyle;
+    }
+    
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -89,6 +113,10 @@
         
         modules = moduleManager.getMenuModules();
         
+        styles = styleManager.getStyles();
+        
+        currentStyle = styleManager.getCurrentStyle();
+        
         return SUCCESS;
     }
 }

=== 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	2010-04-29 04:33:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java	2010-09-04 08:21:14 +0000
@@ -40,6 +40,7 @@
 import static org.hisp.dhis.options.SystemSettingManager.KEY_FACTOR_OF_DEVIATION;
 
 import org.hisp.dhis.options.SystemSettingManager;
+import org.hisp.dhis.options.style.StyleManager;
 
 import com.opensymphony.xwork2.Action;
 
@@ -61,6 +62,13 @@
         this.systemSettingManager = systemSettingManager;
     }
 
+    private StyleManager styleManager;
+
+    public void setStyleManager( StyleManager styleManager )
+    {
+        this.styleManager = styleManager;
+    }
+    
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
@@ -141,6 +149,13 @@
         this.factorDeviation = factorDeviation;
     }
 
+    private String currentStyle;
+
+    public void setCurrentStyle( String style )
+    {
+        this.currentStyle = style;
+    }
+    
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -173,9 +188,9 @@
             omitIndicatorsZeroNumeratorDataMart );
         systemSettingManager
             .saveSystemSetting( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, disableDataEntryWhenCompleted );
+        systemSettingManager.saveSystemSetting( KEY_FACTOR_OF_DEVIATION, factorDeviation );
+        styleManager.setCurrentStyle( currentStyle );
         
-        systemSettingManager.saveSystemSetting( KEY_FACTOR_OF_DEVIATION, factorDeviation );
-
         return SUCCESS;
     }
 }

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableStylesAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableStylesAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableStylesAction.java	1970-01-01 00:00:00 +0000
@@ -1,84 +0,0 @@
-package org.hisp.dhis.settings.action.user;
-
-/*
- * Copyright (c) 2004-2010, 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 java.util.SortedMap;
-
-import org.hisp.dhis.options.style.StyleManager;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetAvailableStylesAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private StyleManager styleManager;
-
-    public void setStyleManager( StyleManager styleManager )
-    {
-        this.styleManager = styleManager;
-    }
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private SortedMap<String, String> styles;
-
-    public SortedMap<String, String> getStyles()
-    {
-        return styles;
-    }
-    
-    private String currentStyle;
-
-    public String getCurrentStyle()
-    {
-        return currentStyle;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-    {
-        styles = styleManager.getStyles();
-        
-        currentStyle = styleManager.getCurrentStyle();
-        
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentStyleAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentStyleAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentStyleAction.java	1970-01-01 00:00:00 +0000
@@ -1,73 +0,0 @@
-package org.hisp.dhis.settings.action.user;
-
-/*
- * Copyright (c) 2004-2010, 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 org.hisp.dhis.options.style.StyleManager;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class SetCurrentStyleAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private StyleManager styleManager;
-
-    public void setStyleManager( StyleManager styleManager )
-    {
-        this.styleManager = styleManager;
-    }
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private String currentStyle;
-
-    public void setCurrentStyle( String style )
-    {
-        this.currentStyle = style;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-    {
-        styleManager.setCurrentStyle( currentStyle );
-        
-        return SUCCESS;
-    }
-}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml	2010-07-01 10:08:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml	2010-09-04 08:21:14 +0000
@@ -15,6 +15,9 @@
     <property name="moduleManager">
       <ref bean="org.hisp.dhis.webportal.module.ModuleManager"/>
     </property>
+    <property name="styleManager">
+      <ref bean="org.hisp.dhis.options.style.StyleManager"/>
+    </property>
   </bean>
   
   <bean id="org.hisp.dhis.settings.action.system.SetSystemSettingsAction"
@@ -23,6 +26,9 @@
     <property name="systemSettingManager">
       <ref bean="org.hisp.dhis.options.SystemSettingManager"/>
     </property>
+    <property name="styleManager">
+      <ref bean="org.hisp.dhis.options.style.StyleManager"/>
+    </property>
   </bean>
   
   <!-- User settings -->
@@ -73,14 +79,6 @@
     </property>
   </bean>
   
-  <bean id="org.hisp.dhis.settings.action.user.GetAvailableStylesAction"
-    class="org.hisp.dhis.settings.action.user.GetAvailableStylesAction"
-    scope="prototype">
-    <property name="styleManager">
-      <ref bean="org.hisp.dhis.options.style.StyleManager"/>
-    </property>
-  </bean>
-  
    <bean id="org.hisp.dhis.settings.action.user.GetAvailableAutoSaveDataEntryFormAction"
     class="org.hisp.dhis.settings.action.user.GetAvailableAutoSaveDataEntryFormAction"
     scope="prototype">
@@ -129,14 +127,6 @@
     </property>
   </bean>
   
-  <bean id="org.hisp.dhis.settings.action.user.SetCurrentStyleAction"
-    class="org.hisp.dhis.settings.action.user.SetCurrentStyleAction"
-    scope="prototype">
-    <property name="styleManager">
-      <ref bean="org.hisp.dhis.options.style.StyleManager"/>
-    </property>
-  </bean>
-  
   <bean id="org.hisp.dhis.settings.action.user.SetAutoSaveDataEntryFormAction"
     class="org.hisp.dhis.settings.action.user.SetAutoSaveDataEntryFormAction"
     scope="prototype">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml	2010-07-01 10:08:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml	2010-09-04 08:21:14 +0000
@@ -51,15 +51,11 @@
     </action>
     
     <action name="getAvailableAutoSaveDataEntryForm" class="org.hisp.dhis.settings.action.user.GetAvailableAutoSaveDataEntryFormAction">
-      <result name="success" type="chain">getAvailableStyles</result>
-    </action>
-    
-    <action name="getAvailableStyles" class="org.hisp.dhis.settings.action.user.GetAvailableStylesAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-maintenance-settings/userSettings.vm</param>
       <param name="menu">/dhis-web-maintenance-settings/settingsMenu.vm</param>
     </action>
-    
+	
     <action name="setCurrentLocale" class="org.hisp.dhis.settings.action.user.SetCurrentLocaleAction">
       <result name="success" type="redirect">userSettings.action</result>
     </action>
@@ -67,7 +63,7 @@
     <action name="setCurrentLocaleDb" class="org.hisp.dhis.settings.action.user.SetCurrentLocaleDbAction">
       <result name="success" type="redirect">userSettings.action</result>
     </action>
-
+	
     <action name="setCurrentSortOrder" class="org.hisp.dhis.settings.action.user.SetCurrentSortOrderAction">
       <result name="success" type="redirect">userSettings.action</result>
     </action>
@@ -80,10 +76,6 @@
       <result name="success" type="redirect">userSettings.action</result>
     </action>    
     
-    <action name="setCurrentStyle" class="org.hisp.dhis.settings.action.user.SetCurrentStyleAction">
-      <result name="success" type="redirect">userSettings.action</result>
-    </action>
-    
     <action name="setAutoSaveDataEntryForm" class="org.hisp.dhis.settings.action.user.SetAutoSaveDataEntryFormAction">
       <result name="success" type="redirect">userSettings.action</result>
     </action>        

=== removed directory 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/javascript'
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/javascript/picker.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/javascript/picker.js	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/javascript/picker.js	1970-01-01 00:00:00 +0000
@@ -1,171 +0,0 @@
-// Title: Tigra Color Picker
-// URL: http://www.softcomplex.com/products/tigra_color_picker/
-// Version: 1.1
-// Date: 06/26/2003 (mm/dd/yyyy)
-// Note: Permission given to use this script in ANY kind of applications if
-//    header lines are left unchanged.
-// Note: Script consists of two files: picker.js and picker.html
-
-var TCP = new TColorPicker();
-
-function TCPopup(field, palette) {
-	this.field = field;
-	this.initPalette = !palette || palette > 3 ? 0 : palette;
-	var w = 194, h = 240,
-	move = screen ? 
-		',left=' + ((screen.width - w) >> 1) + ',top=' + ((screen.height - h) >> 1) : '', 
-	o_colWindow = window.open('picker.vm', null, "help=no,status=no,scrollbars=no,resizable=no" + move + ",width=" + w + ",height=" + h + ",dependent=yes", true);
-	o_colWindow.opener = window;
-	o_colWindow.focus(); 
-}
-
-function TCBuildCell (R, G, B, w, h) {
-	return '<td bgcolor="#' + this.dec2hex((R << 16) + (G << 8) + B) + '"><a href="javascript:P.S(\'' + this.dec2hex((R << 16) + (G << 8) + B) + '\')" onmouseover="P.P(\'' + this.dec2hex((R << 16) + (G << 8) + B) + '\')"><img src="pixel.gif" width="' + w + '" height="' + h + '" border="0"></a></td>';
-}
-
-function TCSelect(c) {
-	this.field.value = '#' + c.toUpperCase();
-	this.win.close();
-}
-
-function TCPaint(c, b_noPref) {
-	c = (b_noPref ? '' : '#') + c.toUpperCase();
-	if (this.o_samp) 
-		this.o_samp.innerHTML = '<font face=Tahoma size=2>' + c +' <font color=white>' + c + '</font></font>'
-	if(this.doc.layers)
-		this.sample.bgColor = c;
-	else { 
-		if (this.sample.backgroundColor != null) this.sample.backgroundColor = c;
-		else if (this.sample.background != null) this.sample.background = c;
-	}
-}
-
-function TCGenerateSafe() {
-	var s = '';
-	for (j = 0; j < 12; j ++) {
-		s += "<tr>";
-		for (k = 0; k < 3; k ++)
-			for (i = 0; i <= 5; i ++)
-				s += this.bldCell(k * 51 + (j % 2) * 51 * 3, Math.floor(j / 2) * 51, i * 51, 8, 10);
-		s += "</tr>";
-	}
-	return s;
-}
-
-function TCGenerateWind() {
-	var s = '';
-	for (j = 0; j < 12; j ++) {
-		s += "<tr>";
-		for (k = 0; k < 3; k ++)
-			for (i = 0; i <= 5; i++)
-				s += this.bldCell(i * 51, k * 51 + (j % 2) * 51 * 3, Math.floor(j / 2) * 51, 8, 10);
-		s += "</tr>";
-	}
-	return s	
-}
-function TCGenerateMac() {
-	var s = '';
-	var c = 0,n = 1;
-	var r,g,b;
-	for (j = 0; j < 15; j ++) {
-		s += "<tr>";
-		for (k = 0; k < 3; k ++)
-			for (i = 0; i <= 5; i++){
-				if(j<12){
-				s += this.bldCell( 255-(Math.floor(j / 2) * 51), 255-(k * 51 + (j % 2) * 51 * 3),255-(i * 51), 8, 10);
-				}else{
-					if(n<=14){
-						r = 255-(n * 17);
-						g=b=0;
-					}else if(n>14 && n<=28){
-						g = 255-((n-14) * 17);
-						r=b=0;
-					}else if(n>28 && n<=42){
-						b = 255-((n-28) * 17);
-						r=g=0;
-					}else{
-						r=g=b=255-((n-42) * 17);
-					}
-					s += this.bldCell( r, g,b, 8, 10);
-					n++;
-				}
-			}
-		s += "</tr>";
-	}
-	return s;
-}
-
-function TCGenerateGray() {
-	var s = '';
-	for (j = 0; j <= 15; j ++) {
-		s += "<tr>";
-		for (k = 0; k <= 15; k ++) {
-			g = Math.floor((k + j * 16) % 256);
-			s += this.bldCell(g, g, g, 9, 7);
-		}
-		s += '</tr>';
-	}
-	return s
-}
-
-function TCDec2Hex(v) {
-	v = v.toString(16);
-	for(; v.length < 6; v = '0' + v);
-	return v;
-}
-
-function TCChgMode(v) {
-	for (var k in this.divs) this.hide(k);
-	this.show(v);
-}
-
-function TColorPicker(field) {
-	this.build0 = TCGenerateSafe;
-	this.build1 = TCGenerateWind;
-	this.build2 = TCGenerateGray;
-	this.build3 = TCGenerateMac;
-	this.show = document.layers ? 
-		function (div) { this.divs[div].visibility = 'show' } :
-		function (div) { this.divs[div].visibility = 'visible' };
-	this.hide = document.layers ? 
-		function (div) { this.divs[div].visibility = 'hide' } :
-		function (div) { this.divs[div].visibility = 'hidden' };
-	// event handlers
-	this.C       = TCChgMode;
-	this.S       = TCSelect;
-	this.P       = TCPaint;
-	this.popup   = TCPopup;
-	this.draw    = TCDraw;
-	this.dec2hex = TCDec2Hex;
-	this.bldCell = TCBuildCell;
-	this.divs = [];
-}
-
-function TCDraw(o_win, o_doc) {
-	this.win = o_win;
-	this.doc = o_doc;
-	var 
-	s_tag_openT  = o_doc.layers ? 
-		'layer visibility=hidden top=54 left=5 width=182' : 
-		'div style=visibility:hidden;position:absolute;left:6px;top:54px;width:182px;height:0',
-	s_tag_openS  = o_doc.layers ? 'layer top=32 left=6' : 'div',
-	s_tag_close  = o_doc.layers ? 'layer' : 'div'
-		
-	this.doc.write('<' + s_tag_openS + ' id=sam name=sam><table cellpadding=0 cellspacing=0 border=1 width=181 align=center class=bd><tr><td align=center height=18><div id="samp"><font face=Tahoma size=2>sample <font color=white>sample</font></font></div></td></tr></table></' + s_tag_close + '>');
-	this.sample = o_doc.layers ? o_doc.layers['sam'] : 
-		o_doc.getElementById ? o_doc.getElementById('sam').style : o_doc.all['sam'].style
-
-	for (var k = 0; k < 4; k ++) {
-		this.doc.write('<' + s_tag_openT + ' id="p' + k + '" name="p' + k + '"><table cellpadding=0 cellspacing=0 border=1 align=center>' + this['build' + k]() + '</table></' + s_tag_close + '>');
-		this.divs[k] = o_doc.layers 
-			? o_doc.layers['p' + k] : o_doc.all 
-				? o_doc.all['p' + k].style : o_doc.getElementById('p' + k).style
-	}
-	if (!o_doc.layers && o_doc.body.innerHTML) 
-		this.o_samp = o_doc.all 
-			? o_doc.all.samp : o_doc.getElementById('samp');
-	this.C(this.initPalette);
-	if (this.field.value) this.P(this.field.value, true)
-}
-	
-	

=== 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	2010-04-29 04:33:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm	2010-09-04 08:21:14 +0000
@@ -7,6 +7,14 @@
 
 <p><input type="text" name="applicationTitle" style="width:30em" value="$!applicationTitle"></p>
 
+<h4>$i18n.getString( "style" )</h4>
+
+<select style="min-width:250px" name='currentStyle' id='currentStyle'>
+#foreach( $style in $styles.entrySet() )
+	<option value="$style.value" #if( $style.value == $currentStyle )selected="selected"#end>$i18n.getString( $style.key )</option>
+#end
+</select>
+
 <h4>$i18n.getString( "max_attempts" )</h4>
 
 <p><input type="text" name="maxAttempts" style="width:30em" value="$!maxAttempts"></p>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/userSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/userSettings.vm	2010-07-01 10:08:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/userSettings.vm	2010-09-04 08:21:14 +0000
@@ -38,13 +38,6 @@
 	window.location.href = "setCurrentDataDictionaryMode.action?currentDataDictionaryMode=" + mode;
 }
 
-function styleChanged( list )
-{
-	var style = list.options[list.selectedIndex].value;
-	
-	window.location.href = "setCurrentStyle.action?currentStyle=" + style;
-}
-
 function autoSaveDataEntryForm( value )
 {
 	window.location.href = "setAutoSaveDataEntryForm.action?autoSave=" + value;
@@ -94,14 +87,6 @@
 #end
 </select>
 
-<h4>$i18n.getString( "style" )</h4>
-
-<select onchange="styleChanged( this );" style="min-width:250px">
-#foreach( $style in $styles.entrySet() )
-	<option value="$style.value" #if( $style.value == $currentStyle )selected="selected"#end>$i18n.getString( $style.key )</option>
-#end
-</select>
-
 <h4>$i18n.getString( "auto_save_data_entry_form" )</h4>
 <input type="checkbox" #if($autoSave == 'true') checked #end onchange="autoSaveDataEntryForm(this.checked);">
 </form>