chosen-rails 1.4.2 → 1.4.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a826802b6b2da40d23e07924bf90ab5c02284488
|
4
|
+
data.tar.gz: 933c17475b7393f91d0c9e43118a365f7a7e786e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ccb7fa379d3d0a373fe3fa48e700d8df8906576558b383eba378bf58308a5daca848adbc63e3bb0856b41d5844a2f89ed1cc092ba7587abed0b8048ec4684f2
|
7
|
+
data.tar.gz: f1fbdbb0317eb4077deaa41eace59496802c39db10df61630491395644c56377de58e8788070ce0352408eda356bb82e13e4c5c6a29162f241fc7f65f18d8745
|
data/lib/chosen-rails/tasks.rake
CHANGED
@@ -6,6 +6,6 @@ task 'assets:precompile' do
|
|
6
6
|
Dir['public/assets/chosen-*'].each do |file|
|
7
7
|
next unless file =~ fingerprint
|
8
8
|
nondigest = file.sub fingerprint, '.'
|
9
|
-
FileUtils.
|
9
|
+
FileUtils.copy_entry file, nondigest, remove_destination: true
|
10
10
|
end
|
11
11
|
end
|
data/lib/chosen-rails/version.rb
CHANGED
@@ -32,6 +32,7 @@ class AbstractChosen
|
|
32
32
|
@display_selected_options = if @options.display_selected_options? then @options.display_selected_options else true
|
33
33
|
@display_disabled_options = if @options.display_disabled_options? then @options.display_disabled_options else true
|
34
34
|
@include_group_label_in_selected = @options.include_group_label_in_selected || false
|
35
|
+
@max_shown_results = @options.max_shown_results || Number.POSITIVE_INFINITY
|
35
36
|
|
36
37
|
set_default_text: ->
|
37
38
|
if @form_field.getAttribute("data-placeholder")
|
@@ -65,11 +66,16 @@ class AbstractChosen
|
|
65
66
|
|
66
67
|
results_option_build: (options) ->
|
67
68
|
content = ''
|
69
|
+
shown_results = 0
|
68
70
|
for data in @results_data
|
71
|
+
data_content = ''
|
69
72
|
if data.group
|
70
|
-
|
73
|
+
data_content = this.result_add_group data
|
71
74
|
else
|
72
|
-
|
75
|
+
data_content = this.result_add_option data
|
76
|
+
if data_content != ''
|
77
|
+
shown_results++
|
78
|
+
content += data_content
|
73
79
|
|
74
80
|
# this select logic pins on an awkward flag
|
75
81
|
# we can make it better
|
@@ -79,6 +85,9 @@ class AbstractChosen
|
|
79
85
|
else if data.selected and not @is_multiple
|
80
86
|
this.single_set_selected_text(this.choice_label(data))
|
81
87
|
|
88
|
+
if shown_results >= @max_shown_results
|
89
|
+
break
|
90
|
+
|
82
91
|
content
|
83
92
|
|
84
93
|
result_add_option: (option) ->
|
@@ -34,7 +34,7 @@ $chosen-sprite-retina: image-url('chosen-sprite@2x.png') !default;
|
|
34
34
|
a{
|
35
35
|
cursor: pointer;
|
36
36
|
}
|
37
|
-
|
37
|
+
|
38
38
|
.search-choice, .chosen-single{
|
39
39
|
.group-name{
|
40
40
|
margin-right: 4px;
|
@@ -64,7 +64,7 @@ $chosen-sprite-retina: image-url('chosen-sprite@2x.png') !default;
|
|
64
64
|
border: 1px solid #aaa;
|
65
65
|
border-radius: 5px;
|
66
66
|
background-color: #fff;
|
67
|
-
@include background(linear-gradient(
|
67
|
+
@include background(linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%));
|
68
68
|
background-clip: padding-box;
|
69
69
|
box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(#000,.1);
|
70
70
|
color: #444;
|
@@ -275,7 +275,7 @@ $chosen-sprite-retina: image-url('chosen-sprite@2x.png') !default;
|
|
275
275
|
padding-right: 5px;
|
276
276
|
border: 1px solid #ccc;
|
277
277
|
background-color: #e4e4e4;
|
278
|
-
@include background-image(linear-gradient(
|
278
|
+
@include background-image(linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%));
|
279
279
|
color: #666;
|
280
280
|
}
|
281
281
|
&.search-choice-focus {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chosen-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tse-Ching Ho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
160
|
rubyforge_project:
|
161
|
-
rubygems_version: 2.4.
|
161
|
+
rubygems_version: 2.4.8
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: Integrate Chosen javascript library with Rails asset pipeline
|