auto_select2 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of auto_select2 might be problematic. Click here for more details.
data/auto_select2.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "auto_select2"
|
8
8
|
spec.version = AutoSelect2::VERSION
|
9
9
|
spec.authors = ["Dmitriy Lisichkin", "Ivan Zabrovskiy"]
|
10
|
-
spec.email = ["dima@sb42.ru", "
|
10
|
+
spec.email = ["dima@sb42.ru", "loriowar@gmail.com"]
|
11
11
|
spec.summary = %q{Base methods for wrapping a Select2 and easy initialize it.}
|
12
12
|
spec.description = <<-DESC
|
13
13
|
Gem provide scripts and helpers for initialize different select2 elements:
|
data/lib/auto_select2/version.rb
CHANGED
@@ -36,6 +36,7 @@ jQuery ($) ->
|
|
36
36
|
result
|
37
37
|
|
38
38
|
window.initAutoAjaxSelect2 = ->
|
39
|
+
# @todo: need to refactor this hell
|
39
40
|
$inputs = $('input.auto-ajax-select2').not('.select2-offscreen')
|
40
41
|
$inputs.each ->
|
41
42
|
$input = $(this)
|
@@ -71,11 +72,13 @@ jQuery ($) ->
|
|
71
72
|
if additionalUserData isnt `undefined`
|
72
73
|
additionalAjaxData = additionalUserData['additional_ajax_data']
|
73
74
|
if additionalAjaxData isnt `undefined`
|
75
|
+
if typeof window[additionalAjaxData['function']] == "function"
|
76
|
+
functionCollection = window[additionalAjaxData['function']]($input, term)
|
74
77
|
$(additionalAjaxData['selector']).each (index, el) ->
|
75
78
|
$el = $(el)
|
76
79
|
paramsCollection[$el.attr('name')] = $el.val()
|
77
80
|
return
|
78
|
-
$.extend(paramsCollection, additionalAjaxData['params'])
|
81
|
+
$.extend(paramsCollection, additionalAjaxData['params'], functionCollection)
|
79
82
|
delete paramsCollection[$this.attr('name')]
|
80
83
|
|
81
84
|
return $.extend({}, paramsCollection, ajaxData)
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auto_select2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Dmitriy Lisichkin
|
@@ -9,53 +10,60 @@ authors:
|
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2015-
|
13
|
+
date: 2015-10-16 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: railties
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
17
19
|
requirements:
|
18
|
-
- - '>='
|
20
|
+
- - ! '>='
|
19
21
|
- !ruby/object:Gem::Version
|
20
22
|
version: '3.1'
|
21
23
|
type: :runtime
|
22
24
|
prerelease: false
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
24
27
|
requirements:
|
25
|
-
- - '>='
|
28
|
+
- - ! '>='
|
26
29
|
- !ruby/object:Gem::Version
|
27
30
|
version: '3.1'
|
28
31
|
- !ruby/object:Gem::Dependency
|
29
32
|
name: select2-rails
|
30
33
|
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
31
35
|
requirements:
|
32
|
-
- - '>='
|
36
|
+
- - ! '>='
|
33
37
|
- !ruby/object:Gem::Version
|
34
38
|
version: '0'
|
35
39
|
type: :runtime
|
36
40
|
prerelease: false
|
37
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
38
43
|
requirements:
|
39
|
-
- - '>='
|
44
|
+
- - ! '>='
|
40
45
|
- !ruby/object:Gem::Version
|
41
46
|
version: '0'
|
42
47
|
- !ruby/object:Gem::Dependency
|
43
48
|
name: coffee-rails
|
44
49
|
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
45
51
|
requirements:
|
46
|
-
- - '>='
|
52
|
+
- - ! '>='
|
47
53
|
- !ruby/object:Gem::Version
|
48
54
|
version: '0'
|
49
55
|
type: :runtime
|
50
56
|
prerelease: false
|
51
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
52
59
|
requirements:
|
53
|
-
- - '>='
|
60
|
+
- - ! '>='
|
54
61
|
- !ruby/object:Gem::Version
|
55
62
|
version: '0'
|
56
63
|
- !ruby/object:Gem::Dependency
|
57
64
|
name: bundler
|
58
65
|
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
59
67
|
requirements:
|
60
68
|
- - ~>
|
61
69
|
- !ruby/object:Gem::Version
|
@@ -63,6 +71,7 @@ dependencies:
|
|
63
71
|
type: :development
|
64
72
|
prerelease: false
|
65
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
66
75
|
requirements:
|
67
76
|
- - ~>
|
68
77
|
- !ruby/object:Gem::Version
|
@@ -70,20 +79,23 @@ dependencies:
|
|
70
79
|
- !ruby/object:Gem::Dependency
|
71
80
|
name: rake
|
72
81
|
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
73
83
|
requirements:
|
74
|
-
- - '>='
|
84
|
+
- - ! '>='
|
75
85
|
- !ruby/object:Gem::Version
|
76
86
|
version: '0'
|
77
87
|
type: :development
|
78
88
|
prerelease: false
|
79
89
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
80
91
|
requirements:
|
81
|
-
- - '>='
|
92
|
+
- - ! '>='
|
82
93
|
- !ruby/object:Gem::Version
|
83
94
|
version: '0'
|
84
95
|
- !ruby/object:Gem::Dependency
|
85
96
|
name: rails
|
86
97
|
requirement: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
87
99
|
requirements:
|
88
100
|
- - ~>
|
89
101
|
- !ruby/object:Gem::Version
|
@@ -91,17 +103,17 @@ dependencies:
|
|
91
103
|
type: :development
|
92
104
|
prerelease: false
|
93
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
94
107
|
requirements:
|
95
108
|
- - ~>
|
96
109
|
- !ruby/object:Gem::Version
|
97
110
|
version: 3.2.12
|
98
|
-
description:
|
99
|
-
|
100
|
-
|
101
|
-
For example for AutoSelect2Tab.
|
111
|
+
description: ! " Gem provide scripts and helpers for initialize different select2
|
112
|
+
elements:\n static, ajax and multi-ajax. Moreover this gem is foundation for
|
113
|
+
other gems.\n For example for AutoSelect2Tab.\n"
|
102
114
|
email:
|
103
115
|
- dima@sb42.ru
|
104
|
-
-
|
116
|
+
- loriowar@gmail.com
|
105
117
|
executables: []
|
106
118
|
extensions: []
|
107
119
|
extra_rdoc_files: []
|
@@ -130,26 +142,26 @@ files:
|
|
130
142
|
homepage: https://github.com/Loriowar/auto_select2
|
131
143
|
licenses:
|
132
144
|
- MIT
|
133
|
-
metadata: {}
|
134
145
|
post_install_message:
|
135
146
|
rdoc_options: []
|
136
147
|
require_paths:
|
137
148
|
- lib
|
138
149
|
required_ruby_version: !ruby/object:Gem::Requirement
|
150
|
+
none: false
|
139
151
|
requirements:
|
140
|
-
- - '>='
|
152
|
+
- - ! '>='
|
141
153
|
- !ruby/object:Gem::Version
|
142
154
|
version: '0'
|
143
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
|
+
none: false
|
144
157
|
requirements:
|
145
|
-
- - '>='
|
158
|
+
- - ! '>='
|
146
159
|
- !ruby/object:Gem::Version
|
147
160
|
version: '0'
|
148
161
|
requirements: []
|
149
162
|
rubyforge_project:
|
150
|
-
rubygems_version:
|
163
|
+
rubygems_version: 1.8.23
|
151
164
|
signing_key:
|
152
|
-
specification_version:
|
165
|
+
specification_version: 3
|
153
166
|
summary: Base methods for wrapping a Select2 and easy initialize it.
|
154
167
|
test_files: []
|
155
|
-
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: f6ec2faf3d1f40f1243e6a566865958b0f59a20f
|
4
|
-
data.tar.gz: 2a230eb36e1c113f54730c7916b7a1631753126e
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: f236f8dc081fc3dca44db0467e34b25d48417edcecbf63211f16582904ebd1f699cacbdcac4e4e6c873d2cf01b5cfe9585b007901b513c0b2210bb5d11c16804
|
7
|
-
data.tar.gz: 11eed5a4bf969b153749dc6687ce8ce2d20d44f9f0a3e67513fd0ffbdebafbc45685cf75404c837595ec61acf362bf35cb59b069db7a647dcdbe9990eb4a6ce4
|