diff rhodecode/templates/base/root.html @ 2686:269c6e0b54cc beta

Reimplemented file-browser using partial-ajax - improves the speed of browsing of files for revision - url push state via html5 History - also cache the results of calls for even faster handling the content
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 04 Aug 2012 17:46:45 +0200
parents d2a528b60e50
children ad4bc0f66d6a
line wrap: on
line diff
--- a/rhodecode/templates/base/root.html	Sat Aug 04 01:29:15 2012 +0200
+++ b/rhodecode/templates/base/root.html	Sat Aug 04 17:46:45 2012 +0200
@@ -55,11 +55,22 @@
                <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script>
             <![endif]-->
             <script type="text/javascript" src="${h.url('/js/yui.flot.js')}"></script>
+            <script type="text/javascript" src="${h.url('/js/native.history.js')}"></script>
             <script type="text/javascript" src="${h.url('/js/rhodecode.js')}"></script>
            ## EXTRA FOR JS
            ${self.js_extra()}
 
             <script type="text/javascript">
+            (function(window,undefined){
+
+                // Prepare
+                var History = window.History; // Note: We are using a capital H instead of a lower h
+                if ( !History.enabled ) {
+                     // History.js is disabled for this browser.
+                     // This is because we can optionally choose to support HTML4 browsers or not.
+                    return false;
+                }
+            })(window);
             var follow_base_url  = "${h.url('toggle_following')}";
 
             var onSuccessFollow = function(target){