dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #09485
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2527: Removed the dataset association management
------------------------------------------------------------
revno: 2527
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-01-11 18:04:20 +0100
message:
Removed the dataset association management
removed:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTable.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTableService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultPivotDataSetAssociationTableService.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/DefineAssociationAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetOrganisationUnitLevelsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetPeriodTypesAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetPivotDataSetAssocicationTableAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/pivotAssociationTable.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewPivotAssociationTableForm.vm
modified:
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.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
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTable.java 2010-08-27 07:07:57 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTable.java 1970-01-01 00:00:00 +0000
@@ -1,101 +0,0 @@
-/*
- * 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.
- */
-package org.hisp.dhis.dataset;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.aggregation.AggregatedDataSetAssociation;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-
-/**
- * @author Chau Thu Tran
- * @version $ID : DataSetAssociationTable.java 10:17:51 AM Jul 9, 2010
- */
-public class PivotDataSetAssociationTable
-{
- private List<DataSet> dataSets = new ArrayList<DataSet>();
-
-// private List<PeriodType> periodTypes = new ArrayList<PeriodType>();
-
- private List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>();
-
- private List<AggregatedDataSetAssociation> associations = new ArrayList<AggregatedDataSetAssociation>();
-
- // -------------------------------------------------------------------------
- // Constructor
- // -------------------------------------------------------------------------
-
- public PivotDataSetAssociationTable()
- {
- }
-
- // -------------------------------------------------------------------------
- // Getters and setters
- // -------------------------------------------------------------------------
-
- public List<DataSet> getDataSets()
- {
- return dataSets;
- }
-
- public void setDataSets( List<DataSet> dataSets )
- {
- this.dataSets = dataSets;
- }
-
-// public List<PeriodType> getPeriodTypes()
-// {
-// return periodTypes;
-// }
-//
-// public void setPeriodTypes( List<PeriodType> periodTypes )
-// {
-// this.periodTypes = periodTypes;
-// }
-
- public List<OrganisationUnit> getOrganisationUnits()
- {
- return organisationUnits;
- }
-
- public void setOrganisationUnits( List<OrganisationUnit> organisationUnits )
- {
- this.organisationUnits = organisationUnits;
- }
-
- public List<AggregatedDataSetAssociation> getAssociations()
- {
- return associations;
- }
-
- public void setAssociations( List<AggregatedDataSetAssociation> associations )
- {
- this.associations = associations;
- }
-
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTableService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTableService.java 2010-08-20 07:54:16 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/PivotDataSetAssociationTableService.java 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-/*
- * 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.
- */
-package org.hisp.dhis.dataset;
-
-
-
-/**
- * @author Chau Thu Tran
- * @version $ID : PivotDataSetAssociationTableService.java 10:22:40 AM Jul 9,
- * 2010
- */
-public interface PivotDataSetAssociationTableService
-{
- /**
- * Returns a PivotDataSetAssociationTable object.
- *
- * @param level the OrganisationUnit level.
- * @return a PivotDataSetAssociationTable object.
- */
- PivotDataSetAssociationTable getPivotDataSetAssociationTable( int level, String periodTypeName );
-}
=== removed file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultPivotDataSetAssociationTableService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultPivotDataSetAssociationTableService.java 2010-08-20 08:03:31 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultPivotDataSetAssociationTableService.java 1970-01-01 00:00:00 +0000
@@ -1,141 +0,0 @@
-/*
- * 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.
- */
-package org.hisp.dhis.dataset;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.hisp.dhis.aggregation.AggregatedDataSetAssociation;
-import org.hisp.dhis.dataset.comparator.DataSetNameComparator;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.period.PeriodService;
-import org.hisp.dhis.period.PeriodType;
-
-/**
- * @author Lars Helge Overland
- * @version $ID : DefaultPivotDataSetAssociationTableService.java 10:28:18 AM
- * Jul 30, 2010
- */
-public class DefaultPivotDataSetAssociationTableService
- implements PivotDataSetAssociationTableService
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private DataSetService dataSetService;
-
- public void setDataSetService( DataSetService dataSetService )
- {
- this.dataSetService = dataSetService;
- }
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- private PeriodService periodService;
-
- public void setPeriodService( PeriodService periodService )
- {
- this.periodService = periodService;
- }
-
- // -------------------------------------------------------------------------
- // Implementation methods
- // -------------------------------------------------------------------------
-
- @Override
- public PivotDataSetAssociationTable getPivotDataSetAssociationTable( int level, String periodTypeName )
- {
- PeriodType periodType = periodService.getPeriodTypeByName( periodTypeName );
-
- List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>( organisationUnitService
- .getOrganisationUnitsAtLevel( level ) );
-
- List<AggregatedDataSetAssociation> associations = new ArrayList<AggregatedDataSetAssociation>();
-
- Map<Integer, Collection<DataSet>> dataSetMap = getDataSetMap( organisationUnits );
-
- List<DataSet> dataSetsByPeriodType = new ArrayList<DataSet>( dataSetService
- .getDataSetsByPeriodType( periodType ) );
-
- if ( dataSetsByPeriodType.size() > 0 )
- {
- Collections.sort( dataSetsByPeriodType, new DataSetNameComparator() );
-
- for ( OrganisationUnit orgunit : organisationUnits )
- {
- Collection<DataSet> dataSetCollection = dataSetMap.get( orgunit.getId() );
-
- for ( DataSet dataSet : dataSetsByPeriodType )
- {
- boolean assigned = dataSetCollection.contains( dataSet );
-
- AggregatedDataSetAssociation assoc = new AggregatedDataSetAssociation();
- assoc.setOrganisationUnitId( orgunit.getId() );
- assoc.setDataSetId( dataSet.getId() );
- assoc.setLevel( level );
- assoc.setAssigned( assigned );
-
- associations.add( assoc );
- }
- }
- }
-
- PivotDataSetAssociationTable table = new PivotDataSetAssociationTable();
- table.setOrganisationUnits( organisationUnits );
- table.setDataSets( dataSetsByPeriodType );
- table.setAssociations( associations );
-
- return table;
- }
-
- // -------------------------------------------------------------------------
- // Private methods
- // -------------------------------------------------------------------------
-
- private Map<Integer, Collection<DataSet>> getDataSetMap( Collection<OrganisationUnit> organisationUnits )
- {
- Map<Integer, Collection<DataSet>> dataSetMap = new HashMap<Integer, Collection<DataSet>>();
-
- for ( OrganisationUnit unit : organisationUnits )
- {
- dataSetMap.put( unit.getId(), dataSetService.getDataSetsBySource( unit ) );
- }
-
- return dataSetMap;
- }
-}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2011-01-07 11:38:55 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2011-01-11 17:04:20 +0000
@@ -440,14 +440,6 @@
<bean id="org.hisp.dhis.i18n.locale.LocaleManagerDb" class="org.hisp.dhis.i18n.locale.DatabaseLocaleManager">
<property name="userSettingService" ref="org.hisp.dhis.user.UserSettingService" />
</bean>
-
- <bean id="org.hisp.dhis.dataset.PivotDataSetAssociationTableService"
- class="org.hisp.dhis.dataset.DefaultPivotDataSetAssociationTableService">
- <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
- <property name="organisationUnitService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
- </bean>
<bean id="org.hisp.dhis.aggregation.AggregatedDataValueService"
class="org.hisp.dhis.aggregation.DefaultAggregatedDataValueService">
=== removed directory 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation'
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/DefineAssociationAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/DefineAssociationAction.java 2010-08-20 07:54:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/DefineAssociationAction.java 1970-01-01 00:00:00 +0000
@@ -1,117 +0,0 @@
-/*
- * 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.
- */
-package org.hisp.dhis.dataset.action.pivotassociation;
-
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ID : DefineAssociationAction.java 4:49:05 PM Jul 30, 2010
- */
-public class DefineAssociationAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private DataSetService dataSetService;
-
- private OrganisationUnitService organisationUnitService;
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private Integer dataSetId;
-
- private Integer organisationId;
-
- private boolean assigned;
-
- // -------------------------------------------------------------------------
- // Getters && Setters
- // -------------------------------------------------------------------------
-
- public void setDataSetService( DataSetService dataSetService )
- {
- this.dataSetService = dataSetService;
- }
-
- public void setDataSetId( Integer dataSetId )
- {
- this.dataSetId = dataSetId;
- }
-
- public void setOrganisationId( Integer organisationId )
- {
- this.organisationId = organisationId;
- }
-
- public void setAssigned( boolean assigned )
- {
- this.assigned = assigned;
- }
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- DataSet dataSet = dataSetService.getDataSet( dataSetId );
- OrganisationUnit orgunit = organisationUnitService.getOrganisationUnit( organisationId );
-
- if ( assigned )
- {
- dataSet.getSources().add( orgunit );
- orgunit.getDataSets().add( dataSet );
- }
- else
- {
- dataSet.getSources().remove( orgunit );
- orgunit.getDataSets().remove( dataSet );
- }
-
- dataSetService.updateDataSet( dataSet );
-
- return SUCCESS;
- }
-
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetOrganisationUnitLevelsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetOrganisationUnitLevelsAction.java 2010-08-20 07:54:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetOrganisationUnitLevelsAction.java 1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
-package org.hisp.dhis.dataset.action.pivotassociation;
-
-/*
- * 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.organisationunit.OrganisationUnitLevel;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetOrganisationUnitLevelsAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private List<OrganisationUnitLevel> levels;
-
- public List<OrganisationUnitLevel> getLevels()
- {
- return levels;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- levels = organisationUnitService.getOrganisationUnitLevels();
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetPeriodTypesAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetPeriodTypesAction.java 2010-08-20 07:54:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetPeriodTypesAction.java 1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
-package org.hisp.dhis.dataset.action.pivotassociation;
-
-/*
- * 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.period.PeriodService;
-import org.hisp.dhis.period.PeriodType;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class GetPeriodTypesAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PeriodService periodService;
-
- public void setPeriodService( PeriodService periodService )
- {
- this.periodService = periodService;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private List<PeriodType> periodTypes;
-
- public List<PeriodType> getPeriodTypes()
- {
- return periodTypes;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- periodTypes = periodService.getAllPeriodTypes();
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetPivotDataSetAssocicationTableAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetPivotDataSetAssocicationTableAction.java 2010-08-31 05:47:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/pivotassociation/GetPivotDataSetAssocicationTableAction.java 1970-01-01 00:00:00 +0000
@@ -1,98 +0,0 @@
-/*
- * 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.
- */
-package org.hisp.dhis.dataset.action.pivotassociation;
-
-import org.hisp.dhis.dataset.PivotDataSetAssociationTable;
-import org.hisp.dhis.dataset.PivotDataSetAssociationTableService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ID : GetPivotDataSetAssocicationTable.java 11:09:50 AM Jul 30, 2010
- */
-public class GetPivotDataSetAssocicationTableAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private PivotDataSetAssociationTableService associationTableService;
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer level;
-
- private String periodTypeName;
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private PivotDataSetAssociationTable associationtable;
-
- // -------------------------------------------------------------------------
- // Getters && Setters
- // -------------------------------------------------------------------------
-
- public PivotDataSetAssociationTable getAssociationtable()
- {
- return associationtable;
- }
-
- public void setPeriodTypeName( String periodTypeName )
- {
- this.periodTypeName = periodTypeName;
- }
-
- public void setAssociationTableService( PivotDataSetAssociationTableService associationTableService )
- {
- this.associationTableService = associationTableService;
- }
-
- public void setLevel( Integer level )
- {
- this.level = level;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
-
- associationtable = associationTableService.getPivotDataSetAssociationTable( level, periodTypeName );
-
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml 2010-12-30 09:13:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml 2011-01-11 17:04:20 +0000
@@ -179,37 +179,6 @@
</property>
</bean>
- <bean id="org.hisp.dhis.dataset.action.pivotassociation.GetPivotDataSetAssocicationTableAction"
- class="org.hisp.dhis.dataset.action.pivotassociation.GetPivotDataSetAssocicationTableAction"
- scope="prototype">
- <property name="associationTableService">
- <ref bean="org.hisp.dhis.dataset.PivotDataSetAssociationTableService"/>
- </property>
- </bean>
-
- <bean id="org.hisp.dhis.dataset.action.pivotassociation.GetOrganisationUnitLevelsAction"
- class="org.hisp.dhis.dataset.action.pivotassociation.GetOrganisationUnitLevelsAction"
- scope="prototype">
- <property name="organisationUnitService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
- </bean>
-
- <bean id="org.hisp.dhis.dataset.action.pivotassociation.GetPeriodTypesAction"
- class="org.hisp.dhis.dataset.action.pivotassociation.GetPeriodTypesAction"
- scope="prototype">
- <property name="periodService"
- ref="org.hisp.dhis.period.PeriodService"/>
- </bean>
-
- <bean id="org.hisp.dhis.dataset.action.pivotassociation.DefineAssociationAction"
- class="org.hisp.dhis.dataset.action.pivotassociation.DefineAssociationAction"
- scope="prototype">
- <property name="dataSetService"
- ref="org.hisp.dhis.dataset.DataSetService"/>
- <property name="organisationUnitService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
- </bean>
-
<!-- Validation -->
<bean id="org.hisp.dhis.dataset.action.ValidateDataSetAction"
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml 2010-11-29 16:43:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml 2011-01-11 17:04:20 +0000
@@ -364,35 +364,5 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
- <!-- PivotDataSetAssociationTableService -->
-
- <action name="displayAssociationTableForm" class="org.hisp.dhis.dataset.action.NoAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-dataset/viewPivotAssociationTableForm.vm</param>
- <param name="menu">/dhis-web-maintenance-dataset/menu.vm</param>
- <param name="javascripts">javascript/pivotAssociationTable.js,javascript/criteria.js</param>
- <param name="stylesheets">css/pivot.css</param>
- </action>
-
- <action name="getPivotAssociationTable" class="org.hisp.dhis.dataset.action.pivotassociation.GetPivotDataSetAssocicationTableAction">
- <result name="success" type="velocity-json">/dhis-web-maintenance-dataset/responsePivotAssociationTable.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
- <action name="getOrganisationUnitLevels" class="org.hisp.dhis.dataset.action.pivotassociation.GetOrganisationUnitLevelsAction">
- <result name="success" type="velocity-json">/dhis-web-maintenance-dataset/responseOrganisationUnitLevel.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
- <action name="getPeriodTypes" class="org.hisp.dhis.dataset.action.pivotassociation.GetPeriodTypesAction">
- <result name="success" type="velocity-json">/dhis-web-maintenance-dataset/responsePeriodType.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
- <action name="defineAssociation" class="org.hisp.dhis.dataset.action.pivotassociation.DefineAssociationAction">
- <result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
</package>
</struts>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm 2011-01-11 16:52:46 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/index.vm 2011-01-11 17:04:20 +0000
@@ -5,5 +5,4 @@
#introListImgItem( "dataSet.action" "dataset" "dataset" )
#introListImgItem( "section.action" "dataset_section" "dataset" )
#introListImgItem( "showAssignMultiDataSetForOrgunitForm.action" "assign_multidataset" "dataset" )
- #introListImgItem( "displayAssociationTableForm.action" "dataset_association_management" "dataset" )
</ul>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/pivotAssociationTable.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/pivotAssociationTable.js 2010-08-20 07:54:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/pivotAssociationTable.js 1970-01-01 00:00:00 +0000
@@ -1,412 +0,0 @@
-
-// -----------------------------------------------------------------------------
-// Global variables
-// -----------------------------------------------------------------------------
-
-var dataSets = []; // Array->associative array (id,name)
-var orgunits = []; // Array->associative array (id,name)
-var data = []; // Associative array [(dataset-periodType-orgunit), (association)]
-
-var sizes = []; // Associative array (dimension, size)
-
-var pivotDataSet = true; // Should correspond to init value in form
-var pivotOrgunit = false;
-
-var currentDataSet = 0;
-var currentOrgunit = 0;
-
-// -----------------------------------------------------------------------------
-// Public methods
-// -----------------------------------------------------------------------------
-
-/**
- * This method is called from the UI and is responsible for retrieving data from
- * the server and setting the global variables.
- */
-function getData()
-{
- clearGlobalVariables();
-
- var levelList = byId( "level" );
- var periodTypeList = byId("periodType");
-
- var level = levelList.options[ levelList.selectedIndex ].value;
- var periodTypeName = periodTypeList.options[ periodTypeList.selectedIndex ].value;
-
- document.getElementById( "dataLabel" ).innerHTML = i18n_organisation_unit_level + ": " + level + ", " + i18n_period_type + ": " + periodTypeName;
-
- hideDivs();
-
- showLoader();
-
- $.getJSON(
- "getPivotAssociationTable.action",
- {
- "level": level,
- "periodTypeName": periodTypeName
- },
- function( json )
- {
- var pivot = json.pivottable;
-
- dataSets = pivot.dataSets;
- orgunits = pivot.organisationUnits;
-
- sizes["dataSet"] = pivot.sizeDataSets;
- sizes["orgunit"] = pivot.sizeOrganisationUnits;
-
- data = pivot.associations[0];
-
- hideLoader();
-
- generateTable();
- }
- );
-}
-
-/**
- * This method is called from the UI and is responsible for pivoting the table.
- */
-function pivotData()
-{
- pivotDataSet = document.getElementById( "dataSetBox" ).checked;
- pivotOrgunit = document.getElementById( "orgunitBox" ).checked;
-
- hideDivs();
-
- generateTable();
-}
-
-
-/**
- * This method is called from the UI and assigns a dataset for orgunit.
- */
-function assignDataSet( dataSetId, organisationId, assigned, imgElement )
-{
- $.getJSON(
- "defineAssociation.action",
- {
- "dataSetId": dataSetId,
- "organisationId": organisationId,
- "assigned": assigned
- },
- function( json )
- {
- if ( json.response == "success" )
- {
- data[dataSetId + '-' + organisationId] = assigned;
-
- var action = 'assignDataSet( ' +
- dataSetId + ',' +
- organisationId + ',' +
- !assigned + ', this)';
-
- if(assigned == true){
- imgElement.src = "../images/check.png";
- imgElement.title = "Unassign";
- imgElement.setAttribute('onclick', action);
- }else{
- imgElement.src = "../images/cross.png";
- imgElement.title = "Assign";
- imgElement.setAttribute('onclick', action);
- }
- }
- }
- );
-}
-
-// -----------------------------------------------------------------------------
-// Supportive methods
-// -----------------------------------------------------------------------------
-
-/**
- * This method is responsible for generating the pivot table.
- */
-function generateTable()
-{
- var columnDataSets = pivotDataSet ? dataSets : [null];
- var columnOrgunits = pivotOrgunit ? orgunits : [null];
-
- var rowDataSets = pivotDataSet ? [null] : dataSets;
- var rowOrgunits = pivotOrgunit ? [null] : orgunits;
-
- var table = document.getElementById( "pivotTable" );
-
- clearTable( table );
-
- var columns = getColumns( columnDataSets, columnOrgunits );
- var rows = getRows( rowDataSets, rowOrgunits );
-
- var columnDimensions = getColumnDimensions();
- var rowDimensions = getRowDimensions();
-
- var colSpans = getSpans( columnDimensions );
- var rowSpans = getSpans( rowDimensions );
-
- var html = "<tr>";
-
- // ---------------------------------------------------------------------------
- // Column headers
- // ---------------------------------------------------------------------------
-
- for ( d in columnDimensions )
- {
- for ( rowDimension in rowDimensions ) // Make space for row header
- {
- html += "<td class='row'></td>";
- }
-
- var dimension = columnDimensions[d];
- var colSpan = colSpans[dimension];
-
- for ( c in columns )
- {
- var modulus = c % colSpan;
-
- if ( modulus == 0 )
- {
- html += "<td class='column' colspan='" + colSpan + "'>" + columns[c][dimension] + "</td>";
- }
- }
-
- html += "</tr>";
- }
-
- // ---------------------------------------------------------------------------
- // Rows
- // ---------------------------------------------------------------------------
-
- for ( r in rows )
- {
- html += "<tr>";
-
- for ( d in rowDimensions ) // Row headers
- {
- var dimension = rowDimensions[d];
- var rowSpan = rowSpans[dimension];
- var modulus = r % rowSpan;
-
- if ( modulus == 0 )
- {
- html += "<td class='row' rowspan='" + rowSpan + "'>" + rows[r][dimension] + "</td>";
- }
- }
-
- for ( c in columns ) // Values
- {
- var value = getValue( columns[c], rows[r] );
-
- var ids = mergeArrays( columns[c], rows[r] );
-
- html += "<td class='cell' " + value + "</td>";
- }
-
- html += "</tr>";
- }
-
- table.innerHTML = html;
-
- hidePivot();
-}
-
-/**
-* @param dimensions array -> dimensions
-*
-* @return associative array ( dimension, span )
-*/
-function getSpans( dimensions )
-{
- var spans = [];
-
- var lastIndex = ( dimensions.length - 1 );
-
- var span = 1;
-
- for ( var i=lastIndex; i>=0; i-- )
- {
- var dimension = dimensions[i];
-
- spans[dimension] = span;
-
- var dimensionSize = sizes[dimension];
-
- span = ( span * dimensionSize );
- }
-
- return spans;
-}
-
-/**
-* @param columnDataSets array -> associative array ( DataSetId, DataSetName )
-* @param columnOrgunits array -> associative array ( orgunitId, orgunitName )
-*
-* @return array -> associative array ( dataSetId, dataSet, periodTypeId, periodType, orgunitId, orgunit )
-*/
-function getColumns( columnDataSets, columnOrgunits )
-{
- var columns = [];
- var columnsIndex = 0;
-
- for ( var i=0; i<columnDataSets.length; i++ )
- {
- for ( var k=0; k<columnOrgunits.length; k++ )
- {
- var column = [];
-
- if ( columnDataSets[i] != null )
- {
- column["dataSetId"] = columnDataSets[i].id;
- column["dataSet"] = columnDataSets[i].name;
- }
-
- if ( columnOrgunits[k] != null )
- {
- column["orgunitId"] = columnOrgunits[k].id;
- column["orgunit"] = columnOrgunits[k].name;
- }
-
- columns[columnsIndex++] = column;
- }
- }
-
- return columns;
-}
-
-/**
-* @param rowDataSets array -> associative array ( dataSetId, dataSetName )
-* @param rowOrgunits array -> associative array ( orgunitId, orgunitName )
-*
-* @return array -> associative array ( dataSetId, dataSet, orgunitId, orgunit )
-*/
-function getRows( rowDataSets, rowOrgunits )
-{
- var rows = [];
- var rowsIndex = 0;
-
- for ( var i=0; i<rowDataSets.length; i++ )
- {
- for ( var k=0; k<rowOrgunits.length; k++ )
- {
- var row = [];
-
- if ( rowDataSets[i] != null )
- {
- row["dataSetId"] = rowDataSets[i].id;
- row["dataSet"] = rowDataSets[i].name;
- }
-
- if ( rowOrgunits[k] != null )
- {
- row["orgunitId"] = rowOrgunits[k].id;
- row["orgunit"] = rowOrgunits[k].name;
- }
-
- rows[rowsIndex++] = row;
- }
- }
-
- return rows;
-}
-
-/**
-* @return array -> dimension
-*/
-function getColumnDimensions()
-{
- var dimensions = [];
-
- if ( pivotDataSet )
- {
- dimensions[dimensions.length] = "dataSet";
- }
-
- if ( pivotOrgunit )
- {
- dimensions[dimensions.length] = "orgunit";
- }
-
- return dimensions;
-}
-
-/**
-* @return array -> dimension
-*/
-function getRowDimensions()
-{
- var dimensions = [];
-
- if ( !pivotDataSet )
- {
- dimensions[dimensions.length] = "dataSet";
- }
-
- if ( !pivotOrgunit )
- {
- dimensions[dimensions.length] = "orgunit";
- }
-
- return dimensions;
-}
-
-/**
- * @param array1 the first associative array.
- * @param array2 the second associative array.
- *
- * @return an associative array with the merged contents of the input arrays.
- */
-function mergeArrays( array1, array2 )
-{
- for ( a2 in array2 )
- {
- array1[a2] = array2[a2];
- }
-
- return array1;
-}
-
-/**
- * @param column associative array ( columnId, columnName )
- * @param row associative array ( rowId, rowName )
- *
- * @return the value for the given combination of dimension identifiers.
- */
-function getValue( column, row )
-{
- var key = mergeArrays( column, row );
-
- var keyString = key.dataSetId + "-" + key.orgunitId;
-
- var value = data[keyString];
-
- value = ( value!= null) ? eval(value) : false;
-
- if(value==true){
- value = '<img title="Unassign" src="../images/check.png" style="cursor:pointer; " onclick="assignDataSet( '+key.dataSetId+',' + key.orgunitId + ',' + !value + ', this )" />';
- }else{
- value = '<img title="Assign" src="../images/cross.png" style="cursor:pointer; " onclick="assignDataSet( '+key.dataSetId+',' + key.orgunitId + ',' + !value + ', this )" />';
- }
-
- return value;
-}
-
-/**
- * Clears the table.
- */
-function clearTable( table )
-{
- while ( table.rows.length > 0 )
- {
- table.deleteRow( 0 );
- }
-}
-
-/**
- * Clears the global variables.
- */
-function clearGlobalVariables()
-{
- dataSets.length = 0;
- orgunits.length = 0;
- data.length = 0;
- sizes.length = 0;
-}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.vm 2010-08-20 07:54:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/menu.vm 2011-01-11 17:04:20 +0000
@@ -4,5 +4,4 @@
<li><a href="dataSet.action">$i18n.getString( "dataset" ) </a></li>
<li><a href="section.action">$i18n.getString( "dataset_section" ) </a></li>
<li><a href="showAssignMultiDataSetForOrgunitForm.action">$i18n.getString( "dataset_assignment_editor" ) </a></li>
- <li><a href="displayAssociationTableForm.action">$i18n.getString( "dataset_association_management" ) </a></li>
</ul>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewPivotAssociationTableForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewPivotAssociationTableForm.vm 2010-09-21 06:16:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewPivotAssociationTableForm.vm 1970-01-01 00:00:00 +0000
@@ -1,74 +0,0 @@
-
-<!-- Control panel -->
-
-<input type="button" value='$i18n.getString( "data" )' style="width:80px" onclick="showCriteria()"/>
-<input type="button" value='$i18n.getString( "pivot" )' style="width:80px" onclick="showPivot()"/>
-<label id="dataLabel" style="color:#606060"></label>
-<hr style="height:1px; color:#d9ece1"/>
-
-<!-- Criteria -->
-
-<div id="criteria" style="display:none">
-
-<p>
- <label>$i18n.getString( "organisation_unit_level" )</label>
- <select id="level" style="width:200px">
- <option value="-1">[ $i18n.getString( "select_level" )... ]</option>
- </select>
-</p>
-
-<p>
- <label>$i18n.getString( "period_type" )</label>
- <select id="periodType" style="width:200px">
- <option value="null">[ $i18n.getString( "select_period_type" )... ]</option>
- </select>
-</p>
-
-<p>
- <input type="button" value='$i18n.getString( "get_data" )' style="width:80px" onclick="getData()"/>
- <input type="button" value='$i18n.getString( "cancel" )' style="width:80px" onclick="hideDivs()"/>
-</p>
-
-</div>
-
-<!-- Pivot -->
-
-<div id="pivot" style="display:none">
-
-<p>
-<table>
- <tr>
- <td><label>$i18n.getString( "datasets" )</label></td>
- <td><input type="checkbox" id="dataSetBox" checked="checked"/></td>
- </tr>
- <tr>
- <td><label>$i18n.getString( "org_units" )</label></td>
- <td><input type="checkbox" id="orgunitBox"/></td>
- </tr>
-</table>
-</p>
-
-<p>
- <input type="button" value='$i18n.getString( "pivot" )' style="width:80px" onclick="pivotData()"/>
- <input type="button" value='$i18n.getString( "cancel" )' style="width:80px" onclick="hideDivs()"/>
-</p>
-
-</div>
-
-<!-- Pivot table -->
-
-#parse( "dhis-web-commons/loader/loader.vm" )
-
-<div id="contentDiv">
- <table id="pivotTable" class="pivot"></table>
-</div>
-
-<!-- I18n variables && Init page -->
-
-<script type="text/javascript">
- var i18n_organisation_unit_level = '$encoder.jsEscape( $i18n.getString( "organisation_unit_level" ) , "'")';
- var i18n_period_type = '$encoder.jsEscape( $i18n.getString( "period_type" ) , "'")';
-
- loadOrgunitLevels();
- loadPeriodTypes();
-</script>
\ No newline at end of file