Sha256: b01897b187ef0315347d5fa305f6b33118d7387fe3255459cec4104a8ec13c42
Contents?: true
Size: 945 Bytes
Versions: 1
Compression:
Stored size: 945 Bytes
Contents
require 'glimmer/swt/widget_proxy' module Glimmer module SWT class ButtonProxy < WidgetProxy attr_reader :text def text=(value) @text = value redraw end def element 'button' end def observation_request_to_event_mapping { 'on_widget_selected' => { event: 'click' }, } end def dom input_text = @text input_id = id input_style = css input_args = {} input_disabled = @enabled ? {} : {'disabled': 'disabled'} input_args = input_args.merge(type: 'password') if has_style?(:password) @dom ||= html { button(input_args.merge(id: input_id, class: name, style: input_style, style: 'min-width: 27px;').merge(input_disabled)) { input_text.to_s == '' ? ' ' : input_text } }.to_s end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
glimmer-dsl-opal-0.1.0 | lib/glimmer/swt/button_proxy.rb |