effective_assets 1.6.1 → 1.6.2

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: e64e55facb8d3446c3b115c56b2ffbd3b4952f9b
4
- data.tar.gz: 02708fc9a444defb57dae035f08e3a699a633315
3
+ metadata.gz: 9bacc3e0d5f658838bebe3ac64e6914078952cea
4
+ data.tar.gz: 614b38bdf3162f44dd810256ab7cc092bb11b3b9
5
5
  SHA512:
6
- metadata.gz: a15827df9b780de1d0a954dbc72b5dee2e7990df3f991262b12ee265bcc8e591ae925f40a8cf6fa12e9c00a5e1cba268b9b70454f0d29e79fdba6cbc46627203
7
- data.tar.gz: c15c45f6bac87bfb95ae40bcf65136188f89da81ecbffcda266f98703dd1924e10ce5b25e461b015724136db6ec0b3835db1f7585a955c38eb18a80ffaf56f1b
6
+ metadata.gz: 88cd095f1bd880b215c82d32f898b5e02e07f23efdccf43d1b2494d8ee1adeb03d057ec59d0c105b54379a2acfa17a8fc467c298aa0a524cda633e94cff56173
7
+ data.tar.gz: 54b14269944ca4446002934cd239eb127ca6e2c0ea9a3e3adb1c5144cdfcf93944798beef96b91afa27c04f697542e8f5425af9f3d8fa9c32b648001ec54ec2a
@@ -0,0 +1,14 @@
1
+ # When we add a cocoon element, it copies a static template into the DOM
2
+ # We have to update this template to have a unique ID
3
+ $(document).on 'cocoon:before-insert', (event, item) ->
4
+ return true if item.find('.asset-box-uploader').length == 0
5
+
6
+ html = item.html()
7
+
8
+ item.find('.asset-box-uploader').each (index, element) =>
9
+ from = $(element).attr('id').replace('s3_', '')
10
+ to = from.replace(/\d.?\d/g, '') + (new Date().getTime()) + '-' + index
11
+ html = html.replace(new RegExp(from, 'g'), to)
12
+
13
+ item.html(html)
14
+
@@ -1,3 +1,3 @@
1
1
  module EffectiveAssets
2
- VERSION = '1.6.1'.freeze
2
+ VERSION = '1.6.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
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-21 00:00:00.000000000 Z
11
+ date: 2016-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -178,6 +178,7 @@ files:
178
178
  - app/assets/javascripts/effective_assets/asset_box_drag_and_drop.js.coffee
179
179
  - app/assets/javascripts/effective_assets/asset_box_filtering.js.coffee
180
180
  - app/assets/javascripts/effective_assets/asset_box_sorting.js.coffee
181
+ - app/assets/javascripts/effective_assets/cocoon.js.coffee
181
182
  - app/assets/javascripts/effective_assets/jquery_ui_sortable.js
182
183
  - app/assets/javascripts/effective_assets/s3_uploader.js.coffee
183
184
  - app/assets/javascripts/effective_assets_iframe.js.coffee