Class: ExtCheckbox
- Includes:
- FormField
- Defined in:
- lib/extclasses/checkbox.rb
Constant Summary collapse
- @@ALIAS_CONFIG =
{ :text => :boxLabel, :ltext => :fieldLabel, :rtext => :boxLabel, :default => :checked }
Instance Attribute Summary
Attributes inherited from ExtNode
#childs, #config, #deep_lvl, #default_config, #parent, #xtype
Instance Method Summary collapse
-
#initialize(config, parent) ⇒ ExtCheckbox
constructor
A new instance of ExtCheckbox.
- #to_extjs(at_dept = 0) ⇒ Object
Methods included from FormField
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) ⇒ ExtCheckbox
Returns a new instance of ExtCheckbox.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/extclasses/checkbox.rb', line 11 def initialize(config, parent) @default_config = { :fieldLabel => "<b></b>", :labelAlign => "right", :boxLabelAlign => "after", :hideLabel => false, :cls => "checkbox" } super "checkboxfield", config, parent end |
Instance Method Details
#to_extjs(at_dept = 0) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/extclasses/checkbox.rb', line 23 def to_extjs(at_dept = 0) if self.find_parent("checkboxgroup") @config.merge! :hideLabel => true end super at_dept end |