Sha256: 1116a493925c7149e2371c51b48baf53a5e7d1bbe8f044cb0b502b525fe98f77

Contents?: true

Size: 694 Bytes

Versions: 6

Compression:

Stored size: 694 Bytes

Contents

module KlassExtension

  def join_classes *classes
    UiBibz::Utils::Screwdriver.join_classes classes
  end

  # Override this method to add a status class
  def status
  end

  private

  def initialize_component_html_classes
    cls = [
      html_options[:class],
      state,
      status,
      effect,
      options_classes,
      connect,
      component_html_classes
    ]
    html_options[:class] = join_classes(cls)
  end

  def effect
    options[:effect]
  end

  def options_classes
    options[:class] if options.kind_of?(Hash)
  end

  def state
    options[:state] unless options[:state].nil?
  end

  def connect
    "ui-bibz-connect" unless options[:connect].nil?
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ui_bibz-2.0.0.beta2.5 lib/ui_bibz/ui/extensions/core/component/klass_extension.rb
ui_bibz-2.0.0.beta2.4 lib/ui_bibz/ui/extensions/core/component/klass_extension.rb
ui_bibz-2.0.0.beta2.3 lib/ui_bibz/ui/extensions/core/component/klass_extension.rb
ui_bibz-2.0.0.beta2.2 lib/ui_bibz/ui/extensions/core/component/klass_extension.rb
ui_bibz-2.0.0.beta2.1 lib/ui_bibz/ui/extensions/core/component/klass_extension.rb
ui_bibz-2.0.0.beta2 lib/ui_bibz/ui/extensions/core/component/klass_extension.rb