dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16265
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6148: Fixed bug in oust
------------------------------------------------------------
revno: 6148
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-03-02 10:08:35 +0100
message:
Fixed bug in oust
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/action/ClearSelectedOrganisationUnitsAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/ClearSelectedOrganisationUnitsAction.java
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/oust/oust.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2012-02-25 01:53:21 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2012-03-02 09:08:35 +0000
@@ -122,13 +122,9 @@
this.clearSelectedOrganisationUnits = function()
{
$.ajax({
- "url" : selectionTreePath + "clearSelectedOrganisationUnits.action",
- async : false,
- dataType :"xml",
- "success" : function( data )
- {
- clearSelectedOrgUnitsCompleted( data );
- }
+ url: selectionTreePath + "clearSelectedOrganisationUnits.action",
+ async: false,
+ dataType: "xml"
});
};
@@ -360,17 +356,4 @@
{
treeTag.style.backgroundImage = 'none';
}
-
- function clearSelectedOrgUnitsCompleted( xmlObject )
- {
- if ( xmlObject != null )
- {
- var type = xmlObject.documentElement.attributes.getNamedItem("type").nodeValue;
-
- if ( type == 'error' )
- {
- alert( xmlObject.documentElement.childNodes[0].nodeValue );
- }
- }
- }
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/action/ClearSelectedOrganisationUnitsAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/action/ClearSelectedOrganisationUnitsAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/action/ClearSelectedOrganisationUnitsAction.java 2012-03-02 09:08:35 +0000
@@ -51,35 +51,13 @@
}
// -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private String message;
-
- public String getMessage()
- {
- return message;
- }
-
- // -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
public String execute()
{
- try
- {
- selectionTreeManager.clearSelectedOrganisationUnits();
- }
- catch ( Exception e )
- {
- message = "cannot_clear_selected_orgunits";
-
- return ERROR;
- }
-
- message = "OK";
-
+ selectionTreeManager.clearSelectedOrganisationUnits();
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/ClearSelectedOrganisationUnitsAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/ClearSelectedOrganisationUnitsAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/ouwt/action/ClearSelectedOrganisationUnitsAction.java 2012-03-02 09:08:35 +0000
@@ -55,7 +55,7 @@
public String execute()
throws Exception
{
- selectionManager.clearSelectedOrganisationUnits();
+ selectionManager.clearSelectedOrganisationUnits();
return SUCCESS;
}
=== 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 2012-02-27 12:39:12 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2012-03-02 09:08:35 +0000
@@ -150,9 +150,6 @@
<result name="success" type="velocity-xml">
/dhis-web-commons/ouwt/responseSuccess.vm
</result>
- <result name="error" type="velocity-xml">
- /dhis-web-commons/ouwt/responseError.vm
- </result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -194,9 +191,6 @@
<result name="success" type="velocity-xml">
/dhis-web-commons/ouwt/responseSuccess.vm
</result>
- <result name="error" type="velocity-xml">
- /dhis-web-commons/ouwt/responseError.vm
- </result>
<param name="onExceptionReturn">plainTextError</param>
</action>