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 +4 -4
- data/app/assets/javascripts/scrivito_icon_box_widget.js +1 -0
- data/app/assets/stylesheets/scrivito_icon_box_widget.css +5 -0
- data/app/assets/stylesheets/scrivito_icon_box_widget/application.css +4 -0
- data/app/assets/stylesheets/{icon_box_widget → scrivito_icon_box_widget}/base.css +0 -0
- data/app/assets/stylesheets/scrivito_icon_box_widget/colors.css +65 -0
- data/app/assets/stylesheets/{icon_box_widget → scrivito_icon_box_widget}/widget.css +0 -0
- data/app/models/icon_box_widget.rb +5 -5
- data/app/views/icon_box_widget/partials/_color_picker.html.erb +1 -1
- data/lib/scrivito_icon_box_widget/engine.rb +3 -0
- data/lib/scrivito_icon_box_widget/version.rb +1 -1
- metadata +8 -6
- data/app/assets/stylesheets/icon_box_widget/application.css +0 -5
- data/app/views/icon_box_widget/partials/_animation_select.erb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f956d0b4c18ffffe14a2988149f788a2dec89288
|
4
|
+
data.tar.gz: e48bafbbd7c8b63b6866afbe11831fa3baee2b32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26ad7dc23e7ca49fce65c96d67c5ec30e8729f2b9fbd59560207582b275971100d53b4dc346b901a4519357f16e09721bd67014053271c26eb2721fd271afd1e
|
7
|
+
data.tar.gz: 3a88b3e17721d448e988c731c4bb01e14975fc8bf76ea6392d6eac0cf725340a1a0c0346f5d82d1dbca2694ea2e94ac5a78b70338492bd6eacf1778b18ec3407
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require scrivito_advanced_editors
|
File without changes
|
@@ -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
|
+
}
|
File without changes
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class IconBoxWidget < Widget
|
2
2
|
|
3
|
-
def
|
4
|
-
if
|
5
|
-
|
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
|
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
|
-
|
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,
|
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
|
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.
|
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-
|
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/
|
93
|
-
- app/assets/stylesheets/
|
94
|
-
- app/assets/stylesheets/
|
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,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) %>
|