← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3860: minor fixes

 

------------------------------------------------------------
revno: 3860
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-06-09 21:35:49 +0200
message:
  minor fixes
modified:
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dropdown.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-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dropdown.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dropdown.js	2011-06-09 19:07:37 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dropdown.js	2011-06-09 19:35:49 +0000
@@ -1,32 +1,23 @@
-
 function setAreaItem( area, item )
 {
-    var request = new Request();
-    request.setCallbackSuccess(setAreaItemReceived);
-    request.send("setAreaItem.action?area=" + area + "&item=" + item);
-}
-
-function setAreaItemReceived( messageElement )
-{
-    window.location.href = "index.action";
+    $.get("setAreaItem.action?area=" + area + "&item=" + item, function()
+    {
+        window.location.href = "index.action";
+    });
 }
 
 function clearArea( area )
 {
-    var request = new Request();
-    request.setCallbackSuccess(clearAreaReceived);
-    request.send("clearArea.action?area=" + area);
-}
-
-function clearAreaReceived( messageElement )
-{
-    window.location.href = "index.action";
+    $.get("clearArea.action?area=" + area, function()
+    {
+        window.location.href = "index.action";
+    });
 }
 
 function viewChart( url )
 {
-    var width = size === 'wide' ? 1000 : 700;
-    var height = size === 'tall' ? 800 : 500;
+    var width = 700;
+    var height = 500;
 
     $('#chartImage').attr('src', url);
     $('#chartView').dialog({