scrivito_icon_box_widget 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee1ad31f6fe894b4e29796a98e1813a51b47f77e
4
- data.tar.gz: a52ad85a34613dbb6dde76e88d501d671c3ec38d
3
+ metadata.gz: f956d0b4c18ffffe14a2988149f788a2dec89288
4
+ data.tar.gz: e48bafbbd7c8b63b6866afbe11831fa3baee2b32
5
5
  SHA512:
6
- metadata.gz: 72068aa03af28058fe6235ba5657ef0b5cfb7e9989fcf0dd617abe47b25bbf448801ee8eaa8a447f39ad8af8fbb4fff4750d1b14031567ead7f58caadd58d2d0
7
- data.tar.gz: 8b1212ebb21402d2285dd6561288980f3b79d1cadda7137fd4cbb42d30e7e5c14ae1169403f12cef7abc6be355c3e0be733e44a2d377e8a76b8cd72dfce89e93
6
+ metadata.gz: 26ad7dc23e7ca49fce65c96d67c5ec30e8729f2b9fbd59560207582b275971100d53b4dc346b901a4519357f16e09721bd67014053271c26eb2721fd271afd1e
7
+ data.tar.gz: 3a88b3e17721d448e988c731c4bb01e14975fc8bf76ea6392d6eac0cf725340a1a0c0346f5d82d1dbca2694ea2e94ac5a78b70338492bd6eacf1778b18ec3407
@@ -0,0 +1 @@
1
+ //= require scrivito_advanced_editors
@@ -0,0 +1,5 @@
1
+ /*
2
+ *= require font-awesome
3
+ *= require scrivito_advanced_editors
4
+ *= require_tree ./scrivito_icon_box_widget
5
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ *= require font-awesome
3
+ *= require_tree ./
4
+ */
@@ -0,0 +1,65 @@
1
+ /* background colors */
2
+ .transparent {
3
+ background-color: transparent !important;
4
+ }
5
+
6
+ .black {
7
+ background-color: #33312d !important;
8
+ }
9
+
10
+ .gray {
11
+ background-color: #a0a0a0 !important;
12
+ }
13
+
14
+ .light-gray {
15
+ background-color: #eee !important;
16
+ }
17
+
18
+ .red {
19
+ background-color: #c5463f !important;
20
+ }
21
+
22
+ .green {
23
+ background-color: #439439 !important;
24
+ }
25
+
26
+ .blue {
27
+ background-color: #3f86ac !important;
28
+ }
29
+
30
+ .yellow {
31
+ background-color: #e1d00e !important;
32
+ }
33
+
34
+ /* icon colors */
35
+ i.transparent {
36
+ color: transparent !important;
37
+ }
38
+
39
+ i.black {
40
+ color: #33312d !important;
41
+ }
42
+
43
+ i.gray {
44
+ color: #a0a0a0 !important;
45
+ }
46
+
47
+ i.light-gray {
48
+ color: #eee !important;
49
+ }
50
+
51
+ i.red {
52
+ color: #c5463f !important;
53
+ }
54
+
55
+ i.green {
56
+ color: #439439 !important;
57
+ }
58
+
59
+ i.blue {
60
+ color: #3f86ac !important;
61
+ }
62
+
63
+ i.yellow {
64
+ color: #e1d00e !important;
65
+ }
@@ -1,10 +1,10 @@
1
1
  class IconBoxWidget < Widget
2
2
 
3
- def self.colors
4
- if Rails.configuration.respond_to?(:icon_box_colors)
5
- Rails.configuration.icon_box_colors.split(" ")
3
+ def selectable_color_classes(class_name, attribute)
4
+ if Obj.respond_to?('selectable_color_classes')
5
+ Obj.selectable_color_classes(class_name, attribute)
6
6
  else
7
- IconBoxWidget.fallback_colors.split(" ")
7
+ IconBoxWidget.fallback_colors
8
8
  end
9
9
  end
10
10
 
@@ -18,6 +18,6 @@ class IconBoxWidget < Widget
18
18
 
19
19
  private
20
20
  def self.fallback_colors
21
- "transparent #000000 #585858 #d9d9d9 #FFFFFF #003380 #6699CC #CC0000"
21
+ %w(transparent black gray light-gray red green blue yellow)
22
22
  end
23
23
  end
@@ -1,4 +1,4 @@
1
- <%= scrivito_toggle_button_editor(widget, attribute, Obj.selectable_color_classes(widget.obj_class.name, attribute)) do |elem|
1
+ <%= scrivito_toggle_button_editor(widget, attribute, widget.selectable_color_classes(widget.obj_class.name, attribute)) do |elem|
2
2
  scrivito_tag(:button, widget, attribute, class: "#{elem == widget.send(attribute) ? 'active' : ''} #{elem}", data: {editor: 'scrivito-toggle-button', content: elem}) do
3
3
  elem
4
4
  end
@@ -1,3 +1,6 @@
1
+ require 'scrivito_advanced_editors'
2
+ require 'font-awesome-rails'
3
+
1
4
  module ScrivitoIconBoxWidget
2
5
  class Engine < ::Rails::Engine
3
6
  isolate_namespace ScrivitoIconBoxWidget
@@ -1,3 +1,3 @@
1
1
  module ScrivitoIconBoxWidget
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_icon_box_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-02 00:00:00.000000000 Z
11
+ date: 2015-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -89,12 +89,14 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - LICENSE
91
91
  - Rakefile
92
- - app/assets/stylesheets/icon_box_widget/application.css
93
- - app/assets/stylesheets/icon_box_widget/base.css
94
- - app/assets/stylesheets/icon_box_widget/widget.css
92
+ - app/assets/javascripts/scrivito_icon_box_widget.js
93
+ - app/assets/stylesheets/scrivito_icon_box_widget.css
94
+ - app/assets/stylesheets/scrivito_icon_box_widget/application.css
95
+ - app/assets/stylesheets/scrivito_icon_box_widget/base.css
96
+ - app/assets/stylesheets/scrivito_icon_box_widget/colors.css
97
+ - app/assets/stylesheets/scrivito_icon_box_widget/widget.css
95
98
  - app/models/icon_box_widget.rb
96
99
  - app/views/icon_box_widget/details.html.erb
97
- - app/views/icon_box_widget/partials/_animation_select.erb
98
100
  - app/views/icon_box_widget/partials/_color_picker.html.erb
99
101
  - app/views/icon_box_widget/partials/_icons_picker.html.erb
100
102
  - app/views/icon_box_widget/show.html.erb
@@ -1,5 +0,0 @@
1
- /*
2
- *= require font-awesome
3
- *= require icon_box_widget/base
4
- *= require icon_box_widget/widget
5
- */
@@ -1,12 +0,0 @@
1
- <%= scrivito_toggle_button_editor(widget, attribute, IconBoxWidget.icons) %>
2
-
3
- <h4>Different Icon</h4>
4
- <div class="alert alert-info">
5
- <p>More Icons can be found at
6
- <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank"><strong>Font Awesome</strong></a>.
7
- </p>
8
- <p>
9
- Use only the name of the icon without fa. For Example the icon <i>fa fa-car</i>, use only <strong>car</strong>
10
- </p>
11
- </div>
12
- <%= scrivito_tag(:div, widget, attribute) %>