biola_wcms_components 0.8.0 → 0.9.0
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/biola-wcms-components.js.coffee +2 -0
- data/app/assets/javascripts/configuration/setup_redactor.js.coffee +6 -1
- data/app/views/wcms_components/forms/_redactor_editor.html.slim +1 -1
- data/lib/biola_wcms_components/version.rb +1 -1
- data/vendor/assets/javascripts/redactor.js +736 -280
- data/vendor/assets/javascripts/redactor_table.js +338 -0
- data/vendor/assets/javascripts/redactor_video.js +77 -0
- data/vendor/assets/stylesheets/redactor.css +26 -14
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a54c4e2b5e76507a454480adeae8660fb4ff2401
|
4
|
+
data.tar.gz: 2ff487a9d3ac36feca3b6446cf9022642b767885
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdc159c5d579df7aa6b2363d7b7c7ab47e0c45fc393d9e12248289c9081decf0759413a3eec4c1a1a8815cfc1981f43a952b4a591d3c986e8ac8cb3458f40b79
|
7
|
+
data.tar.gz: e4067b246938806b4923640cbbe34afdb99c00622ec28ab4a6952229baa3775487e8214df2a408216e72abb7cbb42112112d945799ea47cfae4c726f9d4c4c07
|
@@ -4,6 +4,7 @@ setupRedactor = (obj) ->
|
|
4
4
|
minHeight: 200
|
5
5
|
allowedTags: ['p', 'br']
|
6
6
|
buttons: []
|
7
|
+
plugins: []
|
7
8
|
toolbarFixed: false
|
8
9
|
|
9
10
|
if fileUploader.uploaders && fileUploader.uploaders.embedded_image
|
@@ -23,7 +24,11 @@ setupRedactor = (obj) ->
|
|
23
24
|
if options.allowedTags.indexOf('a') >= 0
|
24
25
|
options.convertLinks = true;
|
25
26
|
if options.buttons.indexOf('fullscreen') >= 0
|
26
|
-
options.plugins
|
27
|
+
options.plugins.push 'fullscreen'
|
28
|
+
if options.buttons.indexOf('table') >= 0
|
29
|
+
options.plugins.push 'table'
|
30
|
+
if options.buttons.indexOf('video') >= 0
|
31
|
+
options.plugins.push 'video'
|
27
32
|
|
28
33
|
# Uniq all arrays
|
29
34
|
options.buttons = $.unique(options.buttons)
|
@@ -19,7 +19,7 @@ ruby:
|
|
19
19
|
add_buttons ||= [] # adds to defaults
|
20
20
|
remove_buttons ||= [] # removes from default
|
21
21
|
buttons = Array(buttons) + Array(add_buttons) - Array(remove_buttons)
|
22
|
-
buttons << 'html' if current_user.try(:admin?)
|
22
|
+
buttons << 'html' if current_user.try(:admin?) || current_user.try(:developer?) || current_user.try(:designer?)
|
23
23
|
buttons << 'fullscreen'
|
24
24
|
|
25
25
|
formatting ||= []
|