Commit c315b514 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Turn History menu on again.

Fix adding items to history by setting correct itemSelector for
HistoryItems view.  Wrong selector caused crash when menu had
been already rendered.
parent c6675969
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -131,11 +131,11 @@ Ext.define('Docs.controller.Classes', {
                docTabPanel.setLoading(false);
            }

            // var prevCls = historyStore.find('cls', cls.name);
            // if (prevCls === -1) {
            //     historyStore.add({cls: cls.name});
            //     historyStore.sync();
            // }
            var prevCls = historyStore.find('cls', cls.name);
            if (prevCls === -1) {
                historyStore.add({cls: cls.name});
                historyStore.sync();
            }

            Ext.getCmp('treePanelCmp').selectClass(cls.name);
        }
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
Ext.define('Docs.view.tree.HistoryItems', {
    extend: 'Ext.view.View',

    itemSelector: 'div.a',
    itemSelector: 'div.item',
    emptyText: 'No history',
    renderTo: Ext.getBody(),
    cls: 'hover-menu-menu show',
+20 −20
Original line number Diff line number Diff line
@@ -14,26 +14,26 @@ Ext.define('Docs.view.tree.Tree', {
    border: false,
    bodyBorder: false,

    // dockedItems: [
    //     {
    //         xtype: 'container',
    //         layout: {
    //             type: 'hbox'
    //         },
    //         dock: 'top',
    //         margin: '0 0 15 0',
    //         items: [
    //             {
    //                 margin: '0 10 0 0',
    //                 xtype: 'button',
    //                 text: 'Favorites'
    //             },
    //             {
    //                 xtype: 'docshistorybutton'
    //             }
    //         ]
    //     }
    // ],
    dockedItems: [
        {
            xtype: 'container',
            layout: {
                type: 'hbox'
            },
            dock: 'top',
            margin: '0 0 15 0',
            items: [
                {
                    margin: '0 10 0 0',
                    xtype: 'button',
                    text: 'Favorites'
                },
                {
                    xtype: 'docshistorybutton'
                }
            ]
        }
    ],

    initComponent: function() {
        // Expand the main tree