Sha256: 447e7c1f6b32db708b5d38712a7ffa6d0523cc65dc43f410c739670806b4e6c4
Contents?: true
Size: 546 Bytes
Versions: 8
Compression:
Stored size: 546 Bytes
Contents
module Netzke class ExtComponent attr_accessor :name def initialize(name, config = {}) @name = name @config = config end def config @config ||= {} end # Rendering def js_component_render %Q{Ext.ComponentManager.create("#{js_full_class_name}", #{config.to_nifty_json}).render("ext-#{name.to_s.split('_').join('-')}");} end # Container for rendering def js_component_html %Q{<div id="ext-#{name.to_s.split('_').join('-')}" class="ext-component"></div>} end end end
Version data entries
8 entries across 8 versions & 1 rubygems