effective_form_inputs 0.8.12 → 0.8.13

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: 172bee6eafd010a5aaa58925e69b0a949e24b94c
4
- data.tar.gz: ba0fdd250bc6bab098d5a3cdb25494db1d3d85ae
3
+ metadata.gz: 3622c46e9170761f97e80cc0c391c3ea15157f6f
4
+ data.tar.gz: 7c88bfbf2433da810bf46ec760b23201d0c6cd88
5
5
  SHA512:
6
- metadata.gz: 8cef188c31fe49dd35725fbc373ed8030ad7b720a71a5a10338b8f57942763e307783fc39bd725b9210f67217cf1613290b60e05ac19c5165e0879c9a5ac693f
7
- data.tar.gz: 04c95b05ff737f172dea75d447eba6719c569e202a6487fc0dec6aa2e0a37da2cddc4e6e54bf1a4ccadb21aa6ec72aaabe62037c702f3287f6c8c85308edb305
6
+ metadata.gz: bd3c76941e6e316efb9e9a881e25b559aa741fb1a040e9a9116b6bea91c37bc2d9edf5eedb4ceac6308b34f50d9ee6ad6a416ac83f8d6789cde207f144d6d4a6
7
+ data.tar.gz: d06038c594c698b072010291ba6314d7eb9a78adcdd283a9f18b66bf1af3e329adae8514960d886b17e9be40f605450fa5c62af1138882d180bb089e47cd93c1
@@ -42,12 +42,8 @@ setupCkeditor = ($inputs) ->
42
42
  ");
43
43
 
44
44
  initCkeditor = (textarea) ->
45
- console.log textarea
46
- console.log textarea.data('input-js-options')
47
- console.log textarea.data('input-js-options')['toolbar']
48
-
49
- CKEDITOR.replace(textarea.attr('id'),
50
- toolbar: ((textarea.data('input-js-options') || {})['toolbar'] || 'full')
45
+ options =
46
+ toolbar: 'full'
51
47
  effectiveRegionType: 'full'
52
48
  customConfig: ''
53
49
  enterMode: CKEDITOR.ENTER_P
@@ -81,7 +77,10 @@ initCkeditor = (textarea) ->
81
77
  { name: 'insert', items: ['Link', 'Table'] },
82
78
  { name: 'lists', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'] },
83
79
  ]
84
- )
80
+
81
+ options[k] = v for k, v of (textarea.data('input-js-options') || {})
82
+
83
+ CKEDITOR.replace(textarea.attr('id'), options)
85
84
 
86
85
  $ -> initialize()
87
86
  $(document).on 'page:change', -> initialize()
@@ -8,8 +8,10 @@ module Inputs
8
8
  effective_assets: defined?(EffectiveAssets).present?,
9
9
  effective_ckeditor_js_path: asset_path('effective_ckeditor.js'),
10
10
  effective_ckeditor_css_path: asset_path('effective_ckeditor.css'),
11
- toolbar: (options[:toolbar] || 'full')
12
- }
11
+ toolbar: options[:toolbar],
12
+ height: options[:height],
13
+ width: options[:width]
14
+ }.compact
13
15
  end
14
16
 
15
17
  def default_input_html
@@ -1,3 +1,3 @@
1
1
  module EffectiveFormInputs
2
- VERSION = '0.8.12'.freeze
2
+ VERSION = '0.8.13'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_form_inputs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.12
4
+ version: 0.8.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-12 00:00:00.000000000 Z
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails