rao-component 0.0.29.pre → 0.0.30.pre
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: d7fd50ce6ded0719c73a4c9ce937d95011157949ee1c59eb1e79c00540035c1f
|
4
|
+
data.tar.gz: ffb29e0ed619a10b511f4e94f1576fcb2c489056352d6485a809b8d998397416
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbf3863352bc04b9be9e5858abde1a818c374a6c94a482e0017d4c1ac34d592154b98baac0ce3f6111fdfef00a54bfb8432f9a4db2e8dca4f4ab20f873cec549
|
7
|
+
data.tar.gz: 545fa7d838a18984af803a43693911afc42e0b6e16d8545c7f758ad41f4075d743a0fff74e44baef34aaf6792bb7b7f6159fb47fd1d93889d34f226bad573353
|
@@ -0,0 +1,22 @@
|
|
1
|
+
$ ->
|
2
|
+
$('[data-awesome-nested-set-item]').each ->
|
3
|
+
$(@).draggable({
|
4
|
+
scope: $(@).attr('data-awesome-nested-set-item-scope'),
|
5
|
+
revert: true
|
6
|
+
})
|
7
|
+
|
8
|
+
$ ->
|
9
|
+
$('[data-awesome-nested-set-item]').each ->
|
10
|
+
redirect_target = $(@).attr('data-awesome-nested-set-item-on-drop-target')
|
11
|
+
console.log(redirect_target)
|
12
|
+
authenticity_token = $( 'meta[name="csrf-token"]' ).attr( 'content' );
|
13
|
+
|
14
|
+
$(@).droppable({
|
15
|
+
accept: '.awesome-nested-set-item',
|
16
|
+
scope: $(@).attr('data-awesome-nested-set-item-scope'),
|
17
|
+
activeClass: 'btn-success',
|
18
|
+
drop: (event, ui) ->
|
19
|
+
dropped_element = $(ui.draggable)
|
20
|
+
dropped_element_to_param = dropped_element.attr('data-awesome-nested-set-item-uid')
|
21
|
+
$.redirect(redirect_target,{ authenticity_token: authenticity_token, dropped_id: dropped_element_to_param });
|
22
|
+
})
|
@@ -4,6 +4,6 @@
|
|
4
4
|
'awesome-nested-set-item-uid': resource.to_param,
|
5
5
|
'awesome-nested-set-item-on-drop-target': url_for([:reposition, resource])
|
6
6
|
}
|
7
|
-
data_attributes['awesome-nested-set-item-scope'] = scope.call(
|
7
|
+
data_attributes['awesome-nested-set-item-scope'] = options[:scope].call(resource) if options[:scope].present?
|
8
8
|
%span.btn.btn-sm.btn-xs.btn-default.awesome-nested-set-item{ data: data_attributes }
|
9
|
-
%
|
9
|
+
%i.fas.fa-sort
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rao-component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- README.md
|
176
176
|
- Rakefile
|
177
177
|
- app/assets/javascripts/rao-component/acts_as_list.js.coffee
|
178
|
+
- app/assets/javascripts/rao-component/awesome_nested_set.js.coffee
|
178
179
|
- app/components/rao/component/base.rb
|
179
180
|
- app/components/rao/component/collection_table.rb
|
180
181
|
- app/components/rao/component/resource_table.rb
|
@@ -205,6 +206,7 @@ files:
|
|
205
206
|
- app/views/rao/component/table/body_cells/_thumbnail.html.haml
|
206
207
|
- app/views/rao/component/table/body_cells/_timestamp.html.haml
|
207
208
|
- app/views/rao/component/table/header_cells/_batch_actions.html.haml
|
209
|
+
- config/initializers/assets.rb
|
208
210
|
- config/locales/de.yml
|
209
211
|
- config/locales/en.yml
|
210
212
|
- lib/generators/rao/component/install_generator.rb
|