Commit d073ab6c authored by Nick Poulden's avatar Nick Poulden
Browse files

Start of Tab remembering

parent b2de063c
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -58,9 +58,12 @@ Ext.define('Docs.controller.Tabs', {
                    this.addTabIconListeners(cmp);
                    this.addTabListeners(cmp);

                    Ext.getStore('Favorites').each(function(f) {
                        this.addTabFromTree(f.data.url, this.getClassTree(), true, true);
                    }, this);
                    // var prevTabs = Docs.Settings.get('openTabs');
                    // if (prevTabs) {
                    //     prevTabs.each(function(f) {
                    //         this.addTabFromTree(f, this.getClassTree(), true, true);
                    //     }, this);
                    // }
                },
                scope: this
            }
+2 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ Ext.define('Docs.view.Tabs', {
            }

            this.openTabs.push(tab.href);
            Docs.Settings.set('openTabs', this.openTabs);
        }

        if (!noActivate) {
@@ -113,6 +114,7 @@ Ext.define('Docs.view.Tabs', {
        var idx = Ext.Array.indexOf(this.openTabs, url);
        if (idx !== false) {
            Ext.Array.erase(this.openTabs, idx, 1);
            Docs.Settings.set('openTabs', this.openTabs);
            if (this.activeTab > idx) {
                this.activeTab -= 1;
            }
+1.06 KiB
Loading image diff...