dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38801
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19706: Oust. Removed use of synchronuus http js requests. Replaced function clearSelectedOrganisationUni...
------------------------------------------------------------
revno: 19706
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-08-04 00:22:21 +0200
message:
Oust. Removed use of synchronuus http js requests. Replaced function clearSelectedOrganisationUnits with clearSelectedOrganisationUnitsAndBuildTree.
removed:
dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/inputReportParamsForm.vm
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-resources/src/main/webapp/dhis-web-commons/oust/selectionTree.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeMultipleSelect.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeSingleSelect.vm
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/exportDataValueForm.vm
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/organisationUnitMergeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewEditorForm.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewOrgUnitDistribution.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followupAnalysisForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.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-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 2015-08-03 19:32:48 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2015-08-03 22:22:21 +0000
@@ -134,14 +134,6 @@
function SelectionTree()
{
- this.clearSelectedOrganisationUnits = function()
- {
- $.ajax( {
- url: selectionTreePath + 'clearSelectedOrganisationUnits.action',
- async: false
- } );
- };
-
this.clearSelectedOrganisationUnitsAndBuildTree = function()
{
$.ajax( {
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTree.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTree.vm 2011-04-04 16:47:24 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTree.vm 2015-08-03 22:22:21 +0000
@@ -2,8 +2,7 @@
jQuery(document).ready(function()
{
selectionTreeSelection.setMultipleSelectionAllowed(true);
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
});
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeMultipleSelect.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeMultipleSelect.vm 2015-04-30 06:14:45 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeMultipleSelect.vm 2015-08-03 22:22:21 +0000
@@ -9,10 +9,12 @@
#if( $required )
selectionTreeSelection.setListenerFunction( selectOrganisationUnit__ );
#end
+
#if( $cleanAll )
- selectionTree.clearSelectedOrganisationUnits();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
+ #else
+ selectionTree.buildSelectionTree();
#end
- selectionTree.buildSelectionTree();
});
function selectedOrganisationUnitXML__( xml )
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeSingleSelect.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeSingleSelect.vm 2014-04-05 17:55:31 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/selectionTreeSingleSelect.vm 2015-08-03 22:22:21 +0000
@@ -8,10 +8,12 @@
#if( $required )
selectionTreeSelection.setListenerFunction( selectOrganisationUnit__ );
#end
+
#if( $cleanAll )
- selectionTree.clearSelectedOrganisationUnits();
- #end
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
+ #else
selectionTree.buildSelectionTree();
+ #end
});
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2015-08-03 19:32:48 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2015-08-03 22:22:21 +0000
@@ -61,9 +61,8 @@
$( "#searchField" ).focus();
$( "#searchField" ).keyup( dhis2.db.search );
- selectionTree.clearSelectedOrganisationUnits();
selectionTreeSelection.setMultipleSelectionAllowed( true );
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
$.getJSON( "../api/me/user-account.json?" + dhis2.util.cacheBust(), function( json ) {
dhis2.db.currentKey = "dhis2.dashboard.current." + json.username;
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm 2014-11-17 08:05:22 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm 2015-08-03 22:22:21 +0000
@@ -49,8 +49,7 @@
});
selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
$.ajax({
url: '../api/programs.json'
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/exportDataValueForm.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/exportDataValueForm.vm 2014-10-07 21:37:53 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/exportDataValueForm.vm 2015-08-03 22:22:21 +0000
@@ -3,8 +3,7 @@
datePickerInRange( 'startDate' , 'endDate' );
selectionTreeSelection.setMultipleSelectionAllowed( true );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
jQuery("#availableDataSets").dhisAjaxSelect({
source: "../api/dataSets.json?links=false&paging=false",
=== 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-12-23 13:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowserForm.js 2015-08-03 22:22:21 +0000
@@ -3,8 +3,7 @@
selectionTreeSelection.setListenerFunction( organisationUnitModeSelected );
selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
datePickerInRange( 'fromDate', 'toDate' );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/organisationUnitMergeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/organisationUnitMergeForm.vm 2011-03-28 15:28:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/organisationUnitMergeForm.vm 2015-08-03 22:22:21 +0000
@@ -2,8 +2,7 @@
jQuery(document).ready(function() {
selectionTreeSelection.setMultipleSelectionAllowed( false );
selectionTreeSelection.setListenerFunction( treeSelected );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
});
var i18n_merging = '$encoder.jsEscape( $i18n.getString( "merging" ), "'" )';
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewEditorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewEditorForm.vm 2012-04-16 13:41:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewEditorForm.vm 2015-08-03 22:22:21 +0000
@@ -18,12 +18,10 @@
<script type="text/javascript">
- jQuery(document).ready(function(){
-
+ jQuery(document).ready(function() {
selectionTreeSelection.setListenerFunction( displayAssociatedForm );
selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
});
var i18n_processing = '$encoder.jsEscape( $i18n.getString( "processing" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm 2014-06-25 15:56:22 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm 2015-08-03 22:22:21 +0000
@@ -11,8 +11,7 @@
dhis2.dsr.setDataSetReport( dataSetReport );
#else
selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
#end
});
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm 2014-09-21 08:42:21 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm 2015-08-03 22:22:21 +0000
@@ -6,9 +6,8 @@
#end
#if ( $!reportParams.isOrganisationUnitSet() )
- selectionTree.clearSelectedOrganisationUnits();
selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
#end
});
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js 2015-02-23 10:10:31 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js 2015-08-03 22:22:21 +0000
@@ -167,7 +167,6 @@
dhis2.dsr.drillDownDataSetReport = function( orgUnitId, orgUnitUid )
{
- selectionTree.clearSelectedOrganisationUnits();
selectionTreeSelection.select( orgUnitId );
var dataSetReport = dhis2.dsr.getDataSetReport();
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm 2014-10-10 14:03:26 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm 2015-08-03 22:22:21 +0000
@@ -1,8 +1,7 @@
<script type="text/javascript">
jQuery(document).ready(function() {
selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
});
var i18n_please_select_org_unit = '$encoder.jsEscape( $i18n.getString( "please_select_org_unit" ) , "'")';
=== 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 2013-10-22 10:29:16 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewOrgUnitDistribution.vm 2015-08-03 22:22:21 +0000
@@ -1,8 +1,7 @@
<script type="text/javascript">
jQuery(document).ready(function() {
selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
});
var i18n_select_group_set = '$encoder.jsEscape( $i18n.getString( "please_select_group_set" ) , "'")';
=== removed file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/inputReportParamsForm.vm'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/inputReportParamsForm.vm 2012-06-18 06:14:19 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/inputReportParamsForm.vm 1970-01-01 00:00:00 +0000
@@ -1,56 +0,0 @@
-
-<script type="text/javascript">
- jQuery(document).ready(function() {
- #if( !$!reportParams.isSet() )
- generateReport();
- #end
- });
-
- var i18n_process_completed = '$encoder.jsEscape( $i18n.getString( "process_completed" ), "'")';
- var i18n_please_wait = '$encoder.jsEscape( $i18n.getString( "please_wait" ), "'")';
- var i18n_please_select_unit = '$encoder.jsEscape( $i18n.getString( "select_organisation_unit" ), "'")';
-</script>
-
-<div class="headerDiv"><span class="header">$i18n.getString( "report_table_parameters" )</span></div>
-
-<input type="hidden" id="id" name="id" value="$!id" />
-
-<!-- Reporting month -->
-
-#if ( $!reportParams.isParamReportingMonth() )
-
-<div class="labelDiv">$i18n.getString( "reporting_period" )</div>
-
-<div class="pageDiv">
-<select id="reportingPeriod" name="reportingPeriod" style="width:300px">
-#foreach ( $period in $periods )
-<option value="${period.startDateString}">${period.name}</option>
-#end
-</select>
-</div>
-
-#end
-
-<!-- OrganisationUnit -->
-
-#if ( $!reportParams.isParamGrandParentOrganisationUnit() || $!reportParams.isParamParentOrganisationUnit() || $!reportParams.isParamOrganisationUnit() )
-
-<div class="labelDiv">$i18n.getString( "organisation_unit" )</div>
-
-<div class="pageDiv" id="selectionTree" style="width:300px; height:200px"></div>
-<script type="text/javascript">
- selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTree.buildSelectionTree();
-</script>
-
-#end
-
-<!-- Submit -->
-
-<div class="labelDiv">
-#if( $!reportParams.isSet() )
-<input type="button" value="$i18n.getString( 'get_report' )" onclick="generateReport()" style="width:150px; height:26px;" />
-#end
-</div>
-
-<span id="message"></span>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm 2014-08-18 08:54:32 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm 2015-08-03 22:22:21 +0000
@@ -88,8 +88,7 @@
selectionTreeSelection.setMultipleSelectionAllowed( false );
selectionTreeSelection.setListenerFunction( organisationUnitSelected );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
</script>
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followupAnalysisForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followupAnalysisForm.vm 2014-11-16 12:56:21 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followupAnalysisForm.vm 2015-08-03 22:22:21 +0000
@@ -7,8 +7,7 @@
$( document ).ready( function() {
selectionTreeSelection.setMultipleSelectionAllowed( false );
selectionTreeSelection.setListenerFunction( getFollowupAnalysis );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
$( "#info" ).html( i18n_no_organisation_unit_selected );
$( "#downloadButtons input:button" ).attr( "disabled", true );
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm 2014-08-18 08:54:32 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm 2015-08-03 22:22:21 +0000
@@ -2,10 +2,9 @@
jQuery(document).ready(function(){
datePickerInRange( 'startDate' , 'endDate' );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
selectionTreeSelection.setMultipleSelectionAllowed( false );
selectionTreeSelection.setListenerFunction( organisationUnitSelected );
+ selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
});
var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';