Sha256: 1308ebab117d5c010038d14f6db36365026c0e0268de85a97ed2c8044ddb8229

Contents?: true

Size: 1.46 KB

Versions: 3

Compression:

Stored size: 1.46 KB

Contents

{
  initComponent: function () {
    this.callParent();

    this.mainPanel = this.down('panel[itemId="main_panel"]');
    this.menuBar = this.down('container[itemId="menu_bar"]');
    var statusBar = this.statusBar = this.down('container[itemId="status_bar"]');

    // Setting the "busy" indicator for Ajax requests
    Ext.Ajax.on('beforerequest', function () {
      statusBar.showBusy();
    });
    Ext.Ajax.on('requestcomplete', function () {
      statusBar.hideBusy();
    });
    Ext.Ajax.on('requestexception', function () {
      statusBar.hideBusy();
    });

    this.setRouting();
    this.netzkeInitComponentCallback();
  },

  setRouting: function () {
    this.router = Ext.util.History;
    this.router.init();
    this.router.on('change', this.loadRoute, this);
  },

  loadRoute: function (token) {
    if (token) {
      this.netzkeLoadComponent(token, {
        container: this.mainPanel
      });
    } else {
      this.mainPanel.removeAll();
    }
  },

  afterRender: function () {
    this.callParent();
    var currentToken = this.router.getToken();
    if (typeof currentToken == "string" && currentToken.length > 0) {
      this.loadRoute(currentToken);
    }
  },

  appLoadComponent: function (name) {
    this.router.add(name);
  },

  netzkeLoadComponentByAction: function (action) {
    this.router.add(action.name.underscore());
  },

  onToggleConfigMode: function (params) {
    this.toggleConfigMode();
  },

  netzkeInitComponentCallback: function() {
  },
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
marty-8.4.1 app/components/marty/simple_app/client/simple_app.js
marty-8.3.1 app/components/marty/simple_app/client/simple_app.js
marty-8.2.0 app/components/marty/simple_app/client/simple_app.js