← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4361: Made the notification about being online go away after an interval

 

------------------------------------------------------------
revno: 4361
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-08-18 19:44:21 +0200
message:
  Made the notification about being online go away after an interval
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.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/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2011-08-18 17:28:45 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2011-08-18 17:44:21 +0000
@@ -532,7 +532,7 @@
 	
 	window.clearTimeout( headerMessageTimeout ); // Clear waiting invocations
 	
-	headerMessageTimeout = window.setTimeout( "hideHeaderMessage();", 5000 );
+	headerMessageTimeout = window.setTimeout( "hideHeaderMessage();", 8000 );
 }
 
 /**
@@ -544,7 +544,7 @@
 	
 	window.clearTimeout( headerMessageTimeout ); // Clear waiting invocations
 	
-	headerMessageTimeout = window.setTimeout( "hideHeaderMessage();", 5000 );
+	headerMessageTimeout = window.setTimeout( "hideHeaderMessage();", 8000 );
 }
 
 /**

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-18 17:28:45 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-18 17:44:21 +0000
@@ -67,7 +67,7 @@
     $( document ).bind( 'dhis2.online', function( event, loggedIn ) {
         if ( loggedIn ) {
             if ( storageManager.hasLocalData() ) {
-                var message = i18n_need_to_sync_notification + '<button id="sync_button" type="button">' + i18n_sync_now + '</button>';
+                var message = i18n_need_to_sync_notification + ' <button id="sync_button" type="button">' + i18n_sync_now + '</button>';
                 
                 setHeaderMessage( message );
                 
@@ -75,7 +75,7 @@
             }
             else
             {
-                setHeaderMessage( i18n_online_notification );
+                setHeaderDelayMessage( i18n_online_notification );
             }
         } 
         else {
@@ -173,7 +173,7 @@
 
                 if ( array.length < 1 )
                 {
-                    setHeaderMessage( i18n_online_notification );
+                    setHeaderDelayMessage( i18n_online_notification );
                 }
             }
         });
@@ -182,7 +182,7 @@
     (function pushDataValues( array ) {
         if ( array.length < 1 )
         {
-            setHeaderMessage( i18n_online_notification );
+            setHeaderDelayMessage( i18n_online_notification );
             
             pushCompleteDataSets(completeDataSetsArray);
 
@@ -209,7 +209,7 @@
                 }
                 else
                 {
-                    setHeaderMessage( i18n_online_notification );
+                    setHeaderDelayMessage( i18n_online_notification );
                 }
             }
         } );