← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9168: Inline interpretation field in data set report

 

------------------------------------------------------------
revno: 9168
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-12-04 14:16:24 +0100
message:
  Inline interpretation field in data set report
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretation.vm
  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
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderDataSetReportHeader.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/style/dhis-web-reporting.css


--
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/css/widgets.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2012-11-28 12:36:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2012-12-04 13:16:24 +0000
@@ -680,7 +680,21 @@
 }
 
 /*----------------------------------------------------------------------------*/
-/* jQuery overrides                                                           */
+/* Placeholders                                                               */
+/*----------------------------------------------------------------------------*/
+
+::-webkit-input-placeholder
+{
+  color: #777;
+}
+
+input:-moz-placeholder
+{
+  color: #777;
+}
+
+/*----------------------------------------------------------------------------*/
+/* Profile                                                                    */
 /*----------------------------------------------------------------------------*/
 
 #updateProfileHeader

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretation.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretation.vm	2012-11-14 11:33:27 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretation.vm	2012-12-04 13:16:24 +0000
@@ -3,8 +3,9 @@
 
 <div id="shareLink">$i18n.getString( "share_your_own_interpretations_from" ) 
 	<a href="../dhis-web-visualizer/app/index.html">$i18n.getString( "data_visualizer" )</a>,
-	<a href="../dhis-web-mapping/app/index.html">$i18n.getString( "gis" )</a> or 
-	<a href="../dhis-web-reporting/displayManageTableForm.action">$i18n.getString( "report_table" )</a>
+	<a href="../dhis-web-mapping/app/index.html">$i18n.getString( "gis" )</a>,
+	<a href="../dhis-web-reporting/displayManageTableForm.action">$i18n.getString( "report_table" )</a> or
+	<a href="../dhis-web-reporting/showDataSetReportForm.action">$i18n.getString( "data_set_report" )</a>
 </div>
 
 <div id="interpretationFeed"></div>

=== 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	2012-11-21 13:04:45 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2012-12-04 13:16:24 +0000
@@ -227,4 +227,5 @@
 percent=Percent
 reports_on_time=Reports On Time
 percent_on_time=Percent On Time
-view_all=View all
\ No newline at end of file
+view_all=View all
+write_your_interpretation_of_report=Write a comment, question or interpretation of this report
\ No newline at end of file

=== 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	2012-11-13 12:10:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm	2012-12-04 13:16:24 +0000
@@ -1,7 +1,6 @@
 <script type="text/javascript">
     jQuery(document).ready(function() {        
-	    jQuery( "#interpretationArea" ).autogrow();
-	  	
+	    	  	
 	  	#if( $render == true )
 	    var dataSetReport = {
 	        dataSet: "${ds}",
@@ -66,6 +65,8 @@
 
 <div id="control">
 <input type="button" value='$i18n.getString( "data" )' style="width:120px" onclick="showCriteria()" />
+<input type="button" class="downloadButton" value="$i18n.getString( 'get_report_as_xls' )" onclick="exportDataSetReport( 'xls' )" style="width:140px; display:none;">
+<input type="button" class="downloadButton" value="$i18n.getString( 'get_report_as_pdf' )" onclick="exportDataSetReport( 'pdf' )" style="width:140px; display:none;">
 </div>
 
 <div id="criteria" class="inputCriteria" style="width:360px;height:450px;">
@@ -112,9 +113,4 @@
 
 #parse( "dhis-web-commons/loader/loader.vm" )
 
-<div id="shareForm">
-<textarea id="interpretationArea" class="interpretationArea" placeholder="$i18n.getString( 'write_your_interpretation' )"></textarea>
-<input type="button" class="interpretationButton" value="$i18n.getString( 'share' )" onclick="shareInterpretation( '${uid}', '$!{ou}' )">
-</div>
-
 <div id="content"></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	2012-10-01 13:44:31 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2012-12-04 13:16:24 +0000
@@ -152,18 +152,21 @@
 function showContent()
 {
 	$( "#content" ).show( "fast" );
+	$( ".downloadButton" ).show();
+	$( "#interpretationArea" ).autogrow();
 }
 
 function hideContent()
 {
 	$( "#content" ).hide( "fast" );
+	$( ".downloadButton" ).hide();
 }
 
 //------------------------------------------------------------------------------
 // Share
 //------------------------------------------------------------------------------
 
-function viewShareForm()
+function viewShareForm() // Not in use
 {
 	$( "#shareForm" ).dialog( {
 		modal : true,
@@ -190,8 +193,7 @@
 	    	type: "POST",
 	    	contentType: "text/html",
 	    	data: text,
-	    	success: function() {
-	    		$( "#shareForm" ).dialog( "close" );
+	    	success: function() {	    		
 	    		$( "#interpretationArea" ).val( "" );
 	    		setHeaderDelayMessage( i18n_interpretation_was_shared );
 	    	}    	

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderDataSetReportHeader.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderDataSetReportHeader.vm	2012-09-03 19:48:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderDataSetReportHeader.vm	2012-12-04 13:16:24 +0000
@@ -1,14 +1,14 @@
 
-<h3>$encoder.htmlEncode( $selectedOrgunit.name ) - $format.formatPeriod( $selectedPeriod )</h3>
-
 <input type="hidden" id="currentDataSetId" value="${selectedDataSet.uid}">
 <input type="hidden" id="currentPeriodId" value="${selectedPeriod.isoDate}">
 <input type="hidden" id="currentSelectedUnitOnly" value="${selectedUnitOnly}">
 <div id="userInfo" class="page"></div>
 
-<div id="download_buttons" style="margin-bottom:15px">
-<input type="button" value="$i18n.getString( 'get_report_as_xls' )" onclick="exportDataSetReport( 'xls' )" style="width:140px">
-<input type="button" value="$i18n.getString( 'get_report_as_pdf' )" onclick="exportDataSetReport( 'pdf' )" style="width:140px">
-<input type="button" value="$i18n.getString( 'share' )" onclick="viewShareForm()" style="width:140px">
-#if( $registration ) &nbsp;<span>$i18n.getString( "completed_by" ): <a href="javascript:setUserInfo( '${registration.storedBy}' )">${registration.storedBy}</a></span>#end
+<h3>$encoder.htmlEncode( $selectedOrgunit.name ) - $format.formatPeriod( $selectedPeriod )</h3>
+
+#if( $registration )<div>$i18n.getString( "completed_by" ): <a href="javascript:setUserInfo( '${registration.storedBy}' )">${registration.storedBy}</a></div>#end
+
+<div id="shareForm">
+<textarea id="interpretationArea" class="interpretationArea" placeholder="$i18n.getString( 'write_your_interpretation_of_report' )"></textarea><br>
+<input type="button" value="$i18n.getString( 'share' )" onclick="shareInterpretation( '${uid}', '$!{ou}' )" style="width:120px">
 </div>

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/style/dhis-web-reporting.css'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/style/dhis-web-reporting.css	2012-06-04 12:52:49 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/style/dhis-web-reporting.css	2012-12-04 13:16:24 +0000
@@ -1,23 +1,15 @@
 
-#shareForm
-{
-  display: none;
-}
-
 .interpretationArea
 {
-  height: 125px;
+  height: 40px;
   width: 510px;
-  border: 1px solid #ccc;
+  border: 1px solid #c0c0c0;
   resize: none;
   overflow: auto;
-  margin: 10px 4px 6px 4px;
   padding: 4px 0 0px 6px;
 }
 
-.interpretationButton
+#shareForm
 {
-  width: 120px;
-  height: 24px;
-  margin: 0 0 6px 4px;
+  margin: 0 0 10px 0;
 }