=== 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 2013-07-18 10:20:20 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css 2013-07-24 15:58:43 +0000 @@ -681,7 +681,7 @@ { padding: 6px 12px; height: 25px; - border: 1px solid #aaa; + border: 1px solid #bbb; border-radius: 3px; margin-right: 4px; font-family: LiberationSansBold, arial; === removed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ClearAreaAction.java' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ClearAreaAction.java 2012-10-03 14:32:11 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ClearAreaAction.java 1970-01-01 00:00:00 +0000 @@ -1,78 +0,0 @@ -package org.hisp.dhis.dashboard.action; - -/* - * Copyright (c) 2004-2012, 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.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.hisp.dhis.dashboard.DashboardManager; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - */ -public class ClearAreaAction - implements Action -{ - private static final Log log = LogFactory.getLog( ClearAreaAction.class ); - - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private DashboardManager manager; - - public void setManager( DashboardManager manager ) - { - this.manager = manager; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private String area; - - public void setArea( String area ) - { - this.area = area; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - manager.clearArea( area ); - - log.info( "Cleared area '" + area + "'" ); - - return SUCCESS; - } -} === removed 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 2013-05-21 11:39:31 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/ProvideContentAction.java 1970-01-01 00:00:00 +0000 @@ -1,171 +0,0 @@ -package org.hisp.dhis.dashboard.action; - -/* - * Copyright (c) 2004-2012, 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.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.hisp.dhis.chart.Chart; -import org.hisp.dhis.chart.ChartService; -import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator; -import org.hisp.dhis.dashboard.DashboardManager; -import org.hisp.dhis.hibernate.exception.ReadAccessDeniedException; -import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.user.CurrentUserService; -import org.hisp.dhis.user.User; - -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.ActionContext; - -/** - * @author Lars Helge Overland - * @version $Id$ - */ -public class ProvideContentAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private DashboardManager manager; - - public void setManager( DashboardManager manager ) - { - this.manager = manager; - } - - private ChartService chartService; - - public void setChartService( ChartService chartService ) - { - this.chartService = chartService; - } - - private CurrentUserService currentUserService; - - public void setCurrentUserService( CurrentUserService currentUserService ) - { - this.currentUserService = currentUserService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer noCharts; - - public void setNoCharts( Integer noCharts ) - { - this.noCharts = noCharts; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private Collection providerNames; - - public Collection getProviderNames() - { - return providerNames; - } - - private List charts; - - public List getCharts() - { - return charts; - } - - private List chartAreas = new ArrayList(); - - public List getChartAreas() - { - return chartAreas; - } - - private OrganisationUnit organisationUnit; - - public OrganisationUnit getOrganisationUnit() - { - return organisationUnit; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - Map content = manager.getContent(); - - ActionContext.getContext().getActionInvocation().getStack().push( content ); - - providerNames = manager.getContentProviderNames(); - - charts = new ArrayList( chartService.getAllCharts() ); - - Collections.sort( charts, IdentifiableObjectNameComparator.INSTANCE ); - - noCharts = noCharts == null ? 6 : noCharts; - - for ( int i = 1; i <= noCharts; i++ ) - { - Object id = content.get( DashboardManager.CHART_AREA_PREFIX + i ); - - Chart chart = null; - - if ( id != null ) - { - try - { - chart = chartService.getChart( Integer.valueOf( String.valueOf( id ) ) ); - } - catch ( ReadAccessDeniedException ex ) - { - // Chart has been made private, do nothing and continue - } - } - - chartAreas.add( chart ); - } - - User user = currentUserService.getCurrentUser(); - - if ( user != null ) - { - organisationUnit = user.getOrganisationUnit(); - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDocumentAction.java' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDocumentAction.java 2013-07-22 17:46:51 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDocumentAction.java 1970-01-01 00:00:00 +0000 @@ -1,101 +0,0 @@ -package org.hisp.dhis.dashboard.action; - -/* - * Copyright (c) 2004-2012, 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.dashboard.DashboardContent; -import org.hisp.dhis.dashboard.DashboardManager; -import org.hisp.dhis.document.Document; -import org.hisp.dhis.document.DocumentService; -import org.hisp.dhis.user.CurrentUserService; -import org.hisp.dhis.user.User; -import org.springframework.beans.factory.annotation.Autowired; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - */ -public class RemoveDocumentAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private CurrentUserService currentUserService; - - public void setCurrentUserService( CurrentUserService currentUserService ) - { - this.currentUserService = currentUserService; - } - - @Autowired - private DashboardManager dashboardManager; - - private DocumentService documentService; - - public void setDocumentService( DocumentService documentService ) - { - this.documentService = documentService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - User user = currentUserService.getCurrentUser(); - - if ( user != null ) - { - DashboardContent content = dashboardManager.getDashboardContent( user ); - - Document document = documentService.getDocument( id ); - - if ( content.getDocuments().remove( document ) ) - { - dashboardManager.saveDashboardContent( content ); - } - } - - return SUCCESS; - } -} - === removed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveMapViewAction.java' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveMapViewAction.java 2013-07-22 17:46:51 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveMapViewAction.java 1970-01-01 00:00:00 +0000 @@ -1,100 +0,0 @@ -package org.hisp.dhis.dashboard.action; - -/* - * Copyright (c) 2004-2012, 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.dashboard.DashboardContent; -import org.hisp.dhis.dashboard.DashboardManager; -import org.hisp.dhis.mapping.Map; -import org.hisp.dhis.mapping.MappingService; -import org.hisp.dhis.user.CurrentUserService; -import org.hisp.dhis.user.User; -import org.springframework.beans.factory.annotation.Autowired; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - */ -public class RemoveMapViewAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private CurrentUserService currentUserService; - - public void setCurrentUserService( CurrentUserService currentUserService ) - { - this.currentUserService = currentUserService; - } - - @Autowired - private DashboardManager dashboardManager; - - private MappingService mappingService; - - public void setMappingService( MappingService mappingService ) - { - this.mappingService = mappingService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - User user = currentUserService.getCurrentUser(); - - if ( user != null ) - { - DashboardContent content = dashboardManager.getDashboardContent( user ); - - Map map = mappingService.getMap( id ); - - if ( content.getMaps().remove( map ) ) - { - dashboardManager.saveDashboardContent( content ); - } - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportAction.java' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportAction.java 2013-07-22 17:46:51 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportAction.java 1970-01-01 00:00:00 +0000 @@ -1,100 +0,0 @@ -package org.hisp.dhis.dashboard.action; - -/* - * Copyright (c) 2004-2012, 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.dashboard.DashboardContent; -import org.hisp.dhis.dashboard.DashboardManager; -import org.hisp.dhis.report.Report; -import org.hisp.dhis.report.ReportService; -import org.hisp.dhis.user.CurrentUserService; -import org.hisp.dhis.user.User; -import org.springframework.beans.factory.annotation.Autowired; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - */ -public class RemoveReportAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private CurrentUserService currentUserService; - - public void setCurrentUserService( CurrentUserService currentUserService ) - { - this.currentUserService = currentUserService; - } - - @Autowired - private DashboardManager dashboardManager; - - private ReportService reportService; - - public void setReportService( ReportService reportService ) - { - this.reportService = reportService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - User user = currentUserService.getCurrentUser(); - - if ( user != null ) - { - DashboardContent content = dashboardManager.getDashboardContent( user ); - - Report report = reportService.getReport( id ); - - if ( content.getReports().remove( report ) ) - { - dashboardManager.saveDashboardContent( content ); - } - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportTableAction.java' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportTableAction.java 2013-07-22 17:46:51 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveReportTableAction.java 1970-01-01 00:00:00 +0000 @@ -1,100 +0,0 @@ -package org.hisp.dhis.dashboard.action; - -/* - * Copyright (c) 2004-2012, 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.dashboard.DashboardContent; -import org.hisp.dhis.dashboard.DashboardManager; -import org.hisp.dhis.reporttable.ReportTable; -import org.hisp.dhis.reporttable.ReportTableService; -import org.hisp.dhis.user.CurrentUserService; -import org.hisp.dhis.user.User; -import org.springframework.beans.factory.annotation.Autowired; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - */ -public class RemoveReportTableAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private CurrentUserService currentUserService; - - public void setCurrentUserService( CurrentUserService currentUserService ) - { - this.currentUserService = currentUserService; - } - - @Autowired - private DashboardManager dashboardManager; - - private ReportTableService reportTableService; - - public void setReportTableService( ReportTableService reportTableService ) - { - this.reportTableService = reportTableService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private Integer id; - - public void setId( Integer id ) - { - this.id = id; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - User user = currentUserService.getCurrentUser(); - - if ( user != null ) - { - DashboardContent content = dashboardManager.getDashboardContent( user ); - - ReportTable table = reportTableService.getReportTable( id ); - - if ( content.getReportTables().remove( table ) ) - { - dashboardManager.saveDashboardContent( content ); - } - } - - return SUCCESS; - } -} === removed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/SetAreaItemAction.java' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/SetAreaItemAction.java 2012-10-03 14:32:11 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/SetAreaItemAction.java 1970-01-01 00:00:00 +0000 @@ -1,85 +0,0 @@ -package org.hisp.dhis.dashboard.action; - -/* - * Copyright (c) 2004-2012, 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.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.hisp.dhis.dashboard.DashboardManager; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - */ -public class SetAreaItemAction - implements Action -{ - private static final Log log = LogFactory.getLog( SetAreaItemAction.class ); - - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private DashboardManager manager; - - public void setManager( DashboardManager manager ) - { - this.manager = manager; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private String area; - - public void setArea( String area ) - { - this.area = area; - } - - private String item; - - public void setItem( String item ) - { - this.item = item; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - { - manager.setAreaItem( area, item ); - - log.info( "Sat item '" + item + "' on area '" + area + "'" ); - - return SUCCESS; - } -} === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml 2013-07-22 17:46:51 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml 2013-07-24 15:58:43 +0000 @@ -9,47 +9,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2013-07-03 17:47:01 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2013-07-24 15:58:43 +0000 @@ -67,7 +67,7 @@ data_visualizer=Data visualizer report_table=Report table data_set_report=Data set report -search_for_users_charts_maps_reports=Search for users, charts, maps and reports +search_for_users_charts_maps_reports=Search for users, charts, maps, reports and resources no_hits=No hits, try again profile=Profile works_as=Works as @@ -104,4 +104,6 @@ no_of_Users=Number of users user_group=User Group groups=Groups -search=Search \ No newline at end of file +search=Search +rename_current_dashboard=Rename current dashboard +delete_current_dashboard=Delete current dashboard \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml 2013-07-22 15:17:19 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml 2013-07-24 15:58:43 +0000 @@ -19,44 +19,6 @@ javascript/dashboard.js - - /dhis-web-dashboard-integration/dashboard.vm - - - - - /dhis-web-dashboard-integration/responseSuccess.vm - - plainTextError - - - - /dhis-web-dashboard-integration/responseSuccess.vm - - plainTextError - - - - index.action - - - - index.action - - - - index.action - - - - index.action - - $i18n.getString( "close" ) $i18n.getString( "clear" ) #if( $chart ) - $i18n.getString( "view_full_size" ) - $i18n.getString( "share" ) + $i18n.getString( "view_full_size" ) + $i18n.getString( "share" ) #end #end @@ -49,8 +49,8 @@ #if ( $chart ) - + #else
$i18n.getString( 'this_is_a_chart_area' )

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2013-07-22 21:08:05 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2013-07-24 15:58:43 +0000 @@ -1,9 +1,15 @@ +dhis2.util.namespace( 'dhis2.db' ); + +dhis2.db.current; +dhis2.db.currentShareType; +dhis2.db.currentShareId; + $( document ).ready( function() { $( "#interpretationArea" ).autogrow(); - $( document ).click( hideSearch ); + $( document ).click( dhis2.db.hideSearch ); $( "#searchField" ).focus( function() { $( "#searchDiv" ).css( "border-color", "#999" ); @@ -12,207 +18,464 @@ } ); $( "#searchField" ).focus(); - $( "#searchField" ).keyup( search ); - - var viewportWidth = parseInt( $( window ).width() ); - var linkWidth = parseInt( 334 ); - var chartWidth = parseInt( 325 ); - - if ( viewportWidth == undefined ) - { - viewportWidth = parseInt( 1366 ); - } - - var noCharts = 2 * Math.floor( ( viewportWidth - linkWidth + 4 ) / chartWidth ); - - $( "#contentDiv" ).load( "provideContent.action?noCharts=" + noCharts + "&_dc=" + getRandomNumber() ); + $( "#searchField" ).keyup( dhis2.db.search ); + + dhis2.db.renderDashboardListLoadFirst(); } ); -function setAreaItem( area, item ) -{ - $.get( "setAreaItem.action", { - 'area' : area, - 'item' : item - }, function() - { - window.location.href = "index.action"; - } ); -} - -function clearArea( area ) -{ - $.get( "clearArea.action", { - 'area' : area - }, function() - { - window.location.href = "index.action"; - } ); -} - -function viewChart( url, name ) -{ - var width = 820; - var height = 520; - var title = i18n_viewing + " " + name; - - $( "#chartImage" ).attr( "src", url ); - $( "#chartView" ).dialog( { - autoOpen : true, - modal : true, - height : height + 65, - width : width + 25, - resizable : false, - title : title - } ); -} - -function explore( uid ) -{ - window.location.href = "../dhis-web-visualizer/app/index.html?id=" + uid; -} - -function viewShareForm( uid, name ) -{ - $( "#interpretationChartId" ).val( uid ); - - var title = i18n_share_your_interpretation_of + " " + name; - - $( "#shareForm" ).dialog( { - modal: true, - width: 550, - resizable: false, - title: title - } ); -} - -function shareInterpretation() -{ - var chartId = $( "#interpretationChartId" ).val(); - var text = $( "#interpretationArea" ).val(); - - if ( text.length && $.trim( text ).length ) - { - text = $.trim( text ); - - var url = "../api/interpretations/chart/" + chartId; - - // TODO url += ( ou && ou.length ) ? "?ou=" + ou : ""; - - $.ajax( url, { - type: "POST", - contentType: "text/html", - data: text, - success: function() { - $( "#shareForm" ).dialog( "close" ); - $( "#interpretationArea" ).val( "" ); - setHeaderDelayMessage( i18n_interpretation_was_shared ); - } - } ); - } -} - -function showShareHelp() -{ - $( "#shareHelpForm" ).dialog( { - modal: true, - width: 380, - resizable: false, - title: "Share your data interpretations" - } ); -} - -function search() +//------------------------------------------------------------------------------ +// Dashboard +//------------------------------------------------------------------------------ + +dhis2.db.tmpl = { + openAddLink: "
  • Add new
  • " + + "Manage
  • ", + + dashboardLink: "
  • ${name}
  • ", + + moduleIntro: "
  • Click Add new to get started
  • ", + + dashboardIntro: "
  • Add stuff by searching from the search field above
  • ", + + hitHeader: "
  • ${title}
  • ", + + hitItem: "
  • ${name}" + + "Add
  • ", + + chartItem: "
  • " + + "
  • ", + + mapItem: "
  • " + + "
  • " +}; + +dhis2.db.openAddDashboardForm = function() +{ + $( "#addDashboardForm" ).dialog( { + autoOpen: true, + modal: true, + width: 405, + height: 100, + resizable: false, + title: "Add new dashboard" + } ); +} + +dhis2.db.openManageDashboardForm = function() +{ + if ( undefined !== dhis2.db.current ) + { + $.getJSON( "../api/dashboards/" + dhis2.db.current, function( data ) + { + var name = data.name; + $( "#dashboardRename" ).val( name ); + + $( "#manageDashboardForm" ).dialog( { + autoOpen: true, + modal: true, + width: 405, + height: 275, + resizable: false, + title: name + } ); + } ); + } +} + +dhis2.db.addDashboard = function() +{ + var item = '{"name": "' + $( "#dashboardName" ).val() + '"}'; + + $.ajax( { + type: "post", + url: "../api/dashboards", + data: item, + contentType: "application/json", + success: function( data, text, xhr ) { + $( "#addDashboardForm" ).dialog( "destroy" ); + $( "#dashboardName" ).val( "" ); + dhis2.db.renderDashboardListLoadFirst(); + } + } ); +} + +dhis2.db.renameDashboard = function() +{ + var name = $( "#dashboardRename" ).val(); + + if ( undefined !== dhis2.db.current && undefined !== name && name.trim().length > 0 ) + { + var data = "{ \"name\": \"" + name + "\"}"; + + $.ajax( { + type: "put", + url: "../api/dashboards/" + dhis2.db.current, + contentType: "application/json", + data: data, + success: function() { + $( "#manageDashboardForm" ).dialog( "destroy" ); + $( "#dashboardRename" ).val( "" ); + dhis2.db.renderDashboardListLoadFirst(); + } + } ); + } +} + +dhis2.db.removeDashboard = function() +{ + if ( undefined !== dhis2.db.current ) + { + $.ajax( { + type: "delete", + url: "../api/dashboards/" + dhis2.db.current, + success: function() { + $( "#manageDashboardForm" ).dialog( "destroy" ); + dhis2.db.renderDashboardListLoadFirst(); + } + } ); + } +} + +dhis2.db.renderDashboardListLoadFirst = function() +{ + var $l = $( "#dashboardList" ); + + $l.empty().append( dhis2.db.tmpl.openAddLink ); + + $.getJSON( "../api/dashboards.json?paging=false&links=false", function( data ) + { + if ( undefined !== data.dashboards ) + { + var first; + + $.each( data.dashboards, function( index, dashboard ) + { + $l.append( $.tmpl( dhis2.db.tmpl.dashboardLink, { "id": dashboard.id, "name": dashboard.name } ) ); + + if ( index == 0 ) + { + first = dashboard.id; + } + } ); + + if ( undefined == dhis2.db.current ) + { + dhis2.db.current = first; + } + + dhis2.db.renderDashboard( dhis2.db.current ); + } + else + { + dhis2.db.clearDashboard(); + $( "#contentList" ).append( $.tmpl( dhis2.db.tmpl.moduleIntro ) ); + } + } ); +} + +dhis2.db.clearDashboard = function() +{ + $d = $( "#contentList" ).empty(); +} + +dhis2.db.renderDashboard = function( id ) +{ + $( "#dashboard-" + dhis2.db.current ).removeClass( "currentDashboard" ); + + dhis2.db.current = id; + + $( "#dashboard-" + dhis2.db.current ).addClass( "currentDashboard" ); + + $d = $( "#contentList" ).empty(); + + $.getJSON( "../api/dashboards/" + id, function( data ) + { + if ( undefined !== data.items ) + { + $.each( data.items, function( index, item ) + { + if ( "chart" == item.type ) + { + $d.append( $.tmpl( dhis2.db.tmpl.chartItem, { "itemId": item.id, "id": item.chart.id, "name": item.chart.name } ) ) + } + else if ( "map" == item.type ) + { + $d.append( $.tmpl( dhis2.db.tmpl.mapItem, { "itemId": item.id, "id": item.map.id, "name": item.map.name } ) ) + } + else if ( "users" == item.type ) + { + dhis2.db.renderLinkItem( $d, item.id, item.users, "Users" ); + } + else if ( "reportTables" == item.type ) + { + dhis2.db.renderLinkItem( $d, item.id, item.reportTables, "Pivot tables" ); + } + else if ( "reports" == item.type ) + { + dhis2.db.renderLinkItem( $d, item.id, item.reports, "Reports" ); + } + else if ( "resources" == item.type ) + { + dhis2.db.renderLinkItem( $d, item.id, item.resources, "Resources" ); + } + } ); + } + else + { + $d.append( $.tmpl( dhis2.db.tmpl.dashboardIntro ) ); + } + } ); +} + +dhis2.db.renderLinkItem = function( $d, itemId, contents, title ) +{ + var html = + "
  • " + + "
  • "; + + $d.append( html ); +} + +dhis2.db.addItemContent = function( type, id ) +{ + if ( undefined !== dhis2.db.current ) + { + $.ajax( { + type: "post", + url: "../api/dashboards/" + dhis2.db.current + "/items/content", + data: { + type: type, + id: id + }, + success: function() { + dhis2.db.renderDashboard( dhis2.db.current ); + } + } ); + } +} + +dhis2.db.removeItem = function( id ) +{ + $.ajax( { + type: "delete", + url: "../api/dashboards/" + dhis2.db.current + "/items/" + id, + success: function() { + dhis2.db.renderDashboard( dhis2.db.current ); + } + } ); +} + +dhis2.db.removeItemContent = function( itemId, contentId ) +{ + $.ajax( { + type: "delete", + url: "../api/dashboards/" + dhis2.db.current + "/items/" + itemId + "/content/" + contentId, + success: function() { + dhis2.db.renderDashboard( dhis2.db.current ); + } + } ); +} + +//------------------------------------------------------------------------------ +// Search +//------------------------------------------------------------------------------ + +dhis2.db.search = function() { var query = $.trim( $( "#searchField" ).val() ); if ( query.length == 0 ) { - hideSearch(); + dhis2.db.hideSearch(); return false; } var hits = $.get( "../api/dashboards/q/" + query, function( data ) { - $( "#hitDiv" ).show().html( getSearchResultList( data ) ); + var $h = $( "#hitDiv" ); + dhis2.db.renderSearch( data, $h ); + $h.show(); } ); } -function getSearchResultList( data ) +dhis2.db.renderSearch = function( data, $h ) { - var html = "
      "; + $h.empty().append( "
        " ); if ( data.searchCount > 0 ) { if ( data.userCount > 0 ) { - html += "
      • Users
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitHeader, { "title": "Users" } ) ); + for ( var i in data.users ) { var o = data.users[i]; - html += "
      • " + o.name + "
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitItem, { "link": "profile.action?id=" + o.id, "img": "user_small", "name": o.name, "type": "users", "id": o.id } ) ); } } if ( data.chartCount > 0 ) { - html += "
      • Charts
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitHeader, { "title": "Charts" } ) ); + for ( var i in data.charts ) { var o = data.charts[i]; - html += "
      • " + o.name + "
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitItem, { "link": "../dhis-web-visualizer/app/index.html?id=" + o.id, "img": "chart_small", "name": o.name, "type": "chart", "id": o.id } ) ); } } if ( data.mapCount > 0 ) { - html += "
      • Maps
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitHeader, { "title": "Maps" } ) ); + for ( var i in data.maps ) { var o = data.maps[i]; - html += "
      • " + o.name + "
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitItem, { "link": "../dhis-web-mapping/app/index.html?id=" + o.id, "img": "map_small", "name": o.name, "type": "map", "id": o.id } ) ); } } if ( data.reportTableCount > 0 ) { - html += "
      • Pivot tables
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitHeader, { "title": "Pivot tables" } ) ); + for ( var i in data.reportTables ) { var o = data.reportTables[i]; - html += "
      • " + o.name + "
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitItem, { "link": "../dhis-web-pivot/app/index.html?id=" + o.id, "img": "table_small", "name": o.name, "type": "reportTables", "id": o.id } ) ); } } if ( data.reportCount > 0 ) { - html += "
      • Standard reports
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitHeader, { "title": "Standard reports" } ) ); + for ( var i in data.reports ) { var o = data.reports[i]; - html += "
      • " + o.name + "
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitItem, { "link": "../dhis-web-reporting/getReportParams.action?uid=" + o.id, "img": "standard_report_small", "name": o.name, "type": "reports", "id": o.id } ) ); } } if ( data.resourceCount > 0 ) { - html += "
      • Resources
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitHeader, { "title": "Resources" } ) ); + for ( var i in data.resources ) { var o = data.resources[i]; - html += "
      • " + o.name + "
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitItem, { "link": "../api/documents/" + o.id, "img": "document_small", "name": o.name, "type": "resources", "id": o.id } ) ); } } } else { - html += "
      • No results found
      • "; + $h.append( $.tmpl( dhis2.db.tmpl.hitHeader, { "title": "No results found" } ) ); } - - html += "
      "; - - return html; } -function hideSearch() +dhis2.db.hideSearch = function() { $( "#hitDiv" ).hide(); } + +//------------------------------------------------------------------------------ +// Share +//------------------------------------------------------------------------------ + +dhis2.db.viewShareForm = function( id, type, name ) +{ + dhis2.db.currentShareId = id; + dhis2.db.currentShareType = type; + + var title = i18n_share_your_interpretation_of + " " + name; + + $( "#shareForm" ).dialog( { + modal: true, + width: 550, + resizable: false, + title: title + } ); +} + +dhis2.db.shareInterpretation = function() +{ + var text = $( "#interpretationArea" ).val(); + + if ( text.length && $.trim( text ).length ) + { + text = $.trim( text ); + + var url = "../api/interpretations/" + dhis2.db.currentShareType + "/" + dhis2.db.currentShareId; + + // TODO url += ( ou && ou.length ) ? "?ou=" + ou : ""; + + $.ajax( { + type: "post", + url: url, + contentType: "text/html", + data: text, + success: function() { + $( "#shareForm" ).dialog( "close" ); + $( "#interpretationArea" ).val( "" ); + setHeaderDelayMessage( i18n_interpretation_was_shared ); + } + } ); + } +} + +dhis2.db.showShareHelp = function() +{ + $( "#shareHelpForm" ).dialog( { + modal: true, + width: 380, + resizable: false, + title: "Share your data interpretations" + } ); +} + +//------------------------------------------------------------------------------ +// Chart +//------------------------------------------------------------------------------ + +dhis2.db.viewImage = function( url, name ) +{ + var width = 820; + var height = 550; + var title = i18n_viewing + " " + name; + + $( "#chartImage" ).attr( "src", url ); + $( "#chartView" ).dialog( { + autoOpen : true, + modal : true, + height : height + 65, + width : width + 25, + resizable : false, + title : title + } ); +} + +dhis2.db.exploreChart = function( uid ) +{ + window.location.href = "../dhis-web-visualizer/app/index.html?id=" + uid; +} + +dhis2.db.exploreMap = function( uid ) +{ + window.location.href = "../dhis-web-mapping/app/index.html?id=" + uid; +} + === 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 2013-07-03 17:47:01 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2013-07-24 15:58:43 +0000 @@ -10,7 +10,7 @@  •  $i18n.getString( "write_feedback" ) #if( $messageCount > 0 ) •  $messageCount #if( $messageCount > 1 )$i18n.getString( "unread_messages" )#else$i18n.getString( "unread_message" )#end #end  •  #if( $interpretationCount > 0 )$interpretationCount #if( $interpretationCount > 1 )$i18n.getString( "new_interpretations" )#else$i18n.getString( "new_interpretation" )#end -#else$i18n.getString( "share_interpretation" )#end +#else$i18n.getString( "share_interpretation" )#end
      @@ -22,12 +22,20 @@
    +
    +
    +
      +
      +
      +
      - + -
      +
      +
        +
        @@ -35,8 +43,7 @@
        - - +
        @@ -46,4 +53,18 @@
      • $i18n.getString( "from" ) $i18n.getString( "gis" ), $i18n.getString( "load_favorite_click_share" )
      • $i18n.getString( "from" ) $i18n.getString( "data_set_report" ), $i18n.getString( "generate_data_set_report_click_share" )
      • -
        \ No newline at end of file +
        + +
        + + $i18n.getString( 'create' ) +
        + +
        +

        $i18n.getString( "rename_current_dashboard" )

        +
        + $i18n.getString( "rename" )
        +

        $i18n.getString( "delete_current_dashboard" )

        + +
        + === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2013-07-22 15:17:19 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2013-07-24 15:58:43 +0000 @@ -18,7 +18,12 @@ #contentDiv { position: relative; - top: 46px; + top: 95px; +} + +#contentList +{ + list-style-type: none; } .removeIcon @@ -42,17 +47,6 @@ position: absolute; } -.chartArea -{ - border: 1px solid #d0d0d0; - padding: 1px; - height: 310px; - width: 310px; - overflow: hidden; - margin-bottom: 15px; - border-radius: 3px; -} - .chartArea div { position: absolute; @@ -77,6 +71,43 @@ margin-top: 6px; } +#dashboardListContainer +{ + position: absolute; + left: 20px; + right: 20px; + margin-top: 45px; +} + +#dashboardListWrapper +{ + position: relative; + width: auto; + height: 29px; + background-color: #fafafa; + border: 1px solid #d0d0d0; + border-radius: 3px; + padding: 0; +} + +#dashboardList li +{ + border-right: 1px solid #d0d0d0; + padding: 7px 14px 6px 14px; +} + +.dasboardIntro +{ + padding: 30px 140px; + font-size: 28px; + color: #bbb; +} + +.currentDashboard +{ + background-color: #eee; +} + .horizontalMenu ul { list-style-type: none; @@ -88,6 +119,51 @@ float: left; } +.item +{ + border: 1px solid #d0d0d0; + width: 405px; + height: 310px; + padding: 6px; + margin: 0 19px 19px 0; + border-radius: 3px; + cursor: pointer; +} + +.itemHeader +{ + margin: 0 0 2px 2px; +} + +.itemHeader a +{ + margin-right: 6px; +} + +.itemList +{ + display: inline; +} + +.itemList li +{ + float: none; + padding: 8px 10px; + border-bottom: 1px solid #ddd; +} + +.itemTitle +{ + font-family: 'LiberationSansBold'; + color: #336C8B; +} + +.removeItemLink +{ + float: right; + display: inline-block; +} + #searchDiv { position: absolute; @@ -135,22 +211,30 @@ box-shadow: #ccc 0px 1px 2px 0px; } -#hitDiv ul -{ +#hitDiv li +{ list-style-type: none; } -#hitDiv a -{ - display: block; - padding: 7px 6px 7px 12px; -} - #hitDiv img { margin-right: 7px; } +#hitDiv .viewLink +{ + display: inline-block; + padding: 7px 5px 7px 12px; + width: 412px; +} + +#hitDiv .addLink +{ + float: right; + display: inline-block; + padding: 9px 15px 7px 15px; +} + .hitHeader { padding: 5px 6px 5px 33px; @@ -199,6 +283,16 @@ cursor: pointer; } +#addDashboardForm +{ + display: none; +} + +#manageDashboardForm +{ + display: none; +} + #chartView { display: none;