activeadmin_select_many 0.4.0 → 0.4.2

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: 125c98dc457c8e510aa9e35d0c03c9d86341a42c6395cbd5da501f32a0782ab3
4
- data.tar.gz: aa9ab407d84de81df360209eba4c868da7232805fe6606d19d2e3b3c74d00279
3
+ metadata.gz: c6ef718f33d654cc19c1cdff127cc0843e8e28b3e7b47a1e4a79ac12f479c7cd
4
+ data.tar.gz: 1bc05acfaf8138a18b3bb5abff9a9144dee8742d2db5389ca33f69f2097a4e44
5
5
  SHA512:
6
- metadata.gz: f40eda600327c6a7262548e7052ae0662c65b88a40cdd21d4138d7b2ce9e4df37e9884384d23dc34e34236f778e876e2a7d48f575d11af8d361598189e7b3ffa
7
- data.tar.gz: 5e0d0b7b131174658ad5dfde9c235dedb5ddfb09c703efed47ea4141b4b0ac06fec1f3591c4ab6b790167f1793570f70a5d2b3a557b7196bed4bb993f4ed9035
6
+ metadata.gz: 7090832972fec99b68d357353ea4523eb12a4d6d3c0a861466425b74c6f43f8e93b2164bf27e274940ca041f0d9a07c320bc21362933c500329a801e2910a864
7
+ data.tar.gz: b6c837d30c6befb48fb487fc9ad5a1ae6fe9a02442141272076e256c42b9bc6ca2ee58a0d0aa8b7aeabde37eec4702faf91e0d1492cc9a4fd43ef1eaf18f18d7
data/README.md CHANGED
@@ -1,8 +1,12 @@
1
- # ActiveAdmin Select Many [![Gem Version](https://badge.fury.io/rb/activeadmin_select_many.svg)](https://badge.fury.io/rb/activeadmin_select_many)
1
+ # ActiveAdmin Select Many
2
+ [![gem version](https://badge.fury.io/rb/activeadmin_select_many.svg)](https://badge.fury.io/rb/activeadmin_select_many)
3
+ [![gem downloads](https://badgen.net/rubygems/dt/activeadmin_select_many)](https://rubygems.org/gems/activeadmin_select_many)
4
+ [![specs](https://github.com/blocknotes/activeadmin_select_many/actions/workflows/specs.yml/badge.svg)](https://github.com/blocknotes/activeadmin_select_many/actions/workflows/specs.yml)
2
5
 
3
6
  An Active Admin plugin which improves one-to-many / many-to-many / many-to-one associations selection using 2 new inputs: **select_many** and **select_one** (jQuery required).
4
7
 
5
8
  Features for *select_many*:
9
+
6
10
  - search box;
7
11
  - available items on the left, selected items on the right;
8
12
  - local/remote collections;
@@ -11,6 +15,7 @@ Features for *select_many*:
11
15
  - key bindings to improve accessibility.
12
16
 
13
17
  Features for *select_one*:
18
+
14
19
  - search box;
15
20
  - selected items on the right;
16
21
  - remote collections;
@@ -101,13 +106,13 @@ As filter:
101
106
 
102
107
  ## Do you like it? Star it!
103
108
 
104
- If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
109
+ If you use this component just star it. A developer is more motivated to improve a project when there is some interest. My other [Active Admin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source).
105
110
 
106
- Take a look at [other ActiveAdmin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source) that I made if you are curious.
111
+ Or consider offering me a coffee, it's a small thing but it is greatly appreciated: [about me](https://www.blocknot.es/about-me).
107
112
 
108
113
  ## Contributors
109
114
 
110
- - [Mattia Roccoberton](http://blocknot.es) - creator, maintainer
115
+ - [Mattia Roccoberton](http://blocknot.es): author
111
116
 
112
117
  ## License
113
118
 
data/Rakefile CHANGED
@@ -1,3 +1,16 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- require "bundler/gem_tasks"
3
+ require 'bundler/gem_tasks'
4
+
5
+ begin
6
+ require 'rspec/core/rake_task'
7
+
8
+ RSpec::Core::RakeTask.new(:spec) do |t|
9
+ # t.ruby_opts = %w[-w]
10
+ t.rspec_opts = ['--color', '--format documentation']
11
+ end
12
+
13
+ task default: :spec
14
+ rescue LoadError
15
+ puts '! LoadError: no RSpec available'
16
+ end
@@ -210,7 +210,7 @@ $(document).ready(function() {
210
210
  var next = select.find(':selected').next();
211
211
  if(next.length) select.val(next.val());
212
212
  }
213
- else $.proxy(onRemoteSelectOne, $(this))(event);
213
+ else if($(this).data('remote-collection')) $.proxy(onRemoteSelectOne, $(this))(event);
214
214
  });
215
215
  $(this).find('[data-select="src"]').on('keydown', function(event) {
216
216
  if(event.which == 37) { // left arrow
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'activeadmin/select_many/engine'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_admin'
2
4
 
3
5
  module ActiveAdmin
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveAdmin
2
4
  module SelectMany
3
- VERSION = '0.4.0'
5
+ VERSION = '0.4.2'
4
6
  end
5
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'activeadmin/select_many'
2
4
 
3
5
  require 'formtastic/inputs/select_many_input'
@@ -73,7 +73,7 @@ module Formtastic
73
73
  size: options[:size] || 4,
74
74
  'data-select': 'src'
75
75
  }
76
- template.select_tag nil, template.options_for_select(coll), input_options.merge(opts)
76
+ template.select_tag "#{input_name}_src", template.options_for_select(coll), input_options.merge(opts)
77
77
  end
78
78
 
79
79
  def select_dst_html
@@ -88,7 +88,7 @@ module Formtastic
88
88
  size: options[:size] || 4,
89
89
  'data-select': 'dst'
90
90
  }
91
- template.select_tag nil, template.options_for_select(coll), input_options.merge(opts)
91
+ template.select_tag "#{input_name}_dst", template.options_for_select(coll), input_options.merge(opts)
92
92
  end
93
93
  end
94
94
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_select_many
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-25 00:00:00.000000000 Z
11
+ date: 2021-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -25,131 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: activestorage
28
+ name: sassc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 6.0.3.2
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 6.0.3.2
41
- - !ruby/object:Gem::Dependency
42
- name: capybara
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 3.33.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 3.33.0
55
- - !ruby/object:Gem::Dependency
56
- name: pry
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 0.13.1
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 0.13.1
69
- - !ruby/object:Gem::Dependency
70
- name: puma
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 4.3.5
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 4.3.5
83
- - !ruby/object:Gem::Dependency
84
- name: rspec_junit_formatter
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.4.1
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.4.1
97
- - !ruby/object:Gem::Dependency
98
- name: rspec-rails
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 4.0.1
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 4.0.1
111
- - !ruby/object:Gem::Dependency
112
- name: selenium-webdriver
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: 3.142.7
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: 3.142.7
125
- - !ruby/object:Gem::Dependency
126
- name: simplecov
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: 0.19.0
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: 0.19.0
139
- - !ruby/object:Gem::Dependency
140
- name: sqlite3
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: 1.4.2
146
- type: :development
33
+ version: '2.4'
34
+ type: :runtime
147
35
  prerelease: false
148
36
  version_requirements: !ruby/object:Gem::Requirement
149
37
  requirements:
150
38
  - - "~>"
151
39
  - !ruby/object:Gem::Version
152
- version: 1.4.2
40
+ version: '2.4'
153
41
  description: An Active Admin plugin which improves one-to-many and many-to-many associations
154
42
  selection (jQuery required)
155
43
  email: mat@blocknot.es
@@ -188,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
76
  - !ruby/object:Gem::Version
189
77
  version: '0'
190
78
  requirements: []
191
- rubygems_version: 3.0.3
79
+ rubygems_version: 3.1.4
192
80
  signing_key:
193
81
  specification_version: 4
194
82
  summary: SelectMany plugin for ActiveAdmin