Class: SectionContentWidget

Inherits:
Widget
  • Object
show all
Defined in:
app/models/section_content_widget.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.fallback_colorsObject



24
25
26
# File 'app/models/section_content_widget.rb', line 24

def self.fallback_colors
  %w(transparent black gray light-gray red green blue yellow)
end

Instance Method Details

#scrivito_selectable_style_classesObject



15
16
17
18
19
20
21
# File 'app/models/section_content_widget.rb', line 15

def scrivito_selectable_style_classes
  if Obj.respond_to? 'scrivito_selectable_style_classes'
    Obj.scrivito_selectable_style_classes('SectionContentWidget')
  else
    ['border-top','border-bottom']
  end
end

#selectable_color_classesObject



7
8
9
10
11
12
13
# File 'app/models/section_content_widget.rb', line 7

def selectable_color_classes
  if Obj.respond_to?('selectable_color_classes')
    Obj.selectable_color_classes('section_content_widget', 'background_color')
  else
    SectionContentWidget.fallback_colors
  end
end