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

Refactoring and cleanup.

- Add doc-comments to all classes.
- Add missing semicolons, remove trailing commas.
- Use Ext.Array.forEach instead of strange for-loop.
- Use === instead of ==.
- Rmove some commented-out code.
- Several other code style improvements.
parent a12e6eb2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -47,8 +47,8 @@ Ext.define('Docs.Application', {
        }

        setInterval(function(){
            Ext.DomQuery.select('link')[4].href = "resources/css/viewport.css?" + Math.ceil(Math.random() * 100000000)
        }, 1000)
            Ext.DomQuery.select('link')[4].href = "resources/css/viewport.css?" + Math.ceil(Math.random() * 100000000);
        }, 1000);
    }

});
+1 −1
Original line number Diff line number Diff line
/**
 * Controller for Welcome page
 * Base class for Classes controller.
 */
Ext.define('Docs.controller.Content', {
    extend: 'Ext.app.Controller',
+3 −3
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ Ext.define('Docs.controller.Examples', {
    ],

    init: function() {

        this.addEvents(
            /**
             * @event showExample
@@ -44,8 +43,9 @@ Ext.define('Docs.controller.Examples', {
    },

    loadExample: function(url, noHistory) {

        if (this.activeUrl === url) return this.activateExampleCard();
        if (this.activeUrl === url) {
            return this.activateExampleCard();
        }
        this.activeUrl = url;

        noHistory || Docs.History.push(url);
+3 −2
Original line number Diff line number Diff line
@@ -92,12 +92,13 @@ Ext.define('Docs.controller.Guides', {
     * @param {Boolean} noHistory  true to disable adding entry to browser history
     */
    loadGuide: function(url, noHistory) {

        Ext.getCmp('card-panel').layout.setActiveItem('guide');
        Ext.getCmp('tree-container').show();
        Ext.getCmp('tree-container').layout.setActiveItem(2);

        if (this.activeUrl === url) return this.scrollContent();
        if (this.activeUrl === url) {
            return this.scrollContent();
        }
        this.activeUrl = url;

        noHistory || Docs.History.push(url);
+0 −2
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ Ext.define('Docs.controller.Tabs', {
    ],

    init: function() {

        this.getController('Classes').addListener({
            showClass: function(cls) {
                this.addTabFromTree("/api/"+cls, this.getClassTree());
@@ -77,7 +76,6 @@ Ext.define('Docs.controller.Tabs', {
     * @private
     */
    addTabIconListeners: function(cmp) {

        cmp.el.addListener('mouseover', function(event, el) {
            Ext.get(el).addCls('ovr');
        }, this, {
Loading