class ExtBooleancolumn

Public Class Methods

new(config, parent) click to toggle source
Calls superclass method ExtNode::new
# 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

Public Instance Methods

to_extjs(at_deep = 0) click to toggle source
Calls superclass method ExtNode#to_extjs
# 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