dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07057
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1977: Change clearSelectedOrganisationUnits to use synchronous jquery ajax to fix bug https://bugs.laun...
------------------------------------------------------------
revno: 1977
committer: Quang <Quang@Quang-PC>
branch nick: trunk
timestamp: Thu 2010-08-26 22:29:08 +0700
message:
Change clearSelectedOrganisationUnits to use synchronous jquery ajax to fix bug https://bugs.launchpad.net/dhis2/+bug/620936
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.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-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2010-07-23 07:04:03 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2010-08-26 15:29:08 +0000
@@ -115,11 +115,15 @@
{
this.clearSelectedOrganisationUnits = function()
{
- var request = new Request();
- request.setResponseTypeXML( 'xmlObject' );
- request.setCallbackSuccess( clearSelectedOrgUnitsCompleted );
- request.send( selectionTreePath + 'clearSelectedOrganisationUnits.action' );
-
+ $.ajax({
+ "url" : selectionTreePath + "clearSelectedOrganisationUnits.action",
+ async : false,
+ dataType :"xml",
+ "success" : function( data )
+ {
+ clearSelectedOrgUnitsCompleted( data );
+ }
+ });
};
this.toggle = function( unitId )
@@ -348,11 +352,11 @@
{
if ( xmlObject != null )
{
- var type = xmlObject.getAttribute( 'type' );
+ var type = xmlObject.documentElement.attributes.getNamedItem("type").nodeValue;
if ( type == 'error' )
{
- alert( xmlObject.firstChild.nodeValue );
+ alert( xmlObject.documentElement.childNodes[0].nodeValue );
}
}
}