bullet_train-sortable 1.0.3 → 1.2.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: 2ee6c7f7c14019d295c69144738fa9ec71f66d6f496b53bed2d531c60bd22ae6
|
4
|
+
data.tar.gz: 81f82e2c4b041eb531cd34898c929085ebedb2e09b6498d3078f2f2fc5fb1442
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83ff615e5473b5a572679c00612a829f69541bef34811048b33a68dc31c8887f35352bb699bec0d07b26db837d499729029af41323017f0b71ea0df2f4b937be
|
7
|
+
data.tar.gz: 8e703c9fc8be22fcb2ec469d293af6877559b77308c01637ed331df2702859aab2199a1fb4b52cd9cc7977eec74c84dabbf8ec7d7d35e777120cb1ea838336f8
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
|
+
import { post } from '@rails/request.js'
|
2
3
|
require("dragula/dist/dragula.min.css")
|
3
4
|
|
4
5
|
import dragula from 'dragula';
|
@@ -74,7 +75,7 @@ export default class extends Controller {
|
|
74
75
|
saveSortOrder() {
|
75
76
|
var idsInOrder = Array.from(this.element.childNodes).map((el) => { return parseInt(el.dataset?.id) });
|
76
77
|
|
77
|
-
|
78
|
+
post(this.reorderPathValue, { body: JSON.stringify({ids_in_order: idsInOrder}) })
|
78
79
|
}
|
79
80
|
|
80
81
|
}
|
@@ -2,7 +2,7 @@ module BulletTrain
|
|
2
2
|
module Sortable
|
3
3
|
class Engine < ::Rails::Engine
|
4
4
|
initializer "bullet_train.sortable.register_routing_concerns" do |app|
|
5
|
-
BulletTrain.routing_concerns <<
|
5
|
+
BulletTrain.routing_concerns << proc do
|
6
6
|
concern :sortable do
|
7
7
|
collection do
|
8
8
|
post :reorder
|
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-sortable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: standard
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rails
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
33
|
+
version: 6.0.0
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
40
|
+
version: 6.0.0
|
27
41
|
description: Bullet Train Sortable
|
28
42
|
email:
|
29
43
|
- andrew.culver@gmail.com
|