dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12245
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3722: Data Browser - Changed from using ouwt to oust lib in orgunit.
------------------------------------------------------------
revno: 3722
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-05-24 16:08:25 +0700
message:
Data Browser - Changed from using ouwt to oust lib in orgunit.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/ActionSupport.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/DataBrowserAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowserForm.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-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/ActionSupport.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/ActionSupport.java 2011-05-22 12:36:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/ActionSupport.java 2011-05-24 09:08:25 +0000
@@ -48,7 +48,7 @@
import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.organisationunit.comparator.OrganisationUnitNameComparator;
-import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
+import org.hisp.dhis.oust.manager.SelectionTreeManager;
import org.hisp.dhis.paging.ActionPagingSupport;
import org.hisp.dhis.period.PeriodService;
import org.hisp.dhis.period.PeriodType;
@@ -112,11 +112,11 @@
this.periodService = periodService;
}
- protected OrganisationUnitSelectionManager selectionManager;
+ protected SelectionTreeManager selectionTreeManager;
- public void setSelectionManager( OrganisationUnitSelectionManager selectionManager )
+ public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
{
- this.selectionManager = selectionManager;
+ this.selectionTreeManager = selectionTreeManager;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/DataBrowserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/DataBrowserAction.java 2011-05-23 04:39:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/databrowser/DataBrowserAction.java 2011-05-24 09:08:25 +0000
@@ -64,11 +64,11 @@
// If set, change the current selected unit
if ( selectedUnitChanger != null )
{
- selectionManager.setSelectedOrganisationUnit( organisationUnitService.getOrganisationUnit( Integer
+ selectionTreeManager.setSelectedOrganisationUnit( organisationUnitService.getOrganisationUnit( Integer
.parseInt( selectedUnitChanger ) ) );
}
- selectedUnit = selectionManager.getSelectedOrganisationUnit();
+ selectedUnit = selectionTreeManager.getReloadedSelectedOrganisationUnit();
// Checks if the selected unit is a leaf node of tree then
// We must add parent as the same parameter value
@@ -135,7 +135,7 @@
}
else if ( mode.equals( "OU" ) )
{
- selectedUnit = selectionManager.getSelectedOrganisationUnit();
+ selectedUnit = selectionTreeManager.getSelectedOrganisationUnit();
if ( (drillDownCheckBox != null) && drillDownCheckBox.equals( TRUE ) )
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml 2011-04-22 17:02:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml 2011-05-24 09:08:25 +0000
@@ -128,8 +128,8 @@
<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
- <property name="selectionManager"
- ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
+ <property name="selectionTreeManager"
+ ref="org.hisp.dhis.oust.manager.SelectionTreeManager" />
<property name="organisationUnitService"
ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
<property name="organisationUnitGroupService"
@@ -322,5 +322,5 @@
scope="prototype">
<property name="sqlViewService" ref="org.hisp.dhis.sqlview.SqlViewService" />
</bean>
-
+
</beans>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2011-04-04 16:47:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2011-05-24 09:08:25 +0000
@@ -26,11 +26,12 @@
<action name="defineDataSetAssociationsFormChain"
class="org.hisp.dhis.dataadmin.action.lock.GetPeriodTypesAction">
<interceptor-ref name="organisationUnitTreeStack"/>
- <result name="success" type="velocity">/main.vm </result>
- <param name="page">
- /dhis-web-maintenance-dataadmin/collectiveDataLockingForm.vm</param>
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-maintenance-dataadmin/collectiveDataLockingForm.vm</param>
<param name="menu">/dhis-web-maintenance-dataadmin/menu.vm</param>
- <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/datasetLockReport.js, javascript/collectiveDataLockingForm.js</param>
+ <param name="javascripts">../dhis-web-commons/oust/oust.js,
+ javascript/datasetLockReport.js,
+ javascript/collectiveDataLockingForm.js</param>
</action>
<action name="getDataSetsForPeriodType"
@@ -186,8 +187,9 @@
<param name="page">
/dhis-web-maintenance-dataadmin/dataBrowserForm.vm</param>
<param name="menu">/dhis-web-maintenance-dataadmin/menu.vm</param>
- <param name="javascripts"> ../dhis-web-commons/ouwt/ouwt.js,
- javascript/dataBrowser.js, javascript/dataBrowserForm.js</param>
+ <param name="javascripts"> ../dhis-web-commons/oust/oust.js,
+ javascript/dataBrowser.js,
+ javascript/dataBrowserForm.js</param>
<interceptor-ref name="organisationUnitTreeStack"/>
</action>
@@ -436,6 +438,6 @@
<param name="javascripts">javascript/sqlView.js</param>
<param name="requiredAuthorities">F_SQLVIEW_MANAGEMENT</param>
</action>
-
+
</package>
</struts>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserForm.vm 2011-05-23 04:39:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/dataBrowserForm.vm 2011-05-24 09:08:25 +0000
@@ -11,7 +11,7 @@
<h3>$i18n.getString( "data_browser" ) #openHelp( "dataBrowser" )</h3>
-<form id="databrowser" method="get" action="searchResult.action">
+<form id="databrowser" name="databrowser" method="get" action="searchResult.action">
<table>
<tr>
<td>$i18n.getString( "period_type" )</td>
@@ -75,11 +75,7 @@
<td>$i18n.getString( "select_parent_organisation_unit" )</td>
</tr>
<tr>
- <td>
- <div style="border:1px dashed gray; height: 16.5em; overflow:auto; padding:0 3px 3px 0;">
- #parse( "/dhis-web-commons/ouwt/orgunittree.vm" )
- </div>
- </td>
+ <td><div id="selectionTree" style="width:325px; height:270px"></div></td>
</tr>
</table>
</div>
@@ -92,4 +88,4 @@
</form>
-<span id="message"></span>
+<span id="message"></span>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowserForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowserForm.js 2011-05-23 04:39:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowserForm.js 2011-05-24 09:08:25 +0000
@@ -1,6 +1,10 @@
jQuery(document).ready(function() {
- selection.setListenerFunction(organisationUnitModeSelected);
+ selectionTreeSelection.setListenerFunction( organisationUnitModeSelected );
+ selectionTreeSelection.setMultipleSelectionAllowed( false );
+ selectionTree.clearSelectedOrganisationUnits();
+ selectionTree.buildSelectionTree();
+
datePickerInRange('fromDate', 'toDate');
validation2('databrowser', function(form) {