Sha256: ba5dd2d9ea9c396e724f0d513cdf1feb2bfc269ab308b5c158fa5ffdebab0632

Contents?: true

Size: 527 Bytes

Versions: 5

Compression:

Stored size: 527 Bytes

Contents

class AccordionPanelWidget < Widget
  attribute :title, :string, default: 'New Panel'
  attribute :content, :widgetlist

  attribute :background_color, :string

  def self.valid_container_classes
    [AccordionWidget]
  end

  def self.description_for_editor
    'Panel'
  end

  def scrivito_selectable_color_classes
    helper = ApplicationController.helpers
    if helper.respond_to? 'scrivito_selectable_color_classes'
      helper.scrivito_selectable_color_classes('accordion_widget', 'background_color')
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
scrivito_accordion_widget-1.2.1 app/models/accordion_panel_widget.rb
scrivito_accordion_widget-1.2.0 app/models/accordion_panel_widget.rb
scrivito_accordion_widget-1.1.3 app/models/accordion_panel_widget.rb
scrivito_accordion_widget-1.1.2 app/models/accordion_panel_widget.rb
scrivito_accordion_widget-1.1.0 app/models/accordion_panel_widget.rb