← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14574: Data set report, more consistent look for advanced options

 

------------------------------------------------------------
revno: 14574
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-03-31 19:22:19 +0200
message:
  Data set report, more consistent look for advanced options
modified:
  dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties
  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-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2014-03-28 01:53:11 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2014-03-31 17:22:19 +0000
@@ -147,7 +147,8 @@
 month=Month
 year=Year
 method=Method
-more_options=More options
+show_more_options=Show more options
+show_less_options=Show less options
 generate_before_export=Please generate table before exporting
 based_on_registration=Based on complete data set registrations
 based_on_compulsory=Based on compulsory data elements

=== 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-03-31 14:28:29 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm	2014-03-31 17:22:19 +0000
@@ -142,15 +142,18 @@
 
 <div id="advancedOptions" style="display:none">
 #foreach( $groupSet in $organisationUnitGroupSets )
+<div class="inputSection">
+<div><label>$encoder.htmlEncode( $groupSet.name )</label></div>
 <select class="dimension" data-uid="${groupSet.uid}" style="width:330px" class="advanced">
-    <option value="">[ $i18n.getString( "select" ) $encoder.htmlEncode( $groupSet.name ) / $i18n.getString( "view_all" ) ]</option>
+    <option value="">[ $i18n.getString( "select_option_view_all" ) ]</option>
     #foreach( $group in $groupSet.organisationUnitGroups )
     <option value="${group.uid}">$encoder.htmlEncode( $group.name )</option>
     #end
-</select><br>
+</select></div>
 #end </div>
 
-<div id="advancedOptionsLink" style="padding: 8px 0;"><a href="javascript:showAdvancedOptions()">$i18n.getString( "more_options" )</a></div>
+<div id="moreOptionsLink" style="padding: 8px 0;"><a href="javascript:showMoreOptions()">$i18n.getString( "show_more_options" )</a></div>
+<div id="lessOptionsLink" style="display: none; padding: 8px 0;"><a href="javascript:showLessOptions()">$i18n.getString( "show_less_options" )</a></div>
 
 <div class="inputSection">
 <input type="button" value='$i18n.getString( "get_report" )' style="width:120px" onclick="generateDataSetReport()">

=== 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	2014-03-31 16:39:30 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2014-03-31 17:22:19 +0000
@@ -108,7 +108,7 @@
 			var category = cat[0];
 			
 			html += '<div class="inputSection">';
-			html += '<label>' + category.name + '</label>';
+			html += '<div><label>' + category.name + '</label></div>';
 			html += '<select class="dimension" data-uid="' + category.id + '" style="width:330px">';
 			html += '<option value="-1">[ ' + i18n_select_option_view_all + ' ]</option>';
 			
@@ -347,12 +347,20 @@
 	$( ".downloadButton" ).hide();
 }
 
-function showAdvancedOptions()
+function showMoreOptions()
 {
-	$( "#advancedOptionsLink" ).hide();
+	$( "#moreOptionsLink" ).hide();
+	$( "#lessOptionsLink" ).show();
 	$( "#advancedOptions" ).show();
 }
 
+function showLessOptions()
+{
+	$( "#moreOptionsLink" ).show();
+	$( "#lessOptionsLink" ).hide();
+	$( "#advancedOptions" ).hide();
+}
+
 dhis2.dsr.showApproval = function()
 {
 	var dataSetReport = dhis2.dsr.currentDataSetReport;