Sha256: dbee3e4ed3a6334b0dd3283ef1cdad8a2f55a1e01307d7f2da759bd17deca01b

Contents?: true

Size: 614 Bytes

Versions: 3

Compression:

Stored size: 614 Bytes

Contents

class PluginWithComponents < Netzke::Plugin
  js_configure do |c|
    c.init = <<-JS
      function(){
        this.callParent(arguments);
        this.cmp.tools = this.cmp.tools || [];
        this.cmp.tools.push({type: 'help', handler: function(){
          // we can instantiate this because it was eagerly loaded
          var w = this.netzkeInstantiateComponent('simple_window');
          w.show();
        }, scope: this});
      }
    JS
  end

  component :simple_window do |c|
    c.width = 300
    c.height = 200
    c.title = "Window added by PluginWithComponents"
    c.eager_loading = true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
netzke-core-0.8.4 test/core_test_app/app/components/plugin_with_components.rb
netzke-core-0.8.3 test/core_test_app/app/components/plugin_with_components.rb
netzke-core-0.8.2 test/core_test_app/app/components/plugin_with_components.rb