Still cleaning things up. Also session times can now show and hide in the menu.

This commit is contained in:
Scott Idem
2020-03-06 17:23:42 -05:00
parent 666b1fc422
commit 382e98baf1
3 changed files with 42 additions and 44 deletions

View File

@@ -176,29 +176,6 @@
window.addEventListener('online', app.currently_online);
window.addEventListener('offline', app.currently_offline);
/*
let update_event_ui = false;
let update_event_location_ui = false;
let update_event_session_ui = false;
let update_event_presentation_ui = false;
let update_event_presenter_ui = false;
let update_event_file_ui = false;
*/
if (navigator.onLine) {
app.currently_online();
} else {
app.currently_offline();
/*
console.log('Using cached IDB data.');
update_event_ui = true;
update_event_location_ui = true;
update_event_session_ui = true;
update_event_presentation_ui = true;
update_event_presenter_ui = true;
update_event_file_ui = true;
*/
}
var api_token_loop = setInterval(async function() {
//console.log('****************** LOOP: API Token Loop ******************');
@@ -235,6 +212,14 @@
}, api_token_loop_interval);
// Placing this online status check after the api_token_loop just in case?
if (navigator.onLine) {
app.currently_online();
} else {
app.currently_offline();
}
// END: API section
/* ***** **** *** ** * ### * ** *** **** ***** */
@@ -487,7 +472,7 @@
const check_file_cache_loop_interval = app_config.check_file_cache_loop_interval; // loop forever; only run after the event_file table has updated
const update_render_loop_interval = app_config.update_render_loop_interval; // loop forever
//const update_render_loop_interval = app_config.update_render_loop_interval; // loop forever
const host_file_cache_path = app_config.host_file_cache_path; // 'file_cache/'
var check_file_cache_loop = setInterval(async function() {
@@ -514,28 +499,20 @@
// BEGIN: Check online status section
// NOTE: This might be needed because the navigator.onLine status is not always correct.
var check_initial_online_status = setInterval(async function() {
//console.log('****************** LOOP: Check Online Status ******************');
console.log('check_initial_online_status online check?');
console.log(navigator.onLine);
//console.log('Secondary online status check?');
//console.log(navigator.onLine);
//clearInterval(check_initial_online_status);
/*
if (navigator.onLine) {
app.currently_online();
//app.currently_online();
} else {
app.currently_offline();
console.log('Using cached IDB data.');
update_event_ui = true;
update_event_location_ui = true;
update_event_session_ui = true;
update_event_presentation_ui = true;
update_event_presenter_ui = true;
update_event_file_ui = true;
//app.currently_offline();
}
clearInterval(check_initial_online_status);
}, 500);
*/
}, 3000);
// END: Check online status section
@@ -555,9 +532,10 @@
// END: Status clock section
</script>
<!-- <script src="js/launcher.js"></script>-->
<!-- <script src="js/test.js"></script>-->
<!-- JavaScript (JS) end -->
</body>