dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04310
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1410: Implemented DataSetLockDeletionHandler.
------------------------------------------------------------
revno: 1410
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-02-10 19:04:44 +0100
message:
Implemented DataSetLockDeletionHandler.
added:
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/DataSetLockDeletionHandler.java
modified:
dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DelDataSetAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/RemoveSectionAction.java
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/dataSetList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.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-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/DataSetLockDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/DataSetLockDeletionHandler.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/DataSetLockDeletionHandler.java 2010-02-10 18:04:44 +0000
@@ -0,0 +1,84 @@
+package org.hisp.dhis.datalock;
+
+/*
+ * Copyright (c) 2004-2009, 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.period.Period;
+import org.hisp.dhis.source.Source;
+import org.hisp.dhis.system.deletion.DeletionHandler;
+
+public class DataSetLockDeletionHandler
+ extends DeletionHandler
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private DataSetLockService dataSetLockService;
+
+ public void setDataSetLockService( DataSetLockService dataSetLockService )
+ {
+ this.dataSetLockService = dataSetLockService;
+ }
+
+ // -------------------------------------------------------------------------
+ // DeletionHandler
+ // -------------------------------------------------------------------------
+
+ @Override
+ protected String getClassName()
+ {
+ return DataSetLock.class.getSimpleName();
+ }
+
+ @Override
+ public void deletePeriod( Period period )
+ {
+ for ( DataSetLock dataSetLock : dataSetLockService.getDataSetLockByPeriod( period ) )
+ {
+ dataSetLockService.deleteDataSetLock( dataSetLock );
+ }
+ }
+
+ @Override
+ public void deleteSource( Source source )
+ {
+ for ( DataSetLock dataSetLock : dataSetLockService.getDataSetLocksBySource( source ) )
+ {
+ dataSetLockService.deleteDataSetLock( dataSetLock );
+ }
+ }
+
+ public void deleteDataSet( DataSet dataSet )
+ {
+ for ( DataSetLock dataSetLock : dataSetLockService.getDataSetLockByDataSet( dataSet ) )
+ {
+ dataSetLockService.deleteDataSetLock( dataSetLock );
+ }
+ }
+}
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml 2010-02-01 15:30:27 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml 2010-02-10 18:04:44 +0000
@@ -140,6 +140,11 @@
<property name="jdbcTemplate" ref="jdbcTemplate"/>
</bean>
+ <bean id="org.hisp.dhis.datalock.DataSetLockDeletionHandler"
+ class="org.hisp.dhis.datalock.DataSetLockDeletionHandler">
+ <property name="dataSetLockService" ref="org.hisp.dhis.datalock.DataSetLockService"/>
+ </bean>
+
<!-- DeletionManager -->
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
@@ -149,6 +154,7 @@
<list>
<list>
<ref local="org.hisp.dhis.dataarchive.ArchivedDataValueDeletionHandler"/>
+ <ref local="org.hisp.dhis.datalock.DataSetLockDeletionHandler"/>
</list>
</list>
</property>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DelDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DelDataSetAction.java 2009-09-15 03:50:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DelDataSetAction.java 2010-02-10 18:04:44 +0000
@@ -27,10 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Collection;
-
-import org.hisp.dhis.datalock.DataSetLock;
-import org.hisp.dhis.datalock.DataSetLockService;
import org.hisp.dhis.dataset.DataSetService;
import com.opensymphony.xwork2.Action;
@@ -42,8 +38,6 @@
public class DelDataSetAction
implements Action
{
- private int dataSetId;
-
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
@@ -54,21 +48,16 @@
{
this.dataSetService = dataSetService;
}
-
- private DataSetLockService dataSetLockService;
-
- public void setDataSetLockService( DataSetLockService dataSetLockService)
- {
- this.dataSetLockService = dataSetLockService;
- }
// -------------------------------------------------------------------------
// Getters & setters
// -------------------------------------------------------------------------
- public void setDataSetId( int dataSetId )
+ private Integer id;
+
+ public void setId( Integer id )
{
- this.dataSetId = dataSetId;
+ this.id = id;
}
// -------------------------------------------------------------------------
@@ -77,19 +66,9 @@
public String execute()
throws Exception
- {
- Collection<DataSetLock> dataSetLocks = dataSetLockService.getDataSetLockByDataSet( dataSetService.getDataSet( dataSetId ) );
-
- if ( dataSetLocks != null )
- {
- for ( DataSetLock dataSetLock : dataSetLocks )
- {
- dataSetLock.getSources().removeAll( dataSetLock.getSources() );
- dataSetLockService.deleteDataSetLock( dataSetLock );
- }
- }
-
- dataSetService.deleteDataSet( dataSetService.getDataSet( dataSetId ) );
- return SUCCESS;
- }
+ {
+ dataSetService.deleteDataSet( dataSetService.getDataSet( id ) );
+
+ return SUCCESS;
+ }
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/RemoveSectionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/RemoveSectionAction.java 2009-08-20 08:17:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/section/RemoveSectionAction.java 2010-02-10 18:04:44 +0000
@@ -50,16 +50,11 @@
// Input & output
// -------------------------------------------------------------------------
- private Integer sectionId;
-
- public Integer getSectionId()
- {
- return sectionId;
- }
-
- public void setSectionId( Integer sectionId )
- {
- this.sectionId = sectionId;
+ private Integer id;
+
+ public void setId( Integer id )
+ {
+ this.id = id;
}
// -------------------------------------------------------------------------
@@ -69,7 +64,7 @@
public String execute()
throws Exception
{
- Section section = sectionService.getSection( sectionId.intValue() );
+ Section section = sectionService.getSection( id );
sectionService.deleteSection( section );
=== 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-02-02 13:21:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml 2010-02-10 18:04:44 +0000
@@ -294,9 +294,6 @@
<bean id="org.hisp.dhis.dataset.action.DelDataSetAction"
class="org.hisp.dhis.dataset.action.DelDataSetAction"
scope="prototype">
- <property name="dataSetLockService">
- <ref bean="org.hisp.dhis.datalock.DataSetLockService"/>
- </property>
<property name="dataSetService">
<ref bean="org.hisp.dhis.dataset.DataSetService"/>
</property>
=== 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-02-02 13:21:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml 2010-02-10 18:04:44 +0000
@@ -83,7 +83,7 @@
</action>
<action name="removeSection" class="org.hisp.dhis.dataset.action.section.RemoveSectionAction">
- <result name="success" type="chain">section</result>
+ <result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
</action>
<!-- Get details -->
@@ -184,7 +184,7 @@
<action name="delDataSet"
class="org.hisp.dhis.dataset.action.DelDataSetAction">
- <result name="success" type="redirect">dataSet.action</result>
+ <result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
<param name="requiredAuthorities">F_DATASET_DELETE</param>
</action>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/dataSetList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/dataSetList.vm 2010-02-02 13:21:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/dataSetList.vm 2010-02-10 18:04:44 +0000
@@ -30,43 +30,37 @@
</tr>
<tbody id="list">
- #set( $mark = false )
#foreach( $dataSet in $dataSets )
- <tr>
- <td#alternate( $mark )>$encoder.htmlEncode( $dataSet.name )</td>
- <td style="text-align:center"#alternate( $mark )>
+ <tr id="tr${dataSet.id}">
+ <td>$encoder.htmlEncode( $dataSet.name )</td>
+ <td style="text-align:center">
<a href="defineDataSetAssociationsForm.action?dataSetId=$dataSet.id" title="$i18n.getString( "define_associations" )"><img src="../images/assign.png" alt="$i18n.getString( "define_associations" )"></a>
</td>
- <td style="text-align:center"#alternate( $mark )>
+ <td style="text-align:center">
<a href="editDataSetForm.action?dataSetId=$dataSet.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a>
</td>
- <td style="text-align:center"#alternate( $mark )>
+ <td style="text-align:center">
<a href="editDataSetFormCustomValues.action?dataSetId=$dataSet.id&typeTextOnly=true" title="$i18n.getString( "edit_custom_values" )"><img src="../images/custom_value.png" alt="$i18n.getString( "edit_custom_values" )"></a>
</td>
- <td style="text-align:center"#alternate( $mark )>
+ <td style="text-align:center">
<a href="javascript:translate( 'DataSet', '$dataSet.id' )" title="$i18n.getString( "translation_translate" )"><img src="../images/i18n.png" alt="$i18n.getString( "translation_translate" )"></a>
</td>
- <td style="text-align:center"#alternate( $mark )>
+ <td style="text-align:center">
<a href="javascript:viewDataEntryForm( '$dataSet.id' )" title="$i18n.getString( "design_data_entry_form" )"><img src="../images/edit_layout.png" alt="$i18n.getString( "design_data_entry_form" )"></a>
</td>
- <td style="text-align:center"#alternate( $mark )>
+ <td style="text-align:center">
<a href="javascript:showsection( $dataSet.id )" title="$i18n.getString( "view_section_management" )"><img src="../images/edit_sections.png" alt="$i18n.getString( "view_section_management" )"></a>
</td>
- <td style="text-align:center"#alternate( $mark )>
+ <td style="text-align:center">
<a href="javascript:window.location.href='displayCompulsoryDataElementsForm.action?id=${dataSet.id}'" title="$i18n.getString( "edit_compulsory_data_elements" )"><img src="../images/edit_compulsory_data_elements.png" alt="$i18n.getString( "edit_compulsory_data_elements" )"></a>
</td>
- <td style="text-align:center"#alternate( $mark )>
+ <td style="text-align:center">
<a href="javascript:removeDataSet( '$dataSet.id', '$encoder.jsEncode( $dataSet.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
</td>
- <td style="text-align:center"#alternate( $mark )>
+ <td style="text-align:center">
<a href="javascript:showDataSetDetails( $dataSet.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
</td>
</tr>
- #if( $mark )
- #set( $mark = false )
- #else
- #set( $mark = true )
- #end
#end
</tbody>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js 2010-02-05 13:16:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js 2010-02-10 18:04:44 +0000
@@ -35,12 +35,7 @@
function removeDataSet( dataSetId, dataSetName )
{
- var result = window.confirm( i18n_confirm_delete + '\n\n' + dataSetName );
-
- if ( result )
- {
- window.location.href = 'delDataSet.action?dataSetId=' + dataSetId;
- }
+ removeItem( dataSetId, dataSetName, i18n_confirm_delete, 'delDataSet.action' );
}
// ----------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js 2010-02-10 18:04:44 +0000
@@ -1,4 +1,42 @@
+function sortOrderSubmit()
+{
+ var datasetId = document.getElementById('dataSetId').value;
+
+ if ( datasetId=="null" )
+ {
+ window.alert( "Please select dataset" );
+ }
+ else
+ {
+ window.location = "sortOrderSection.action?dataSetId=" + datasetId;
+ }
+}
+
+function getSectionByDataSet(dataSetId)
+{
+ window.location = "section.action?dataSetId=" + dataSetId;
+}
+
+function removeSection( sectionId, sectionName )
+{
+ removeItem( sectionId, sectionName, i18n_confirm_delete, "removeSection.action" );
+}
+
+function addSectionSubmit()
+{
+ var dataset = document.getElementById('dataSetId').value;
+
+ if( dataset=="null" )
+ {
+ window.alert( "Please select dataset" );
+ }
+ else
+ {
+ window.location.href="addSectionAction.action?dataSetId=" + document.getElementById('dataSetId').value;
+ }
+}
+
function getDataElementByDataSet( dataSetId )
{
var request = new Request();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm 2009-11-03 09:05:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm 2010-02-10 18:04:44 +0000
@@ -4,11 +4,11 @@
<table class="mainPageTable">
<tr>
<td style="vertical-align:top">
- <table id="list" class="listTable">
- <col style="width:40%">
- <col style="width:40%">
- <col style="width:20px">
- <col style="width:20px">
+ <table class="listTable">
+ <col>
+ <col>
+ <col width="20">
+ <col width="20">
<tr>
<td colspan="2"><label>$i18n.getString( "select_dataset" )</label><br>
<select id="dataSetId" name="dataSetId" style="min-width:20em" onchange="javascript:getSectionByDataSet(this.options[this.selectedIndex].value)">
@@ -18,14 +18,10 @@
#end
</select>
</td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td colspan="4" style="text-align:right">
- <input type="button" value="$i18n.getString( "add_new" )" onclick="javascript:addSectionSubmit()">
- <input type="button" value="$i18n.getString( "sort_section" )" onclick="javascript:sortOrderSubmit()">
- <input type="button" value="$i18n.getString( "cancel" )" onclick="javascript:window.location.href='dataSet.action'">
+ <td colspan="2" style="text-align:right">
+ <input type="button" value="$i18n.getString( "add_new" )" onclick="javascript:addSectionSubmit()" style="width:80px"><br>
+ <input type="button" value="$i18n.getString( "sort_section" )" onclick="javascript:sortOrderSubmit()" style="width:80px"><br>
+ <input type="button" value="$i18n.getString( "cancel" )" onclick="javascript:window.location.href='dataSet.action'" style="width:80px">
</td>
</tr>
<tr>
@@ -33,20 +29,14 @@
<th>$i18n.getString( "label" )</th>
<th colspan="2">$i18n.getString( "operations" )</th>
</tr>
- <tbody>
- #set( $mark = false )
+ <tbody id="list">
#foreach( $section in $sections )
- <tr>
- <td#alternate( $mark )>$encoder.htmlEncode( $section.name )</td>
- <td#alternate( $mark )>$encoder.htmlEncode( $section.label )</td>
- <td style="text-align:center"#alternate( $mark )><a href="editSectionAction.action?sectionId=$section.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a></td>
- <td style="text-align:center"#alternate( $mark )><a href="javascript:removeSection( '$section.id', '$encoder.jsEncode( $section.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a></td>
+ <tr id="tr${section.id}">
+ <td>$encoder.htmlEncode( $section.name )</td>
+ <td>$encoder.htmlEncode( $section.label )</td>
+ <td style="text-align:center"><a href="editSectionAction.action?sectionId=$section.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a></td>
+ <td style="text-align:center"><a href="javascript:removeSection( '$section.id', '$encoder.jsEncode( $section.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a></td>
</tr>
- #if( $mark )
- #set( $mark = false )
- #else
- #set( $mark = true )
- #end
#end
</tbody>
</table>
@@ -68,49 +58,5 @@
</table>
<script type="text/javascript">
-
-function sortOrderSubmit()
-{
- var datasetId = document.getElementById('dataSetId').value;
-
- if(datasetId=="null")
- {
- window.alert( "Please select dataset" );
- }
- else
- {
- window.location = "sortOrderSection.action?dataSetId=" + datasetId;
- }
-
-}
-
-function getSectionByDataSet(dataSetId)
-{
- window.location = "section.action?dataSetId=" + dataSetId;
-}
-
-function removeSection(sectionId, sectionName)
-{
- if(window.confirm( "Are you sure you want to remove section " + sectionName ))
- {
- window.location = "removeSection.action?sectionId=" + sectionId + "§ionName=" + sectionName;
- }
-}
-
-function addSectionSubmit()
-{
- var dataset = document.getElementById('dataSetId').value;
-
- if(dataset=="null")
- {
- window.alert( "Please select dataset" );
- }
- else
- {
- window.location.href="addSectionAction.action?dataSetId=" + document.getElementById('dataSetId').value;
- }
-}
-
var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete" ) , "'" )';
-
</script>