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

Expand class comments when count in toolbar clicked.

parent 5fbab0f1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ Ext.define('Docs.view.cls.Overview', {
                menubuttonclick: function(type) {
                    this.scrollToEl("h3.members-title.icon-"+type, -20);
                },
                commentcountclick: this.expandClassComments,
                scope: this
            }
        });
@@ -134,6 +135,13 @@ Ext.define('Docs.view.cls.Overview', {
        }, this);
    },

    expandClassComments: function() {
        var expaned = this.clsExpander.getExpander();
        expander.expand();
        // add a small arbitrary -40 offset to make the header visible.
        this.scrollToEl(expander.getEl(), -40);
    },

    /**
     * Filters members by search string and inheritance.
     * @param {String} search
+4 −4
Original line number Diff line number Diff line
@@ -46,11 +46,11 @@ Ext.define('Docs.view.comments.LargeExpander', {
    },

    /**
     * Updates the comment count.
     * @param {Number} count
     * Access the embedded Expander element.
     * @return {Docs.view.comments.Expander}
     */
    setCount: function(count) {
        this.expander.setCount(count);
    getExpander: function() {
        return this.expander;
    }

});