dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11423
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3248: Data Set Editor - Removed multi-ajax-calls using one way to (un)assign all instead.
------------------------------------------------------------
revno: 3248
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-04-01 15:26:08 +0700
message:
Data Set Editor - Removed multi-ajax-calls using one way to (un)assign all instead.
removed:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedAssociationsEditorAction.java
added:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedAssociationEditorAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedMultiAssociationsEditorAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/loadIcons.vm
modified:
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/htmlGrid.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
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedAssociationEditorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedAssociationEditorAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedAssociationEditorAction.java 2011-04-01 08:26:08 +0000
@@ -0,0 +1,157 @@
+package org.hisp.dhis.dataset.action.editor;
+
+/*
+ * Copyright (c) 2004-2011, 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.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.i18n.I18n;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.source.Source;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class DefinedAssociationEditorAction
+ implements Action
+{
+ private static final String SEPERATE = " - ";
+
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private DataSetService dataSetService;
+
+ public void setDataSetService( DataSetService dataSetService )
+ {
+ this.dataSetService = dataSetService;
+ }
+
+ private OrganisationUnitService organisationUnitService;
+
+ public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+ {
+ this.organisationUnitService = organisationUnitService;
+ }
+
+ // -------------------------------------------------------------------------
+ // I18n
+ // -------------------------------------------------------------------------
+
+ private I18n i18n;
+
+ public void setI18n( I18n i18n )
+ {
+ this.i18n = i18n;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input
+ // -------------------------------------------------------------------------
+
+ private Integer orgUnitId;
+
+ public void setOrgUnitId( Integer orgUnitId )
+ {
+ this.orgUnitId = orgUnitId;
+ }
+
+ private Integer dataSetId;
+
+ public void setDataSetId( Integer dataSetId )
+ {
+ this.dataSetId = dataSetId;
+ }
+
+ private boolean assigned;
+
+ public void setAssigned( boolean assigned )
+ {
+ this.assigned = assigned;
+ }
+
+ // -------------------------------------------------------------------------
+ // Output
+ // -------------------------------------------------------------------------
+
+ public Integer getOrgUnitId()
+ {
+ return orgUnitId;
+ }
+
+ public Integer getDataSetId()
+ {
+ return dataSetId;
+ }
+
+ public boolean isAssigned()
+ {
+ return assigned;
+ }
+
+ private String title;
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implement
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ DataSet dataSet = dataSetService.getDataSet( dataSetId );
+ Source source = organisationUnitService.getOrganisationUnit( orgUnitId );
+
+ title = SEPERATE + dataSet.getName() + SEPERATE + source.getName();
+
+ if ( assigned )
+ {
+ dataSet.getSources().add( source );
+
+ title = i18n.getString( "assigned" ) + SEPERATE + title;
+ }
+ else
+ {
+ dataSet.getSources().remove( source );
+
+ title = i18n.getString( "unassigned" ) + SEPERATE + title;
+ }
+
+ 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/editor/DefinedAssociationsEditorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedAssociationsEditorAction.java 2011-03-23 04:38:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedAssociationsEditorAction.java 1970-01-01 00:00:00 +0000
@@ -1,157 +0,0 @@
-package org.hisp.dhis.dataset.action.editor;
-
-/*
- * Copyright (c) 2004-2011, 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.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.source.Source;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Dang Duy Hieu
- * @version $Id$
- */
-public class DefinedAssociationsEditorAction
- implements Action
-{
- private static final String SEPERATE = " - ";
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private DataSetService dataSetService;
-
- public void setDataSetService( DataSetService dataSetService )
- {
- this.dataSetService = dataSetService;
- }
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- // -------------------------------------------------------------------------
- // I18n
- // -------------------------------------------------------------------------
-
- private I18n i18n;
-
- public void setI18n( I18n i18n )
- {
- this.i18n = i18n;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer orgUnitId;
-
- public void setOrgUnitId( Integer orgUnitId )
- {
- this.orgUnitId = orgUnitId;
- }
-
- private Integer dataSetId;
-
- public void setDataSetId( Integer dataSetId )
- {
- this.dataSetId = dataSetId;
- }
-
- private boolean assigned;
-
- public void setAssigned( boolean assigned )
- {
- this.assigned = assigned;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- public Integer getOrgUnitId()
- {
- return orgUnitId;
- }
-
- public Integer getDataSetId()
- {
- return dataSetId;
- }
-
- public boolean isAssigned()
- {
- return assigned;
- }
-
- private String title;
-
- public String getTitle()
- {
- return title;
- }
-
- // -------------------------------------------------------------------------
- // Action implement
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- DataSet dataSet = dataSetService.getDataSet( dataSetId );
- Source source = organisationUnitService.getOrganisationUnit( orgUnitId );
-
- title = SEPERATE + dataSet.getName() + SEPERATE + source.getName();
-
- if ( assigned )
- {
- dataSet.getSources().add( source );
-
- title = i18n.getString( "assigned" ) + SEPERATE + title;
- }
- else
- {
- dataSet.getSources().remove( source );
-
- title = i18n.getString( "unassigned" ) + SEPERATE + title;
- }
-
- dataSetService.updateDataSet( dataSet );
-
- return SUCCESS;
- }
-
-}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedMultiAssociationsEditorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedMultiAssociationsEditorAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedMultiAssociationsEditorAction.java 2011-04-01 08:26:08 +0000
@@ -0,0 +1,195 @@
+package org.hisp.dhis.dataset.action.editor;
+
+/*
+ * Copyright (c) 2004-2011, 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.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.hisp.dhis.databrowser.MetaValue;
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.i18n.I18n;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.source.Source;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class DefinedMultiAssociationsEditorAction
+ implements Action
+{
+ private static final String SEPERATE = " - ";
+
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private DataSetService dataSetService;
+
+ public void setDataSetService( DataSetService dataSetService )
+ {
+ this.dataSetService = dataSetService;
+ }
+
+ private OrganisationUnitService organisationUnitService;
+
+ public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+ {
+ this.organisationUnitService = organisationUnitService;
+ }
+
+ // -------------------------------------------------------------------------
+ // I18n
+ // -------------------------------------------------------------------------
+
+ private I18n i18n;
+
+ public void setI18n( I18n i18n )
+ {
+ this.i18n = i18n;
+ }
+
+ // -------------------------------------------------------------------------
+ // Parameters
+ // -------------------------------------------------------------------------
+
+ private Integer orgUnitId;
+
+ private Integer[] dataSetIds;
+
+ private Boolean[] statuses;
+
+ private boolean checked;
+
+ private Source source;
+
+ private List<MetaValue> metaItems = new ArrayList<MetaValue>();
+
+ private Map<Integer, String> itemMaps = new HashMap<Integer, String>();
+
+ // -------------------------------------------------------------------------
+ // Input
+ // -------------------------------------------------------------------------
+
+ public void setOrgUnitId( Integer orgUnitId )
+ {
+ this.orgUnitId = orgUnitId;
+ }
+
+ public void setDataSetIds( Integer[] dataSetIds )
+ {
+ this.dataSetIds = dataSetIds;
+ }
+
+ public void setStatuses( Boolean[] statuses )
+ {
+ this.statuses = statuses;
+ }
+
+ public boolean isChecked()
+ {
+ return checked;
+ }
+
+ public void setChecked( boolean checked )
+ {
+ this.checked = checked;
+ }
+
+ public List<MetaValue> getMetaItems()
+ {
+ return metaItems;
+ }
+
+ // -------------------------------------------------------------------------
+ // Output
+ // -------------------------------------------------------------------------
+
+ public Map<Integer, String> getItemMaps()
+ {
+ return itemMaps;
+ }
+
+ public Source getSource()
+ {
+ return source;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implement
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ throws Exception
+ {
+ String title = "";
+
+ if ( checked )
+ {
+ title = i18n.getString( "assigned" ) + SEPERATE;
+ }
+ else
+ {
+ title = i18n.getString( "unassigned" ) + SEPERATE;
+ }
+
+ if ( dataSetIds.length == statuses.length )
+ {
+ source = organisationUnitService.getOrganisationUnit( orgUnitId );
+
+ for ( int i = 0; i < dataSetIds.length; i++ )
+ {
+ DataSet dataSet = dataSetService.getDataSet( dataSetIds[i] );
+
+ itemMaps.put( i, title + dataSet.getName() + SEPERATE + source.getName() );
+
+ metaItems.add( new MetaValue( orgUnitId, dataSet.getId() + "", String.valueOf( checked ) ) );
+
+ if ( (checked && !statuses[i]) )
+ {
+ dataSet.getSources().add( source );
+
+ dataSetService.updateDataSet( dataSet );
+ }
+ else if ( (!checked && statuses[i]) )
+ {
+ dataSet.getSources().remove( source );
+
+ dataSetService.updateDataSet( dataSet );
+ }
+ }
+ }
+
+ 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 2011-03-21 14:30:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml 2011-04-01 08:26:08 +0000
@@ -429,8 +429,19 @@
</property>
</bean>
- <bean id="org.hisp.dhis.dataset.action.editor.DefinedAssociationsEditorAction"
- class="org.hisp.dhis.dataset.action.editor.DefinedAssociationsEditorAction"
+ <bean id="org.hisp.dhis.dataset.action.editor.DefinedAssociationEditorAction"
+ class="org.hisp.dhis.dataset.action.editor.DefinedAssociationEditorAction"
+ scope="prototype">
+ <property name="dataSetService">
+ <ref bean="org.hisp.dhis.dataset.DataSetService"/>
+ </property>
+ <property name="organisationUnitService">
+ <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
+ </property>
+ </bean>
+
+ <bean id="org.hisp.dhis.dataset.action.editor.DefinedMultiAssociationsEditorAction"
+ class="org.hisp.dhis.dataset.action.editor.DefinedMultiAssociationsEditorAction"
scope="prototype">
<property name="dataSetService">
<ref bean="org.hisp.dhis.dataset.DataSetService"/>
=== 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 2011-03-21 14:30:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml 2011-04-01 08:26:08 +0000
@@ -320,10 +320,15 @@
<result name="success" type="velocity">/dhis-web-maintenance-dataset/htmlGrid.vm</result>
</action>
- <action name="definedAssociationsEditor"
- class="org.hisp.dhis.dataset.action.editor.DefinedAssociationsEditorAction">
+ <action name="definedAssociationEditor"
+ class="org.hisp.dhis.dataset.action.editor.DefinedAssociationEditorAction">
<result name="success" type="velocity">/dhis-web-maintenance-dataset/loadIcon.vm</result>
</action>
+ <action name="definedMultiAssociationsEditor"
+ class="org.hisp.dhis.dataset.action.editor.DefinedMultiAssociationsEditorAction">
+ <result name="success" type="velocity">/dhis-web-maintenance-dataset/loadIcons.vm</result>
+ </action>
+
</package>
</struts>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/htmlGrid.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/htmlGrid.vm 2011-03-30 05:05:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/htmlGrid.vm 2011-04-01 08:26:08 +0000
@@ -27,7 +27,7 @@
<tbody>
#foreach( $meta in $!MetaValues )
#set( $list = $!MetaValueMaps.get( $meta.id ) )
- <tr>
+ <tr id="tr$meta.id">
<td><input type="checkbox" onchange="assignAll( this, $meta.id )"/></td>
<td>$meta</td>
#foreach( $item in $list )
@@ -58,5 +58,5 @@
arrayIds.push( '$encoder.jsEscape( $id, "'" )' );
#end
}
-
+
</script>
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/loadIcons.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/loadIcons.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/loadIcons.vm 2011-04-01 08:26:08 +0000
@@ -0,0 +1,11 @@
+<td><input type="checkbox" onchange="assignAll( this, $source.id )" #if( $checked ) checked #end/></td>
+<td>$source.name</td>
+#foreach( $item in $metaItems )
+#set( $index = $velocityCount - 1 )
+<td>
+ <div id="div$item.id$item.name" align="center">
+ <img #if ( $item.metaValue == "true" ) src="../images/edit_add.png" #else src="../images/cancel.png" #end onclick="changeAssociatedStatus( $item.id, $item.name, $item.metaValue )" style="cursor:pointer" title="$!itemMaps.get( $index )"/>
+ <input type="hidden" value="$item.metaValue"/>
+ </div>
+</td>
+#end
\ No newline at end of file