=== 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-07-21 20:49:52 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2011-08-08 18:21:36 +0000 @@ -8,6 +8,23 @@ var _loading_circle_html = ""; /** + * Determines whether the DHIS server can be accessed, ie. if the server + * is running (in the context of a remote server also if the network is up). + */ +function serverIsAccessible() +{ + $.ajax( { + url: "../dhis-web-commons-stream/ping.action", + success: function( data, textStatus, jqXHR ) { + return true; + }, + error: function( jqXHR, textStatus, errorThrown ) { + return false; + } + } ); +} + +/** * Go back using the document.referrer. * * @param defaultUrl if there is not document.referrer, use this url === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-08-08 15:09:46 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-08-08 18:21:36 +0000 @@ -735,6 +735,10 @@ + + + +