effective_regions 1.6.2 → 1.6.3
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: 738f97a9ad50f283af1022a2d710573c572e0f16
|
4
|
+
data.tar.gz: 2e7667f3bcc5cc5cedfa948174e1d1ed8ce5bdc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9880cbdbe3db76f15607669589093f75c95ab6d6c049f1da064c8345deba9e8978d3de76b289cd00ee328118d90b3b09306a43d4ad1b29b3f9d973cb8228f567
|
7
|
+
data.tar.gz: 8ca7bd29151278f4ea509c771bd057ddf785533e2e7b854d85b2122e428737df74051ae184069065bfc19047fe6eb56919780a54c3669b628f2bdc21e8c98d45
|
data/README.md
CHANGED
@@ -47,6 +47,26 @@ effective_regions_include_tags
|
|
47
47
|
|
48
48
|
Do not add anything to your asset pipeline javascripts or stylesheets.
|
49
49
|
|
50
|
+
### Optional Step
|
51
|
+
|
52
|
+
(optional)
|
53
|
+
|
54
|
+
When you intend to use the full screen editor quite a bit, it does load faster if you add the effective_ckeditor resources to the asset pipeline.
|
55
|
+
|
56
|
+
It prevents 2 extra requests on page load, but increases your asset payload size by around 200kb.
|
57
|
+
|
58
|
+
To add it to the asset pipeline, put the following to your application.js:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
//= require effective_ckeditor
|
62
|
+
```
|
63
|
+
|
64
|
+
and in your application.css, add:
|
65
|
+
|
66
|
+
```ruby
|
67
|
+
*= require effective_ckeditor
|
68
|
+
```
|
69
|
+
|
50
70
|
|
51
71
|
## Usage
|
52
72
|
|
@@ -32,7 +32,6 @@ module EffectiveRegionsHelper
|
|
32
32
|
payload[:pages] = ([['', '']] + Effective::Page.order(:title).map { |page| [page.title, page.id] })
|
33
33
|
end
|
34
34
|
|
35
|
-
javascript_include_tag('effective_ckeditor') + stylesheet_link_tag('effective_ckeditor') +
|
36
35
|
render(:partial => 'effective_regions/include_tags_javascript', :locals => {:payload => payload})
|
37
36
|
end
|
38
37
|
end
|
@@ -1,2 +1,11 @@
|
|
1
1
|
:javascript
|
2
|
+
var ckeditor_present = (((function() {try {return CKEDITOR.version; } catch (_error) {} })()) || '').length > 0;
|
3
|
+
|
4
|
+
var $head = $('head');
|
5
|
+
|
6
|
+
if (!ckeditor_present) {
|
7
|
+
$head.append("<script src='/assets/effective_ckeditor.js' />");
|
8
|
+
$head.append("<link href='/assets/effective_ckeditor.css' type='text/css', media='screen' rel='stylesheet'/>");
|
9
|
+
};
|
10
|
+
|
2
11
|
CKEDITOR.config['effective_regions'] = #{payload.to_json()};
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_regions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
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-
|
11
|
+
date: 2015-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|