Method: ExtPasswordfield#initialize
- Defined in:
- lib/extclasses/passwordfield.rb
#initialize(config, parent) ⇒ ExtPasswordfield
Returns a new instance of ExtPasswordfield.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# 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 |