Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / js / History.js
diff --git a/docs/js/History.js b/docs/js/History.js
deleted file mode 100644 (file)
index 9f12f20..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Browser history management using Ext.util.History.
- */
-Ext.define("Docs.History", {
-    singleton: true,
-
-    /**
-     * Initializes history management.
-     */
-    init: function() {
-        Ext.util.History.init(function() {
-            this.navigate(Ext.util.History.getToken());
-        }, this);
-        Ext.util.History.on("change", this.navigate, this);
-    },
-
-    // Parses current URL and navigates to the page
-    navigate: function(token) {
-        var url = this.parseToken(token);
-        if (url.type === "api") {
-            Docs.ClassLoader.load(url.key, true);
-            Ext.getCmp('treePanelCmp').selectClass(url.key.replace(/-.*$/, ''));
-        }
-        else if (url.type === "guide") {
-            Docs.App.setGuideMode();
-            Docs.Guides.load(url.key, true);
-        }
-        else {
-            Docs.App.setIndexMode();
-        }
-    },
-
-    // Parses current browser location
-    parseToken: function(token) {
-        var matches = token && token.match(/\/(api|guide)\/(.*)/);
-        return matches ? {type: matches[1], key: matches[2]} : {};
-    },
-
-    /**
-     * Adds URL to history
-     *
-     * @param {String} token  the part of URL after #
-     */
-    push: function(token) {
-        Ext.util.History.add(token);
-    }
-});