Commit 203c1d34 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix scrolling to members section on HoverMenuButton click.

This time implement it without a hacky access to parent component.
parent 4f98a404
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -79,6 +79,9 @@ Ext.define('Docs.view.cls.Overview', {
                filter: function(search, show) {
                    this.filterMembers(search, show);
                },
                menubuttonclick: function(type) {
                    this.scrollToEl("h3.members-title.icon-"+type, -20);
                },
                scope: this
            }
        });
+7 −1
Original line number Diff line number Diff line
@@ -28,6 +28,12 @@ Ext.define('Docs.view.cls.Toolbar', {

    initComponent: function() {
        this.addEvents(
            /**
             * @event buttonclick
             * Fired when one of the toolbar HoverMenuButtons is clicked.
             * @param {String} type Type of button that was clicked "cfg", "method", "event", etc
             */
            "menubuttonclick",
            /**
             * @event filter
             * Fires when text typed to filter, or one of the hide-checkboxes clicked.
@@ -177,7 +183,7 @@ Ext.define('Docs.view.cls.Toolbar', {
            showCount: true,
            listeners: {
                click: function() {
                    this.up('classoverview').scrollToEl("#m-" + cfg.type);
                    this.fireEvent('menubuttonclick', cfg.type);
                },
                scope: this
            }