Class: ExtPanel

Inherits:
ExtNode show all
Includes:
Magic::Title
Defined in:
lib/extclasses/panel.rb

Constant Summary collapse

@@ALIAS_CONFIG =
{
  :text => :title
}

Instance Attribute Summary

Attributes inherited from ExtNode

#childs, #config, #deep_lvl, #default_config, #parent, #xtype

Instance Method Summary collapse

Methods included from Magic::Title

included

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(options, parent) ⇒ ExtPanel

Returns a new instance of ExtPanel.



8
9
10
11
12
13
14
15
16
# File 'lib/extclasses/panel.rb', line 8

def initialize(options, parent)
   @default_config = {
     :padding => 5,
     # :height => 200,

     :title => 'Title By Default',
     :autoHeight => true
   }
  super("panel", options, parent)  
end

Instance Method Details

#to_extjs(at_deep = 0) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/extclasses/panel.rb', line 18

def to_extjs(at_deep = 0)
  if find("toolbar", { :recursive => 1})
    @config.merge! :tbar => find("toolbar").to_extjs(at_deep + 1)
    self.remove_childs "toolbar"
  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