assets/themes/j1/adapter/js/fab.js in j1-template-2023.2.7 vs assets/themes/j1/adapter/js/fab.js in j1-template-2023.3.0

- old
+ new

@@ -156,16 +156,18 @@ var dependencies_met_navigator = setInterval(function() { var pageState = $('#no_flicker').css("display"); var pageVisible = (pageState == 'block') ? true : false; var atticFinished = (j1.adapter.attic.getState() == 'finished') ? true: false; - if (j1.adapter.navigator.getState() == 'finished' && pageVisible && atticFinished) { + if (j1.adapter.navigator.getState() == 'finished' && pageVisible) { +// if (j1.adapter.navigator.getState() == 'finished' && pageVisible && atticFinished) { + logger.debug('\n' + 'met dependencies for: navigator'); _this.fabLoader(fabOptions); clearInterval(dependencies_met_navigator); } - }, 25); + }, 10); }, // END init // ------------------------------------------------------------------------- // FAB Loader @@ -191,11 +193,12 @@ var dependencies_met_fab_initialized = setInterval (function () { var pageState = $('#no_flicker').css("display"); var pageVisible = (pageState == 'block') ? true: false; var atticFinished = (j1.adapter.attic.getState() == 'finished') ? true: false; - if (j1.xhrDOMState['#' + fabOptions.xhr_container_id] == 'success' && j1.getState() == 'finished' && pageVisible && atticFinished ) { +// if (j1.xhrDOMState['#' + fabOptions.xhr_container_id] == 'success' && j1.getState() == 'finished' && pageVisible && atticFinished ) { + if (j1.xhrDOMState['#' + fabOptions.xhr_container_id] == 'success' && j1.getState() == 'finished' && pageVisible ) { _this.setState('loaded'); logger.info('\n' + 'set module state to: ' + _this.getState()); logger.info('\n' + 'HTML data for FAB: ' + _this.getState()); // _this.scrollSpy(fabOptions); @@ -207,11 +210,11 @@ $('.fab-btn').show(); clearInterval(dependencies_met_fab_initialized); } - }, 25); // END dependencies_met_fab_initialized + }, 10); // END dependencies_met_fab_initialized }, // END dataLoader // ------------------------------------------------------------------------- // Button Initializer // ------------------------------------------------------------------------- @@ -301,11 +304,11 @@ // : logger.info('\n' + 'FAB mode detected: menu'); $('#open_mmenu_toc').show(); clearInterval(dependencies_met_toccer_finished); } - }, 25); // END dependencies_met_toccer_finished + }, 10); // END dependencies_met_toccer_finished } else { logger.info('\n' + 'found toc in page: disabled'); } } else { $('#' + item.id).show(); @@ -361,10 +364,10 @@ // to open the TOC sidebar // $actionButton.prop('id', 'open_mmenu_toc'); clearInterval(dependencies_met_toccer_finished); } - }, 25); // END dependencies_met_toccer_finished + }, 10); // END dependencies_met_toccer_finished } else { logger.info('\n' + 'found toc in page: disabled'); logger.info('\n' + 'eventhandler: disabled'); } } // END if eventHandler == open_mmenu_toc