simple_form_extension 1.3.4 → 1.3.5

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: 5fb343178260d675ca9c66ee94576f950187f875
4
- data.tar.gz: 68319c7d6e91908fe8ca84d889071a8b04ab9602
3
+ metadata.gz: 3904000cfb5006c57500236658550047ac50b0ac
4
+ data.tar.gz: d68987f820c39bb1f18085bd7b2bae85733cdbc4
5
5
  SHA512:
6
- metadata.gz: 981909abe52e11389f8ba1ad96f2070e6442b3be872f0c1717d55f89ac51ad235cb0861b04e3d04454060849ab6992f8ced80d898f2e6793dbf573da2e1154c7
7
- data.tar.gz: 41e953e318a1d24014394d2ce896bfa193e1d65c52cf3c6fcfd461bb27cd6c9659c4d9c29278dfe50a7c152e63c6bdad6aafee1b6224e6f334d1de54d57b8c44
6
+ metadata.gz: c0646ab9d6501de0e464c72fa8e9b6017b077e44c85f51f482a16f1c85bf1ab7e82e9b6380f0e1bad28cb9f4024674e43b7749195dff2b68c80286663c4ebd53
7
+ data.tar.gz: e44ceda270ac8cb7f26eaf815342c876715234a18196850976031e868e192d1431dfd48920fb06c5447a037d21c54fd4895aa61e424c79cd63a8f822910cb2b0
@@ -5,7 +5,12 @@ module SimpleFormExtension
5
5
  @additional_classes ||= additional_classes
6
6
  @additional_classes -= [input_type]
7
7
 
8
- input_html_options[:"data-redactor"] = true
8
+ input_html_options[:data] ||= {}
9
+ input_html_options[:data][:redactor] = true
10
+
11
+ input_html_options[:data][:'redactor-config'] = (
12
+ options[:config] || {}
13
+ ).to_json
9
14
 
10
15
  super
11
16
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleFormExtension
2
- VERSION = "1.3.4"
2
+ VERSION = "1.3.5"
3
3
  end
@@ -1,13 +1,20 @@
1
1
  class Redactor
2
+ DEFAULT_OPTIONS: {
3
+ min_height: 250
4
+ }
5
+
2
6
  constructor: (@$el) ->
3
7
  params = @params()
8
+ config = $.extend({}, @DEFAULT_OPTIONS, @$el.data('redactor-config'))
9
+
10
+ console.log('REDACTOR CONFIG : ', config, ' //// ', @DEFAULT_OPTIONS)
4
11
 
5
12
  @$el.redactor
6
13
  buttons: ['html', 'formatting', 'bold', 'italic', 'underline', 'deleted',
7
14
  'unorderedlist', 'orderedlist', 'outdent', 'indent',
8
15
  'image', 'file','link', 'alignment', 'horizontalrule']
9
16
  removeEmpty: ['strong', 'em', 'span', 'p', 'h1', 'h2', 'h3', 'h4', 'div']
10
- minHeight: 400
17
+ minHeight: config.min_height
11
18
  buttonSource: true
12
19
  replaceDivs: false
13
20
  linebreaks: false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glyph-fr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-29 00:00:00.000000000 Z
11
+ date: 2015-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails