biola_wcms_components 0.2.0 → 0.2.1
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/configuration/setup_redactor.js.coffee +1 -0
- data/app/views/wcms_components/forms/_redactor_editor.html.slim +12 -8
- data/app/views/wcms_components/forms/_related_object_tags.html.slim +6 -2
- data/lib/biola_wcms_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad43cf94ae5f7f3c298b9863ec8acae5fa28e5d2
|
4
|
+
data.tar.gz: d653206bde30cee1b55c8068b1497c23a0b70874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f68c613bfe2f706da1ab5718266a066ba60ef2c68d857ef212f879a73f904da3c2b1edccc17a617b1eb4d0cc78df6b537569e045bc36e1e2deb0f2a0f58247b
|
7
|
+
data.tar.gz: 586484d9d7e6385b37503c9b6cbf193cbe4cbd656f6e5796c323fdb7fdc4febddc06fd71a78fa60972f07dc0054a5a8c78dfe0ffb78346bbaa8b2085bf6b9f48
|
@@ -24,6 +24,7 @@ setupRedactor = (obj) ->
|
|
24
24
|
options.buttons = $.unique(options.buttons)
|
25
25
|
if formatting
|
26
26
|
options.formatting = $.unique(options.formatting)
|
27
|
+
options.allowedTags = options.allowedTags.concat(options.formatting)
|
27
28
|
options.allowedTags = $.unique(options.allowedTags)
|
28
29
|
|
29
30
|
# Initialize redactor
|
@@ -1,8 +1,9 @@
|
|
1
1
|
/ Example:
|
2
|
-
/ = wcms_component
|
2
|
+
/ = wcms_component "forms/redactor_editor",
|
3
|
+
/ form: f,
|
3
4
|
/ attribute: :body,
|
4
|
-
/ add_buttons: ['link']
|
5
|
-
/
|
5
|
+
/ add_buttons: ['link']
|
6
|
+
/
|
6
7
|
|
7
8
|
|
8
9
|
ruby:
|
@@ -18,15 +19,18 @@ ruby:
|
|
18
19
|
add_buttons ||= [] # adds to defaults
|
19
20
|
remove_buttons ||= [] # removes from default
|
20
21
|
buttons = Array(buttons) + Array(add_buttons) - Array(remove_buttons)
|
21
|
-
buttons << '
|
22
|
+
buttons << 'html' if current_user.try(:admin?)
|
22
23
|
buttons << 'fullscreen'
|
23
24
|
|
24
|
-
|
25
|
-
buttons
|
25
|
+
formatting ||= []
|
26
|
+
buttons.unshift 'formatting' if formatting.length > 0
|
26
27
|
|
27
28
|
|
29
|
+
# Turn buttons and formatting into a string and remove duplicates
|
30
|
+
buttons = buttons.uniq.join(' ')
|
31
|
+
formatting = formatting.uniq.join(' ')
|
28
32
|
|
29
33
|
- if form
|
30
|
-
= form.text_area attribute, class: input_class, 'data-buttons' => buttons
|
34
|
+
= form.text_area attribute, class: input_class, 'data-buttons' => buttons, 'data-formatting' => formatting
|
31
35
|
- else
|
32
|
-
= text_area_tag attribute, value, class: input_class, 'data-buttons' => buttons
|
36
|
+
= text_area_tag attribute, value, class: input_class, 'data-buttons' => buttons, 'data-formatting' => formatting
|
@@ -1,6 +1,10 @@
|
|
1
|
+
/ Example
|
2
|
+
/ = wcms_component 'forms/related_object_tags', form: f
|
3
|
+
/
|
4
|
+
|
1
5
|
ruby:
|
2
6
|
form ||= nil
|
3
|
-
attribute ||=
|
7
|
+
attribute ||= :related_object_tags_string
|
4
8
|
value ||= value
|
5
9
|
html_class ||= 'form-control'
|
6
10
|
lookup_url ||= wcms_components_tags_url
|
@@ -8,7 +12,7 @@ ruby:
|
|
8
12
|
|
9
13
|
= wcms_component "forms/tag_input",
|
10
14
|
form: form,
|
11
|
-
attribute:
|
15
|
+
attribute: attribute,
|
12
16
|
value: value,
|
13
17
|
html_class: html_class,
|
14
18
|
typeahead: { url: wcms_components_tags_url(format: :json), key: 'tag'}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biola_wcms_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Hall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ace-rails-ap
|