4233: better labelling includes raw interval data and number formatting
[arvados.git] / apps / workbench / app / assets / javascripts / application.js
index 39e8cf96eac5b9e8cfbb886451931f45eb545bac..796053b8cd3b4de8dd3205cee5ef5642f000da67 100644 (file)
 //= require bootstrap/modal
 //= require bootstrap/button
 //= require bootstrap3-editable/bootstrap-editable
+//= require bootstrap-tab-history
 //= require wiselinks
+//= require raphael
+//= require morris
+//= require jquery.number.min
 //= require_tree .
 
 jQuery(function($){
@@ -213,4 +217,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);
+}