dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04587
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1536: Mirror fix.
------------------------------------------------------------
revno: 1536
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-03-03 14:33:59 +0700
message:
Mirror fix.
modified:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reportItem.js
--
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 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reportItem.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reportItem.js 2010-02-23 04:26:05 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reportItem.js 2010-03-03 07:33:59 +0000
@@ -150,21 +150,18 @@
function addReportExcelItem() {
- var request = new Request();
- request.setResponseTypeXML( 'xmlObject' );
- request.setCallbackSuccess( Completed );
-
- var params = "name=" + byId("name").value;
- params += "&expression=" + byId("expression").value;
- params += "&row=" + byId("row").value;
- params += "&column=" + byId("column").value;
- params += "&reportId=" + reportId;
- params += "&itemType=" + byId("itemType").value;
- params += "&periodType=" + byId("periodType").value;
- params += "&sheetNo=" + byId("sheetNo").value;
-
- request.sendAsPost(params);
- request.send("addReportExcelItem.action");
+ $.post("addReportExcelItem.action",{
+ name:$("#name").val(),
+ expression:$("#expression").val(),
+ row:$("#row").val(),
+ column:$("#column").val(),
+ reportId:reportId,
+ itemType:$("#itemType").val(),
+ periodType:$("#periodType").val(),
+ sheetNo:$("#sheetNo").val()
+ }, function (data){
+ window.location.reload();
+ },'xml');
}
@@ -212,22 +209,19 @@
function updateReportExcelItem() {
- var request = new Request();
- request.setResponseTypeXML( 'xmlObject' );
- request.setCallbackSuccess( Completed );
-
- var params = "id=" + byId("id").value;
- params += "&name=" + byId("name").value;
- params += "&expression=" + byId("expression").value;
- params += "&row=" + byId("row").value;
- params += "&column=" + byId("column").value;
- params += "&reportId=" + reportId;
- params += "&itemType=" + byId("itemType").value;
- params += "&periodType=" + byId("periodType").value;
- params += "&sheetNo=" + byId("sheetNo").value;
-
- request.sendAsPost(params);
- request.send("updateReportExcelItem.action");
+ $.post("updateReportExcelItem.action",{
+ id:$("#id").val(),
+ name:$("#name").val(),
+ expression:$("#expression").val(),
+ row:$("#row").val(),
+ column:$("#column").val(),
+ reportId:reportId,
+ itemType:$("#itemType").val(),
+ periodType:$("#periodType").val(),
+ sheetNo:$("#sheetNo").val()
+ }, function (data){
+ window.location.reload();
+ },'xml');
}