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: 98a1f0c7ac1218dd6e4816bb05b25aac8d050101
4
- data.tar.gz: ee539e9efa44ea89072a227729bcb3c65d583cc0
3
+ metadata.gz: 738f97a9ad50f283af1022a2d710573c572e0f16
4
+ data.tar.gz: 2e7667f3bcc5cc5cedfa948174e1d1ed8ce5bdc0
5
5
  SHA512:
6
- metadata.gz: d60610b9f140cae6674f15e094bd69ff2cf6015f3e47d1c02ff77d440b53b284d3991f49cf923573add41b61c80d76f25dc8749cdc935db7e8affd7dcd44cc73
7
- data.tar.gz: 1f85e586d9c43f799ab6299c06fdc6118d76d27ab8dd213193fff180a1f0a6726533fdb470133af97b9df2c1c4867ecee4a4a41c436f9eaca0e0d3a41a31654d
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()};
@@ -1,3 +1,3 @@
1
1
  module EffectiveRegions
2
- VERSION = '1.6.2'.freeze
2
+ VERSION = '1.6.3'.freeze
3
3
  end
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.2
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-10-30 00:00:00.000000000 Z
11
+ date: 2015-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails