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

Use refs for class overview panel.

No more access ClassOverview by ID. Instead it just has a classname
which is also used for styling in CSS.
parent a0ee9ec4
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -24,6 +24,10 @@ Ext.define('Docs.controller.Classes', {
        {
            ref: 'tabPanel',
            selector: 'classtabpanel'
        },
        {
            ref: 'classOverview',
            selector: 'classoverview'
        }
    ],

@@ -58,7 +62,7 @@ Ext.define('Docs.controller.Classes', {
                }
            },

            '#doc-overview': {
            'classoverview': {
                afterrender: function(cmp) {
                    // Expand member when clicked
                    cmp.el.addListener('click', function(cmp, el) {
@@ -144,10 +148,9 @@ Ext.define('Docs.controller.Classes', {
        }

        if (anchor) {
            Ext.getCmp('doc-overview').scrollToEl("#" + anchor);
            this.getClassOverview().scrollToEl("#" + anchor);
        } else {
            var docContent = Ext.get(Ext.query('#doc-overview .x-panel-body')[0]);
            docContent.scrollTo('top', 0);
            this.getClassOverview().getEl().down('.x-panel-body').scrollTo('top', 0);
        }

        this.currentCls = cls;
+3 −4
Original line number Diff line number Diff line
@@ -10,8 +10,7 @@ Ext.define('Docs.view.cls.Overview', {
        'Docs.Settings'
    ],

    id: 'doc-overview',
    cls: 'doc-tab iScroll',
    cls: 'class-overview iScroll',
    title: 'Overview',
    autoScroll: true,
    bodyPadding: '20',
@@ -26,7 +25,7 @@ Ext.define('Docs.view.cls.Overview', {
        if (el) {
            var isMember = el.hasCls("member");
            var scrollOffset = el.getY() - (isMember ? 145 : 135);
            var docContent = Ext.get(Ext.query('#doc-overview .x-panel-body')[0]);
            var docContent = this.getEl().down('.x-panel-body');
            var currentScroll = docContent.getScroll()['top'];
            docContent.scrollTo('top', currentScroll + scrollOffset, true);

@@ -62,7 +61,7 @@ Ext.define('Docs.view.cls.Overview', {

    renderClass: function(cls) {
        this.classTpl = this.classTpl || new Ext.XTemplate(
            '<div class="doc-overview-content">',
            '<div>',
                '{hierarchy}',
                '{doc}',
                '<div class="members">',
+3 −2
Original line number Diff line number Diff line
@@ -99,8 +99,9 @@ Ext.define('Docs.view.cls.Toolbar', {
            showCount: true,
            listeners: {
                click: function() {
                    Ext.getCmp('doc-overview').scrollToEl("#m-" + cfg.type);
                }
                    this.up('classoverview').scrollToEl("#m-" + cfg.type);
                },
                scope: this
            }
        });
    },
+4 −4
Original line number Diff line number Diff line
@@ -403,7 +403,7 @@ a:hover {
  border: 0; }


#doc-overview, #guide {
.class-overview, #guide {
  pre {
    background-color: #f7f7f7;
    border: solid 1px #e8e8e8;
@@ -422,7 +422,7 @@ a:hover {
  pre.prettyprint {
    padding: 10px 12px; } }

#doc-overview {
.class-overview {
  img.screenshot {
    display: block;
    padding: 10px 0; }
@@ -448,7 +448,7 @@ a:hover {
        background: none;
        padding-left: 15px; } } } }

#doc-overview, #guide {
.class-overview, #guide {
  min-height: 100px;
  .clr {
    clear: both; }
@@ -502,7 +502,7 @@ a:hover {
    display: none; } }


#doc-overview {
.class-overview {
  .deprecated-signature, .protected-signature, .static-signature {
    font-weight: bold;
    text-transform: uppercase;