Merge remote-tracking branch 'origin/master' into 4084-log-pane-refresh
[arvados.git] / apps / workbench / app / assets / javascripts / application.js
index 82563b08411f22f1a8b0d9efa3983e469cbf7bdf..a23a6d488045be7bc297aa217626e9d60cf23c02 100644 (file)
@@ -206,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');
+}