Merge remote-tracking branch 'origin/master' into 4084-log-pane-refresh
[arvados.git] / apps / workbench / app / assets / javascripts / application.js
index 950ee50d54957fb4c9c23d5b91355f59d0c24a26..a23a6d488045be7bc297aa217626e9d60cf23c02 100644 (file)
@@ -21,6 +21,7 @@
 //= require bootstrap/modal
 //= require bootstrap/button
 //= require bootstrap3-editable/bootstrap-editable
+//= require bootstrap-tab-history
 //= require wiselinks
 //= require_tree .
 
@@ -206,8 +207,32 @@ jQuery(function($){
     });
 
     $(document).on('click', '.compute-detail', function(e) {
-        console.log("woble");
         $(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');
+}