← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13458: Approval, ui fix

 

------------------------------------------------------------
revno: 13458
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-12-28 16:41:14 +0100
message:
  Approval, ui fix
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css
  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	2013-12-27 16:53:58 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2013-12-28 15:41:14 +0000
@@ -338,17 +338,6 @@
 /* Message field                                                              */
 /*----------------------------------------------------------------------------*/
 
-.messageBox
-{
-  display: none;
-  padding: 1em;
-  margin: 1em 0;
-  background-color: #f8eab0;
-  border: 1px solid #dbae56;
-  width: 480px;
-  border-radius: 3px;
-}
-
 span#message 
 {
   display: none;

=== 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	2013-12-27 16:53:58 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2013-12-28 15:41:14 +0000
@@ -249,6 +249,8 @@
 analytics_and_data_mart=Analytics and Data Mart
 approve=Approve
 unapprove=Unapprove
-waiting_for_lower_level_approval=Waiting for lower level organisation units to approve
+waiting_for_lower_level_approval=Waiting for lower level org units to approve
+approved=Approved
+ready_for_approval=Ready for approval
 confirm_approval=Are you sure you want to approve this data set?
 confirm_unapproval=Are you sure you want to unapprove this data set?
\ 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	2013-12-27 16:53:58 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm	2013-12-28 15:41:14 +0000
@@ -40,6 +40,8 @@
 var i18n_interpretation_was_shared = '$encoder.jsEscape( $i18n.getString( "interpretation_was_shared" ), "'")';
 var i18n_select_option_view_all = '$encoder.jsEscape( $i18n.getString( "select_option_view_all" ) , "'")';
 var i18n_waiting_for_lower_level_approval = '$encoder.jsEscape( $i18n.getString( "waiting_for_lower_level_approval" ) , "'")';
+var i18n_ready_for_approval = '$encoder.jsEscape( $i18n.getString( "ready_for_approval" ) , "'")';
+var i18n_approved = '$encoder.jsEscape( $i18n.getString( "approved" ) , "'")';
 var i18n_confirm_approval = '$encoder.jsEscape( $i18n.getString( "confirm_approval" ) , "'")';
 var i18n_confirm_unapproval = '$encoder.jsEscape( $i18n.getString( "confirm_unapproval" ) , "'")';
 </script>
@@ -162,5 +164,3 @@
 <input type="button" id="approveButton" value="$i18n.getString( 'approve' )" onclick="dhis2.dsr.approveData()" style="width:120px">
 <input type="button" id="unapproveButton" value="$i18n.getString( 'unapprove' )" onclick="dhis2.dsr.unapproveData()" style="width:120px">
 </div>
-
-<div id="message" class="messageBox"></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-12-27 18:02:36 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2013-12-28 15:41:14 +0000
@@ -223,10 +223,7 @@
     hideCriteria();
     hideContent();
     showLoader();
-	
-    delete dataSetReport.periodType;
-    delete dataSetReport.offset;
-    
+	    
     var url = dhis2.dsr.getDataSetReportUrl( dataSetReport );
     
     $.get( url, function( data ) {
@@ -337,6 +334,8 @@
 	var approval = $( "#dataSetId :selected" ).data( "approval" );
 	var attributesSelected = dhis2.dsr.attributesSelected( dataSetReport );
 
+	$( "#approvalNotification" ).hide();
+	
 	if ( !approval || !attributesSelected ) {
 		$( "#approvalDiv" ).hide();
 		return false;
@@ -349,17 +348,17 @@
 			$( "#approvalDiv" ).show();
 			$( "#approveButton" ).prop( "disabled", false );
 			$( "#unapproveButton" ).prop( "disabled", true );
-			$( "#message" ).hide();
+			$( "#approvalNotification" ).show().html( i18n_ready_for_approval );
 		}
 		else if ( status && '"APPROVED"' == status ) {
 			$( "#approvalDiv" ).show();
 			$( "#approveButton" ).prop( "disabled", true );
 			$( "#unapproveButton" ).prop( "disabled", false );
-			$( "#message" ).hide();		
+			$( "#approvalNotification" ).show().html( i18n_approved );
 		}
 		else if ( status && '"WAITING_FOR_LOWER_LEVEL_APPROVAL"' == status ) {
 			$( "#approvalDiv" ).hide();
-			$( "#message" ).show().html( i18n_waiting_for_lower_level_approval );		
+			$( "#approvalNotification" ).show().html( i18n_waiting_for_lower_level_approval );		
 		}
 	} );
 }

=== 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	2013-12-25 15:01:48 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderDataSetReportHeader.vm	2013-12-28 15:41:14 +0000
@@ -9,6 +9,7 @@
 #if( $registration )<div style="margin-bottom:6px">$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>
+<textarea id="interpretationArea" class="interpretationArea" placeholder="$i18n.getString( 'write_your_interpretation_of_report' )"></textarea>
+<span id="approvalNotification" class="message message-info" style="display:none"></span><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	2013-10-22 10:29:16 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/style/dhis-web-reporting.css	2013-12-28 15:41:14 +0000
@@ -2,7 +2,7 @@
 .interpretationArea
 {
   height: 40px;
-  width: 510px;
+  width: 455px;
   border: 1px solid #c0c0c0;
   resize: none;
   overflow: auto;
@@ -19,4 +19,12 @@
   border: 1px solid #ddd;
   border-radius: 3px;
   padding: 20px;
+}
+
+#approvalNotification
+{
+  width: auto;
+  display: inline-block;
+  vertical-align: top;
+  margin-left: 15px;
 }
\ No newline at end of file