Sha256: b8b9c97606ccf6dfb3f412907830ec64ff4865ecfd62ed52449d7d0631b38793

Contents?: true

Size: 766 Bytes

Versions: 11

Compression:

Stored size: 766 Bytes

Contents

{
  netzkeTabComponentDelivered: function(c, config) {
    var tab,
        i,
        activeTab = this.getActiveTab(),
        cmp = Ext.ComponentManager.create(Ext.apply(c, {closable: true}));

    if (config.newTab || activeTab == null) {
      tab = this.add(cmp);
    } else {
      tab = this.getActiveTab();
      i = this.items.indexOf(tab);
      this.remove(tab);
      tab = this.insert(i, cmp);
    }

    this.setActiveTab(tab);
  },

  netzkeLoadComponentByClass: function(klass, options) {
    this.netzkeLoadComponent('child', Ext.apply(options, {
      configOnly: true,
      clone: true,
      clientConfig: Ext.apply(options.clientConfig || {}, {klass: klass}),
      callback: this.netzkeTabComponentDelivered,
      scope: this,
    }));
  }
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
netzke-basepack-0.12.9 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js
netzke-basepack-0.12.8 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js
netzke-basepack-0.12.7 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js
netzke-basepack-0.12.6 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js
netzke-basepack-0.12.5 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js
netzke-basepack-0.12.4 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js
netzke-basepack-0.12.3 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js
netzke-basepack-0.12.2 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js
netzke-basepack-0.12.1 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js
netzke-basepack-0.12.0 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js
netzke-basepack-0.12.0.rc1 lib/netzke/basepack/dynamic_tab_panel/javascripts/dynamic_tab_panel.js