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 +4 -4
- data/lib/active_scaffold_sortable/version.rb +1 -1
- metadata +12 -14
- data/app/assets/javascripts/active_scaffold_sortable.js.erb +0 -1
- data/app/assets/javascripts/prototype/active_scaffold_sortable.js +0 -34
- /data/app/assets/javascripts/{jquery/active_scaffold_sortable.js → active_scaffold_sortable.js} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a2ba69a2e3d71c06c7263f86fb9c7a1e005dd292fcf0e364b45d3c2c6e724a6
|
4
|
+
data.tar.gz: 4d57add1e0531ac0b6744340b4b4430246a479d07a42e68ee3f3be180e2e1270
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25f72fc6addcd4f173f9b2ca35033c6fa195e16a2b28de828a4d8f73c87867ad95905f160d3a8dd0c8b8f8a0a831f7daa5067f295e16dd7190a3e168400b6eb9
|
7
|
+
data.tar.gz: b77eaea4a0770abbaf5ec1c22649e28290b59a3a281d0d7fb460252e2a29c85f8f352cfe7989066b8a8bb46690a881f59eaf75d0b3a0b6d8befa3c1f2904199f
|
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.
|
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
|
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:
|
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:
|
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
|
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.
|
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/
|
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/
|
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
|
-
});
|
/data/app/assets/javascripts/{jquery/active_scaffold_sortable.js → active_scaffold_sortable.js}
RENAMED
File without changes
|