scrivito_advanced_editors 1.3.0 → 1.4.0.dev
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/scripts/color_picker.js +30 -11
- data/app/assets/stylesheets/scrivito_advanced_editors/color_picker.css +6 -3
- data/app/views/scrivito_advanced_editors/_page_preview_buttons.html.erb +7 -0
- data/lib/scrivito_advanced_editors/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 461d4ae5a5653f43b8108eae56609267669d1b74
|
4
|
+
data.tar.gz: 9ef0e794d4535d7240b8631e2b9e600c0b241495
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40e524e86d6d0818469095ff41139ad6ff4ac0eb7bf5e99cded5cd558a6c781eee9dcb528f205bce5d1268fc74cbc71a0baf752417e66a0cda7f6384a67ae0a7
|
7
|
+
data.tar.gz: f7a309248a87a7ec4194f18a540cc922d4377797d0af3b05c2162ba9f041fb8fbdaf3f351910aef9670a778112d1161f51abc91200268b2941868941ebf8f3b5
|
@@ -10,17 +10,19 @@
|
|
10
10
|
if(with_text) $(scrivito_tag).addClass('with-text');
|
11
11
|
|
12
12
|
$(scrivito_tag).addClass('scrivito_color_picker').html('');
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
}
|
13
|
+
|
14
|
+
if(Array.isArray(values[0])) {
|
15
|
+
$.each(values, function(index, list) {
|
16
|
+
if(index > 0) $('<div class="clear"></div>').appendTo($(scrivito_tag));
|
17
|
+
if(list === null) {
|
18
|
+
$('<hr>').appendTo($(scrivito_tag));
|
19
|
+
} else {
|
20
|
+
ScrivitoColorPicker.buttons(list, content, scrivito_tag);
|
21
|
+
}
|
22
|
+
});
|
23
|
+
} else {
|
24
|
+
ScrivitoColorPicker.buttons(values, content, scrivito_tag);
|
25
|
+
}
|
24
26
|
},
|
25
27
|
|
26
28
|
clickFunction: function(event) {
|
@@ -32,6 +34,23 @@
|
|
32
34
|
|
33
35
|
scrivito_tag.scrivito('save', text);
|
34
36
|
},
|
37
|
+
|
38
|
+
buttons: function(values, content, scrivito_tag) {
|
39
|
+
$.each(values, function(index, color) {
|
40
|
+
var css_class = (color === content) ? 'active' : 'inactive'
|
41
|
+
ScrivitoColorPicker.button(color, css_class).appendTo($(scrivito_tag));
|
42
|
+
});
|
43
|
+
},
|
44
|
+
|
45
|
+
button: function(color, css_class) {
|
46
|
+
return $('<button></button>')
|
47
|
+
.addClass('scrivito-color-select')
|
48
|
+
.addClass(color === "" ? "default" : color)
|
49
|
+
.addClass(color !== "" ? '' : 'transparent_bg')
|
50
|
+
.addClass(css_class)
|
51
|
+
.data('content', color)
|
52
|
+
.html('')
|
53
|
+
}
|
35
54
|
};
|
36
55
|
|
37
56
|
scrivito.on('content', function() {
|
@@ -21,9 +21,9 @@
|
|
21
21
|
overflow: hidden;
|
22
22
|
position: relative;
|
23
23
|
border: 0;
|
24
|
-
margin:
|
24
|
+
margin: 10px 10px 5px 0;
|
25
25
|
box-shadow: 0 0 4px 1px rgba(0,0,0,0.1);
|
26
|
-
border-radius:
|
26
|
+
border-radius: 2px;
|
27
27
|
background: transparent;
|
28
28
|
top: -5px;
|
29
29
|
outline: none;
|
@@ -33,6 +33,7 @@
|
|
33
33
|
width: 55px;
|
34
34
|
height: 55px;
|
35
35
|
top: 0;
|
36
|
+
margin: 0px 5px 0px -5px;
|
36
37
|
}
|
37
38
|
|
38
39
|
.scrivito_dialog [data-colors-list] .scrivito-color-select.none {
|
@@ -64,6 +65,7 @@
|
|
64
65
|
left: 0;
|
65
66
|
right: 0;
|
66
67
|
bottom: 0;
|
68
|
+
border-radius: 3px;
|
67
69
|
}
|
68
70
|
|
69
71
|
.scrivito_dialog [data-colors-list] .scrivito-color-select:after {
|
@@ -75,4 +77,5 @@
|
|
75
77
|
left: 0;
|
76
78
|
right: 0;
|
77
79
|
bottom: 0;
|
78
|
-
|
80
|
+
border-radius: 2px;
|
81
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= link_to scrivito_path(obj), class: 'editing-button editing-blue', target: :_top do %>
|
2
|
+
<i class='scrivito_icon scrivito_icon_eye' style='font-size: 10px;'></i> Go to page
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<%= link_to scrivito_path(obj).sub(/_scrivito_display_mode=\w+/,'_scrivito_display_mode=view'), class: 'editing-button editing-blue', target: :_blank do %>
|
6
|
+
<i class='scrivito_icon scrivito_icon_plus' style='font-size: 10px;'></i> Preview
|
7
|
+
<% 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: 1.
|
4
|
+
version: 1.4.0.dev
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- app/assets/stylesheets/scrivito_advanced_editors/textarea_editor.css
|
96
96
|
- app/helpers/scrivito_advanced_editors/scrivito_advanced_tag_helper.rb
|
97
97
|
- app/views/scrivito_advanced_editors/_create_obj.html.erb
|
98
|
+
- app/views/scrivito_advanced_editors/_page_preview_buttons.html.erb
|
98
99
|
- lib/scrivito_advanced_editors.rb
|
99
100
|
- lib/scrivito_advanced_editors/engine.rb
|
100
101
|
- lib/scrivito_advanced_editors/version.rb
|
@@ -114,9 +115,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
115
|
version: '0'
|
115
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
117
|
requirements:
|
117
|
-
- - "
|
118
|
+
- - ">"
|
118
119
|
- !ruby/object:Gem::Version
|
119
|
-
version:
|
120
|
+
version: 1.3.1
|
120
121
|
requirements: []
|
121
122
|
rubyforge_project:
|
122
123
|
rubygems_version: 2.4.5
|