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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c78bf06c4f79cbc1f456eb2bd5750fe0ab93986e
4
- data.tar.gz: de11ce169119121f0ab95dc2eabbc69707b67937
3
+ metadata.gz: ad43cf94ae5f7f3c298b9863ec8acae5fa28e5d2
4
+ data.tar.gz: d653206bde30cee1b55c8068b1497c23a0b70874
5
5
  SHA512:
6
- metadata.gz: dce136a7e660e3aeac8051dcc3a0f78f848417d0928469bca3de6798eb3a7630cd22fbd900e0a7a895c9fd410f42ce9e6df957093320dfe1916380486c9881ae
7
- data.tar.gz: a2c5af24de383959e0ab09725b2abb5e60035060db170ef960acd5130df3e66298285b67bcfbc1d05f86a811aa3acab532a1f7de3ea01eda8556d3a296473897
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("forms/redactor_editor", {form: f,
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 << 'html_options' if current_user.try(:admin?)
22
+ buttons << 'html' if current_user.try(:admin?)
22
23
  buttons << 'fullscreen'
23
24
 
24
- # Turn buttons into a string and make sure there are no duplicates
25
- buttons = buttons.uniq.join(' ')
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 ||= nil
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: :related_object_tags_string,
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'}
@@ -1,3 +1,3 @@
1
1
  module BiolaWcmsComponents
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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.0
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-05 00:00:00.000000000 Z
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