bootstrap-chosen-rails 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: aa73683064b4073c555878514841e97dd96ecebc
4
+ data.tar.gz: a91f1b55048dc6ab7815f1d9321d4b8813ba9f3a
5
+ SHA512:
6
+ metadata.gz: b76588f48c765cdc6a0cd257c856b495aa9dc09a0ce2a7d9fd65f63fb5ab91d8df1026790e2224599aa302b99f304ea3b264d60e1ab6cea8978255eb64b57b13
7
+ data.tar.gz: 85c4e10f665d1e0b1c76066a422b99b9f59d56028b48dcf51278486fe1ce0f92bd881c8ca598d01b0bb35eec3cbab3ed7c76ebb860acacf454a16f9db6df4eb2
@@ -0,0 +1,16 @@
1
+ *.gem
2
+ .sass-cache
3
+ Gemfile.lock
4
+ *.gemfile.lock
5
+ .rvmrc
6
+ .rbenv-version
7
+ .ruby-version
8
+ .ruby-gemset
9
+
10
+ # Ignore bundler config
11
+ /.bundle
12
+ /vendor/cache
13
+ /vendor/bundle
14
+ tmp/
15
+ .DS_Store
16
+ node_modules
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in bootstrap-rails.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 James Carbine
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ # bootstrap-chosen-rails
2
+ An alternate stylesheet for Chosen that integrates with Bootstrap and Rails asset pipeline.
@@ -0,0 +1,17 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'bootstrap-chosen-rails/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'bootstrap-chosen-rails'
8
+ s.version = BootstrapChosenRails::Rails::VERSION
9
+ s.summary = "An alternate stylesheet for Chosen that integrates with Bootstrap and Rails asset pipeline."
10
+ s.description = "An alternate stylesheet for Chosen that integrates with Bootstrap and Rails asset pipeline."
11
+ s.authors = ["James Carbine"]
12
+ s.email = 'jamescarbine@gmail.com'
13
+ s.files = `git ls-files`.split("\n")
14
+ s.homepage =
15
+ 'https://github.com/bfcoder/bootstrap-chosen-rails'
16
+ s.license = 'MIT'
17
+ end
@@ -0,0 +1,9 @@
1
+ require "rails"
2
+ require "bootstrap-chosen-rails/version"
3
+
4
+ module BootstrapChosenRails
5
+ module Rails
6
+ class Engine < ::Rails::Engine
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ module BootstrapChosenRails
2
+ module Rails
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ $chosen-background: $input-bg !default;
2
+ $chosen-border: 1px solid $input-border !default;
3
+ $chosen-border-color: $input-border-focus;
4
+ $chosen-border-radius: $input-border-radius !default;
5
+ $chosen-multi-border-radius: $chosen-border-radius !default;
6
+ $chosen-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075) !default;
7
+ $chosen-drop-border: $input-border !default;
8
+ $chosen-drop-box-shadow: 0 8px 8px rgba(0, 0, 0, .25) !default;
9
+ $chosen-drop-zindex: 1060 !default;
10
+ $chosen-focus-border: 1px solid $input-border-focus !default;
11
+ $chosen-focus-box-shadow: 0 1px 1px rgba(0, 0, 0, .075) inset, 0 0 8px $chosen-border-color !default;
12
+ $chosen-focus-transition: border linear .2s, box-shadow linear .2s !default;
13
+ $chosen-height: $input-height-base !default;
14
+ $chosen-multi-height: $input-height-base + 6px !default;
15
+ $chosen-sprite-path: asset-url('chosen-sprite.png') !default;
16
+ $chosen-sprite-retina-path: asset-url('chosen-sprite@2x.png') !default;
@@ -0,0 +1,459 @@
1
+ //
2
+ // bootstrap-chosen.scss
3
+ //
4
+ // An alternate stylesheet for Chosen (http://harvesthq.github.com/chosen/).
5
+ // This one is supposed to integrate better with Bootstrap.
6
+ //
7
+ // Submit bugfixes to: http://github.com/alxlit/bootstrap-chosen
8
+ //
9
+
10
+ @import "bootstrap-chosen-variables.scss";
11
+
12
+ .chosen-select { width: 100%; }
13
+ .chosen-select-deselect { width: 100%; }
14
+
15
+ .chosen-container {
16
+ display: inline-block;
17
+ font-size: $font-size-base;
18
+ position: relative;
19
+ vertical-align: middle;
20
+
21
+ .chosen-drop {
22
+ background: $chosen-background;
23
+ border: 1px solid $chosen-drop-border;
24
+ @include border-bottom-radius($chosen-border-radius);
25
+ @include box-shadow($chosen-drop-box-shadow);
26
+ margin-top: -1px;
27
+ position: absolute;
28
+ top: 100%;
29
+ left: -9000px;
30
+ z-index: $chosen-drop-zindex;
31
+ }
32
+
33
+ &.chosen-with-drop .chosen-drop {
34
+ left: 0;
35
+ right: 0;
36
+ }
37
+
38
+ .chosen-results {
39
+ color: $gray;
40
+ margin: 0 4px 4px 0;
41
+ max-height: 240px;
42
+ padding: 0 0 0 4px;
43
+ position: relative;
44
+ overflow-x: hidden;
45
+ overflow-y: auto;
46
+ -webkit-overflow-scrolling: touch;
47
+
48
+ li {
49
+ display: none;
50
+ line-height: $line-height-base; // 15px;
51
+ list-style: none;
52
+ margin: 0;
53
+ padding: 5px 6px;
54
+
55
+ em {
56
+ background: #feffde;
57
+ font-style: normal;
58
+ }
59
+
60
+ &.group-result {
61
+ display: list-item;
62
+ cursor: default;
63
+ color: #999;
64
+ font-weight: bold;
65
+ }
66
+
67
+ &.group-option {
68
+ padding-left: 15px;
69
+ }
70
+
71
+ &.active-result {
72
+ cursor: pointer;
73
+ display: list-item;
74
+ }
75
+
76
+ &.highlighted {
77
+ background-color: $link-color;
78
+ background-image: none;
79
+ color: white;
80
+
81
+ em {
82
+ background: transparent;
83
+ }
84
+ }
85
+
86
+ &.disabled-result {
87
+ display: list-item;
88
+ color: $gray-light;
89
+ }
90
+ }
91
+
92
+ .no-results {
93
+ background: $gray-lighter;
94
+ display: list-item;
95
+ }
96
+ }
97
+
98
+ .chosen-results-scroll {
99
+ background: white;
100
+ margin: 0 4px;
101
+ position: absolute;
102
+ text-align: center;
103
+ width: 321px;
104
+ z-index: 1;
105
+
106
+ span {
107
+ display: inline-block;
108
+ height: $line-height-base; // 17px;
109
+ text-indent: -5000px;
110
+ width: 9px;
111
+ }
112
+ }
113
+
114
+ .chosen-results-scroll-down {
115
+ bottom: 0;
116
+
117
+ span {
118
+ background: url($chosen-sprite-path) no-repeat -4px -3px;
119
+ }
120
+ }
121
+
122
+ .chosen-results-scroll-up {
123
+ span {
124
+ background: url($chosen-sprite-path) no-repeat -22px -3px;
125
+ }
126
+ }
127
+ }
128
+
129
+ .chosen-container-single {
130
+ .chosen-single {
131
+ background-color: $chosen-background;
132
+ -webkit-background-clip: padding-box;
133
+ -moz-background-clip: padding;
134
+ background-clip: padding-box;
135
+ border: $chosen-border;
136
+ @include border-top-radius($chosen-border-radius);
137
+ @include border-bottom-radius($chosen-border-radius);
138
+ @include box-shadow($chosen-box-shadow);
139
+ color: $gray;
140
+ display: block;
141
+ height: $chosen-height;
142
+ overflow: hidden;
143
+ line-height: $chosen-height;
144
+ padding: 0 0 0 8px;
145
+ position: relative;
146
+ text-decoration: none;
147
+ white-space: nowrap;
148
+
149
+ span {
150
+ display: block;
151
+ margin-right: 26px;
152
+ @include text-overflow();
153
+ }
154
+
155
+ abbr {
156
+ background: url($chosen-sprite-path) right top no-repeat;
157
+ display: block;
158
+ font-size: 1px;
159
+ height: 10px;
160
+ position: absolute;
161
+ right: 26px;
162
+ top: ($chosen-height - 10px) / 2;
163
+ width: 12px;
164
+
165
+ &:hover {
166
+ background-position: right -11px;
167
+ }
168
+ }
169
+
170
+ &.chosen-disabled .chosen-single abbr:hover {
171
+ background-position: right 2px;
172
+ }
173
+
174
+ div {
175
+ display: block;
176
+ height: 100%;
177
+ position: absolute;
178
+ top: 0;
179
+ right: 0;
180
+ width: 18px;
181
+
182
+ b {
183
+ background: url($chosen-sprite-path) no-repeat 0 7px;
184
+ display: block;
185
+ height: 100%;
186
+ width: 100%;
187
+ }
188
+ }
189
+ }
190
+
191
+ .chosen-default {
192
+ color: $gray-light;
193
+ }
194
+
195
+ .chosen-search {
196
+ margin: 0;
197
+ padding: 3px 4px;
198
+ position: relative;
199
+ white-space: nowrap;
200
+ z-index: $zindex-dropdown;
201
+
202
+ input[type="text"] {
203
+ background: url($chosen-sprite-path) no-repeat 100% -20px, $chosen-background;
204
+ border: $chosen-border;
205
+ @include border-top-radius($chosen-border-radius);
206
+ @include border-bottom-radius($chosen-border-radius);
207
+ @include box-shadow($chosen-box-shadow);
208
+ margin: 1px 0;
209
+ padding: 4px 20px 4px 4px;
210
+ width: 100%;
211
+ }
212
+ }
213
+
214
+ .chosen-drop {
215
+ margin-top: -1px;
216
+ @include border-bottom-radius($chosen-border-radius);
217
+ -webkit-background-clip: padding-box;
218
+ -moz-background-clip: padding;
219
+ background-clip: padding-box;
220
+ }
221
+ }
222
+
223
+ .chosen-container-single-nosearch {
224
+ .chosen-search {
225
+ input[type="text"] {
226
+ position: absolute;
227
+ left: -9000px;
228
+ }
229
+ }
230
+ }
231
+
232
+ .chosen-container-multi {
233
+ .chosen-choices {
234
+ background-color: $chosen-background;
235
+ border: $chosen-border;
236
+ @include border-top-radius($chosen-multi-border-radius);
237
+ @include border-bottom-radius($chosen-multi-border-radius);
238
+ @include box-shadow($chosen-box-shadow);
239
+ cursor: text;
240
+ height: auto !important;
241
+ height: 1%;
242
+ margin: 0;
243
+ overflow: hidden;
244
+ padding: 0;
245
+ position: relative;
246
+
247
+ li {
248
+ float: left;
249
+ list-style: none;
250
+ }
251
+
252
+ .search-field {
253
+ margin: 0;
254
+ padding: 0;
255
+ white-space: nowrap;
256
+
257
+ input[type="text"] {
258
+ background: transparent !important;
259
+ border: 0 !important;
260
+ @include box-shadow(none);
261
+ color: $gray;
262
+ height: $chosen-multi-height - 8px;
263
+ margin: 0;
264
+ padding: 4px;
265
+ outline: 0;
266
+ }
267
+
268
+ .default {
269
+ color: #999;
270
+ }
271
+ }
272
+
273
+ .search-choice {
274
+ -webkit-background-clip: padding-box;
275
+ -moz-background-clip: padding;
276
+ background-clip: padding-box;
277
+ background-color: $gray-lighter;
278
+ border: $chosen-border;
279
+ @include border-top-radius($chosen-border-radius);
280
+ @include border-bottom-radius($chosen-border-radius);
281
+ @include gradient-vertical(white, $gray-lighter);
282
+ @include box-shadow($chosen-box-shadow);
283
+ color: $gray-dark;
284
+ cursor: default;
285
+ line-height: 13px;
286
+ margin: 6px 0 3px 5px;
287
+ padding: 3px 20px 3px 5px;
288
+ position: relative;
289
+
290
+ .search-choice-close {
291
+ background: url($chosen-sprite-path) right top no-repeat;
292
+ display: block;
293
+ font-size: 1px;
294
+ height: 10px;
295
+ position: absolute;
296
+ right: 4px;
297
+ top: 5px;
298
+ width: 12px;
299
+ cursor: pointer;
300
+
301
+ &:hover {
302
+ background-position: right -11px;
303
+ }
304
+ }
305
+ }
306
+
307
+ .search-choice-focus {
308
+ background: #d4d4d4;
309
+
310
+ .search-choice-close {
311
+ background-position: right -11px;
312
+ }
313
+ }
314
+ }
315
+
316
+ .chosen-results {
317
+ margin: 0 0 0 0;
318
+ padding: 0;
319
+ }
320
+
321
+ .chosen-drop {
322
+ .result-selected {
323
+ display: none;
324
+ }
325
+ }
326
+ }
327
+
328
+ .chosen-container-active {
329
+ .chosen-single {
330
+ border: $chosen-focus-border;
331
+ @include box-shadow($chosen-focus-box-shadow);
332
+ @include transition($chosen-focus-transition);
333
+ }
334
+
335
+ &.chosen-with-drop .chosen-single {
336
+ background-color: $input-bg;
337
+ border: $chosen-focus-border;
338
+ @include border-bottom-radius(0);
339
+ @include box-shadow($chosen-focus-box-shadow);
340
+ @include transition($chosen-focus-transition);
341
+
342
+ div {
343
+ background: transparent;
344
+ border-left: none;
345
+
346
+ b {
347
+ background-position: -18px 7px;
348
+ }
349
+ }
350
+ }
351
+
352
+ .chosen-choices {
353
+ border: $chosen-focus-border;
354
+ @include border-bottom-radius(0);
355
+ @include box-shadow($chosen-focus-box-shadow);
356
+ @include transition($chosen-focus-transition);
357
+
358
+ .search-field input[type="text"] {
359
+ color: #111 !important;
360
+ }
361
+ }
362
+
363
+ &.chosen-with-drop .chosen-choices {
364
+ @include border-bottom-radius(0);
365
+ }
366
+ }
367
+
368
+ .chosen-disabled {
369
+ cursor: default;
370
+ opacity: 0.5 !important;
371
+
372
+ .chosen-single {
373
+ cursor: default;
374
+ }
375
+
376
+ .chosen-choices .search-choice .search-choice-close {
377
+ cursor: default;
378
+ }
379
+ }
380
+
381
+ .chosen-rtl {
382
+ text-align: right;
383
+
384
+ .chosen-single {
385
+ padding: 0 8px 0 0;
386
+ overflow: visible;
387
+
388
+ span {
389
+ margin-left: 26px;
390
+ margin-right: 0;
391
+ direction: rtl;
392
+ }
393
+
394
+ div {
395
+ left: 7px;
396
+ right: auto;
397
+ }
398
+
399
+ abbr {
400
+ left: 26px;
401
+ right: auto;
402
+ }
403
+ }
404
+
405
+ .chosen-choices {
406
+ .search-field input[type="text"] {
407
+ direction: rtl;
408
+ }
409
+
410
+ li {
411
+ float: right;
412
+ }
413
+
414
+ .search-choice {
415
+ margin: 6px 5px 3px 0;
416
+ padding: 3px 5px 3px 19px;
417
+
418
+ .search-choice-close {
419
+ background-position: right top;
420
+ left: 4px;
421
+ right: auto;
422
+ }
423
+ }
424
+ }
425
+
426
+ &.chosen-container-single .chosen-results {
427
+ margin: 0 0 4px 4px;
428
+ padding: 0 4px 0 0;
429
+ }
430
+
431
+ .chosen-results .group-option {
432
+ padding-left: 0;
433
+ padding-right: 15px;
434
+ }
435
+
436
+ &.chosen-container-active.chosen-with-drop .chosen-single div {
437
+ border-right: none;
438
+ }
439
+
440
+ .chosen-search input[type="text"] {
441
+ background: url($chosen-sprite-path) no-repeat -28px -20px, $chosen-background;
442
+ direction: rtl;
443
+ padding: 4px 5px 4px 20px;
444
+ }
445
+ }
446
+
447
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 2dppx) {
448
+ .chosen-rtl .chosen-search input[type="text"],
449
+ .chosen-container-single .chosen-single abbr,
450
+ .chosen-container-single .chosen-single div b,
451
+ .chosen-container-single .chosen-search input[type="text"],
452
+ .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
453
+ .chosen-container .chosen-results-scroll-down span,
454
+ .chosen-container .chosen-results-scroll-up span {
455
+ background-image: url($chosen-sprite-retina-path) !important;
456
+ background-size: 52px 37px !important;
457
+ background-repeat: no-repeat !important;
458
+ }
459
+ }
metadata ADDED
@@ -0,0 +1,56 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bootstrap-chosen-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - James Carbine
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-26 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: An alternate stylesheet for Chosen that integrates with Bootstrap and
14
+ Rails asset pipeline.
15
+ email: jamescarbine@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".gitignore"
21
+ - Gemfile
22
+ - LICENSE
23
+ - README.md
24
+ - bootstrap-chosen-rails.gemspec
25
+ - lib/bootstrap-chosen-rails.rb
26
+ - lib/bootstrap-chosen-rails/version.rb
27
+ - vendor/assets/images/chosen-sprite.png
28
+ - vendor/assets/images/chosen-sprite@2x.png
29
+ - vendor/assets/stylesheets/bootstrap-chosen-variables.scss
30
+ - vendor/assets/stylesheets/bootstrap-chosen.scss
31
+ homepage: https://github.com/bfcoder/bootstrap-chosen-rails
32
+ licenses:
33
+ - MIT
34
+ metadata: {}
35
+ post_install_message:
36
+ rdoc_options: []
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubyforge_project:
51
+ rubygems_version: 2.4.3
52
+ signing_key:
53
+ specification_version: 4
54
+ summary: An alternate stylesheet for Chosen that integrates with Bootstrap and Rails
55
+ asset pipeline.
56
+ test_files: []