active_scaffold_sortable 3.3.10 → 3.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32d846a77db73022d77fae9f89593c42fc18f4146a1c694ad3deb66b02e2b1cd
|
4
|
+
data.tar.gz: 8d82537f1748352064e4100c03feaa663369c45cde7c35ce743f52e34f7c4204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e31694f1969a08cb691c27efae01488e6b255913b13dddb82abdb1c1a925f763b6cdc754c8e9cba002f50181baed071e370e788ad5b2fbc2896ddc7fb5d66456
|
7
|
+
data.tar.gz: 233c34441179b5478ab70f7afeda6d5c4c7b731f2db9611c0d110c7821496bae33ff83644678520b4cd3c363740157673d06517608ae187656b6628a89c66695
|
@@ -37,7 +37,7 @@ ActiveScaffold.sortable = function(element) {
|
|
37
37
|
element = jQuery(element);
|
38
38
|
form = element.closest('form.as_form').length > 0;
|
39
39
|
if (form) content = element;
|
40
|
-
else content = element.find('.records:first');
|
40
|
+
else content = element.find(element.data('contentSelector') || '.records:first');
|
41
41
|
}
|
42
42
|
|
43
43
|
if (form) {
|
@@ -49,7 +49,8 @@ ActiveScaffold.sortable = function(element) {
|
|
49
49
|
if (url) {
|
50
50
|
var csrf = jQuery('meta[name=csrf-param]').attr('content') + '=' + jQuery('meta[name=csrf-token]').attr('content');
|
51
51
|
sortable_options.update = function(event, ui) {
|
52
|
-
var
|
52
|
+
var $this = jQuery(this),
|
53
|
+
body = $this.sortable('serialize',{key: encodeURIComponent(($this.data('key') || $this.attr('id')) + '[]'), expression: new RegExp(element.data('format'))});
|
53
54
|
var params = element.data('with');
|
54
55
|
if (params) body += '&' + params;
|
55
56
|
jQuery.post(url, body + '&' + csrf);
|