activeadmin_froala_editor 0.1.2 → 0.1.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
- SHA1:
3
- metadata.gz: b2c12e486936ade79ce0cd6fa77150e8a77dc0e1
4
- data.tar.gz: c4a5a2ab644d031a3f5edfe1177ff3697e070409
2
+ SHA256:
3
+ metadata.gz: 615cda2fca5dd7ee3153de9e891354ef06b8c25556bb2c227d32d55e9e874c54
4
+ data.tar.gz: a8fd82de3559b50d9c1f02774e74a9bc338cc3889e245a5e6e90c8401fd98d71
5
5
  SHA512:
6
- metadata.gz: 23cdd0af760828bee8b9a44abb570ea492581502d0a0571a8ef360daae0c5424b22690402d982a47a3631c8a468638eadf62efbfac6e068558fd24b29c8c7675
7
- data.tar.gz: cdd7ea07bb83b06315794d8c4577cf78340a62e826f3285a1a4e4c4bcc21acc98e8d84ae8d6bd377f615d9aa2fda7e1c2967e39ed6273b5d9223ae5845e2e1fe
6
+ metadata.gz: cf9f8c3b24db73fa78bcf1fb268f25789258bb8b16faced9c2d94b566ffa05e4fddf1a91a23fb5f0fb6b9deb827a4ecd92a9b36f84f8d5520ccc24e7548cbfb6
7
+ data.tar.gz: fd5127cf79889510d1b9d8e85c65b0e062368fc42347c4abb43e2e3541b5736488d1d35a47bb772610db6abd5952200f4293dc379bcb95b42348ca48f58d8e52
@@ -1,7 +1,18 @@
1
- $(document).ready( function() {
1
+ function initFroalaEditors() {
2
2
  $('.froala-editor').each(function () {
3
- var options = {};
4
- options = $.extend({}, options, $(this).data( 'options' ));
5
- $(this).froalaEditor( options );
3
+ if (!$(this).hasClass('froala-editor--active')) {
4
+ var options = {};
5
+ options = $.extend({}, options, $(this).data('options'));
6
+ $(this).froalaEditor(options);
7
+ $(this).addClass('froala-editor--active');
8
+ }
6
9
  });
10
+ }
11
+
12
+ $(document).on('has_many_add:after', function () {
13
+ initFroalaEditors();
14
+ });
15
+
16
+ $(document).ready( function() {
17
+ initFroalaEditors();
7
18
  });
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
2
  module FroalaEditor
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_froala_editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-23 00:00:00.000000000 Z
11
+ date: 2018-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
204
  version: '0'
205
205
  requirements: []
206
206
  rubyforge_project:
207
- rubygems_version: 2.6.13
207
+ rubygems_version: 2.7.8
208
208
  signing_key:
209
209
  specification_version: 4
210
210
  summary: Froala editor for ActiveAdmin