scrivito_advanced_editors 0.0.9 → 0.0.10
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_dialog.js +15 -0
- data/app/assets/stylesheets/scrivito_advanced_editors/jquery.tag-editor.css +3 -3
- data/app/assets/stylesheets/scrivito_advanced_editors/scrivito_dialog.css +19 -29
- data/app/assets/stylesheets/scrivito_advanced_editors/scrivito_tabs.css +9 -4
- data/app/assets/stylesheets/scrivito_advanced_editors/textarea_editor.css.scss +7 -0
- data/app/helpers/scrivito_advanced_editors/scrivito_advanced_tag_helper.rb +14 -1
- data/app/views/scrivito_advanced_editors/_color_picker.html.erb +5 -0
- data/lib/scrivito_advanced_editors/version.rb +1 -1
- metadata +6 -4
- data/app/assets/stylesheets/scrivito_advanced_editors/styles.css +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6812757790c4b39db1e079941b07335eeb49d689
|
4
|
+
data.tar.gz: d153d49a8623dd765c6f5a9a765cb733e8e52c79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b13224bfbac76e597ff861d7a8358f5dffd35fd80c298ec19dd499a0624ff8c9832c165608ee786346d3f9249a2aa9f7a40c5b241f29246f95de16ab7ef5959
|
7
|
+
data.tar.gz: e06893831b87eedfe44ff79e625d6d853714d278f3632435acab762060a1d7be1e79e02adbaf2dec54df2e8380972fe84d37554b04c2babb43e0fc3b0848bbf5
|
@@ -0,0 +1,15 @@
|
|
1
|
+
(function($, App) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
$(function() {
|
5
|
+
scrivito.on('content', function(content) {
|
6
|
+
$(content).find('[data-scrivito-tab-toggle-details]').on('click', function() {
|
7
|
+
var tab_details_link = $(this);
|
8
|
+
var tab_details_id = tab_details_link.attr('data-scrivito-tab-toggle-details');
|
9
|
+
var tab_details = tab_details_link.parent().find('.scrivito-tab-details-'+tab_details_id);
|
10
|
+
tab_details.toggle();
|
11
|
+
return false;
|
12
|
+
});
|
13
|
+
});
|
14
|
+
});
|
15
|
+
})(jQuery, this);
|
@@ -16,7 +16,7 @@
|
|
16
16
|
/* core styles usually need no change */
|
17
17
|
.tag-editor li { display: block; float: left; overflow: hidden; margin: 3px 0; line-height: 1.5; }
|
18
18
|
.tag-editor div { float: left; padding: 0 4px; }
|
19
|
-
.tag-editor .placeholder { padding:
|
19
|
+
.tag-editor .placeholder { padding: 3px 8px; color: #bbb; }
|
20
20
|
.tag-editor .tag-editor-spacer { padding: 0; width: 8px; overflow: hidden; color: transparent; background: none; }
|
21
21
|
.tag-editor input {
|
22
22
|
vertical-align: inherit; border: 0; outline: none; padding: 0; margin: 0; cursor: text;
|
@@ -32,7 +32,7 @@
|
|
32
32
|
.tag-editor .tag-editor-tag {
|
33
33
|
padding: 3px 5px;
|
34
34
|
color: #fff;
|
35
|
-
background: #
|
35
|
+
background: #444;
|
36
36
|
white-space: nowrap;
|
37
37
|
overflow: hidden;
|
38
38
|
cursor: pointer;
|
@@ -41,7 +41,7 @@
|
|
41
41
|
|
42
42
|
/* delete icon */
|
43
43
|
.tag-editor .tag-editor-delete {
|
44
|
-
background: #
|
44
|
+
background: #444;
|
45
45
|
color: #fff;
|
46
46
|
cursor: pointer;
|
47
47
|
padding: 3px 0;
|
@@ -1,40 +1,30 @@
|
|
1
|
-
.details-view
|
2
|
-
|
3
|
-
|
4
|
-
font-size: 18px;
|
5
|
-
line-height: 22px;
|
6
|
-
color: #439439;
|
7
|
-
font-weight: bold;
|
8
|
-
}
|
9
|
-
|
10
|
-
.details-view h4:first-child {
|
11
|
-
margin-top: 10px;
|
1
|
+
.details-view abbr {
|
2
|
+
color: #444;
|
3
|
+
font-size: 13px;
|
12
4
|
}
|
13
5
|
|
14
|
-
.details-view
|
15
|
-
|
16
|
-
padding: 0;
|
17
|
-
font-size: 14px;
|
18
|
-
line-height: 19px;
|
19
|
-
color: #439439;
|
20
|
-
font-weight: bold;
|
6
|
+
.details-view abbr:after {
|
7
|
+
content: "?";
|
21
8
|
}
|
22
9
|
|
23
|
-
.
|
24
|
-
|
10
|
+
.scrivito-tab-title-details {
|
11
|
+
background: #ddd;
|
12
|
+
padding: 10px;
|
13
|
+
margin-bottom: 2px;
|
25
14
|
}
|
26
15
|
|
27
|
-
.details
|
28
|
-
|
29
|
-
font-size: 13px;
|
16
|
+
.scrivito-tab-title-details h4 {
|
17
|
+
display: inline;
|
30
18
|
}
|
31
19
|
|
32
|
-
|
33
|
-
|
20
|
+
[data-scrivito-tab-toggle-details] {
|
21
|
+
font-size: 12px;
|
22
|
+
padding-left: 5px;
|
34
23
|
}
|
35
24
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
25
|
+
[class^=scrivito-tab-details-] {
|
26
|
+
display: none;
|
27
|
+
background: #eee;
|
28
|
+
padding: 10px;
|
29
|
+
margin-top: 5px;
|
40
30
|
}
|
@@ -3,26 +3,31 @@
|
|
3
3
|
list-style: none;
|
4
4
|
margin-top: 0;
|
5
5
|
padding: 0;
|
6
|
+
box-shadow: 0 0 3px rgba(0,0,0,0.25);
|
7
|
+
background-color: #f3f3f3;
|
8
|
+
border-radius: 4px;
|
6
9
|
}
|
7
10
|
|
8
11
|
.tab-list li {
|
9
12
|
float: left;
|
10
13
|
padding: 5px 10px;
|
11
14
|
cursor: pointer;
|
12
|
-
background: #
|
15
|
+
background: #f3f3f3;
|
16
|
+
color: #666;
|
17
|
+
padding: 8px;
|
13
18
|
}
|
14
19
|
|
15
20
|
.tab-list li:hover {
|
16
|
-
background: #
|
21
|
+
background: #fff;
|
17
22
|
}
|
18
23
|
|
19
24
|
.tab-list li.active {
|
20
25
|
background: #444;
|
21
|
-
color: #
|
26
|
+
color: #f3f3f3;
|
22
27
|
}
|
23
28
|
|
24
29
|
.tab-list li.active:hover {
|
25
|
-
background: #
|
30
|
+
background: #888;
|
26
31
|
}
|
27
32
|
|
28
33
|
.tab-panels .tab-panel {
|
@@ -12,8 +12,21 @@ module ScrivitoAdvancedEditors
|
|
12
12
|
|
13
13
|
content_tag :div, buttons, class: 'button_list'
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
|
+
def scrivito_selectable_color_classes(class_name, attribute)
|
17
|
+
if Obj.respond_to?('selectable_color_classes')
|
18
|
+
Obj.selectable_color_classes(class_name, attribute)
|
19
|
+
else
|
20
|
+
fallback_colors
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
16
24
|
private
|
25
|
+
|
26
|
+
def fallback_colors
|
27
|
+
%w(transparent black gray light-gray red green blue yellow)
|
28
|
+
end
|
29
|
+
|
17
30
|
def fallback_toggle_button(obj, attribute, elem, active)
|
18
31
|
scrivito_tag(:button, obj, attribute, class: css_class(elem, active), data: data_attribute(elem)) do
|
19
32
|
elem.to_s
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<%= scrivito_toggle_button_editor(widget, attribute, scrivito_selectable_color_classes(widget.class.to_s, attribute)) do |elem|
|
2
|
+
scrivito_tag(:button, widget, attribute, class: "#{elem == widget.send(attribute) ? 'active' : ''} #{elem}", data: {editor: 'scrivito-toggle-button', content: elem}) do
|
3
|
+
elem
|
4
|
+
end
|
5
|
+
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- app/assets/javascripts/scripts/create_obj.js
|
79
79
|
- app/assets/javascripts/scripts/jquery.caret.min.js
|
80
80
|
- app/assets/javascripts/scripts/jquery.tag-editor.min.js
|
81
|
+
- app/assets/javascripts/scripts/scrivito_dialog.js
|
81
82
|
- app/assets/javascripts/scripts/scrivito_list_editor.js
|
82
83
|
- app/assets/javascripts/scripts/scrivito_tabs.js
|
83
84
|
- app/assets/javascripts/scripts/scrivito_textarea_editor.js
|
@@ -89,8 +90,9 @@ files:
|
|
89
90
|
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_dialog.css
|
90
91
|
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_tabs.css
|
91
92
|
- app/assets/stylesheets/scrivito_advanced_editors/scrivito_toggle_button.css
|
92
|
-
- app/assets/stylesheets/scrivito_advanced_editors/
|
93
|
+
- app/assets/stylesheets/scrivito_advanced_editors/textarea_editor.css.scss
|
93
94
|
- app/helpers/scrivito_advanced_editors/scrivito_advanced_tag_helper.rb
|
95
|
+
- app/views/scrivito_advanced_editors/_color_picker.html.erb
|
94
96
|
- app/views/scrivito_advanced_editors/_create_obj.html.erb
|
95
97
|
- lib/scrivito_advanced_editors.rb
|
96
98
|
- lib/scrivito_advanced_editors/engine.rb
|
@@ -116,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
118
|
version: '0'
|
117
119
|
requirements: []
|
118
120
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.4.5
|
120
122
|
signing_key:
|
121
123
|
specification_version: 4
|
122
124
|
summary: Advanced Editors and details view extensions for scrivito
|