Class: ExtBooleancolumn

Inherits:
ExtNode show all
Includes:
Magic::Column
Defined in:
lib/extclasses/booleancolumn.rb

Constant Summary collapse

@@ALIAS_CONFIG =
{
  :text => :header,
  :name => :dataIndex
}

Instance Attribute Summary

Attributes inherited from ExtNode

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

Instance Method Summary collapse

Methods included from Magic::Column

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(config, parent) ⇒ ExtBooleancolumn

Returns a new instance of ExtBooleancolumn.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/extclasses/booleancolumn.rb', line 8

def initialize(config, parent)
  @default_config = {
    trueText: "yes",
    falseText: "no",
    align: "center",
    width: 45
  }

  if parent.xtype ==  "editorgrid"
    super "checkcolumn", config, parent
  else
    super "booleancolumn", config, parent
  end
end

Instance Method Details

#to_extjs(at_deep = 0) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/extclasses/booleancolumn.rb', line 23

def to_extjs(at_deep = 0)
  if parent.xtype ==  "editorgrid"
    self.xtype = "checkcolumn" 
  else
    self.xtype = "booleancolumn" 
  end
  # if self.child_of? "editorgrid"
  #   @config.merge! :editor => { :xtype => "checkbox", :boxLabel => "Check" }
  # end
  super at_deep 
end