active_scaffold_sortable 3.5.0 → 3.6.0

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
  SHA256:
3
- metadata.gz: 548a760ce00526629966fd4abbff3f0a5fe4cae3dbfbd676e4dc1aa1734c5360
4
- data.tar.gz: 9c8071449474ffe07d8841bf3b9f32c2c6c6086e27edee193af90dab4a00a981
3
+ metadata.gz: 6a2ba69a2e3d71c06c7263f86fb9c7a1e005dd292fcf0e364b45d3c2c6e724a6
4
+ data.tar.gz: 4d57add1e0531ac0b6744340b4b4430246a479d07a42e68ee3f3be180e2e1270
5
5
  SHA512:
6
- metadata.gz: 2131e8b08e86c8e7f718bbb7ff5f7e3b8391f55141a0be8dc819f7c54e8e9ccebf4edc7a215b3e4159b006fef0bee2438b42296ff8f2c33a55f882f46f4192f8
7
- data.tar.gz: a7c744ea5ab9611e5051ee0d42e365e929a74830c4cb61c2340a59988ab3d273cc564f514713b19fafa78777f62f722140b51d536c76a18cda238d4145707f34
6
+ metadata.gz: 25f72fc6addcd4f173f9b2ca35033c6fa195e16a2b28de828a4d8f73c87867ad95905f160d3a8dd0c8b8f8a0a831f7daa5067f295e16dd7190a3e168400b6eb9
7
+ data.tar.gz: b77eaea4a0770abbaf5ec1c22649e28290b59a3a281d0d7fb460252e2a29c85f8f352cfe7989066b8a8bb46690a881f59eaf75d0b3a0b6d8befa3c1f2904199f
@@ -1,7 +1,7 @@
1
1
  module ActiveScaffoldSortable
2
2
  module Version
3
3
  MAJOR = 3
4
- MINOR = 5
4
+ MINOR = 6
5
5
  PATCH = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
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.5.0
4
+ version: 3.6.0
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: 2024-04-05 00:00:00.000000000 Z
12
+ date: 2024-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: active_scaffold
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 3.7.1
20
+ version: 4.0.0.rc1
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 3.7.1
27
+ version: 4.0.0.rc1
28
28
  description: Sort Tree or List Structures by Drag n Drop
29
29
  email: activescaffold@googlegroups.com
30
30
  executables: []
@@ -36,9 +36,7 @@ files:
36
36
  - LICENSE.txt
37
37
  - README.textile
38
38
  - app/assets/images/active_scaffold/sortable.png
39
- - app/assets/javascripts/active_scaffold_sortable.js.erb
40
- - app/assets/javascripts/jquery/active_scaffold_sortable.js
41
- - app/assets/javascripts/prototype/active_scaffold_sortable.js
39
+ - app/assets/javascripts/active_scaffold_sortable.js
42
40
  - app/assets/stylesheets/active_scaffold_sortable.css.scss
43
41
  - app/views/active_scaffold_overrides/_form_association.html.erb
44
42
  - app/views/active_scaffold_overrides/edit_associated.js.erb
@@ -84,18 +82,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
82
  - !ruby/object:Gem::Version
85
83
  version: '0'
86
84
  requirements: []
87
- rubygems_version: 3.2.3
85
+ rubygems_version: 3.5.11
88
86
  signing_key:
89
87
  specification_version: 4
90
88
  summary: Drag n Drop Sorting for Activescaffold
91
89
  test_files:
90
+ - test/auto_models_controller_test.rb
92
91
  - test/config_test.rb
93
- - test/models/model.rb
92
+ - test/controllers/auto_models_controller.rb
93
+ - test/controllers/models_controller.rb
94
+ - test/controllers/sortable_models_controller.rb
94
95
  - test/models/auto_model.rb
96
+ - test/models/model.rb
95
97
  - test/router_test.rb
96
- - test/test_helper.rb
97
- - test/auto_models_controller_test.rb
98
98
  - test/schema.rb
99
- - test/controllers/auto_models_controller.rb
100
- - test/controllers/sortable_models_controller.rb
101
- - test/controllers/models_controller.rb
99
+ - test/test_helper.rb
@@ -1 +0,0 @@
1
- <% require_asset "#{ActiveScaffold.js_framework}/active_scaffold_sortable" %>
@@ -1,34 +0,0 @@
1
- ActiveScaffold.sortable = function(element) {
2
- var form, content, sortable_options = {};
3
- if (typeof(element) == 'string') {
4
- content = $(element);
5
- element = content.up('.sortable-container');
6
- } else {
7
- var form = !!element.up('form.as_form');
8
- if (form) content = element;
9
- else content = element.down('.records');
10
- }
11
-
12
- if (!form) {
13
- var csrf = $$('meta[name=csrf-param]')[0].readAttribute('content') + '=' + $$('meta[name=csrf-token]')[0].readAttribute('content');
14
- var url = element.readAttribute('data-reorder-url').append_params(csrf);
15
- sortable_options.onUpdate = function() {
16
- var body = Sortable.serialize(content);
17
- var params = element.readAttribute('data-with');
18
- if (params) body += '&' + params;
19
- new Ajax.Request(url, {method: 'post', parameters: body + '&' + csrf});
20
- }
21
- }
22
- sortable_options.handle = element.readAttribute('data-handle');
23
- sortable_options.items = element.readAttribute('data-tag');
24
- Sortable.create(content, sortable_options);
25
- };
26
-
27
- document.observe('dom:loaded', function(){
28
- document.on('as:action_success', 'a.as_action', function(e, action_link) {
29
- var sortable = $(action_link.adapter).find('.sortable-container');
30
- if (sortable.length) sortable.invoke(function(s) { ActiveScaffold.sortable(s); });
31
- });
32
- var sortable = $$('.sortable-container');
33
- if (sortable.length) ActiveScaffold.sortable(sortable[0]);
34
- });