Commit 692891a8 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Remove the class/guide distinguishing logic.

This was a bogus/hacky implementation.  Not all classes in the world
will start with "Ext." - for example when we generate docs for this
very docs app itself.  Or deciding that class names can't be
all-lowercase.

Needs to be implemented properly.
parent b3dec0a6
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ Ext.define('Docs.controller.Classes', {
            },
            'classgrid': {
                classselect: function(cls) {
                    this.showPage(cls);
                    this.loadClass(cls);
                }
            },

@@ -227,14 +227,6 @@ Ext.define('Docs.controller.Classes', {
        });
    },

    showPage: function(pageName) {
        if (pageName.match(/^Ext./)) {
            this.loadClass(pageName);
        } else {
            this.showGuide(pageName);
        }
    },

    /**
     * Returns base URL used for making AJAX requests.
     * @return {String} URL
+2 −13
Original line number Diff line number Diff line
@@ -41,24 +41,13 @@ Ext.define('Docs.view.ClassGrid', {
                width: 18,
                dataIndex: 'cls',
                renderer: function(cls, data) {
                    if (cls.match(/^[a-z_]+$/)) {
                        data.tdCls = 'icon-guide';
                    } else {
                    data.tdCls = this.icons[cls];
                    }
                },
                scope: this
            },
            {
                dataIndex: 'cls',
                flex: true,
                renderer: function(cls, data) {
                    if (cls.match(/^[a-z_]+$/)) {
                        return Ext.Array.map(cls.split('_'), function(s) { return Ext.String.capitalize(s) }).join(" ");
                    } else {
                        return cls;
                    }
                }
                flex: true
            }
        ];