dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10030
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2732: Fixed bug 'Orgunit appears as selected while its not'
------------------------------------------------------------
revno: 2732
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-01-24 20:40:35 +0100
message:
Fixed bug 'Orgunit appears as selected while its not'
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadOrganisationUnitAction.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultSelectedStateManager.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/SelectedStateManager.java
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewOrgUnitDistribution.vm
--
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-dataentry/src/main/java/org/hisp/dhis/de/action/LoadOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadOrganisationUnitAction.java 2010-11-17 18:26:47 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadOrganisationUnitAction.java 2011-01-24 19:40:35 +0000
@@ -1,7 +1,6 @@
package org.hisp.dhis.de.action;
import org.hisp.dhis.de.state.SelectedStateManager;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
import com.opensymphony.xwork2.Action;
@@ -20,24 +19,12 @@
}
// -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private OrganisationUnit organisationUnit;
-
- public OrganisationUnit getOrganisationUnit()
- {
- return organisationUnit;
- }
-
- // -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
public String execute()
{
- organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
-
+ selectedStateManager.clearSelectedOrganisationUnits();
selectedStateManager.clearSelectedDataSet();
selectedStateManager.clearSelectedPeriod();
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultSelectedStateManager.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultSelectedStateManager.java 2011-01-17 12:03:26 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultSelectedStateManager.java 2011-01-24 19:40:35 +0000
@@ -123,6 +123,11 @@
return selectionManager.getSelectedOrganisationUnit();
}
+ public void clearSelectedOrganisationUnits()
+ {
+ selectionManager.clearSelectedOrganisationUnits();
+ }
+
// -------------------------------------------------------------------------
// DataSet
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/SelectedStateManager.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/SelectedStateManager.java 2010-11-21 15:52:10 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/SelectedStateManager.java 2011-01-24 19:40:35 +0000
@@ -52,6 +52,8 @@
OrganisationUnit getSelectedOrganisationUnit();
+ void clearSelectedOrganisationUnits();
+
// -------------------------------------------------------------------------
// DataSet
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewOrgUnitDistribution.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewOrgUnitDistribution.vm 2010-12-26 23:25:10 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewOrgUnitDistribution.vm 2011-01-24 19:40:35 +0000
@@ -37,8 +37,9 @@
</table>
<script type="text/javascript">
+selectionTreeSelection.setMultipleSelectionAllowed( false );
selectionTreeSelection.setListenerFunction( organisationUnitSelected );
-selectionTreeSelection.setMultipleSelectionAllowed( false );
+selectionTree.clearSelectedOrganisationUnits();
selectionTree.buildSelectionTree();
var i18n_select_group_set = '$encoder.jsEscape( $i18n.getString( "please_select_group_set" ) , "'")';