Sha256: bba39712aaf29d94dce35d76a0ef23b9bb6fbb93e911af24efe6383712dd1c78

Contents?: true

Size: 1.11 KB

Versions: 6

Compression:

Stored size: 1.11 KB

Contents

class CardComponentLoader < Netzke::Base
  js_property :layout, :card

  action :load_server_caller
  action :load_extended_server_caller

  js_property :bbar, [:load_server_caller.action, :load_extended_server_caller.action]

  component :server_caller
  component :extended_server_caller

  js_method :on_load_server_caller, <<-JS
    function(){
      var existing = this.items.findBy(function(i){ return i.getId() == this.getId() + "__server_caller"}, this);
      if (existing) this.getLayout().setActiveItem(existing); else this.loadNetzkeComponent({name: 'server_caller', container: this, append: true, callback: function(el){this.getLayout().setActiveItem(el)}, scope: this});
    }
  JS

  js_method :on_load_extended_server_caller, <<-JS
    function(){
      var existing = this.items.findBy(function(i){ return i.getId() == this.getId() + "__extended_server_caller"}, this);
      if (existing) this.getLayout().setActiveItem(existing); else this.loadNetzkeComponent({name: 'extended_server_caller', container: this, append: true, callback: function(el){this.getLayout().setActiveItem(el)}, scope: this});
    }
  JS
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
netzke-core-0.7.7 test/core_test_app/app/components/card_component_loader.rb
netzke-core-0.7.6 test/core_test_app/app/components/card_component_loader.rb
netzke-core-0.7.5 test/core_test_app/app/components/card_component_loader.rb
netzke-core-0.7.4 test/core_test_app/app/components/card_component_loader.rb
netzke-core-0.7.3 test/core_test_app/app/components/card_component_loader.rb
netzke-core-0.7.2 test/core_test_app/app/components/card_component_loader.rb