effective_form_inputs 0.8.7 → 0.8.8
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: b27b137d43729afe8f73c2ad90f1472a5d7fe72a
|
4
|
+
data.tar.gz: beb2a984a5262a8c00e0596c8f9c22d3a04d9657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e41f7b8acc42cef070a9dda74f757c27aca0eb8848bd927af6f39a6c41d1df65eed188313e2e62c891b352ecd162e89f3cf77178bb0e54481beddef6ff51cc4f
|
7
|
+
data.tar.gz: 7701c46726dc9b8008ab4c84778b0a573133ff16c37b855a548c27b916a0843ccb59eb3cfa5c17fab96f75917848cf7583048494d858525fcf8b90875e23ec7f
|
@@ -11,29 +11,33 @@ initialize = ->
|
|
11
11
|
setupCkeditor = ($inputs) ->
|
12
12
|
return unless $inputs.length > 0
|
13
13
|
|
14
|
+
input_js_options = $inputs.first().data('input-js-options') || {}
|
15
|
+
|
14
16
|
ckeditor_present = ((try CKEDITOR.version) || '').length > 0
|
15
|
-
use_effective_assets =
|
17
|
+
use_effective_assets = input_js_options['effective_assets'] == true
|
16
18
|
$head = $('head')
|
17
19
|
|
18
20
|
unless ckeditor_present
|
19
|
-
$head.append("<
|
20
|
-
|
21
|
+
$head.append("<link href='#{input_js_options['effective_ckeditor_css_path']}' type='text/css', media='screen' rel='stylesheet' />")
|
22
|
+
jQuery.ajax({url: input_js_options['effective_ckeditor_js_path'], dataType: 'script', cache: true, async: false})
|
21
23
|
|
22
24
|
if use_effective_assets
|
23
25
|
$head.append("
|
24
26
|
<script>
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
27
|
+
try {
|
28
|
+
CKEDITOR.config['effective_regions'] = {
|
29
|
+
'snippets': {
|
30
|
+
'effective_asset': {
|
31
|
+
'dialog_url':'/assets/effective/snippets/effective_asset.js',
|
32
|
+
'label':'Effective asset',
|
33
|
+
'description':'Insert Effective asset',
|
34
|
+
'inline':true,
|
35
|
+
'editables':false,
|
36
|
+
'tag':'span'
|
37
|
+
}
|
38
|
+
}
|
39
|
+
};
|
40
|
+
} catch(e) {};
|
37
41
|
</script>
|
38
42
|
");
|
39
43
|
|
@@ -1,10 +1,14 @@
|
|
1
1
|
module Inputs
|
2
2
|
module EffectiveCkeditorTextArea
|
3
3
|
class Input < Effective::FormInput
|
4
|
-
delegate :content_tag, :text_area_tag, :to => :@template
|
4
|
+
delegate :content_tag, :text_area_tag, :asset_path, :to => :@template
|
5
5
|
|
6
6
|
def default_input_js
|
7
|
-
{
|
7
|
+
{
|
8
|
+
effective_assets: defined?(EffectiveAssets).present?,
|
9
|
+
effective_ckeditor_js_path: asset_path('effective_ckeditor.js'),
|
10
|
+
effective_ckeditor_css_path: asset_path('effective_ckeditor.css')
|
11
|
+
}
|
8
12
|
end
|
9
13
|
|
10
14
|
def default_input_html
|
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.
|
4
|
+
version: 0.8.8
|
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: 2015-12-
|
11
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|