← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20348: tracker-capture: login failure/online/offline notifications

 

------------------------------------------------------------
revno: 20348
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-09-24 15:34:47 +0200
message:
  tracker-capture: login failure/online/offline notifications
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.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-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties	2015-09-23 15:04:50 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties	2015-09-24 13:34:47 +0000
@@ -1,3 +1,6 @@
+online_notification=You are online
+offline_notification=You are offline
+login_failed=Login failed, check your username and password and try again
 tracked_entity_management=Tracked entity management
 registering_unit=Registering unit
 program=Program

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html	2015-09-23 14:06:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/index.html	2015-09-24 13:34:47 +0000
@@ -59,6 +59,8 @@
         <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.util.js"></script>
         <script type="text/javascript" src="../dhis-web-commons/javascripts/commons.js"></script>
         <script type="text/javascript" src="../dhis-web-commons/javascripts/commons.ajax.js"></script>
+        <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.availability.js"></script>
+        <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.trigger.js"></script>
         <script type="text/javascript" src="../dhis-web-commons/javascripts/lists.js"></script>
         <script type="text/javascript" src="../dhis-web-commons/javascripts/periodTypeNoDep.js"></script>
         <script type="text/javascript" src="../dhis-web-commons/javascripts/json2.js"></script>

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js	2015-09-21 15:01:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js	2015-09-24 13:34:47 +0000
@@ -6,13 +6,9 @@
 dhis2.tc.emptyOrganisationUnits = false;
 
 var i18n_no_orgunits = 'No organisation unit attached to current user, no data entry possible';
-var i18n_offline_notification = 'You are offline, data will be stored locally';
+var i18n_offline_notification = 'You are offline';
 var i18n_online_notification = 'You are online';
-var i18n_need_to_sync_notification = 'There is data stored locally, please upload to server';
-var i18n_sync_now = 'Upload';
-var i18n_sync_success = 'Upload to server was successful';
-var i18n_sync_failed = 'Upload to server failed, please try again later';
-var i18n_uploading_data_notification = 'Uploading locally stored data to the server';
+var i18n_ajax_login_failed = 'Login failed, check your username and password and try again';
 
 var optionSetsInPromise = [];
 var attributesInPromise = [];
@@ -157,6 +153,7 @@
         //Enable ou selection after meta-data has downloaded
         $( "#orgUnitTree" ).removeClass( "disable-clicks" );
         dhis2.tc.metaDataCached = true;
+        dhis2.availability.startAvailabilityCheck();
         console.log( 'Finished loading meta-data' );        
         selection.responseReceived(); 
     });