Sha256: 93e1dc737f004ee7bdf168979023f5b6d2f7d54bf4f49d75b8db158eb000f99a

Contents?: true

Size: 658 Bytes

Versions: 8

Compression:

Stored size: 658 Bytes

Contents

module Netzke
  # The following methods are used when a component is generated stand-alone (as a part of a HTML page)
  module Embedding

    # Instantiating
    def js_component_instance
      %Q{Netzke.page.#{name.jsonify} = Ext.create("#{self.class.js_alias}", #{js_config.to_nifty_json});}
    end

    # Rendering
    def js_component_render
      %Q{Netzke.page.#{name.jsonify}.render("#{name.to_s.split('_').join('-')}-netzke");} unless self.class.js_xtype == "netzkewindow"
    end

    # Container for rendering
    def js_component_html
      %Q{<div id="#{name.to_s.split('_').join('-')}-netzke" class="netzke-component"></div>}
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
netzke-core-0.7.7 lib/netzke/embedding.rb
netzke-core-0.7.6 lib/netzke/embedding.rb
netzke-core-0.7.5 lib/netzke/embedding.rb
netzke-core-0.7.4 lib/netzke/embedding.rb
netzke-core-0.7.3 lib/netzke/embedding.rb
netzke-core-0.7.2 lib/netzke/embedding.rb
netzke-core-0.7.1 lib/netzke/embedding.rb
netzke-core-0.7.0 lib/netzke/embedding.rb