scrivito_advanced_editors 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/scripts/scrivito_tabs.js +6 -4
- data/app/assets/stylesheets/scrivito_advanced_editors/color_picker.css.scss +10 -0
- data/app/assets/stylesheets/scrivito_advanced_editors/{scrivito_dialog.css → scrivito_dialog.css.scss} +11 -2
- data/app/assets/stylesheets/scrivito_advanced_editors/scrivito_tabs.css +10 -5
- data/app/helpers/scrivito_advanced_editors/scrivito_advanced_tag_helper.rb +4 -3
- data/lib/scrivito_advanced_editors/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b27b6cd44c8c7986a24697828d93333a7b5a1488
|
4
|
+
data.tar.gz: 77e6a7c4bea27ba81948013f6672f6dd566d10c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7964f367f3909d6ae991e5150adc5a1da9919b27bbcf10d75e44a2cdc9680a08390f72ca2c47b1171d199091df1620ee2e390285d3e3df58167bb208e1bbaad7
|
7
|
+
data.tar.gz: a16d7ec6d09949fd94227c913f83bd10551ffc62fd738791b65096c2979f495939f45cacbda5b1990c3ae38e5abf30185410e85c1b404ec78b49f9874a83c8ba
|
@@ -10,10 +10,12 @@
|
|
10
10
|
|
11
11
|
tab_list.on('click', 'li', function() {
|
12
12
|
var target = $(this).data('panel-target');
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
if(!$(this).hasClass('inactive')) {
|
14
|
+
$(target).siblings('.active').removeClass('active');
|
15
|
+
$(this).siblings('.active').removeClass('active');
|
16
|
+
$(target).addClass('active');
|
17
|
+
$(this).addClass('active');
|
18
|
+
}
|
17
19
|
});
|
18
20
|
});
|
19
21
|
});
|
@@ -1,9 +1,9 @@
|
|
1
|
-
.
|
1
|
+
.scrivito_dialog abbr {
|
2
2
|
color: #444;
|
3
3
|
font-size: 13px;
|
4
4
|
}
|
5
5
|
|
6
|
-
.
|
6
|
+
.scrivito_dialog abbr:after {
|
7
7
|
content: "?";
|
8
8
|
}
|
9
9
|
|
@@ -27,4 +27,13 @@
|
|
27
27
|
background: #eee;
|
28
28
|
padding: 10px;
|
29
29
|
margin: 5px -10px -10px;
|
30
|
+
}
|
31
|
+
|
32
|
+
.scrivito_content_group {
|
33
|
+
h1,h2,h3,h4,h5,h6 {
|
34
|
+
small {
|
35
|
+
color: #bbb;
|
36
|
+
margin-left: 20px;
|
37
|
+
}
|
38
|
+
}
|
30
39
|
}
|
@@ -8,28 +8,33 @@
|
|
8
8
|
border-radius: 4px;
|
9
9
|
}
|
10
10
|
|
11
|
-
.tab-list li {
|
11
|
+
.tab-list li[data-panel-target] {
|
12
12
|
float: left;
|
13
|
-
padding: 5px 10px;
|
14
13
|
cursor: pointer;
|
15
14
|
background: #f3f3f3;
|
16
15
|
color: #666;
|
17
16
|
padding: 8px;
|
18
17
|
}
|
19
18
|
|
20
|
-
.tab-list li:hover {
|
19
|
+
.tab-list li[data-panel-target]:hover {
|
21
20
|
background: #fff;
|
22
21
|
}
|
23
22
|
|
24
|
-
.tab-list li.active {
|
23
|
+
.tab-list li[data-panel-target].active {
|
25
24
|
background: #444;
|
26
25
|
color: #f3f3f3;
|
27
26
|
}
|
28
27
|
|
29
|
-
.tab-list li.active:hover {
|
28
|
+
.tab-list li[data-panel-target].active:hover {
|
30
29
|
background: #888;
|
31
30
|
}
|
32
31
|
|
32
|
+
.tab-list li.inactive {
|
33
|
+
color: #aaa;
|
34
|
+
float: left;
|
35
|
+
padding: 8px;
|
36
|
+
}
|
37
|
+
|
33
38
|
.tab-panels .tab-panel {
|
34
39
|
display: none;
|
35
40
|
}
|
@@ -39,7 +39,7 @@ module ScrivitoAdvancedEditors
|
|
39
39
|
|
40
40
|
def fallback_toggle_button(obj, attribute, elem, active, type)
|
41
41
|
content = elem.is_a?(Hash) ? elem : content_hash(elem)
|
42
|
-
scrivito_tag(:button, obj, attribute, class: (css_class(elem, active
|
42
|
+
scrivito_tag(:button, obj, attribute, class: (content[:css] + " " + css_class(elem, active)), style: content[:style], data: data_attribute(content, type)) do
|
43
43
|
content[:caption]
|
44
44
|
end
|
45
45
|
end
|
@@ -58,7 +58,7 @@ module ScrivitoAdvancedEditors
|
|
58
58
|
content: color,
|
59
59
|
caption: (color.present? ? color : 'no selection'),
|
60
60
|
style: '',
|
61
|
-
css: color,
|
61
|
+
css: "color-select #{color == "" ? "none" : color}",
|
62
62
|
}
|
63
63
|
end
|
64
64
|
|
@@ -75,7 +75,8 @@ module ScrivitoAdvancedEditors
|
|
75
75
|
|
76
76
|
def css_class(elem, active)
|
77
77
|
return '' if active.nil?
|
78
|
-
return active == elem ? 'active' : '' if
|
78
|
+
return active == elem[:content] ? 'active' : '' if elem.is_a? Hash
|
79
|
+
return active == elem ? 'active' : '' if elem.is_a? String
|
79
80
|
active.include?(elem) ? 'active' : ''
|
80
81
|
end
|
81
82
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_advanced_editors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,9 +86,10 @@ files:
|
|
86
86
|
- app/assets/javascripts/scripts/scrivito_toggle_button.js
|
87
87
|
- app/assets/javascripts/scrivito_advanced_editors.js
|
88
88
|
- app/assets/stylesheets/scrivito_advanced_editors.css
|
89
|
+
- app/assets/stylesheets/scrivito_advanced_editors/color_picker.css.scss
|
89
90
|
- app/assets/stylesheets/scrivito_advanced_editors/create_obj.css
|
90
91
|
- app/assets/stylesheets/scrivito_advanced_editors/jquery.tag-editor.css
|
91
|
-
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_dialog.css
|
92
|
+
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_dialog.css.scss
|
92
93
|
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_mutli_select_button.css.scss
|
93
94
|
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_tabs.css
|
94
95
|
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_toggle_button.css
|