=== 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 2010-07-01 10:08:55 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java 2011-04-05 18:10:58 +0000 @@ -42,7 +42,9 @@ String ID = UserSettingService.class.getName(); final String AUTO_SAVE_DATA_ENTRY_FORM = "autoSaveDataEntryForm"; - + + public static final String KEY_DASHBOARD_CHARTS_TO_DISPLAY = "keyDashboardChartsToDisplay"; + /** * Saves the name/value pair as a user setting connected to the currently * logged in user. === added directory 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/charts' === added file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/charts/DashboardChartsToDisplayManager.java' --- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/charts/DashboardChartsToDisplayManager.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/charts/DashboardChartsToDisplayManager.java 2011-04-05 18:10:58 +0000 @@ -0,0 +1,48 @@ +package org.hisp.dhis.options.charts; + +/* + * 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.List; + +/** + * @author mortenoh + */ +public interface DashboardChartsToDisplayManager +{ + static final String DASHBOARD_CHARTS_TO_DISPLAY_4 = "4"; + + static final String DASHBOARD_CHARTS_TO_DISPLAY_6 = "6"; + + static final String DASHBOARD_CHARTS_TO_DISPLAY_8 = "8"; + + public void setCurrentDashboardChartsToDisplay( String chartsToDisplay ); + + public String getCurrentDashboardChartsToDisplay(); + + public List getDashboardChartsToDisplay(); +} === added file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/charts/DefaultDashboardChartsToDisplayManager.java' --- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/charts/DefaultDashboardChartsToDisplayManager.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/charts/DefaultDashboardChartsToDisplayManager.java 2011-04-05 18:10:58 +0000 @@ -0,0 +1,88 @@ +package org.hisp.dhis.options.charts; + +/* + * 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.ArrayList; +import java.util.List; + +import org.hisp.dhis.user.NoCurrentUserException; +import org.hisp.dhis.user.UserSettingService; + +/** + * @author mortenoh + */ +public class DefaultDashboardChartsToDisplayManager + implements DashboardChartsToDisplayManager +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private UserSettingService userSettingService; + + public void setUserSettingService( UserSettingService userSettingService ) + { + this.userSettingService = userSettingService; + } + + // ------------------------------------------------------------------------- + // DashboardChartsToDisplayManager implementation + // ------------------------------------------------------------------------- + + @Override + public void setCurrentDashboardChartsToDisplay( String chartsToDisplay ) + { + try + { + userSettingService.saveUserSetting( UserSettingService.KEY_DASHBOARD_CHARTS_TO_DISPLAY, chartsToDisplay ); + } + catch ( NoCurrentUserException e ) + { + } + } + + @Override + public String getCurrentDashboardChartsToDisplay() + { + return (String) userSettingService.getUserSetting( UserSettingService.KEY_DASHBOARD_CHARTS_TO_DISPLAY, + DASHBOARD_CHARTS_TO_DISPLAY_4 ); + } + + @Override + public List getDashboardChartsToDisplay() + { + List list = new ArrayList(); + + list.add( DASHBOARD_CHARTS_TO_DISPLAY_4 ); + list.add( DASHBOARD_CHARTS_TO_DISPLAY_6 ); + list.add( DASHBOARD_CHARTS_TO_DISPLAY_8 ); + + return list; + } + +} === 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 2011-04-02 09:48:38 +0000 +++ dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml 2011-04-05 18:10:58 +0000 @@ -218,5 +218,11 @@ + + + + === added 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 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/UserSettingInterceptor.java 2011-04-05 18:10:58 +0000 @@ -0,0 +1,83 @@ +package org.hisp.dhis.interceptor; + +/* + * 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.HashMap; +import java.util.Map; + +import org.hisp.dhis.user.UserSettingService; + +import com.opensymphony.xwork2.ActionInvocation; +import com.opensymphony.xwork2.interceptor.Interceptor; + +/** + * @author mortenoh + */ +public class UserSettingInterceptor + implements Interceptor +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private UserSettingService userSettingService; + + public void setUserSettingService( UserSettingService userSettingService ) + { + this.userSettingService = userSettingService; + } + + // ------------------------------------------------------------------------- + // UserSettingInterceptor implementation + // ------------------------------------------------------------------------- + + private static final long serialVersionUID = -3123337448714959530L; + + public void destroy() + { + } + + public void init() + { + } + + public String intercept( ActionInvocation invocation ) + throws Exception + { + Map map = new HashMap(); + + Integer chartsToDisplay = Integer.valueOf( (String) userSettingService.getUserSetting( + UserSettingService.KEY_DASHBOARD_CHARTS_TO_DISPLAY, "4" ) ); + + map.put( UserSettingService.KEY_DASHBOARD_CHARTS_TO_DISPLAY, chartsToDisplay ); + + invocation.getStack().push( map ); + + return invocation.invoke(); + } +} === 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 2011-04-01 19:47:09 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2011-04-05 18:10:58 +0000 @@ -478,6 +478,10 @@ + + + + === 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 2011-03-29 21:28:45 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-04-05 18:10:58 +0000 @@ -54,6 +54,8 @@ class="org.hisp.dhis.interceptor.DisplayPropertyInterceptor" /> + + === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ProvideContentAction.java' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ProvideContentAction.java 2011-03-24 02:10:56 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ProvideContentAction.java 2011-04-05 18:10:58 +0000 @@ -37,6 +37,7 @@ import org.hisp.dhis.chart.ChartService; import org.hisp.dhis.chart.comparator.ChartTitleComparator; import org.hisp.dhis.dashboard.DashboardManager; +import org.hisp.dhis.user.UserSettingService; import com.opensymphony.xwork2.Action; import com.opensymphony.xwork2.ActionContext; @@ -58,14 +59,14 @@ { this.manager = manager; } - + private ChartService chartService; public void setChartService( ChartService chartService ) { this.chartService = chartService; } - + // ------------------------------------------------------------------------- // Output // ------------------------------------------------------------------------- @@ -76,13 +77,25 @@ { return providerNames; } - + private List charts; public List getCharts() { return charts; } + + private List chartAreas = new ArrayList(); + + public void setChartAreas( List chartAreas ) + { + this.chartAreas = chartAreas; + } + + public List getChartAreas() + { + return chartAreas; + } // ------------------------------------------------------------------------- // Action implementation @@ -91,15 +104,26 @@ public String execute() { Map content = manager.getContent(); - + ActionContext.getContext().getActionInvocation().getStack().push( content ); - + providerNames = manager.getContentProviderNames(); - + charts = new ArrayList( chartService.getAllCharts() ); - + Collections.sort( charts, new ChartTitleComparator() ); - + + Object keyDashboardChartsToDisplay = ActionContext.getContext().getActionInvocation().getStack() + .findString( UserSettingService.KEY_DASHBOARD_CHARTS_TO_DISPLAY ); + + Integer dashboardChartsCount = keyDashboardChartsToDisplay != null ? Integer + .valueOf( (String) keyDashboardChartsToDisplay ) : 4; + + for ( int i = 1; i <= dashboardChartsCount; i++ ) + { + chartAreas.add( content.get( "chartArea" + i ) ); + } + return SUCCESS; } } === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2009-03-03 16:46:36 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2011-04-05 18:10:58 +0000 @@ -33,7 +33,7 @@ #end - #if ( $chartId ) + #if ( $chartId ) #else @@ -56,21 +56,25 @@ #dropDownButtonDiv( "dropDownC" "areaC" ) #linkDropDownListDiv( "areaC" "dropDownC" $areaC ) - - - #dropDownButtonDiv( "chartDropDownA" "chartAreaA" ) - #chartDropDownListDiv( "chartAreaA" "chartDropDownA" $chartAreaA ) - - #dropDownButtonDiv( "chartDropDownB" "chartAreaB" ) - #chartDropDownListDiv( "chartAreaB" "chartDropDownB" $chartAreaB ) - - - - #dropDownButtonDiv( "chartDropDownC" "chartAreaC" ) - #chartDropDownListDiv( "chartAreaC" "chartDropDownC" $chartAreaC ) - - #dropDownButtonDiv( "chartDropDownD" "chartAreaD" ) - #chartDropDownListDiv( "chartAreaD" "chartDropDownD" $chartAreaD ) - + + + +#set( $sizeHalf = $chartAreas.size() / 2 ) + +#foreach( $chart in $chartAreas ) +#set( $count0 = $velocityCount - 1 ) +#set( $startHr = ($count0 % $sizeHalf) == 0 ) +#set( $endHr = ($count0 % $sizeHalf) == ($sizeHalf - 1) ) + +#if($startHr) #end + +#end +#if($endHr) #end +
+ #dropDownButtonDiv( "chartDropDown$velocityCount" "chartArea$velocityCount" ) + #chartDropDownListDiv( "chartArea$velocityCount" "chartDropDown$velocityCount" $chart ) +
+ + === added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableDashboardChartsToDisplayAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableDashboardChartsToDisplayAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableDashboardChartsToDisplayAction.java 2011-04-05 18:10:58 +0000 @@ -0,0 +1,70 @@ +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.List; + +import org.hisp.dhis.options.charts.DashboardChartsToDisplayManager; + +import com.opensymphony.xwork2.Action; + +public class GetAvailableDashboardChartsToDisplayAction + implements Action +{ + private DashboardChartsToDisplayManager dashboardChartsToDisplayManager; + + public void setDashboardChartsToDisplayManager( DashboardChartsToDisplayManager dashboardChartsToDisplayManager ) + { + this.dashboardChartsToDisplayManager = dashboardChartsToDisplayManager; + } + + private String currentDashboardChartsToDisplay; + + public String getCurrentDashboardChartsToDisplay() + { + return currentDashboardChartsToDisplay; + } + + private List dashboardChartsToDisplay; + + public List getDashboardChartsToDisplay() + { + return dashboardChartsToDisplay; + } + + @Override + public String execute() + throws Exception + { + dashboardChartsToDisplay = dashboardChartsToDisplayManager.getDashboardChartsToDisplay(); + + currentDashboardChartsToDisplay = dashboardChartsToDisplayManager.getCurrentDashboardChartsToDisplay(); + + return SUCCESS; + } +} === added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentDashboardChartsToDisplayAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentDashboardChartsToDisplayAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentDashboardChartsToDisplayAction.java 2011-04-05 18:10:58 +0000 @@ -0,0 +1,59 @@ +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.charts.DashboardChartsToDisplayManager; + +import com.opensymphony.xwork2.Action; + +public class SetCurrentDashboardChartsToDisplayAction + implements Action +{ + private DashboardChartsToDisplayManager dashboardChartsToDisplayManager; + + public void setDashboardChartsToDisplayManager( DashboardChartsToDisplayManager dashboardChartsToDisplayManager ) + { + this.dashboardChartsToDisplayManager = dashboardChartsToDisplayManager; + } + + private String currentDashboardChartsToDisplay; + + public void setCurrentDashboardChartsToDisplay( String currentDashboardChartsToDisplay ) + { + this.currentDashboardChartsToDisplay = currentDashboardChartsToDisplay; + } + + @Override + public String execute() + throws Exception + { + dashboardChartsToDisplayManager.setCurrentDashboardChartsToDisplay( currentDashboardChartsToDisplay ); + + 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 2011-01-17 17:03:05 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml 2011-04-05 18:10:58 +0000 @@ -63,6 +63,14 @@ + + + + + + @@ -114,6 +122,14 @@ + + + + + + === 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 2011-04-04 17:23:41 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2011-04-05 18:10:58 +0000 @@ -5,6 +5,7 @@ display_property = Display Property language = Interface Language sort_order = Sort Order +dashboard_charts_to_display = Dashboard Charts to Display code = Code system_settings = System settings shortname = Short name === 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 2011-01-19 08:56:03 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml 2011-04-05 18:10:58 +0000 @@ -39,6 +39,10 @@ + getAvailableDashboardChartsToDisplay + + + getAvailableDisplayProperties @@ -68,6 +72,10 @@ userSettings.action + + userSettings.action + + userSettings.action === 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 2011-03-18 14:28:38 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/userSettings.vm 2011-04-05 18:10:58 +0000 @@ -34,6 +34,12 @@ var style = list.options[list.selectedIndex].value; window.location.href = "setCurrentStyle.action?currentStyle=" + style; } + + function dashboardChartsToDisplayChanged( list ) + { + var listValue = list.options[list.selectedIndex].value; + window.location.href = "setCurrentDashboardChartsToDisplay.action?currentDashboardChartsToDisplay=" + listValue; + }
@@ -79,6 +85,14 @@ #end +

$i18n.getString( "dashboard_charts_to_display" )

+ + +

$i18n.getString( "auto_save_data_entry_form" )