3177: in file chooser mode, allow row selection
[arvados.git] / apps / workbench / app / assets / javascripts / application.js
index 567a6d12d0a156868d839b449f830e02d20324cc..1990b8b0f55c8d2497db67cae6d6da21f714663b 100644 (file)
@@ -214,4 +214,29 @@ jQuery(function($){
         $(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');
+}
+
+function hasHTML5History() {
+    return !!(window.history && window.history.pushState);
+}