X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b6487d6773406f0da6724e24ad5ce6a94e1009cd..31e1d10eb4a54b13f55b3c9638f46032be633ff9:/apps/workbench/app/assets/javascripts/application.js diff --git a/apps/workbench/app/assets/javascripts/application.js b/apps/workbench/app/assets/javascripts/application.js index cf0812adae..a23a6d4880 100644 --- a/apps/workbench/app/assets/javascripts/application.js +++ b/apps/workbench/app/assets/javascripts/application.js @@ -21,6 +21,7 @@ //= require bootstrap/modal //= require bootstrap/button //= require bootstrap3-editable/bootstrap-editable +//= require bootstrap-tab-history //= require wiselinks //= require_tree . @@ -205,4 +206,33 @@ jQuery(function($){ }); }); + $(document).on('click', '.compute-detail', function(e) { + $(e.target).collapse('hide'); + }); + + $(document).on('click', '.compute-node-summary', function(e) { + $(e.target.href).collapse('toggle'); + }); + + $(document).on('click', '.force-cache-reload', function(e) { + history.replaceState( { nocache: true }, '' ); + }); }); + +window.addEventListener("DOMContentLoaded", function(e) { + if(history.state) { + if(history.state.nocache) { + showLoadingModal(); + history.replaceState( {}, '' ); + location.reload(true); + } + } +}); + +function showLoadingModal() { + $('#loading-modal').modal('show'); +} + +function hideLoadingModal() { + $('#loading-modal').modal('hide'); +}