← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7199: Removed dashboard charts user setting, not needed

 

------------------------------------------------------------
revno: 7199
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-06-06 00:03:24 +0200
message:
  Removed dashboard charts user setting, not needed
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/UserSettingInterceptor.java
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetGeneralSettingsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetGeneralSettingsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/userGeneralSettings.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-api/src/main/java/org/hisp/dhis/user/UserSettingService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java	2012-01-26 11:40:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java	2012-06-05 22:03:24 +0000
@@ -44,7 +44,6 @@
     String ID = UserSettingService.class.getName();
 
     final String AUTO_SAVE_DATA_ENTRY_FORM = "autoSaveDataEntryForm";
-    final String KEY_CHARTS_IN_DASHBOARD = "keyChartsInDashboard";
     final String KEY_CURRENT_DATADICTIONARY = "currentDataDictionary";
     final String KEY_STYLE = "stylesheet";
     final String KEY_STYLE_DIRECTORY = "stylesheetDirectory";
@@ -52,7 +51,6 @@
     final String KEY_MESSAGE_SMS_NOTIFICATION = "keyMessageSmsNotification";
     final String KEY_DB_LOCALE = "keyLocaleUserSetting";
 
-    final int DEFAULT_CHARTS_IN_DASHBOARD = 4;
     final List<Integer> DASHBOARD_CHARTS_TO_DISPLAY = Arrays.asList( 4, 6, 8 );
 
     /**

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/UserSettingInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/UserSettingInterceptor.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/UserSettingInterceptor.java	2012-06-05 22:03:24 +0000
@@ -27,14 +27,13 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.user.UserSettingService.DEFAULT_CHARTS_IN_DASHBOARD;
-import static org.hisp.dhis.user.UserSettingService.*;
+import static org.hisp.dhis.user.UserSettingService.KEY_STYLE;
+import static org.hisp.dhis.user.UserSettingService.KEY_STYLE_DIRECTORY;
 
 import java.util.HashMap;
 import java.util.Map;
 
 import org.hisp.dhis.setting.StyleManager;
-import org.hisp.dhis.user.UserSettingService;
 
 import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.interceptor.Interceptor;
@@ -49,13 +48,6 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserSettingService userSettingService;
-
-    public void setUserSettingService( UserSettingService userSettingService )
-    {
-        this.userSettingService = userSettingService;
-    }
-
     private StyleManager styleManager;
 
     public void setStyleManager( StyleManager styleManager )
@@ -80,7 +72,6 @@
     {
         Map<String, Object> map = new HashMap<String, Object>();
 
-        map.put( KEY_CHARTS_IN_DASHBOARD, userSettingService.getUserSetting( KEY_CHARTS_IN_DASHBOARD, DEFAULT_CHARTS_IN_DASHBOARD ) );
         map.put( KEY_STYLE, styleManager.getCurrentStyle() );
         map.put( KEY_STYLE_DIRECTORY, styleManager.getCurrentStyleDirectory() );
 

=== 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	2012-06-03 17:20:55 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2012-06-05 22:03:24 +0000
@@ -567,7 +567,6 @@
   <bean id="org.hisp.dhis.interceptor.CacheInterceptor" class="org.hisp.dhis.interceptor.CacheInterceptor"/>
   
   <bean id="org.hisp.dhis.interceptor.UserSettingInterceptor" class="org.hisp.dhis.interceptor.UserSettingInterceptor">
-    <property name="userSettingService" ref="org.hisp.dhis.user.UserSettingService" />
     <property name="styleManager" ref="org.hisp.dhis.setting.StyleManager" />
   </bean>
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetGeneralSettingsAction.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetGeneralSettingsAction.java	2012-06-05 22:03:24 +0000
@@ -28,8 +28,6 @@
 package org.hisp.dhis.settings.action.user;
 
 import static org.hisp.dhis.user.UserSettingService.AUTO_SAVE_DATA_ENTRY_FORM;
-import static org.hisp.dhis.user.UserSettingService.DEFAULT_CHARTS_IN_DASHBOARD;
-import static org.hisp.dhis.user.UserSettingService.KEY_CHARTS_IN_DASHBOARD;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -139,13 +137,6 @@
         return currentSortOrder;
     }
 
-    private Integer chartsInDashboard;
-
-    public Integer getChartsInDashboard()
-    {
-        return chartsInDashboard;
-    }
-
     private List<Integer> chartsInDashboardOptions;
 
     public List<Integer> getChartsInDashboardOptions()
@@ -228,15 +219,6 @@
         currentLocaleDb = i18nService.getCurrentLocale();
 
         // ---------------------------------------------------------------------
-        // Get Charts in Dashboard
-        // ---------------------------------------------------------------------
-
-        chartsInDashboard = (Integer) userSettingService.getUserSetting( KEY_CHARTS_IN_DASHBOARD,
-            DEFAULT_CHARTS_IN_DASHBOARD );
-
-        chartsInDashboardOptions = UserSettingService.DASHBOARD_CHARTS_TO_DISPLAY;
-
-        // ---------------------------------------------------------------------
         // Get Auto-save data entry form
         // ---------------------------------------------------------------------
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetGeneralSettingsAction.java	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetGeneralSettingsAction.java	2012-06-05 22:03:24 +0000
@@ -28,7 +28,6 @@
  */
 
 import static org.hisp.dhis.user.UserSettingService.AUTO_SAVE_DATA_ENTRY_FORM;
-import static org.hisp.dhis.user.UserSettingService.KEY_CHARTS_IN_DASHBOARD;
 import static org.hisp.dhis.user.UserSettingService.KEY_DB_LOCALE;
 
 import java.util.Locale;
@@ -83,13 +82,6 @@
         this.autoSave = autoSave;
     }
 
-    private Integer chartsInDashboard;
-
-    public void setChartsInDashboard( Integer chartsInDashboard )
-    {
-        this.chartsInDashboard = chartsInDashboard;
-    }
-
     private String currentLocale;
 
     public void setCurrentLocale( String locale )
@@ -124,8 +116,6 @@
 
         styleManager.setUserStyle( currentStyle );
 
-        userSettingService.saveUserSetting( KEY_CHARTS_IN_DASHBOARD, chartsInDashboard );
-
         userSettingService.saveUserSetting( AUTO_SAVE_DATA_ENTRY_FORM, autoSave );
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/userGeneralSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/userGeneralSettings.vm	2012-04-16 12:26:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/userGeneralSettings.vm	2012-06-05 22:03:24 +0000
@@ -7,7 +7,6 @@
 				currentLocale: getFieldValue( 'currentLocale' ),
 				currentLocaleDb: getFieldValue( 'currentLocaleDb' ),
 				currentStyle: getFieldValue( 'currentStyle' ),
-				chartsInDashboard: getFieldValue( 'chartsInDashboard' ),
 				autoSave: jQuery( '#autoSave' ).is(':checked' )
 			}, function ( json ) {
 				if ( json.response == "success" )
@@ -44,14 +43,6 @@
 #end
 </select>
 
-<h4>$i18n.getString( "dashboard_charts_to_display" )</h4>
-
-<select id="chartsInDashboard" name="chartsInDashboard" style="min-width:250px">
-#foreach( $charts in $chartsInDashboardOptions )
-	<option value="$charts" #if($charts == $chartsInDashboard) selected="selected"#end>$charts</option>
-#end
-</select>
-
 <h4>$i18n.getString( "auto_save_data_entry_form" )</h4>
 <input type="checkbox" id="autoSave" name="autoSave" #if( $autoSave ) checked="checked"#end/>