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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3904000cfb5006c57500236658550047ac50b0ac
|
4
|
+
data.tar.gz: d68987f820c39bb1f18085bd7b2bae85733cdbc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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[:
|
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,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:
|
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
|
+
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-
|
11
|
+
date: 2015-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|