← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6130: local vn - Replace Request object by json.

 

------------------------------------------------------------
revno: 6130
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-02-28 15:50:46 +0700
message:
  local vn - Replace Request object by json.
removed:
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportItem.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportItems.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportReport.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportReports.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportReports.js
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/ajax/jsonDataElementCategoryOptionCombos.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/ajax/jsonExportGroups.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/responseExportItems.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseDataElements.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseDataSets.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseExportReports.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responsePeriodColumn.vm
added:
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonDataElementCategoryOptionCombos.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportGroups.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportItems.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportItem.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportItems.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportReport.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportReports.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonPeriodColumn.vm
modified:
  local/vn/dhis-service-spreadsheet-reporting/pom.xml
  local/vn/dhis-web-spreadsheet-reporting/pom.xml
  local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addDataStatus.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exceltemplate.js
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportItems.js
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/import.js
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/importItems.js
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/preview.js
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/organisationUnitAtLevels.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/periodcolumns.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportReportForm.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateDataStatus.vm
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.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
=== modified file 'local/vn/dhis-service-spreadsheet-reporting/pom.xml'
--- local/vn/dhis-service-spreadsheet-reporting/pom.xml	2012-02-20 09:02:21 +0000
+++ local/vn/dhis-service-spreadsheet-reporting/pom.xml	2012-02-28 08:50:46 +0000
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.hisp.dhis</groupId>
     <artifactId>dhis-services</artifactId>
-    <version>2.7</version>
+    <version>2.8-SNAPSHOT</version>
   </parent>
   
   <artifactId>dhis-service-spreadsheet-reporting</artifactId>

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/pom.xml'
--- local/vn/dhis-web-spreadsheet-reporting/pom.xml	2012-02-20 09:02:21 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/pom.xml	2012-02-28 08:50:46 +0000
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.hisp.dhis</groupId>
     <artifactId>dhis-web</artifactId>
-    <version>2.7</version>
+    <version>2.8-SNAPSHOT</version>
   </parent>
   
   <artifactId>dhis-web-spreadsheet-reporting</artifactId>
@@ -33,7 +33,7 @@
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-service-spreadsheet-reporting</artifactId>
-	  <version>2.7</version>
+	  <version>2.8-SNAPSHOT</version>
     </dependency>
 	<dependency>
       <groupId>org.hisp.dhis</groupId>

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml	2011-12-13 07:46:57 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml	2012-02-28 08:50:46 +0000
@@ -141,7 +141,7 @@
 		<action name="getExportReportGroups"
 			class="org.hisp.dhis.reportsheet.exportreport.action.GetExportReportGroupsAction">
 			<result name="success" type="velocity-json">
-				/dhis-web-spreadsheet-reporting/report/ajax/jsonExportGroups.vm</result>
+				/dhis-web-spreadsheet-reporting/jsonExportGroups.vm</result>
 		</action>
 
 		<action name="listAllExportReport"
@@ -155,14 +155,14 @@
 		
 		<action name="getAllExportReport"
 			class="org.hisp.dhis.reportsheet.exportreport.action.ListExportReportAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/responseExportReports.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonExportReports.vm</result>
 		</action>
 		
 		<action name="getAllExportReportByType"
 			class="org.hisp.dhis.reportsheet.exportreport.action.ListExportReportByReportTypeAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/responseExportReports.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonExportReports.vm</result>
 		</action>
 		
 		<action name="updateExportReportForm"
@@ -308,8 +308,8 @@
 
 		<action name="updateOrganisationUnitGroupAtLevel"
 			class="org.hisp.dhis.reportsheet.orgunitgrouplisting.action.UpdateOrgUnitGroupAtLevelAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
 		</action>
 
 		<!-- REPORT EXCEL ASSOCIATION ACTION -->
@@ -409,7 +409,7 @@
 		<action name="getDataElementCategoryOptionCombos"
 			class="org.hisp.dhis.reportsheet.exportitem.action.GetDataElementCategoryOptionCombosAction">
 			<result name="success" type="velocity-json">
-				/dhis-web-spreadsheet-reporting/report/ajax/jsonDataElementCategoryOptionCombos.vm</result>
+				/dhis-web-spreadsheet-reporting/jsonDataElementCategoryOptionCombos.vm</result>
 		</action>
 
 		<action name="deleteExportItem"
@@ -440,13 +440,13 @@
 
 		<action name="getExportItemsBySheet"
 			class="org.hisp.dhis.reportsheet.exportitem.action.GetExportItemsBySheetAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/report/responseExportItems.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonExportItems.vm</result>
 		</action>
 		
 		<action name="copyExportItemToExportReport"
 			class="org.hisp.dhis.reportsheet.exportitem.action.CopyExportItemToExportReportAction">
-			<result name="success" type="velocity-xml">
+			<result name="success" type="velocity-json">
 				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
 			<param name="requiredAuthorities">F_EXCEL_REPORT_ADMINISTRATION</param>
 		</action>
@@ -460,8 +460,8 @@
 		
 		<action name="getListSheet"
 			class="org.hisp.dhis.reportsheet.exportitem.action.GetListSheetAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/responseSheets.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonSheets.vm</result>
 		</action>
 
 		<!-- GENERATE REPORT EXCEL ACTION -->
@@ -601,8 +601,8 @@
 
 		<action name="getDataSets"
 			class="org.hisp.dhis.reportsheet.dataentrystatus.action.GetDataSetsAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/responseDataSets.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonDataSets.vm</result>
 		</action>
 
 		<!-- DATA SET COMPLETED REPORT ACTION -->
@@ -703,8 +703,8 @@
 
 		<action name="getALLExportReportByGroup"
 			class="org.hisp.dhis.reportsheet.exporting.advance.action.GetExportReportsByGroupAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/responseExportReports.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonExportReports.vm</result>
 		</action>
 
 		<action name="generateAdvancedExportReport"
@@ -725,26 +725,26 @@
 
 		<action name="generateAdvancedReportNormal"
 			class="org.hisp.dhis.reportsheet.exporting.advance.action.GenerateAdvancedReportNormalAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
 		</action>
 
 		<action name="generateAdvancedReportOrganizationGroupListing"
 			class="org.hisp.dhis.reportsheet.exporting.advance.action.GenerateAdvancedReportOrgGroupListingAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
 		</action>
 
 		<action name="generateAdvancedReportPeriodColumnListing"
 			class="org.hisp.dhis.reportsheet.exporting.advance.action.GenerateAdvancedReportPeriodColumnListingAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
 		</action>
 
 		<action name="generateAdvancedReportCategory"
 			class="org.hisp.dhis.reportsheet.exporting.action.GenerateAdvancedReportCategoryAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
 		</action>
 
 		<!-- PREVIEW ADVANCED REPORT -->
@@ -829,14 +829,14 @@
 
 		<action name="getAllImportReport"
 			class="org.hisp.dhis.reportsheet.importreport.action.ListAllImportReportAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/import/responseImportReports.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonImportReports.vm</result>
 		</action>
 		
 		<action name="getAllImportReportByType"
 			class="org.hisp.dhis.reportsheet.importreport.action.ListAllImportReportByTypeAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/import/responseImportReports.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonImportReports.vm</result>
 		</action>
 
 		<action name="updateImportReportForm"
@@ -862,8 +862,8 @@
 
 		<action name="getImportReport"
 			class="org.hisp.dhis.reportsheet.importreport.action.GetImportReportAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/import/responseImportReport.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonImportReport.vm</result>
 		</action>
 
 		<action name="updateImportReportAssociations"
@@ -917,8 +917,8 @@
 
 		<action name="getSelectedDataElements"
 			class="org.hisp.dhis.reportsheet.importitem.action.GetSelectedDataElementsAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/responseDataElements.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonDataElements.vm</result>
 		</action>
 
 		<action name="getImportItemParam"
@@ -968,28 +968,28 @@
 
 		<action name="getImportItem"
 			class="org.hisp.dhis.reportsheet.importitem.action.GetImportItemByIdAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/import/responseImportItem.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonImportItem.vm</result>
 		</action>
 
 		<action name="getImportItemsByImportReport"
 			class="org.hisp.dhis.reportsheet.importitem.action.ListImportItemAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/import/responseImportItems.vm
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonImportItems.vm
 			</result>
 		</action>
 		
 		<action name="copyImportItemToImportReport"
 			class="org.hisp.dhis.reportsheet.importitem.action.CopyImportItemToImportReportAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
 			<param name="requiredAuthorities">F_COPY_IMPORT_ITEM_ADMINISTRATION</param>
 		</action>
 		
 		<action name="copyImportItemToExportReport"
 			class="org.hisp.dhis.reportsheet.importitem.action.CopyImportItemToExportReportAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
 			<param name="requiredAuthorities">F_COPY_IMPORT_ITEM_ADMINISTRATION</param>
 		</action>
 
@@ -997,19 +997,19 @@
 		
 		<action name="cleanUpDraftFile"
 			class="org.hisp.dhis.reportsheet.filemanager.action.CleanUpDraftFilesAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
 		</action>
 		
 		<action name="validateUploadExcelImport"
 			class="org.hisp.dhis.reportsheet.filemanager.action.ValidateUploadExcelFile">
 			<interceptor-ref name="fileUploadStack" />
-			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
-			<result name="error" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseError.vm</result>
-			<result name="input" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseInput.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+			<result name="error" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseError.vm</result>
+			<result name="input" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseInput.vm</result>
 		</action>
 
 		<action name="uploadExcelImport"
@@ -1075,7 +1075,7 @@
 		<!--  function - Prewiew Data - CATEGORY GROUP  -->
 		<action name="previewDataCategory"
 			class="org.hisp.dhis.reportsheet.importing.action.ViewDataCategoryAction">
-			<result name="success" type="velocity">
+			<result name="success" type="velocity-xml">
 				/dhis-web-spreadsheet-reporting/responseExportReportPreview.vm
 			</result>
 			<result name="error" type="velocity-xml">
@@ -1085,8 +1085,8 @@
 		<!--  function - Prewiew Data - ORGANISATION GROUP  -->
 		<action name="previewDataOrganizationGroup"
 			class="org.hisp.dhis.reportsheet.importing.action.ViewDataOrganizationGroupAction">
-			<result name="success" type="velocity">
-				/dhis-web-spreadsheet-reporting/responseImportItemValuesByOrgunits.vm
+			<result name="success" type="velocity-xml">
+				/dhis-web-spreadsheet-reporting/responseExportReportPreview.vm
 			</result>
 			<result name="error" type="velocity-xml">
 				/dhis-web-commons/ajax/xmlResponseError.vm</result>		
@@ -1158,8 +1158,8 @@
 
 		<action name="getPeriodColumn"
 			class="org.hisp.dhis.reportsheet.periodcolumn.action.GetPeriodColumnAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-spreadsheet-reporting/responsePeriodColumn.vm
+			<result name="success" type="velocity-json">
+				/dhis-web-spreadsheet-reporting/jsonPeriodColumn.vm
 			</result>
 		</action>
 
@@ -1193,12 +1193,12 @@
 
 		<action name="renameExcelTemplate"
 			class="org.hisp.dhis.reportsheet.filemanager.action.RenameExcelTemplateAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseSuccess.vm</result>
-			<result name="error" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseError.vm</result>
-			<result name="none" type="velocity-xml">
-				/dhis-web-commons/ajax/xmlResponseInput.vm</result>
+			<result name="success" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+			<result name="error" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseError.vm</result>
+			<result name="none" type="velocity-json">
+				/dhis-web-commons/ajax/jsonResponseInput.vm</result>
 			<param name="requiredAuthorities">F_EXCEL_TEMPLATE_MANAGEMENT_RENAME</param>
 		</action>
 

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addDataStatus.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addDataStatus.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addDataStatus.vm	2012-02-28 08:50:46 +0000
@@ -33,20 +33,14 @@
 </form>
 <script language="javascript">
 	
-	var request = new Request();
-	request.setCallbackSuccess( dataSetResponse );	
-	request.setResponseTypeXML( 'xmlObject' );
-	request.send( 'getDataSets.action' );
-	
-	function dataSetResponse( xmlObject ){
-		var listDataSet = xmlObject.getElementsByTagName("dataset");
-		var dataSets = document.getElementById("dataSetId");
+	jQuery.postJSON( 'getDataSets.action', {}, function( json ) {
+		var listDataSet = json.dataSets;
+		var dataSets = byId( "dataSetId" );
 		dataSets.options.length = 0;
+
 		for ( var i=0 ; i < listDataSet.length ; i++ )
 		{
-			var id = listDataSet.item(i).getElementsByTagName('id')[0].firstChild.nodeValue;
-			var name = listDataSet.item(i).getElementsByTagName('name')[0].firstChild.nodeValue;
-			dataSets.options.add(new Option(name, id),null);			
+			dataSets.options.add( new Option(listDataSet[i].name, listDataSet[i].id), null );			
 		}
-	}
+	} );
 </script>
\ No newline at end of file

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportItem.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportItem.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportItem.vm	1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<importItem>
-	<id>$importItem.id</id>
-	<name>$encoder.xmlEncode( $importItem.name )</name>
-	<row>$importItem.row</row>	
-	<column>$importItem.column</column>
-	<expression>$encoder.xmlEncode( $importItem.expression )</expression>
-	<sheetNo>$importItem.sheetNo</sheetNo>
-</importItem>
\ No newline at end of file

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportItems.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportItems.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportItems.vm	1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<importItems>
-	#foreach($importItem in $importItems)
-		<importItem>
-			<id>$importItem.id</id>
-			<name>$encoder.xmlEncode( $importItem.name )</name>
-			<row>$importItem.row</row>	
-			<column>$importItem.column</column>
-			<expression>$encoder.xmlEncode( $importItem.expression )</expression>
-			<sheetNo>$importItem.sheetNo</sheetNo>
-		</importItem>
-	#end
-</importItems>
\ No newline at end of file

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportReport.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportReport.vm	2011-08-03 08:38:38 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportReport.vm	1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<importReport>
-	<id>$report.id</id>
-	<name>$encoder.xmlEncode( $!report.name )</name>
-	<type>$report.type</type>
-	<periodType>$report.periodType.name</periodType>
-	<excelTemplateFile>$report.excelTemplateFile</excelTemplateFile>
-</importReport>
\ No newline at end of file

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportReports.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportReports.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/import/responseImportReports.vm	1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<importReports>
-	#foreach($importReport in $importReports)
-		<importReport>
-			<id>$importReport.id</id>
-			<name>$encoder.xmlEncode( $!importReport.name )</name>
-			<type>$importReport.type</type>
-			<periodType>$importReport.periodType.name</periodType>
-			<excelTemplateFile>$importReport.excelTemplateFile</excelTemplateFile>
-		</importReport>
-	#end
-</importReports>
\ No newline at end of file

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exceltemplate.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exceltemplate.js	2011-08-04 08:39:55 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exceltemplate.js	2012-02-28 08:50:46 +0000
@@ -41,26 +41,16 @@
 */
 function deleteExcelTemplate( fileName ) {
 
-	if ( window.confirm(i18n_confirm_delete) ) {
-	
-		var request = new Request();
-		request.setResponseTypeXML( 'xmlObject' );
-		request.setCallbackSuccess( deleteExcelTemplateReceived );
-		request.send( "deleteExcelTemplate.action?fileName=" + fileName );
-	}
-}
-
-function deleteExcelTemplateReceived( xmlObject ) {
-
-	var type = xmlObject.getAttribute( 'type' );
-	
-	if ( type == 'error' )
-	{
-		setMessage( xmlObject.firstChild.nodeValue );
-	}
-	else
-	{
-		window.location.href = 'listAllExcelTemplates.action';
+	if ( window.confirm( i18n_confirm_delete ) ) {
+	
+		jQuery.postUTF8( "deleteExcelTemplate.action", { fileName: fileName }, function( json )
+		{			
+			if ( json.response == 'error' ) {
+				setMessage( json.message );
+			}else {
+				window.location.href = 'listAllExcelTemplates.action';
+			}
+		} );
 	}
 }
 
@@ -156,57 +146,43 @@
 
 function renamingExcelTemplate( curFileName, newFileName, renamingMode )
 {
-	var request = new Request();
-	request.setResponseTypeXML( 'xmlObject' );
-	request.setCallbackSuccess( renamingExcelTemplateReceived );
-	
-	var params = "newFileName=" + newFileName + "&curFileName=" + curFileName + "&renamingMode=" + renamingMode;
-	request.sendAsPost( params );
-	request.send( "renameExcelTemplate.action" );	
-}
-
-function renamingExcelTemplateReceived( xmlObject ) {
-
-	var type = xmlObject.getAttribute( 'type' );
-	var message = xmlObject.firstChild.nodeValue;
-	
-	if ( type == "success" )
-	{
-		closeDialog( dialog );
-	
-		if ( window.confirm( confirmUpdateSysMessage ) )
-		{
-			updateExportReportByTemplate();
-		}
-		else
-		{
-			window.location.href="listAllExcelTemplates.action?mode=" + mode + "&message=" + message;
-		}
-	}
-	else if ( type == "input" )
-	{
-		window.location.href="listAllExcelTemplates.action?mode=" + mode + "&message=" + message;
-	}
-	else setMessage( message );
+	jQuery.postUTF8( "renameExcelTemplate.action", {
+		newFileName: newFileName,
+		curFileName: curFileName,
+		renamingMode: renamingMode
+	}, function( json ){
+		if ( json.response == "success" )
+		{
+			closeDialog( dialog );
+		
+			if ( window.confirm( confirmUpdateSysMessage ) )
+			{
+				updateExportReportByTemplate();
+			}
+			else
+			{
+				window.location.href="listAllExcelTemplates.action?mode=" + mode + "&message=" + json.message;
+			}
+		}
+		else if ( json.response == "input" )
+		{
+			window.location.href="listAllExcelTemplates.action?mode=" + mode + "&message=" + json.message;
+		}
+		else setMessage( json.message );
+	} );
 }
 
 function updateExportReportByTemplate() {
 
-	var request = new Request();
-	request.setResponseTypeXML( 'xmlObject' );
-	request.setCallbackSuccess( updateExportReportByTemplateCompleted );
-	request.send( "updateExportReportByTemplate.action?curTemplateName=" + curTemplateName + "&newTemplateName=" + newTemplateName);
-}
-
-function updateExportReportByTemplateCompleted( xmlObject ) {
-
-	var type = xmlObject.getAttribute( 'type' );
-	
-	if ( type != "" )
-	{
-		var message = xmlObject.firstChild.nodeValue;
-		window.location.href="listAllExcelTemplates.action?mode=" + mode + "&message=" + message;
-	}
+	jQuery.postUTF8( "updateExportReportByTemplate.action", {
+		curTemplateName: curTemplateName,
+		newTemplateName: newTemplateName
+	}, function( json ) {
+		if ( json.response )
+		{
+			window.location.href="listAllExcelTemplates.action?mode=" + mode + "&message=" + json.message;
+		}
+	} );
 }
 
 //----------------------------------------------------------

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js	2011-12-02 05:48:55 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js	2012-02-28 08:50:46 +0000
@@ -129,31 +129,26 @@
 
 function getALLExportReportByGroup() {
 
-	var request = new Request();
-	request.setResponseTypeXML( 'xmlObject' );
-	request.setCallbackSuccess( getALLExportReportByGroupReceived );
-	request.sendAsPost( "group=" + byId("group").value );
-	request.send( 'getALLExportReportByGroup.action');
-	
-}
-
-function getALLExportReportByGroupReceived( xmlObject ) {
-
-	clearListById('exportReport');
-	var list = xmlObject.getElementsByTagName("exportReport");
-	
-	for(var i=0;i<list.length;i++){
-		var item = list[i];
-		var id = item.getElementsByTagName('id')[0].firstChild.nodeValue;
-		var name = item.getElementsByTagName('name')[0].firstChild.nodeValue;
-		addOption('exportReport',name,id);
-	}
+	jQuery.postJSON( "getALLExportReportByGroup.action", {
+		group: byId("group").value
+	}, function( json ) {
+		clearListById( 'exportReport' );
+		var list = json.exportReports;
+		
+		for ( var i = 0 ; i < list.length ; i++ )
+		{
+			addOption( 'exportReport', item[i].name, item[i].id );
+		}
+	} );
 }
 
 function generateAdvancedExportReport()
 {
-	var request = new Request();
-	request.setResponseTypeXML( 'xmlObject' );
-	request.setCallbackSuccess( generateExportReportReceived );
-	request.send( 'generateAdvancedExportReport.action?organisationGroupId='+ byId("availableOrgunitGroups").value );
+	jQuery.postJSON( 'generateAdvancedExportReport.action', {
+		organisationGroupId: byId("availableOrgunitGroups").value
+	}, function( json ) {
+		if ( json.response == "success" ) {
+			showSuccessMessage( json.message );
+		}
+	} );
 }

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportItems.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportItems.js	2012-02-03 08:38:42 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportItems.js	2012-02-28 08:50:46 +0000
@@ -98,18 +98,17 @@
 
 function validateAddExportItem( form )
 {
-	jQuery.postJSON('validationExportItem.action',
+	jQuery.postUTF8('validationExportItem.action',
 	{
 		exportReportId: getFieldValue( 'exportReportId' ),
 		name: getFieldValue( 'name' ),
 		sheetNo: getFieldValue( 'sheetNo' ),
 		row: getFieldValue( 'row' ),
 		column: getFieldValue( 'column' )
-
 	},function( json ){
-		if(json.response == 'success'){					
+		if( json.response == 'success' ) {					
 			form.submit();
-		}else{
+		}else {
 			showErrorMessage( json.message );
 		}
 	});
@@ -117,7 +116,7 @@
 
 function validateUpdateExportItem( form )
 {
-	jQuery.postJSON('validationExportItem.action',
+	jQuery.postUTF8('validationExportItem.action',
 	{
 		id: getFieldValue( 'id' ),
 		exportReportId: getFieldValue( 'exportReportId' ),
@@ -125,18 +124,17 @@
 		sheetNo: getFieldValue( 'sheetNo' ),
 		row: getFieldValue( 'row' ),
 		column: getFieldValue( 'column' )
-		
 	},function( json ){
-		if(json.response == 'success'){
+		if( json.response == 'success' ) {
 			form.submit();
-		}else{
+		}else {
 			showErrorMessage( json.message );
 		}
 	});
 }
 
 /*
-*	Delete multi export item
+*	Delete multi export items
 */
 
 function deleteMultiExportItem( confirm )
@@ -183,28 +181,21 @@
  */
 function copyExportItemToExportReport() {
 	
-	var request = new Request();
-	request.setResponseTypeXML( 'xmlObject' );
-	request.setCallbackSuccess( copyExportItemToExportReportReceived );
-	request.send( "getAllExportReportByType.action?reportType=" + getFieldValue( "exportReportType" ) );
-}
-
-function copyExportItemToExportReportReceived( xmlObject ) {
-
-	var exportReports = xmlObject.getElementsByTagName("exportReport");
-	var selectList = document.getElementById("targetExportReport");
-	var options = selectList.options;
-	
-	options.length = 0;
-	
-	for( var i = 0 ; i < exportReports.length ; i++ ) {
-	
-		var id = exportReports[i].getElementsByTagName("id")[0].firstChild.nodeValue;
-		var name = exportReports[i].getElementsByTagName("name")[0].firstChild.nodeValue;
-		options.add(new Option(name,id), null);
-	}
-	
-	openDialog( dialog1 );
+	jQuery.postJSON( "getAllExportReportByType.action", {
+		reportType: getFieldValue( "exportReportType" )
+	}, function( json ) {
+		var exportReports = json.exportReports;
+		var options = byId( "targetExportReport" ).options;
+
+		options.length = 0;
+
+		for( var i = 0 ; i < exportReports.length ; i++ )
+		{
+			options.add( new Option( exportReports[i].name, exportReports[i].id ), null );
+		}
+
+		openDialog( dialog1 );
+	} );
 }
 
 
@@ -246,30 +237,21 @@
 	
 	itemsCurTarget = new Array();
 	itemsDuplicated = new Array();
-
-	var request = new Request();
-	request.setResponseTypeXML( 'xmlObject' );
-	request.setCallbackSuccess( validateCopyExportItemsToExportReportReceived );
-	
-	var param = "exportReportId=" + getFieldValue("targetExportReport");
-		param += "&sheetNo=" + sheetId;
-	
-	request.sendAsPost( param );
-	request.send( "getExportItemsBySheet.action" );
-	
-}
-
-function validateCopyExportItemsToExportReportReceived( data ) {
-
-	var items = data.getElementsByTagName('exportItem');
+	
+	jQuery.postJSON( "getExportItemsBySheet.action", {
+		exportReportId: getFieldValue( "targetExportReport" );
+		sheetNo: sheetId
+	}, function( json ) {
+		var items = json.exportItems;
+			
+		for ( var i = 0 ; i < items.length ; i ++ ) 
+		{
+			itemsCurTarget.push( items[i].name );
+		}
 		
-	for (var i = 0 ; i < items.length ; i ++) 
-	{
-		itemsCurTarget.push(items[i].getElementsByTagName('name')[0].firstChild.nodeValue);
-	}
-	
-	splitDuplicatedItems( 'exportItemID', 'exportItemName' );
-	saveCopyExportItemsToExportReport();
+		splitDuplicatedItems( 'exportItemID', 'exportItemName' );
+		saveCopyExportItemsToExportReport();
+	} );
 }
 
 function splitDuplicatedItems( itemIDAttribute, itemNameAttribute )
@@ -354,28 +336,21 @@
 
 function copyExportItemToImportReport()
 {
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.setCallbackSuccess( copyExportItemToImportReportReceived );
-	request.send( "getAllImportReportByType.action?reportType=" + getFieldValue( "exportReportType" ) );
-}
-
-function copyExportItemToImportReportReceived( xmlObject ) {
-	
-	var groups = xmlObject.getElementsByTagName("importReport");
-	var selectList = document.getElementById("targetImportReport");
-	var options = selectList.options;
-	
-	options.length = 0;
-	
-	for( var i = 0 ; i < groups.length ; i++ ) {
-	
-		var id = groups[i].getElementsByTagName("id")[0].firstChild.nodeValue;
-		var name = groups[i].getElementsByTagName("name")[0].firstChild.nodeValue;
-		options.add(new Option(name,id), null);
-	}
-	
-	openDialog( dialog2 );
+	jQuery.postJSON( "getAllImportReportByType.action", {
+		reportType: getFieldValue( "exportReportType" )
+	}, function( json ) {
+		var list = json.importReports;
+		var options = byId("targetImportReport").options;
+
+		options.length = 0;
+		
+		for( var i = 0 ; i < list.length ; i++ )
+		{
+			options.add( new Option( list[i].name, list[i].id ), null );
+		}
+
+		openDialog( dialog2 );
+	} );
 }
 
 /*
@@ -410,28 +385,24 @@
 	itemsCurTarget = new Array();
 	itemsDuplicated = new Array();
 	
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.setCallbackSuccess( validateCopyExportItemsToImportReportReceived );
-	request.send( "getImportItemsByImportReport.action?importReportId=" + getFieldValue("targetImportReport") );
-}
-
-function validateCopyExportItemsToImportReportReceived( xmlObject )
-{	
-	var items = xmlObject.getElementsByTagName('importItem');
-	
-	for (var i = 0 ;  i < items.length ; i ++)
-	{
-		itemsCurTarget.push(items[i].getElementsByTagName('name')[0].firstChild.nodeValue);
-	}
-	
-	splitDuplicatedItems( 'exportItemID', 'exportItemName' );
-	saveCopiedExportItemsToImportReport();
+	jQuery.postJSON( "getImportItemsByImportReport.action", {
+		importReportId: getFieldValue( "targetImportReport" )
+	}, function( json ) {
+		var items = json.importItems;
+
+		for (var i = 0 ; i < items.length ; i ++)
+		{
+			itemsCurTarget.push( items[i].name );
+		}
+
+		splitDuplicatedItems( 'exportItemID', 'exportItemName' );
+		saveCopiedExportItemsToImportReport();
+	} );
 }
 
 function saveCopiedExportItemsToImportReport() {
 	
-	warningMessages = " ======= Sheet [" + sheetId + "] ========";
+	warningMessages = "";
 	
 	// If have ExportItem(s) in Duplicating list
 	// preparing the warning message
@@ -485,20 +456,19 @@
 
 function executeCopyItems( url )
 {
-	$.postJSON(
-		url, {}, function ( json )
-		{
-			if ( json.response == "success" )
-			{	
-				warningMessages +=
-				"<br/><b>[" + (ItemsSaved.length) + "/" + (NumberOfItemsChecked) + "]</b>:: "
-				+ i18n_copy_successful
-				+ "<br/>=======================<br/><br/>";
-			}
-			
-			setMessage( warningMessages );
+	jQuery.postJSON( url, {}, function ( json )
+	{
+		if ( json.response == "success" )
+		{	
+			warningMessages +=
+			" ======= Sheet [" + sheetId + "] ========"
+			+ "<br/><b>[" + (ItemsSaved.length) + "/" + (NumberOfItemsChecked) + "]</b>:: "
+			+ i18n_copy_successful
+			+ "<br/>=======================<br/><br/>";
 		}
-	);
+		
+		setMessage( warningMessages );
+	} );
 }
 
 /**
@@ -533,134 +503,35 @@
 
 function filterIndicators()
 {
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.setCallbackSuccess( filterIndicatorsCompleted );
-	request.send( "../dhis-web-commons-ajax/getIndicators.action?id=" + $("#indicatorGroups").val());
-}
-
-function filterIndicatorsCompleted( xmlObject )
-{
-	var indiatorList = byId( "availableIndicators" );
-	indiatorList.options.length = 0;
-	
-	var indicators = xmlObject.getElementsByTagName( "indicator" );
-	
-	for ( var i = 0; i < indicators.length; i++ )
-	{
-		var id = indicators[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
-		var indicatorName = indicators[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
-		var option = document.createElement( "option" );
-		
-		option.value = "[" + id + "]";
-		option.text = indicatorName;
-		indiatorList.add( option, null );	
-		
-		var formula = byId('formulaIndicator').value;
-		if(formula==option.value){
-			option.selected = true;
-			byId("formulaIndicatorDiv").innerHTML = indicatorName;
-		}
-	}
-}
-
-/**
-* Open Category Expression
-*/
-function openCategoryExpression()
-{	
-	byId("categoryFormula").value = byId("expression").value;
-	
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.setCallbackSuccess( openCategoryExpressionReceived );
-	request.send("getExportReport.action?id=" + exportReportId);	
-}
-
-function openCategoryExpressionReceived( data ) {
-
-	var selectedDataElementGroups = document.getElementById('dataElementGroup_');
-	selectedDataElementGroups.options.length = 0;
-	var dataElementGroups = data.getElementsByTagName('dataElementGroup');
-	
-	for( var i = 0 ; i < dataElementGroups.length ; i++ ) {
-	
-		var id = dataElementGroups.item(i).getElementsByTagName('id')[0].firstChild.nodeValue;
-		var name = dataElementGroups.item(i).getElementsByTagName('name')[0].firstChild.nodeValue;
-		//selectedDataElementGroups.options.add(new Option(name, id));
-		
-		var option = new Option( name, id );
-		option.onmousemove  = function(e){
-			showToolTip( e, this.text);
-		}
-		selectedDataElementGroups.add(option, null);
-	}
-	
-	getDataElementGroupOrder();
-	setPositionCenter( 'category' );
-	enable( "dataElementGroup_" );
-	enable( "availableDataElements_" );
-	byId( "availableDataElements_" ).onchange = function(e){ getOptionCombos_() };
-	
-	$( "#category" ).show();	
-}
-
-function getOptionCombos_()
-{
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.setCallbackSuccess( getOptionCombos_Received );
-	request.send( "getOptionCombos.action?dataElementId=" + byId("availableDataElements_").value );	
-}
-
-function getOptionCombos_Received( xmlObject ) {
-
-	xmlObject = xmlObject.getElementsByTagName('categoryOptions')[0];		
-	
-	var optionComboList = byId( "optionCombos_" );			
-	optionComboList.options.length = 0;		
-	var optionCombos = xmlObject.getElementsByTagName( "categoryOption" );
-	
-	for ( var i = 0; i < optionCombos.length; i++ )
-	{
-		var id = optionCombos[ i ].getAttribute('id');
-		var name = optionCombos[ i ].firstChild.nodeValue;			
-		var option = document.createElement( "option" );
-		
-		option.value = id ;
-		option.text = name;
-		optionComboList.add( option, null );
-	}
-}
-
-function insertDataElementId_()
-{
-	var optionCombo = byId("optionCombos_");
-	var dataElementComboId = "[*." + optionCombo.value + "]";
-	byId("categoryFormula").value = dataElementComboId;
-	byId("categoryFormulaDiv").innerHTML = "*." + optionCombo[optionCombo.selectedIndex].text ;
-}
-
-function clearFormula(formulaFieldName)
+	jQuery.postJSON( "../dhis-web-commons-ajax-json/getIndicators.action" {
+		id: $("#indicatorGroups").val()
+	}, function( json ) {
+		var indiatorList = byId( "availableIndicators" );
+		indiatorList.options.length = 0;
+
+		var indicators = json.indicators;
+		
+		for ( var i = 0; i < indicators.length; i++ )
+		{
+			var id = indicators[ i ].id;
+			var name = indicators[ i ].name;
+			var option = document.createElement( "option" );
+			
+			option.value = "[" + id + "]";
+			option.text = name;
+			indiatorList.add( option, null );	
+
+			if ( byId('formulaIndicator').value == option.value )
+			{
+				option.selected = true;
+				setInnerHTML( "formulaIndicatorDiv", name );
+			}
+		}
+	} );
+}
+
+function clearFormula( formulaFieldName )
 {
 	byId(formulaFieldName).value = '';
 	byId(formulaFieldName + "Div").innerHTML = ''
 }
-// -------------------------------------------------------------------------------
-// Show textFormula
-// -------------------------------------------------------------------------------
-
-function updateFormulaText( formulaFieldName )
-{		
-	var formula = htmlEncode( byId( formulaFieldName ).value );
-	var url = "getFormulaText.action?formula=" + formula;
-	
-	var request = new Request();
-	request.setCallbackSuccess( updateFormulaTextReceived );
-    request.send( url );
-}
-
-function updateFormulaTextReceived( messageElement )
-{
-	byId( "formulaDiv").innerHTML = messageElement;
-}

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportReports.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportReports.js	2011-08-04 08:39:55 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportReports.js	1970-01-01 00:00:00 +0000
@@ -1,66 +0,0 @@
-function backupExportReport( id )
-{
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.setCallbackSuccess( backupExportReportReceived );
-	request.send( "backupExportReport.action?id=" + id );	
-
-}
-
-function backupExportReportReceived( data ) {
-
-	window.location = "downloadFile.action?outputFormat=application/xml-external-parsed-entity";
-}
-
-function restoreExportReport() {
-	
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.setCallbackSuccess( restoreExportReportReceived );
-	request.send( "restoreExportReport.action");	
-
-}
-
-function restoreExportReportReceived( xmlObject ) {
-
-	var type = xmlObject.getAttribute( 'type' );
-	
-	if ( type == 'error' )
-	{
-		setMessage( xmlObject.firstChild.nodeValue );
-	}
-	else if ( type == 'success' )
-	{
-		window.location.reload();	
-	}
-}
-
-function getListExcelTemplate()
-{
-	var request = new Request();
-    request.setResponseTypeXML( 'files' );
-    request.setCallbackSuccess( getListExcelTemplateReceived );
-	request.send( "getListExcelTemplateFile.action");	
-}
-
-function getListExcelTemplateReceived( files )
-{
-	var html = "<ul>";
-	var excels = files.getElementsByTagName( "file");
-	
-	for( var i=0;i<excels.length;i++)
-	{
-		html += "<li onclick='selectExcelTemplate(this);'>" + excels[i].firstChild.nodeValue + "</li>";
-	}
-	
-	html += "</ul>";
-	
-	byId("listExcelTemplate").innerHTML = html;
-	showById( 'listExcelTemplate' );
-}
-
-function selectExcelTemplate( li )
-{
-	byId( 'excelTemplateFile' ).value = li.innerHTML;
-	hideById( 'listExcelTemplate' );
-}

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/import.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/import.js	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/import.js	2012-02-28 08:50:46 +0000
@@ -37,17 +37,11 @@
 // @param isImport This is a global variable which declared in preview.js
 // -----------------------------------------------------------------------------
 
-function getPreviewImportData(){	
-	
+function getPreviewImportData()
+{	
 	lockScreen();
-	
 	isImport = true;
-	
-	var request = new Request();
-	request.setResponseTypeXML( 'xmlObject' );
-	request.setCallbackSuccess( previewExportReportReceived );
-	request.send( "previewDataFlow.action?importReportId=" + byId("importReportId").value );
-	
+	jQuery.postJSON( "previewDataFlow.action", { importReportId: byId( "importReportId" ).value }, previewExportReportReceived );
 }
 
 isToggled = true;
@@ -96,7 +90,7 @@
 	
 	var url = 'getPeriodsByImportReport.action';
 	
-	jQuery.postJSON( url, {'importReportId':importReportId}, responseListPeriodReceived );
+	jQuery.postJSON( url, { 'importReportId' : importReportId }, responseListPeriodReceived );
 }
 
 function validateUploadExcelImportByJSON(){

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/importItems.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/importItems.js	2012-02-03 08:38:42 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/importItems.js	2012-02-28 08:50:46 +0000
@@ -131,57 +131,42 @@
 
 function copyImportItemToImportReport() {
 	
-	var request = new Request();
-	request.setResponseTypeXML( 'xmlObject' );
-	request.setCallbackSuccess( copyImportItemToImportReportReceived );
-	request.send( "getAllImportReportByType.action?reportType=" + getFieldValue( "importReportType" ) );
-
-}
-
-function copyImportItemToImportReportReceived( xmlObject ) {
-
-	var reports = xmlObject.getElementsByTagName("importReport");
-	var selectList = document.getElementById("targetImportReport");
-	var options = selectList.options;
-	
-	options.length = 0;
-	
-	for( var i = 0 ; i < reports.length ; i++ ) {
-	
-		var id = reports[i].getElementsByTagName("id")[0].firstChild.nodeValue;
-		var name = reports[i].getElementsByTagName("name")[0].firstChild.nodeValue;
-		options.add(new Option(name,id), null);
-	}
-	
-	openDialog( dialog1 );
+	jQuery.postJSON( "getAllImportReportByType.action",	{
+		reportType: getFieldValue( "importReportType" )
+	}, function( json ) {
+		var reports = json.importReports;
+		var options = byId( "targetImportReport" ).options;
+		
+		options.length = 0;
+		
+		for( var i = 0 ; i < reports.length ; i++ )
+		{
+			options.add( new Option( reports[i].name, reports[i].id ), null );
+		}
+		
+		openDialog( dialog1 );
+	} );
 }
 
 function copyImportItemToExportReport() {
 	
-	var request = new Request();
-	request.setResponseTypeXML( 'xmlObject' );
-	request.setCallbackSuccess( copyImportItemToExportReportReceived );
-	request.send( "getAllExportReportByType.action?reportType=" + getFieldValue( "importReportType" ) );
-}
-
-function copyImportItemToExportReportReceived( xmlObject ) {
-
-	var exportReports = xmlObject.getElementsByTagName("exportReport");
-	var selectList = document.getElementById("targetExportReport");
-	var options = selectList.options;
-	
-	options.length = 0;
-	
-	for( var i = 0 ; i < exportReports.length ; i++ ) {
-	
-		var id = exportReports[i].getElementsByTagName("id")[0].firstChild.nodeValue;
-		var name = exportReports[i].getElementsByTagName("name")[0].firstChild.nodeValue;
-		options.add(new Option(name,id), null);
-	}
-	
-	loadItemTypes( jQuery("#targetExportReport").val() );
-	
-	openDialog( dialog2 );
+	jQuery.postJSON( "getAllExportReportByType.action", {
+		reportType: getFieldValue( "importReportType" )
+	}, function( json ) {		
+		var exportReports = json.exportReports;
+		var options = byId("targetExportReport").options;
+		
+		options.length = 0;
+		
+		for( var i = 0 ; i < exportReports.length ; i++ )
+		{
+			options.add( new Option( exportReports[i].name, exportReports[i].id ), null );
+		}
+		
+		loadItemTypes( jQuery("#targetExportReport").val() );
+		
+		openDialog( dialog2 );
+	} );
 }
 
 function validateCopyImportItemsToImportReport() {
@@ -212,23 +197,19 @@
 	itemsCurTarget = new Array();
 	itemsDuplicated = new Array();
 	
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.setCallbackSuccess( validateCopyImportItemsToImportReportReceived );
-	request.send( "getImportItemsByImportReport.action?importReportId=" + byId("targetImportReport").value );
-}
-
-function validateCopyImportItemsToImportReportReceived( xmlObject ) {
-	
-	var items = xmlObject.getElementsByTagName('importItem');
-	
-	for (var i = 0 ;  i < items.length ; i ++) {
-	
-		itemsCurTarget.push(items[i].getElementsByTagName('name')[0].firstChild.nodeValue);
-	}
-	
-	splitDuplicatedImportItems( 'importItemID', 'importItemName' );
-	saveCopiedImportItemsToImportReport();
+	jQuery.postJSON( "getImportItemsByImportReport.action", {
+		importReportId: byId("targetImportReport").value
+	}, function( json ) {	
+		var items = json.importItems;
+		
+		for (var i = 0 ; i < items.length ; i ++)
+		{
+			itemsCurTarget.push( items[i].name );
+		}
+		
+		splitDuplicatedImportItems( 'importItemID', 'importItemName' );
+		saveCopiedImportItemsToImportReport();
+	} );
 }
 
 
@@ -260,28 +241,21 @@
 	itemsCurTarget = new Array();
 	itemsDuplicated = new Array();
 	
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.setCallbackSuccess( validateCopyImportItemsToExportReportReceived );
-	
-	var param = "exportReportId=" + getFieldValue( "targetExportReport" );
-		param += "&sheetNo=" + sheetId;
-	
-	request.sendAsPost( param );
-	request.send( "getExportItemsBySheet.action" );
-}
-
-function validateCopyImportItemsToExportReportReceived( xmlObject ) {
-	
-	var items = xmlObject.getElementsByTagName( 'exportItem' );
-	
-	for (var i = 0 ;  i < items.length ; i ++)
-	{
-		itemsCurTarget.push(items[i].getElementsByTagName( 'name' )[0].firstChild.nodeValue);
-	}
-	
-	splitDuplicatedImportItems( 'importItemID', 'importItemName' );
-	saveCopiedImportItemsToExportReport();
+	jQuery.postJSON( "getExportItemsBySheet.action", {
+		exportReportId: getFieldValue( "targetExportReport" ),
+		sheetNo: sheetId
+	}, function( json ) {
+		
+		var items = json.exportItems;
+		
+		for (var i = 0 ;  i < items.length ; i ++)
+		{
+			itemsCurTarget.push( items[i].name );
+		}
+		
+		splitDuplicatedImportItems( 'importItemID', 'importItemName' );
+		saveCopiedImportItemsToExportReport();
+	} );
 }
 
 function splitDuplicatedImportItems( itemIDAttribute, itemNameAttribute ) {
@@ -351,20 +325,16 @@
 	// do copy and prepare the message notes
 	if ( ItemsSaved.length > 0 ) {
 	
-		var request = new Request();
-		request.setResponseTypeXML( 'xmlObject' );
-		request.setCallbackSuccess( saveCopiedImportItemsReceived );	
-		
-		var params = "importReportDestId=" + byId("targetImportReport").value;
-			params += "&sheetNo=" + sheetId;
+		var url = "copyImportItemToImportReport.action";
+			url += "?importReportDestId=" + byId("targetImportReport").value;
+			url += "&sheetNo=" + sheetId;
 			
 		for (var i in ItemsSaved)
 		{
-			params += "&itemIds=" + ItemsSaved[i];
+			url += "&itemIds=" + ItemsSaved[i];
 		}
-		
-		request.sendAsPost(params);
-		request.send( "copyImportItemToImportReport.action");
+
+		executeCopyItems( url );
 	}
 	// If have no any ImportItem(s) will be copied
 	// and also have ImportItem(s) in Duplicating list
@@ -403,22 +373,18 @@
 	// do copy and prepare the message notes
 	if ( ItemsSaved.length > 0 ) {
 	
-		var request = new Request();
-		request.setResponseTypeXML( 'xmlObject' );
-		request.setCallbackSuccess( saveCopiedImportItemsReceived );	
-		
-		var params = "exportReportId=" + getFieldValue( "targetExportReport" );
-			params += "&periodType=" + getFieldValue( "periodType" );
-			params += "&itemType=" + getFieldValue( "itemType" );
-			params += "&sheetNo=" + sheetId;
+		var url = "copyImportItemToExportReport.action";
+			url += "?exportReportId=" + getFieldValue( "targetExportReport" );
+			url += "&periodType=" + getFieldValue( "periodType" );
+			url += "&itemType=" + getFieldValue( "itemType" );
+			url += "&sheetNo=" + sheetId;
 			
 		for (var i in ItemsSaved)
 		{
-			params += "&itemIds=" + ItemsSaved[i];
+			url += "&itemIds=" + ItemsSaved[i];
 		}
 		
-		request.sendAsPost(params);
-		request.send( "copyImportItemToExportReport.action");
+		executeCopyItems( url );
 	}
 	// If have no any ImportItem(s) will be copied
 	// and also have ImportItem(s) in Duplicating list
@@ -430,19 +396,19 @@
 	closeDialog( dialog2 );
 }
 
-function saveCopiedImportItemsReceived( data ) {
-	
-	var type = data.getAttribute("type");
-	
-	if ( type == "success" ) {
-	
-		warningMessages +=
-		" ======= Sheet [" + sheetId + "] ========"
-		+ "<br/><b>[" + (ItemsSaved.length) + "/" + (noItemsChecked) + "]</b>:: "
-		+ i18n_copy_successful
-		+ "<br/>======================<br/><br/>";
-
-	}
-	
-	setMessage( warningMessages );
+function executeCopyItems( url )
+{	
+	jQuery.postJSON( url, {}, function ( json )
+	{
+		if ( json.response == "success" )
+		{
+			warningMessages +=
+			" ======= Sheet [" + sheetId + "] ========"
+			+ "<br/><b>[" + (ItemsSaved.length) + "/" + (noItemsChecked) + "]</b>:: "
+			+ i18n_copy_successful
+			+ "<br/>======================<br/><br/>";
+		}
+		
+		setMessage( warningMessages );
+	} );
 }
\ No newline at end of file

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/preview.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/preview.js	2011-12-13 07:46:57 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/preview.js	2012-02-28 08:50:46 +0000
@@ -50,21 +50,14 @@
 	});
 }
 
-function previewExportReport() {
-
-	var request = new Request();
-	request.setResponseTypeXML( 'reportXML' );
-	request.setCallbackSuccess( previewExportReportReceived );
-	request.send( 'previewExportReport.action' );
+function previewExportReport()
+{
+	jQuery.post( "previewExportReport.action", {}, previewExportReportReceived );
 }
 
 function previewAdvandReport() 
 {	
-	var request = new Request();
-	request.setResponseTypeXML( 'reportXML' );
-	request.setCallbackSuccess( previewExportReportReceived );
-	request.sendAsPost( params );
-	request.send( "previewAdvancedExportReport.action?organisationGroupId=" + byId("availableOrgunitGroups").value );
+	jQuery.post( "previewAdvancedExportReport.action", { organisationGroupId: byId( "availableOrgunitGroups" ).value }, previewExportReportReceived );
 }
 
 function previewExportReportReceived( parentElement ) 

=== added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonDataElementCategoryOptionCombos.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonDataElementCategoryOptionCombos.vm	1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonDataElementCategoryOptionCombos.vm	2012-02-28 08:50:46 +0000
@@ -0,0 +1,9 @@
+#set( $size = $dataElementCategoryOptionCombos.size() )
+{ "dataElementCategoryOptionCombos": [
+#foreach( $de in $dataElementCategoryOptionCombos )
+  {
+    "id": $!{de.id},
+    "name": "$!encoder.jsEncode( ${de.name} )"   
+  }#if( $velocityCount < $size ),#end    
+#end
+] }

=== added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportGroups.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportGroups.vm	1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportGroups.vm	2012-02-28 08:50:46 +0000
@@ -0,0 +1,6 @@
+#set( $size = $groups.size() )
+#foreach($g in $groups)
+[
+	{"id":"$!encoder.jsEncode( ${g} )", "label": "$!encoder.jsEncode( ${g} )", "value":"$!encoder.jsEncode( ${g} )"}#if( $velocityCount < $size ),#end
+]
+#end
\ No newline at end of file

=== added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportItems.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportItems.vm	1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonExportItems.vm	2012-02-28 08:50:46 +0000
@@ -0,0 +1,13 @@
+#set( $size = $exportItems.size() )
+{
+  "exportItems": [
+  #foreach( $exportItem in $exportItems )
+  {
+    "id": "${exportItem.id}",
+	"name": "$!encoder.jsonEncode( ${exportItem.name} )",
+	"row": "${exportItem.row}",
+	"column": "${exportItem.column}"
+  }#if( $velocityCount < $size ),#end
+  #end
+  ]
+}
\ No newline at end of file

=== added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportItem.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportItem.vm	1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportItem.vm	2012-02-28 08:50:46 +0000
@@ -0,0 +1,10 @@
+{ "importItem":
+  {
+	"id": "${importItem.id}",
+	"name": "$!encoder.jsonEncode( ${importItem.name} )",
+	"row": "${importItem.row}",
+	"column": "${importItem.column}",
+	"expression": "$!encoder.jsonEncode( ${importItem.expression} )",
+	"sheetNo": "$importItem.sheetNo"
+  }
+}
\ No newline at end of file

=== added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportItems.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportItems.vm	1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportItems.vm	2012-02-28 08:50:46 +0000
@@ -0,0 +1,15 @@
+#set( $size = $importItems.size() )
+{
+  "importItems": [
+  #foreach($importItem in $importItems)
+  {
+    "id": "${importItem.id}",
+	"name": "$!encoder.jsonEncode( ${importItem.name} )",
+	"row": "${importItem.row}",
+	"column": "${importItem.column}",
+	"expression": "$!encoder.jsonEncode( ${importItem.expression} )",
+	"sheetNo": "${importItem.sheetNo}"
+  }#if( $velocityCount < $size ),#end
+  #end
+  ]
+}
\ No newline at end of file

=== added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportReport.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportReport.vm	1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportReport.vm	2012-02-28 08:50:46 +0000
@@ -0,0 +1,9 @@
+{ "importReport":
+  {
+	"id": "${report.id}",
+	"name": "$!encoder.jsonEncode( $!{report.name} )",
+	"type": "${report.type}",
+	"periodType": "${report.periodType.name}",
+	"excelTemplateFile": "${report.excelTemplateFile}"
+  }
+}
\ No newline at end of file

=== added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportReports.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportReports.vm	1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonImportReports.vm	2012-02-28 08:50:46 +0000
@@ -0,0 +1,14 @@
+#set( $size = $!importReports.size() )
+{
+  "importReports": [
+  #foreach( $importReport in $importReports )
+  {
+    "id": "${importReport.id}",
+	"name": "$!encoder.jsonEncode( $!{importReport.name} )",
+	"type": "${importReport.type}",
+	"periodType": "${importReport.periodType.name}",
+	"excelTemplateFile": "${importReport.excelTemplateFile}"
+  }#if( $velocityCount < $size ),#end
+  #end
+  ]
+}
\ No newline at end of file

=== added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonPeriodColumn.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonPeriodColumn.vm	1970-01-01 00:00:00 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonPeriodColumn.vm	2012-02-28 08:50:46 +0000
@@ -0,0 +1,9 @@
+{ "periodColumn":
+  {
+	"id": "${periodColumn.id}",
+	"startdate": "$!encoder.jsonEncode( $!format.formatDate( ${periodColumn.startdate} ) )",
+	"enddate": "$!encoder.jsonEncode( $!format.formatDate( ${periodColumn.enddate ) )",
+	"column": "${periodColumn.column}",
+	"periodType": "$!encoder.jsonEncode( ${periodColumn.periodType} )"
+  }
+}
\ No newline at end of file

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/organisationUnitAtLevels.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/organisationUnitAtLevels.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/organisationUnitAtLevels.vm	2012-02-28 08:50:46 +0000
@@ -1,3 +1,9 @@
+<script type="text/javascript">
+	jQuery(document).ready(function(){	
+		tableSorter( 'listTable' );	
+	});
+</script>
+
 <h3>$encoder.htmlEncode($exportReport.name)</h3>
 
 <table width="100%">
@@ -45,16 +51,17 @@
 </table>
 
 <script>
-	function updateOrganisationUnitGroupAtLevel(exportReportId, orgUnitGroupId, select){
+	function updateOrganisationUnitGroupAtLevel( exportReportId, orgUnitGroupId, select )
+	{
 		select.style.backgroundColor = "#FFFFFF";
-		var request = new Request();
-		request.setResponseTypeXML( 'message' );
-		request.setCallbackSuccess( function (message){
+		
+		jQuery.postJSON( "updateOrganisationUnitGroupAtLevel.action",
+		{
+			exportReportId: exportReportId,
+			orgUnitGroupId: orgUnitGroupId,
+			levelId: select.value
+		}, function ( json ) {
 			select.style.backgroundColor = "#D5FFC5";
-		});		
-		request.send( "updateOrganisationUnitGroupAtLevel.action?exportReportId=" + exportReportId + "&orgUnitGroupId=" + orgUnitGroupId + "&levelId=" + select.value);		
+		} );
 	}
-	jQuery(document).ready(function(){	
-		tableSorter( 'listTable' );	
-	});
 </script>
\ No newline at end of file

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/periodcolumns.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/periodcolumns.vm	2011-08-03 08:38:38 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/periodcolumns.vm	2012-02-28 08:50:46 +0000
@@ -1,1 +1,1 @@
-<script>

	jQuery(document).ready(function(){
		datePickerInRange( 'startdate' , 'enddate' );	
		tableSorter( 'listTable' );
		
		validation( 'periodColumnForm', function( form ){ 
			form.action = getFieldValue('action');
			form.submit();
		});
		
		periodColumnDialog = setUpDialog( 'periodColumn', i18n_expression, 410, 210 );
	});
	
	var i18n_startdate_null = "$encoder.jsEscape($i18n.getString( 'startdate_null' ) , "'")";
	var i18n_enddate_null = "$encoder.jsEscape($i18n.getString( 'enddate_null' ) , "'")";
	var i18n_column_is_null = "$encoder.jsEscape($i18n.getString( 'column_is_null' ) , "'")";
	var i18n_confirm_delete = '$encoder.jsEscape($i18n.getString( 'confirm_delete' ) , "'")';
	var i18n_expression = '$encoder.jsEscape( $i18n.getString( "expression" ) , "'")';
	var periodColumnDialog = null;
</script>

<h3>$!encoder.htmlEncode($!report.name)</h3>
<table width="100%">
<tr style="vertical-align:bottom;">
<td>
	$i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues(this.value, 1)" style="width:300px"/>	
</td>
<td align="right">		
	<input type="button" onclick="openAddPeriodColumn()" value="$i18n.getString('add')" style="width:150px"/><br>
	<input type="button" onclick="window.location='listAllExportReport.action'" value="$i18n.getString('cancel')" style="width:150px"/><br>	
</td>
</tr>
</table>
<table width="100%" id="listTable" class="listTable">
	<thead>
		<tr>		
			<th>$i18n.getString('start_date')</th>	
			<th>$i18n.getString('end_date')</th>	
			<th>$i18n.getString('period_type')</th>		
			<th>$i18n.getString('column')</th>
			<th width="70px" class="{sorter: false}">$i18n.getString('operations')</th>		
		</tr>
	</thead>
	<tbody id="list">
	#set( $mark = false )
	#foreach($periodColumn in $report.periodColumns)
		<tr #alternate( $mark )>
			<td>$format.formatDate($periodColumn.startdate)</td>	
			<td>$format.formatDate($periodColumn.enddate)</td>			
			<td>$i18n.getString( $periodColumn.periodType )</td>			
			<td>$periodColumn.column</td>
			<td align="center">				
				<a href="javascript:deletePeriodColumn($report.id, $periodColumn.id );" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
				<a href="javascript:openUpdatePeriodColumn( $periodColumn.id );" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
			</td>
		</tr>
		#if( $mark )
			#set( $mark = false )
		#else
			#set( $mark = true )
		#end
	#end
	</tbody>
</table>

<div id="periodColumn" style="padding:10px">	
<form id="periodColumnForm" method="POST">
<input type="hidden" id="action" value=""/>
<input type="hidden" name="id" id="id"/>
<input type="hidden" value="$!report.id" name="exportReportId"/>
	<table width="100%">
		<tr>
			<td><label>$i18n.getString('period_type')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
			<td>
				<select type="text" id="periodType" name="periodType" style="min-width:20em">
					<option value='selected_month'>$i18n.getString('selected_month')</option>
					<option value='last_3_month'>$i18n.getString('last_3_month')</option>
					<option value='last_6_month'>$i18n.getString('last_6_month')</option>
					<option value='so_far_this_year'>$i18n.getString('so_far_this_year')</option>
					<option value='quaterly'>$i18n.getString('quaterly')</option>
					<option value='6_month'>$i18n.getString('six_monthly')</option>
					<option value='yealy'>$i18n.getString('yearly')</option>
				</select>
			</td>			
		</tr>
		<tr>
			<td>$i18n.getString('start_date')</td>
			<td>
				<input id="startdate" name="startdate" type="text" readonly="readonly" /><em title="$i18n.getString( 'required' )" class="required">*</em>				
			</td>				
		</tr>
		<tr>
			<td>$i18n.getString('end_date')</td>
			<td>
				<input id="enddate" name="enddate" type="text" readonly="readonly"/><em title="$i18n.getString( 'required' )" class="required">*</em>				
			</td>				
		</tr>
		<tr>
			<td>$i18n.getString('column')</td>
			<td>
				<input id="column" name="column" type="text" class="{validate:{required:true, number:true}}"/><em title="$i18n.getString( 'required' )" class="required">*</em>			
			</td>				
		</tr>
		<tr style="height:50px">
			<td></td>
			<td>
				<input type="submit" id="action" value="$i18n.getString('save')" style="width:100px"/>
				<input type="button" value="$i18n.getString('cancel')" style="width:100px" onclick="closeDialog( periodColumnDialog )"/>
			</td>
		</tr>		
	</table>
</form>
</div>

<script>
	
	// ---------------------------------------------------------------------------
	// Dialog
	// ---------------------------------------------------------------------------

	function setUpDialog( elementId, title, width, height )
	{
		var dialog = jQuery( '#'+elementId ).dialog({
			title: title,
			modal: true,
			autoOpen: false,
			minWidth: width,
			minHeight: height,
			width: width,
			height: height
		});
		
		return dialog;
	}

	function openDialog( _dialog )
	{
		_dialog.dialog( 'open' );
	}

	function closeDialog( _dialog )
	{
		_dialog.dialog( 'close' );
	}
	
	function openAddPeriodColumn()
	{
		setFieldValue( "action", "savePeriodColumn.action" );
		openDialog( periodColumnDialog );
	}
		
	function openUpdatePeriodColumn( id )
	{
		var request = new Request();
		request.setResponseTypeXML( 'xmlObject' );
		request.setCallbackSuccess( openUpdatePeriodColumnCompleted );
		request.send( "getPeriodColumn.action?id=" + id );	
	}

	function openUpdatePeriodColumnCompleted( xmlObject )
	{	
		
		var id = xmlObject.getElementsByTagName("id")[0].firstChild.nodeValue;	
		var startdate = xmlObject.getElementsByTagName("startdate")[0].firstChild.nodeValue;
		var enddate = xmlObject.getElementsByTagName("enddate")[0].firstChild.nodeValue;
		var periodType = xmlObject.getElementsByTagName("periodType")[0].firstChild.nodeValue;
		var column = xmlObject.getElementsByTagName("column")[0].firstChild.nodeValue;
		
		byId("startdate").value = startdate;
		byId("enddate").value = enddate;
		byId("periodType").value = periodType;
		byId("column").value = column;
		byId("id").value = id;

		setFieldValue('action', 'updatePeriodColumn.action' );
		
		openDialog( periodColumnDialog );
	}

	function deletePeriodColumn( exportReportId, periodColumnId )
	{
		if(window.confirm(i18n_confirm_delete)){
			window.location="deletePeriodColumn.action?exportReportId=" + exportReportId + "&id=" + periodColumnId;
		}	
	}
</script>
\ No newline at end of file
+<script>

	jQuery(document).ready(function(){
		datePickerInRange( 'startdate' , 'enddate' );	
		tableSorter( 'listTable' );
		
		validation( 'periodColumnForm', function( form ){ 
			form.action = getFieldValue('action');
			form.submit();
		});
		
		periodColumnDialog = setUpDialog( 'periodColumn', i18n_expression, 410, 210 );
	});
	
	var i18n_startdate_null = "$encoder.jsEscape($i18n.getString( 'startdate_null' ) , "'")";
	var i18n_enddate_null = "$encoder.jsEscape($i18n.getString( 'enddate_null' ) , "'")";
	var i18n_column_is_null = "$encoder.jsEscape($i18n.getString( 'column_is_null' ) , "'")";
	var i18n_confirm_delete = '$encoder.jsEscape($i18n.getString( 'confirm_delete' ) , "'")';
	var i18n_expression = '$encoder.jsEscape( $i18n.getString( "expression" ) , "'")';
	var periodColumnDialog = null;
</script>

<h3>$!encoder.htmlEncode($!report.name)</h3>
<table width="100%">
<tr style="vertical-align:bottom;">
<td>
	$i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues(this.value, 1)" style="width:300px"/>	
</td>
<td align="right">		
	<input type="button" onclick="openAddPeriodColumn()" value="$i18n.getString('add')" style="width:150px"/><br>
	<input type="button" onclick="window.location='listAllExportReport.action'" value="$i18n.getString('cancel')" style="width:150px"/><br>	
</td>
</tr>
</table>
<table width="100%" id="listTable" class="listTable">
	<thead>
		<tr>		
			<th>$i18n.getString('start_date')</th>	
			<th>$i18n.getString('end_date')</th>	
			<th>$i18n.getString('period_type')</th>		
			<th>$i18n.getString('column')</th>
			<th width="70px" class="{sorter: false}">$i18n.getString('operations')</th>		
		</tr>
	</thead>
	<tbody id="list">
	#set( $mark = false )
	#foreach($periodColumn in $report.periodColumns)
		<tr #alternate( $mark )>
			<td>$format.formatDate($periodColumn.startdate)</td>	
			<td>$format.formatDate($periodColumn.enddate)</td>			
			<td>$i18n.getString( $periodColumn.periodType )</td>			
			<td>$periodColumn.column</td>
			<td align="center">				
				<a href="javascript:deletePeriodColumn($report.id, $periodColumn.id );" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
				<a href="javascript:openUpdatePeriodColumn( $periodColumn.id );" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
			</td>
		</tr>
		#if( $mark )
			#set( $mark = false )
		#else
			#set( $mark = true )
		#end
	#end
	</tbody>
</table>

<div id="periodColumn" style="padding:10px">	
<form id="periodColumnForm" method="POST">
<input type="hidden" id="action" value=""/>
<input type="hidden" name="id" id="id"/>
<input type="hidden" value="$!report.id" name="exportReportId"/>
	<table width="100%">
		<tr>
			<td><label>$i18n.getString('period_type')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
			<td>
				<select type="text" id="periodType" name="periodType" style="min-width:20em">
					<option value='selected_month'>$i18n.getString('selected_month')</option>
					<option value='last_3_month'>$i18n.getString('last_3_month')</option>
					<option value='last_6_month'>$i18n.getString('last_6_month')</option>
					<option value='so_far_this_year'>$i18n.getString('so_far_this_year')</option>
					<option value='quaterly'>$i18n.getString('quaterly')</option>
					<option value='6_month'>$i18n.getString('six_monthly')</option>
					<option value='yealy'>$i18n.getString('yearly')</option>
				</select>
			</td>			
		</tr>
		<tr>
			<td>$i18n.getString('start_date')</td>
			<td>
				<input id="startdate" name="startdate" type="text" readonly="readonly" /><em title="$i18n.getString( 'required' )" class="required">*</em>				
			</td>				
		</tr>
		<tr>
			<td>$i18n.getString('end_date')</td>
			<td>
				<input id="enddate" name="enddate" type="text" readonly="readonly"/><em title="$i18n.getString( 'required' )" class="required">*</em>				
			</td>				
		</tr>
		<tr>
			<td>$i18n.getString('column')</td>
			<td>
				<input id="column" name="column" type="text" class="{validate:{required:true, number:true}}"/><em title="$i18n.getString( 'required' )" class="required">*</em>			
			</td>				
		</tr>
		<tr style="height:50px">
			<td></td>
			<td>
				<input type="submit" id="action" value="$i18n.getString('save')" style="width:100px"/>
				<input type="button" value="$i18n.getString('cancel')" style="width:100px" onclick="closeDialog( periodColumnDialog )"/>
			</td>
		</tr>		
	</table>
</form>
</div>

<script>
	
	// ---------------------------------------------------------------------------
	// Dialog
	// ---------------------------------------------------------------------------

	function setUpDialog( elementId, title, width, height )
	{
		var dialog = jQuery( '#'+elementId ).dialog({
			title: title,
			modal: true,
			autoOpen: false,
			minWidth: width,
			minHeight: height,
			width: width,
			height: height
		});
		
		return dialog;
	}

	function openDialog( _dialog )
	{
		_dialog.dialog( 'open' );
	}

	function closeDialog( _dialog )
	{
		_dialog.dialog( 'close' );
	}
	
	function openAddPeriodColumn()
	{
		setFieldValue( "action", "savePeriodColumn.action" );
		openDialog( periodColumnDialog );
	}
		
	function openUpdatePeriodColumn( id )
	{
		jQuery.postJSON( "getPeriodColumn.action", { id: id }, function( json )
		{	
			byId("startdate").value = json.startdate;
			byId("enddate").value = json.enddate;
			byId("periodType").value = json.periodType;
			byId("column").value = json.column;
			byId("id").value = json.id;

			setFieldValue( 'action', 'updatePeriodColumn.action' );
			
			openDialog( periodColumnDialog );
		} );
	}

	function deletePeriodColumn( exportReportId, periodColumnId )
	{
		if ( window.confirm( i18n_confirm_delete ) )
		{
			window.location="deletePeriodColumn.action?exportReportId=" + exportReportId + "&id=" + periodColumnId;
		}	
	}
</script>
\ No newline at end of file

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportReportForm.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportReportForm.vm	2011-08-03 08:38:38 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/addExportReportForm.vm	2012-02-28 08:50:46 +0000
@@ -22,8 +22,7 @@
 				});
 			}
 		});
-
-	});	
+	});
 </script>
 <h3>$i18n.getString('export_reports') : $i18n.getString('add')</h3>
 

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/ajax/jsonDataElementCategoryOptionCombos.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/ajax/jsonDataElementCategoryOptionCombos.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/ajax/jsonDataElementCategoryOptionCombos.vm	1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-#set( $size = $dataElementCategoryOptionCombos.size() )
-{ "dataElementCategoryOptionCombos": [
-#foreach( $de in $dataElementCategoryOptionCombos )
-  {
-    "id": $!{de.id},
-    "name": "$!encoder.jsEncode( ${de.name} )"   
-  }#if( $velocityCount < $size ),#end    
-#end
-] }

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/ajax/jsonExportGroups.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/ajax/jsonExportGroups.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/ajax/jsonExportGroups.vm	1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-#set( $size = $groups.size() )
-#foreach($g in $groups)
-[
-	{"id":"$!encoder.jsEncode( ${g} )", "label": "$!encoder.jsEncode( ${g} )", "value":"$!encoder.jsEncode( ${g} )"}#if( $velocityCount < $size ),#end
-]
-#end
\ No newline at end of file

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/responseExportItems.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/responseExportItems.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/responseExportItems.vm	1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<exportItems>
-#foreach($exportItem in $exportItems)
-	<exportItem>
-		<id>$exportItem.id</id>
-		<name>$encoder.xmlEncode( $exportItem.name )</name>
-		<row>$exportItem.row</row>
-		<column>$exportItem.column</column>
-	</exportItem>
-#end
-</exportItems>
\ No newline at end of file

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseDataElements.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseDataElements.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseDataElements.vm	1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dataelements>
-#foreach ( $dataelement in $dataElements )
-	<dataelement>
-		<id>$dataelement.id</id>
-		<name>$encoder.xmlEncode( $dataelement.name )</name>		
-	</dataelement>
-#end
-</dataelements>

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseDataSets.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseDataSets.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseDataSets.vm	1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<datasets>
-	#foreach( $dataSet in $dataSets )
-		<dataset>
-			<id>$dataSet.id</id>
-			<name>$encoder.xmlEncode( $dataSet.name )</name>
-		</dataset>
-	#end
-</datasets>
\ No newline at end of file

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseExportReports.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseExportReports.vm	2011-10-13 03:03:58 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responseExportReports.vm	1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<exportReports>	
-	<organisationUnit>$!encoder.xmlEncode($organisationUnit.name)</organisationUnit>
-	#foreach($exportReport in $exportReports)
-	<exportReport>
-		<id>$exportReport.id</id>
-		<name>$!encoder.xmlEncode($exportReport.name)</name>
-		<flag>$!idMap.contains($!exportReport.id)</flag>
-	</exportReport>
-	#end
-</exportReports>
\ No newline at end of file

=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responsePeriodColumn.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responsePeriodColumn.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/responsePeriodColumn.vm	1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<periodColumn>
-	<id>$periodColumn.id</id>
-	<startdate>$encoder.xmlEncode($format.formatDate($periodColumn.startdate))</startdate>
-	<enddate>$encoder.xmlEncode($format.formatDate($periodColumn.enddate))</enddate>
-	<column>$periodColumn.column</column>
-	<periodType>$encoder.xmlEncode( $periodColumn.periodType )</periodType>
-</periodColumn>
\ No newline at end of file

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateDataStatus.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateDataStatus.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateDataStatus.vm	2012-02-28 08:50:46 +0000
@@ -31,26 +31,24 @@
 </form>
 <script language="javascript">
 
-	var request = new Request();
-	request.setCallbackSuccess( dataSetResponse );	
-	request.setResponseTypeXML( 'xmlObject' );
-	request.send( 'getDataSets.action?dataSetId=' + $!dataStatus.dataSet.id );
-	
-	function dataSetResponse( xmlObject ){
-		var listDataSet = xmlObject.getElementsByTagName("dataset");
-		var dataSets = document.getElementById("dataSetId");
-		dataSets.options.length = 0;
-		
-		for (var i=0 ; i < listDataSet.length ; i++ )
-		{
-			var id = listDataSet.item(i).getElementsByTagName('id')[0].firstChild.nodeValue;
-			var name = listDataSet.item(i).getElementsByTagName('name')[0].firstChild.nodeValue;	
-			var option = new Option(name, id);
-			if ( id == $dataStatus.dataSet.id )
+	jQuery.postJSON( 'getDataSets.action', { dataSetId: $!dataStatus.dataSet.id },
+		function( json ) {
+			var listDataSet = json.dataSets;
+			var dataSets = byId( "dataSetId" );
+			dataSets.options.length = 0;
+			
+			for (var i=0 ; i < listDataSet.length ; i++ )
 			{
-				option.selected = true;				
+				var id = listDataSet[i].id;
+				var name = listDataSet[i].name;
+				var option = new Option( name, id );
+
+				if ( id == $!dataStatus.dataSet.id )
+				{
+					option.selected = true;				
+				}
+				dataSets.options.add( option, null );
 			}
-			dataSets.options.add(option,null);
 		}
-	}
+	);
 </script>
\ No newline at end of file

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.vm	2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.vm	2012-02-28 08:50:46 +0000
@@ -14,13 +14,8 @@
 		window.location = action;
 	}
 	function cleanUp(){
-		var request = new Request();
-		request.setResponseTypeXML( 'xmlObject' );
-		request.setCallbackSuccess( cleanUpCompleted );
-		request.send( 'cleanUpDraftFile.action' );
-	}
-	
-	function cleanUpCompleted( xmlObject ){	
-		setHeaderDelayMessage( xmlObject.firstChild.nodeValue );
-	}
-</script>
+		jQuery.postJSON( 'cleanUpDraftFile.action', {}, function( json ) {
+			setHeaderDelayMessage( json.message );
+		} );
+	}
+</script>
\ No newline at end of file