select2-rails 3.5.1 → 3.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +9 -0
- data/app/assets/javascripts/select2.js +7 -3
- data/app/assets/stylesheets/select2.css.erb +1 -1
- data/lib/select2-rails/version.rb +1 -1
- metadata +3 -8
data/README.md
CHANGED
@@ -43,6 +43,15 @@ Code [here](https://github.com/argerim/select_2_example)
|
|
43
43
|
|
44
44
|
Heroku app [here](http://select-2-example.herokuapp.com/)
|
45
45
|
|
46
|
+
## Fix
|
47
|
+
### IE8 Invalid Character
|
48
|
+
IE8 doesn't support some unescaped Unicode character and need to quote keys in object literals
|
49
|
+
You need some configurations for [Uglifier](https://github.com/lautis/uglifier) to do the work.
|
50
|
+
Add to your `config/environments/production.rb`
|
51
|
+
|
52
|
+
require 'uglifier'
|
53
|
+
config.assets.js_compressor = Uglifier.new(output: {ascii_only: true, quote_keys: true})
|
54
|
+
|
46
55
|
## Version
|
47
56
|
From `v2.1.0` on, `select2-rails`'s version will match the version of `Select2` it uses.
|
48
57
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
Copyright 2012 Igor Vaynberg
|
3
3
|
|
4
|
-
Version: 3.4.
|
4
|
+
Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
|
5
5
|
|
6
6
|
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
7
7
|
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
@@ -2443,6 +2443,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2443
2443
|
return opts;
|
2444
2444
|
},
|
2445
2445
|
|
2446
|
+
// multi
|
2446
2447
|
selectChoice: function (choice) {
|
2447
2448
|
|
2448
2449
|
var selected = this.container.find(".select2-search-choice-focus");
|
@@ -2859,7 +2860,6 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2859
2860
|
var val = this.getVal(),
|
2860
2861
|
data,
|
2861
2862
|
index;
|
2862
|
-
|
2863
2863
|
selected = selected.closest(".select2-search-choice");
|
2864
2864
|
|
2865
2865
|
if (selected.length === 0) {
|
@@ -2889,6 +2889,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2889
2889
|
return;
|
2890
2890
|
}
|
2891
2891
|
|
2892
|
+
selected.remove();
|
2893
|
+
|
2892
2894
|
this.opts.element.trigger({ type: "select2-removed", val: this.id(data), choice: data });
|
2893
2895
|
this.triggerChange({ removed: data });
|
2894
2896
|
},
|
@@ -3003,7 +3005,9 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
3003
3005
|
for (var j = 0; j < old.length; j++) {
|
3004
3006
|
if (equal(this.opts.id(current[i]), this.opts.id(old[j]))) {
|
3005
3007
|
current.splice(i, 1);
|
3006
|
-
i
|
3008
|
+
if(i>0){
|
3009
|
+
i--;
|
3010
|
+
}
|
3007
3011
|
old.splice(j, 1);
|
3008
3012
|
j--;
|
3009
3013
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: select2-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-11-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|
@@ -154,18 +154,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
154
|
- - ! '>='
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '0'
|
157
|
-
segments:
|
158
|
-
- 0
|
159
|
-
hash: -3706961845905186501
|
160
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
158
|
none: false
|
162
159
|
requirements:
|
163
160
|
- - ! '>='
|
164
161
|
- !ruby/object:Gem::Version
|
165
162
|
version: '0'
|
166
|
-
segments:
|
167
|
-
- 0
|
168
|
-
hash: -3706961845905186501
|
169
163
|
requirements: []
|
170
164
|
rubyforge_project:
|
171
165
|
rubygems_version: 1.8.25
|
@@ -173,3 +167,4 @@ signing_key:
|
|
173
167
|
specification_version: 3
|
174
168
|
summary: Integrate Select2 javascript library with Rails asset pipeline
|
175
169
|
test_files: []
|
170
|
+
has_rdoc:
|