dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24785
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12204: Minor
------------------------------------------------------------
revno: 12204
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-23 11:18:40 +0200
message:
Minor
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js
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/javascript/dataSetReport.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-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 2013-05-02 08:49:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2013-09-23 09:18:40 +0000
@@ -59,7 +59,7 @@
onSelectFunction();
}
- var unitTag = document.getElementById( getTagId( unitId ));
+ var unitTag = document.getElementById( getTagId( unitId ) );
var linkTags = $(unitTag).find( 'a' );
if ( linkTags[0].className == 'selected' )
@@ -90,7 +90,7 @@
}
// Set new select mark
- var unitTag = document.getElementById( getTagId( unitId ));
+ var unitTag = document.getElementById( getTagId( unitId ) );
linkTags = $(unitTag).find( 'a' );
linkTags[0].className = 'selected';
}
@@ -114,7 +114,7 @@
selectedOrganisationUnitUid.push( unitUids[i] );
}
- jQuery( 'body' ).trigger( 'oust.selected', selectedOrganisationUnit);
+ jQuery( 'body' ).trigger( 'oust.selected', selectedOrganisationUnit );
if ( listenerFunction )
{
=== 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 2013-05-03 15:06:31 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm 2013-09-23 09:18:40 +0000
@@ -123,7 +123,7 @@
<div id="advancedOptionsLink" style="padding: 8px 0;"><a href="javascript:showAdvancedOptions()">$i18n.getString( "more_options" )</a></div>
<div class="inputSection">
-<input type="button" value='$i18n.getString( "get_report" )' style="width:120px" onclick="validateDataSetReport()">
+<input type="button" value='$i18n.getString( "get_report" )' style="width:120px" onclick="generateDataSetReport()">
<input type="button" value='$i18n.getString( "cancel" )' style="width:120px" onclick="hideCriteria()">
</div>
</div>
=== 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 2013-09-09 08:02:52 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js 2013-09-23 09:18:40 +0000
@@ -47,11 +47,11 @@
selectionTreeSelection.setMultipleSelectionAllowed( false );
selectionTree.buildSelectionTree();
-
+
$( "body" ).on( "oust.selected", function()
{
$( "body" ).off( "oust.selected" );
- validateDataSetReport();
+ generateDataSetReport();
} );
}
@@ -94,10 +94,26 @@
// Run report
//------------------------------------------------------------------------------
-function validateDataSetReport()
+//TODO rewrite to use uid only
+
+function drillDownDataSetReport( orgUnitId, orgUnitUid )
{
- var dataSetReport = getDataSetReport();
+ selectionTree.clearSelectedOrganisationUnits();
+ selectionTreeSelection.select( orgUnitId );
+ var dataSetReport = getDataSetReport();
+ dataSetReport["ou"] = orgUnitUid;
+ displayDataSetReport( dataSetReport );
+}
+
+function generateDataSetReport()
+{
+ var dataSetReport = getDataSetReport();
+ displayDataSetReport( dataSetReport );
+}
+
+function displayDataSetReport( dataSetReport )
+{
if ( !dataSetReport.ds )
{
setHeaderMessage( i18n_select_data_set );