class ExtPasswordfield

Public Class Methods

new(config, parent) click to toggle source
Calls superclass method ExtNode::new
# File lib/extclasses/passwordfield.rb, line 8
    def initialize(config, parent)
@default_config = {
  :width => 150,
  :autoCreate => {
    :tag => "input",
    :type => "password",
    :autocomplete => "off"
  }
}
if config[:autoCreate]
  @default_config.merge! config[:autoCreate]
  config.delete :autoCreate
end
if config[:emptyText]
  @default_config[:autoCreate][:placeholder] = config[:emptyText]
  config.delete :emptyText 
end
            super('textfield', config, parent)
    end