← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1619: Fixed bug #531351 (chart creation without feedback)

 

------------------------------------------------------------
revno: 1619
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-03-11 12:56:49 +0100
message:
  Fixed bug #531351 (chart creation without feedback)
modified:
  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/util/commons.js
  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/javascript/chart.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.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/css/widgets.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2010-03-11 10:41:22 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2010-03-11 11:56:49 +0000
@@ -285,6 +285,7 @@
 
 div#headerMessageContainer
 {
+  position: fixed;
   top: 0px;
   width: 100%;
   height: 26px;

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js	2010-03-11 10:41:22 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js	2010-03-11 11:56:49 +0000
@@ -369,7 +369,7 @@
 }
 
 /**
- * Sets a message in the "message" span and makes the span visible.
+ * Shows the message span and sets the message as text.
  * 
  * @param message the message. 
  */
@@ -379,6 +379,11 @@
     $( '#message' ).slideDown( 'fast' );
 }
 
+/**
+ * Shows the message span and sets the message as text together with a wait animation.
+ * 
+ * @param message the message.
+ */
 function setWaitMessage( message )
 {
 	setMessage( message + "&nbsp;&nbsp;&nbsp;<img src='../../images/ajax-loader-bar-small.gif'>" );
@@ -392,23 +397,70 @@
 	$( '#message' ).slideUp( 'fast' );
 }
 
+/**
+ * Slides down the header message div and sets the message as text.
+ * 
+ * @param message the message.
+ */
 function setHeaderMessage( message )
 {
     $( 'div#headerMessage' ).html( message );
-    $( 'div#headerMessage' ).slideDown( 'slow' );
-}
-
+    $( 'div#headerMessage' ).slideDown();
+}
+
+/**
+ * Updates the text in the header message div with the message.
+ * 
+ * @param message the message.
+ */
+function updateHeaderMessage( message )
+{
+	$( 'div#headerMessage' ).html( message );
+}
+
+/**
+ * Slides down the header message div and sets the message as text together with a wait animation.
+ * 
+ * @param message the message.
+ */
+function setHeaderWaitMessage( message )
+{
+	$( 'div#headerMessage' ).html( message + "&nbsp;&nbsp;&nbsp;<img src='../../images/ajax-loader-bar-small.gif'>" );
+    $( 'div#headerMessage' ).slideDown();
+}
+
+/**
+ * Updates the text in the header message div with the message.
+ * 
+ * @param message the message.
+ */
+function updateHeaderWaitMessage( message )
+{
+	$( 'div#headerMessage' ).html( message + "&nbsp;&nbsp;&nbsp;<img src='../../images/ajax-loader-bar-small.gif'>" );
+}
+
+/**
+ * Hides the header message div.
+ */
 function hideHeaderMessage()
 {
-    $( 'div#headerMessage' ).slideUp( 'slow' );
+    $( 'div#headerMessage' ).slideUp();
 }   
 
+/**
+ * Slides down the info message div and sets the message as text.
+ * 
+ * @param message the message.
+ */
 function setInfo( message )
 {
     $( '#info' ).html( message );
     $( '#info' ).slideDown( 'fast' );
 }
 
+/**
+ * Hides the info div.
+ */
 function hideInfo()
 {
     $( '#info' ).slideUp( 'fast' );

=== 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	2010-03-08 16:53:05 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2010-03-11 11:56:49 +0000
@@ -280,6 +280,12 @@
 configuration = Configuration
 based_on_subjective = Based on complete data set registrations
 based_on_objective = Based on compulsory data elements
+deleting_existing_aggregated_data= Deleting existing aggregated data
+crosstabulating_data= Crosstabulating data
+exporting_data_for_data_elements= Exporting data for data elements
+exporting_data_for_calculated_data_elements = Exporting data for calculated data elements
+exporting_data_for_indicators= Exporting data for indicators
+export_process_done= Export process done
 report_table_process_started = Report table process started
 report_table_process_done = Report table process done
 report_table_process_failed = Report table process failed - See log for details

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/chart.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/chart.js	2010-03-08 07:37:39 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/chart.js	2010-03-11 11:56:49 +0000
@@ -7,6 +7,8 @@
 
 function runAndViewChart( chartId )
 {
+	setHeaderWaitMessage( "Please wait" );
+	
     tempChartId = chartId;
     
     var request = new Request();
@@ -20,7 +22,7 @@
 }
 
 function getChartStatus()
-{   
+{
     var url = "getStatus.action";
     
     var request = new Request();
@@ -34,8 +36,12 @@
     var statusMessage = getElementValue( xmlObject, "statusMessage" );
     var finished = getElementValue( xmlObject, "finished" );
     
+    updateHeaderWaitMessage( statusMessage );
+    
     if ( finished == "true" )
     {
+    	hideHeaderMessage();
+    	
         var url = "viewChart.action?id=" + tempChartId;
         
         viewChart( url );

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm	2010-02-15 18:55:09 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm	2010-03-11 11:56:49 +0000
@@ -57,7 +57,8 @@
 </table>
 
 <script type="text/javascript">
-    var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_chart" ) , "'")';
-    var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
-    var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
+	var i18n_please_wait = '$encoder.jsEscape( $i18n.getString( "please_wait" ), "'")';
+    var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_chart" ), "'")';
+    var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ), "'")';
+    var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ), "'")';
 </script>