dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13682
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4455: Codestyle
------------------------------------------------------------
revno: 4455
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-08-26 13:43:31 +0200
message:
Codestyle
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.availability.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/dhis2/dhis2.availability.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.availability.js 2011-08-26 09:54:28 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.availability.js 2011-08-26 11:43:31 +0000
@@ -50,6 +50,7 @@
$.ajax( {
url : "../dhis-web-commons-stream/ping.action",
cache : false,
+ dataType : "json",
success : function( data, textStatus, jqXHR )
{
dhis2.availability._isAvailable = true;
@@ -69,17 +70,18 @@
dhis2.availability._isLoggedIn = -1;
$( document ).trigger( "dhis2.offline" );
}
- }
- } ).complete( function()
- {
- if ( dhis2.availability._isAvailable )
- {
- dhis2.availability._availableTimeoutHandler = setTimeout( _checkAvailability, onlineInterval );
- }
- else
- {
- dhis2.availability._availableTimeoutHandler = setTimeout( _checkAvailability, offlineInterval );
- }
+ },
+ complete : function()
+ {
+ if ( dhis2.availability._isAvailable )
+ {
+ dhis2.availability._availableTimeoutHandler = setTimeout( _checkAvailability, onlineInterval );
+ }
+ else
+ {
+ dhis2.availability._availableTimeoutHandler = setTimeout( _checkAvailability, offlineInterval );
+ }
+ }
} );
}
@@ -106,6 +108,7 @@
url : "../dhis-web-commons-stream/ping.action",
async : false,
cache : false,
+ dataType : "json",
success : function( data, textStatus, jqXHR )
{
dhis2.availability._isAvailable = true;