Class: ExtWindow
- Includes:
- Magic::Title
- Defined in:
- lib/extclasses/window.rb
Instance Attribute Summary
Attributes inherited from ExtNode
#childs, #config, #deep_lvl, #default_config, #parent, #xtype
Instance Method Summary collapse
-
#initialize(config, parent) ⇒ ExtWindow
constructor
A new instance of ExtWindow.
- #to_extjs(at_deep = 0) ⇒ Object
Methods included from Magic::Title
Methods inherited from ExtNode
#add_child, #apply_config, before_to_extjs, #build_abstract_function, #child_of?, #child_of_form?, #collect_events, #collect_ref, #conv_id_to_label, #conv_id_to_name, #conv_id_to_ref, #do_alias_config, #do_layout, #find, #find_field_elements, #find_parent, #get_all_siblings, get_before_filters, #get_deep, get_events, get_refs, #has_child?, #is_field_element?, #override_config, #prepare_config, #remove_childs, #remove_config, reset_generator_config, #root?, set_generator_config, #set_parent
Constructor Details
#initialize(config, parent) ⇒ ExtWindow
Returns a new instance of ExtWindow.
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/extclasses/window.rb', line 4 def initialize(config, parent) @default_config = { y: 10, width: 500, layout: "anchor", title: "My Window", maximizable: true, modal: true, padding: "0.5em" } super "window", config, parent end |
Instance Method Details
#to_extjs(at_deep = 0) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/extclasses/window.rb', line 17 def to_extjs(at_deep = 0) if @childs.last.xtype == "toolbar" @config.merge! :fbar => @childs.last.to_extjs(at_deep + 1) @childs.pop end if @childs.first.xtype == "toolbar" @config.merge! :tbar => @childs.first.to_extjs(at_deep + 1) @childs.slice!(0) end # if find("paging",{:recursive => 1}) # @config.merge! :bbar => find("paging").to_extjs(at_deep + 1) # self.remove_childs "paging" # end super at_deep end |