dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06734
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1872: Applied patch from Tran. Fixes bug organisation-unit-web-tree-not-working-in-ie8
------------------------------------------------------------
revno: 1872
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Thu 2010-07-22 15:55:39 +0200
message:
Applied patch from Tran. Fixes bug organisation-unit-web-tree-not-working-in-ie8
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js
dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml
--
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/ouwt/ouwt.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js 2009-10-22 17:22:15 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js 2010-07-22 13:55:39 +0000
@@ -41,29 +41,39 @@
this.select = function( unitId )
{
- var request = new Request();
- request.setCallbackSuccess( responseReceived );
- request.setResponseTypeXML( 'selected' );
-
var unitTag = document.getElementById( getTagId( unitId ));
var linkTags = unitTag.getElementsByTagName( 'a' );
if ( linkTags[0].className == 'selected' )
{
- request.send( organisationUnitTreePath + 'removeorgunit.action?id=' + unitId );
+ $.post(organisationUnitTreePath + "removeorgunit.action",{
+ id:unitId
+ }, function (data){
+ responseReceived(data.firstChild);
+ },'xml');
+
linkTags[0].className = '';
}
else
{
if ( multipleSelectionAllowed )
{
- request.send( organisationUnitTreePath + 'addorgunit.action?id=' + unitId );
+ $.post(organisationUnitTreePath + "addorgunit.action",{
+ id:unitId
+ }, function (data){
+ responseReceived(data.firstChild);
+ },'xml');
+
linkTags[0].className = 'selected';
}
else
{
- request.send( organisationUnitTreePath + 'setorgunit.action?id=' + unitId );
-
+ $.post(organisationUnitTreePath + "setorgunit.action",{
+ id:unitId
+ }, function (data){
+ responseReceived(data.firstChild);
+ },'xml');
+
// Remove all select marks
var treeTag = document.getElementById( 'orgUnitTree' );
var linkTags = treeTag.getElementsByTagName( 'a' );
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2010-07-18 15:17:23 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2010-07-22 13:55:39 +0000
@@ -188,21 +188,21 @@
<action name="setorgunit"
class="org.hisp.dhis.ouwt.action.SetSelectedOrganisationUnitAction">
- <result name="success" type="velocity">
+ <result name="success" type="velocity-xml">
/dhis-web-commons/ouwt/responseSelect.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
<action name="addorgunit"
class="org.hisp.dhis.ouwt.action.AddSelectedOrganisationUnitAction">
- <result name="success" type="velocity">
+ <result name="success" type="velocity-xml">
/dhis-web-commons/ouwt/responseSelect.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
<action name="removeorgunit"
class="org.hisp.dhis.ouwt.action.RemoveSelectedOrganisationUnitAction">
- <result name="success" type="velocity">
+ <result name="success" type="velocity-xml">
/dhis-web-commons/ouwt/responseSelect.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>