active_scaffold_sortable 3.2.11 → 3.2.12

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: 5e762e42e9f36d8a36ce8cd524f763fcea2ce1c5
4
- data.tar.gz: 05a77343639d90656ad2ae4d6bb9affe913abd32
3
+ metadata.gz: 6e864193528c8155624de24f0f7dde67410ba0d8
4
+ data.tar.gz: d8fe87a567fc065fef9e62011bc7b2069de4c372
5
5
  SHA512:
6
- metadata.gz: 34cba7a88ef66b0b1fb677f76f4c0766001d43466906437533f56a6f08783526eee48b1b22b7fd189de4947db8fdcc4651caeed9e878e0feac8c1b88235fe2c0
7
- data.tar.gz: d9145cc4b3fa7dbabb37d6d0a113e1c3e6147f9f92fda06a2fe0e68c27e37f6a46ae98805f8528f35cefef3ffbd6eebc27d6a651b3197b4f752a647139350166
6
+ metadata.gz: ae255ffa2331ea264259a56e811a37c25079ce4acde317ec74bf99cff7a77bec83cdfa8e8eca09573b1342f909dfb94652aaa171ea9cf23b9b3db7d0771b2bca
7
+ data.tar.gz: d9d6316aa7fd6b20e85f9adbaf85f6e08e938ad1c81ccfaa33f4e22d6e54f81227d6972e52ace01b3c2bab8096c13660cc9e106c2a47ac235dd214680cd2c50f
@@ -1,6 +1,7 @@
1
1
  <%= render :super %>
2
2
  <% config = active_scaffold_config_for(@column.association.klass) %>
3
3
  <% if config.actions.include? :sortable %>
4
- ActiveScaffold.update_positions('<%= sub_form_list_id(:association => @column.name) %>');
5
- ActiveScaffold.sortable('<%= sub_form_list_id(:association => @column.name) %>');
4
+ <% list_id = sub_form_list_id(:association => @column.name, :id => @parent_record.try(:id) || generated_id(@parent_record) || 99999999999) %>
5
+ ActiveScaffold.update_positions('<%= list_id %>');
6
+ ActiveScaffold.sortable('<%= list_id %>');
6
7
  <% end %>
@@ -2,7 +2,7 @@ module ActiveScaffoldSortable
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 2
5
- PATCH = 11
5
+ PATCH = 12
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_sortable
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.11
4
+ version: 3.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Cambra
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-16 00:00:00.000000000 Z
12
+ date: 2015-09-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: active_scaffold
@@ -43,9 +43,7 @@ files:
43
43
  - app/assets/javascripts/prototype/active_scaffold_sortable.js~
44
44
  - app/assets/stylesheets/active_scaffold_sortable.css.scss
45
45
  - app/views/active_scaffold_overrides/_form_association.html.erb
46
- - app/views/active_scaffold_overrides/_form_association.html.erb~
47
46
  - app/views/active_scaffold_overrides/edit_associated.js.erb
48
- - app/views/active_scaffold_overrides/edit_associated.js.erb~
49
47
  - frontends/default/active_scaffold_overrides/_list.html.erb
50
48
  - frontends/default/active_scaffold_overrides/on_create.js.erb
51
49
  - frontends/default/active_scaffold_overrides/on_create.js.erb~
@@ -1,6 +0,0 @@
1
- <% config = active_scaffold_config_for(column.association.klass) %>
2
- <% if config.actions.include? :sortable %>
3
- <%= content_tag :div, render(:super), :class => 'sortable-container', :data => sort_params(config).merge(:tag => 'tbody') %>
4
- <% else %>
5
- <%= render :super %>
6
- <% end %>
@@ -1,6 +0,0 @@
1
- <%= render :super %>
2
- <% config = active_scaffold_config_for(@column.association.klass) %>
3
- <% if config.actions.include? :sortable %>
4
- ActiveScaffold.update_position('<%= sub_form_list_id(:association => @column.name) %>');
5
- ActiveScaffold.sortable('<%= sub_form_list_id(:association => @column.name) %>');
6
- <% end %>