select2-rails 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,26 +1,30 @@
1
1
  require "thor"
2
+ require "json"
3
+ require "httpclient"
2
4
 
3
5
  class SourceFile < Thor
4
6
  include Thor::Actions
5
7
 
6
8
  desc "fetch source files", "fetch source files from GitHub"
7
9
  def fetch
10
+ filtered_tags = fetch_tags
11
+ tag = select("Which tag do you want to fetch?", filtered_tags)
8
12
  self.destination_root = "vendor/assets"
9
13
  remote = "https://github.com/ivaynberg/select2"
10
- get "#{remote}/raw/master/select2.png", "images/select2.png"
11
- get "#{remote}/raw/master/spinner.gif", "images/spinner.gif"
12
- get "#{remote}/raw/master/select2.css", "stylesheets/select2.css"
13
- get "#{remote}/raw/master/select2.js", "javascripts/select2.js"
14
+ get "#{remote}/raw/#{tag}/select2.png", "images/select2.png"
15
+ get "#{remote}/raw/#{tag}/spinner.gif", "images/spinner.gif"
16
+ get "#{remote}/raw/#{tag}/select2.css", "stylesheets/select2.css"
17
+ get "#{remote}/raw/#{tag}/select2.js", "javascripts/select2.js"
14
18
  end
15
19
 
16
- desc "convert css to sass file", "convert css to sass file by sass-convert"
20
+ desc "convert css to scss file", "convert css to scss file"
17
21
  def convert
18
22
  self.destination_root = "vendor/assets"
19
23
  inside destination_root do
20
- run("sass-convert -F css -T sass stylesheets/select2.css stylesheets/select2.css.sass")
21
- gsub_file 'stylesheets/select2.css.sass', '(spinner.gif)', "('spinner.gif')"
22
- gsub_file 'stylesheets/select2.css.sass', '(select2.png)', "('select2.png')"
23
- gsub_file 'stylesheets/select2.css.sass', ' url', ' image-url'
24
+ run("cp stylesheets/select2.css stylesheets/select2.css.scss")
25
+ gsub_file 'stylesheets/select2.css.scss', '(spinner.gif)', "('spinner.gif')"
26
+ gsub_file 'stylesheets/select2.css.scss', '(select2.png)', "('select2.png')"
27
+ gsub_file 'stylesheets/select2.css.scss', ' url', ' image-url'
24
28
  end
25
29
  end
26
30
 
@@ -29,5 +33,17 @@ class SourceFile < Thor
29
33
  self.destination_root = "vendor/assets"
30
34
  remove_file "stylesheets/select2.css"
31
35
  end
32
-
33
- end
36
+ private
37
+ def fetch_tags
38
+ http = HTTPClient.new
39
+ response = JSON.parse(http.get("https://api.github.com/repos/ivaynberg/select2/tags").body)
40
+ response.map{|tag| tag["name"]}.sort
41
+ end
42
+ def select msg, elements
43
+ elements.each_with_index do |element, index|
44
+ say(block_given? ? yield(element, index + 1) : ("#{index + 1}. #{element.to_s}"))
45
+ end
46
+ result = ask(msg).to_i
47
+ elements[result - 1]
48
+ end
49
+ end
@@ -1,5 +1,5 @@
1
1
  module Select2
2
2
  module Rails
3
- VERSION = "3.1.0"
3
+ VERSION = "3.1.1"
4
4
  end
5
5
  end
@@ -4,8 +4,8 @@ require File.expand_path("../lib/select2-rails/version", __FILE__)
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "select2-rails"
6
6
  s.version = Select2::Rails::VERSION
7
- s.authors = ["Rogerio Medeiros"]
8
- s.email = ["argerim@gmail.com"]
7
+ s.authors = ["Rogerio Medeiros", "Pedro Nascimento"]
8
+ s.email = ["argerim@gmail.com", "pnascimento@gmail.com"]
9
9
  s.homepage = "https://github.com/argerim/select2-rails"
10
10
  s.summary = %q{Integrate Select2 javascript library with Rails asset pipeline}
11
11
  s.description = %q{Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results. This gem integrates Select2 with Rails asset pipeline for easy of use.}
@@ -18,5 +18,5 @@ Gem::Specification.new do |s|
18
18
  s.add_dependency "thor", "~> 0.14"
19
19
  s.add_development_dependency "bundler", "~> 1.0"
20
20
  s.add_development_dependency "rails", "~> 3.0"
21
- s.add_development_dependency "sass", "~> 3.1"
21
+ s.add_development_dependency "httpclient", "~> 2.2"
22
22
  end
@@ -1,4 +1,4 @@
1
- /*
1
+ /*
2
2
  Copyright 2012 Igor Vaynberg
3
3
 
4
4
  Version: 3.1 Timestamp: Tue Aug 14 09:05:17 PDT 2012
@@ -13,23 +13,23 @@
13
13
  See the License for the specific language governing permissions and limitations under the License.
14
14
  */
15
15
  (function ($) {
16
- if(typeof $.fn.each2 == "undefined"){
17
- $.fn.extend({
18
- /*
19
- * 4-10 times faster .each replacement
20
- * use it carefully, as it overrides jQuery context of element on each iteration
21
- */
22
- each2 : function (c) {
23
- var j = $([0]), i = -1, l = this.length;
24
- while (
25
- ++i < l
26
- && (j.context = j[0] = this[i])
27
- && c.call(j[0], i, j) !== false //"this"=DOM, i=index, j=jQuery object
28
- );
29
- return this;
30
- }
31
- });
32
- }
16
+ if(typeof $.fn.each2 == "undefined"){
17
+ $.fn.extend({
18
+ /*
19
+ * 4-10 times faster .each replacement
20
+ * use it carefully, as it overrides jQuery context of element on each iteration
21
+ */
22
+ each2 : function (c) {
23
+ var j = $([0]), i = -1, l = this.length;
24
+ while (
25
+ ++i < l
26
+ && (j.context = j[0] = this[i])
27
+ && c.call(j[0], i, j) !== false //"this"=DOM, i=index, j=jQuery object
28
+ );
29
+ return this;
30
+ }
31
+ });
32
+ }
33
33
  })(jQuery);
34
34
 
35
35
  (function ($, undefined) {
@@ -181,7 +181,7 @@
181
181
  * the elements under the pointer are scrolled.
182
182
  */
183
183
  function installFilteredMouseMove(element) {
184
- element.bind("mousemove", function (e) {
184
+ element.bind("mousemove", function (e) {
185
185
  var lastpos = $.data(document, "select2-lastpos");
186
186
  if (lastpos === undefined || lastpos.x !== e.pageX || lastpos.y !== e.pageY) {
187
187
  $(e.target).trigger("mousemove-filtered", e);
@@ -233,21 +233,21 @@
233
233
 
234
234
  function measureTextWidth(e) {
235
235
  if (!sizer){
236
- var style = e[0].currentStyle || window.getComputedStyle(e[0], null);
237
- sizer = $("<div></div>").css({
238
- position: "absolute",
239
- left: "-10000px",
240
- top: "-10000px",
241
- display: "none",
242
- fontSize: style.fontSize,
243
- fontFamily: style.fontFamily,
244
- fontStyle: style.fontStyle,
245
- fontWeight: style.fontWeight,
246
- letterSpacing: style.letterSpacing,
247
- textTransform: style.textTransform,
248
- whiteSpace: "nowrap"
249
- });
250
- $("body").append(sizer);
236
+ var style = e[0].currentStyle || window.getComputedStyle(e[0], null);
237
+ sizer = $("<div></div>").css({
238
+ position: "absolute",
239
+ left: "-10000px",
240
+ top: "-10000px",
241
+ display: "none",
242
+ fontSize: style.fontSize,
243
+ fontFamily: style.fontFamily,
244
+ fontStyle: style.fontStyle,
245
+ fontWeight: style.fontWeight,
246
+ letterSpacing: style.letterSpacing,
247
+ textTransform: style.textTransform,
248
+ whiteSpace: "nowrap"
249
+ });
250
+ $("body").append(sizer);
251
251
  }
252
252
  sizer.text(e.val());
253
253
  return sizer.width();
@@ -1082,7 +1082,7 @@
1082
1082
  highlightUnderEvent: function (event) {
1083
1083
  var el = $(event.target).closest(".select2-result-selectable");
1084
1084
  if (el.length > 0 && !el.is(".select2-highlighted")) {
1085
- var choices = this.results.find('.select2-result-selectable');
1085
+ var choices = this.results.find('.select2-result-selectable');
1086
1086
  this.highlight(choices.index(el));
1087
1087
  } else if (el.length == 0) {
1088
1088
  // if we are over an unselectable item remove al highlights
@@ -1162,8 +1162,8 @@
1162
1162
  if (opts.maximumSelectionSize >=1) {
1163
1163
  data = this.data();
1164
1164
  if ($.isArray(data) && data.length >= opts.maximumSelectionSize && checkFormatter(opts.formatSelectionTooBig, "formatSelectionTooBig")) {
1165
- render("<li class='select2-selection-limit'>" + opts.formatSelectionTooBig(opts.maximumSelectionSize) + "</li>");
1166
- return;
1165
+ render("<li class='select2-selection-limit'>" + opts.formatSelectionTooBig(opts.maximumSelectionSize) + "</li>");
1166
+ return;
1167
1167
  }
1168
1168
  }
1169
1169
 
@@ -1329,7 +1329,7 @@
1329
1329
 
1330
1330
  // single
1331
1331
 
1332
- createContainer: function () {
1332
+ createContainer: function () {
1333
1333
  var container = $("<div></div>", {
1334
1334
  "class": "select2-container"
1335
1335
  }).html([
@@ -1740,7 +1740,7 @@
1740
1740
  " <ul class='select2-results'>" ,
1741
1741
  " </ul>" ,
1742
1742
  "</div>"].join(""));
1743
- return container;
1743
+ return container;
1744
1744
  },
1745
1745
 
1746
1746
  // multi
@@ -1928,7 +1928,7 @@
1928
1928
  this.parent.opening.apply(this, arguments);
1929
1929
 
1930
1930
  this.clearPlaceholder();
1931
- this.resizeSearch();
1931
+ this.resizeSearch();
1932
1932
  this.focusSearch();
1933
1933
  },
1934
1934
 
@@ -2113,7 +2113,7 @@
2113
2113
  resizeSearch: function () {
2114
2114
 
2115
2115
  var minimumWidth, left, maxWidth, containerLeft, searchWidth,
2116
- sideBorderPadding = getSideBorderPadding(this.search);
2116
+ sideBorderPadding = getSideBorderPadding(this.search);
2117
2117
 
2118
2118
  minimumWidth = measureTextWidth(this.search) + 10;
2119
2119
 
@@ -2316,7 +2316,7 @@
2316
2316
  formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; },
2317
2317
  formatSelectionTooBig: function (limit) { return "You can only select " + limit + " items"; },
2318
2318
  formatLoadMore: function (pageNumber) { return "Loading more results..."; },
2319
- formatSearching: function () { return "Searching..."; },
2319
+ formatSearching: function () { return "Searching..."; },
2320
2320
  minimumResultsForSearch: 0,
2321
2321
  minimumInputLength: 0,
2322
2322
  maximumSelectionSize: 0,
@@ -0,0 +1,511 @@
1
+ /*
2
+ Version: 3.1 Timestamp: Tue Aug 14 09:05:17 PDT 2012
3
+ */
4
+ .select2-container {
5
+ position: relative;
6
+ display: inline-block;
7
+ /* inline-block for ie7 */
8
+ zoom: 1;
9
+ *display: inline;
10
+ vertical-align: top;
11
+ }
12
+
13
+ .select2-container,
14
+ .select2-drop,
15
+ .select2-search,
16
+ .select2-search input{
17
+ /*
18
+ Force border-box so that % widths fit the parent
19
+ container without overlap because of margin/padding.
20
+
21
+ More Info : http://www.quirksmode.org/css/box.html
22
+ */
23
+ -moz-box-sizing: border-box; /* firefox */
24
+ -ms-box-sizing: border-box; /* ie */
25
+ -webkit-box-sizing: border-box; /* webkit */
26
+ -khtml-box-sizing: border-box; /* konqueror */
27
+ box-sizing: border-box; /* css3 */
28
+ }
29
+
30
+ .select2-container .select2-choice {
31
+ background-color: #fff;
32
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
33
+ background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
34
+ background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
35
+ background-image: -o-linear-gradient(bottom, #eeeeee 0%, #ffffff 50%);
36
+ background-image: -ms-linear-gradient(top, #eeeeee 0%, #ffffff 50%);
37
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#ffffff', GradientType = 0);
38
+ background-image: linear-gradient(top, #eeeeee 0%, #ffffff 50%);
39
+ -webkit-border-radius: 4px;
40
+ -moz-border-radius: 4px;
41
+ border-radius: 4px;
42
+ -moz-background-clip: padding;
43
+ -webkit-background-clip: padding-box;
44
+ background-clip: padding-box;
45
+ border: 1px solid #aaa;
46
+ display: block;
47
+ overflow: hidden;
48
+ white-space: nowrap;
49
+ position: relative;
50
+ height: 26px;
51
+ line-height: 26px;
52
+ padding: 0 0 0 8px;
53
+ color: #444;
54
+ text-decoration: none;
55
+ }
56
+
57
+ .select2-container.select2-drop-above .select2-choice
58
+ {
59
+ border-bottom-color: #aaa;
60
+ -webkit-border-radius:0px 0px 4px 4px;
61
+ -moz-border-radius:0px 0px 4px 4px;
62
+ border-radius:0px 0px 4px 4px;
63
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.9, white));
64
+ background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 90%);
65
+ background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 90%);
66
+ background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 90%);
67
+ background-image: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 90%);
68
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
69
+ background-image: linear-gradient(top, #eeeeee 0%,#ffffff 90%);
70
+ }
71
+
72
+ .select2-container .select2-choice span {
73
+ margin-right: 26px;
74
+ display: block;
75
+ overflow: hidden;
76
+ white-space: nowrap;
77
+ -o-text-overflow: ellipsis;
78
+ -ms-text-overflow: ellipsis;
79
+ text-overflow: ellipsis;
80
+ }
81
+
82
+ .select2-container .select2-choice abbr {
83
+ display: block;
84
+ position: absolute;
85
+ right: 26px;
86
+ top: 8px;
87
+ width: 12px;
88
+ height: 12px;
89
+ font-size: 1px;
90
+ background: image-url('select2.png') right top no-repeat;
91
+ cursor: pointer;
92
+ text-decoration: none;
93
+ border:0;
94
+ outline: 0;
95
+ }
96
+ .select2-container .select2-choice abbr:hover {
97
+ background-position: right -11px;
98
+ cursor: pointer;
99
+ }
100
+
101
+ .select2-drop {
102
+ background: #fff;
103
+ color: #000;
104
+ border: 1px solid #aaa;
105
+ border-top: 0;
106
+ position: absolute;
107
+ top: 100%;
108
+ -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
109
+ -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
110
+ -o-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
111
+ box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
112
+ z-index: 9999;
113
+ width:100%;
114
+ margin-top:-1px;
115
+
116
+ -webkit-border-radius: 0 0 4px 4px;
117
+ -moz-border-radius: 0 0 4px 4px;
118
+ border-radius: 0 0 4px 4px;
119
+ }
120
+
121
+ .select2-drop.select2-drop-above {
122
+ -webkit-border-radius: 4px 4px 0px 0px;
123
+ -moz-border-radius: 4px 4px 0px 0px;
124
+ border-radius: 4px 4px 0px 0px;
125
+ margin-top:1px;
126
+ border-top: 1px solid #aaa;
127
+ border-bottom: 0;
128
+
129
+ -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
130
+ -moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
131
+ -o-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
132
+ box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
133
+ }
134
+
135
+ .select2-container .select2-choice div {
136
+ -webkit-border-radius: 0 4px 4px 0;
137
+ -moz-border-radius: 0 4px 4px 0;
138
+ border-radius: 0 4px 4px 0;
139
+ -moz-background-clip: padding;
140
+ -webkit-background-clip: padding-box;
141
+ background-clip: padding-box;
142
+ background: #ccc;
143
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
144
+ background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
145
+ background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
146
+ background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
147
+ background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%);
148
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#cccccc', endColorstr = '#eeeeee', GradientType = 0);
149
+ background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%);
150
+ border-left: 1px solid #aaa;
151
+ position: absolute;
152
+ right: 0;
153
+ top: 0;
154
+ display: block;
155
+ height: 100%;
156
+ width: 18px;
157
+ }
158
+
159
+ .select2-container .select2-choice div b {
160
+ background: image-url('select2.png') no-repeat 0 1px;
161
+ display: block;
162
+ width: 100%;
163
+ height: 100%;
164
+ }
165
+
166
+ .select2-search {
167
+ display: inline-block;
168
+ white-space: nowrap;
169
+ z-index: 10000;
170
+ min-height: 26px;
171
+ width: 100%;
172
+ margin: 0;
173
+ padding-left: 4px;
174
+ padding-right: 4px;
175
+ }
176
+
177
+ .select2-search-hidden {
178
+ display: block;
179
+ position: absolute;
180
+ left: -10000px;
181
+ }
182
+
183
+ .select2-search input {
184
+ background: #fff image-url('select2.png') no-repeat 100% -22px;
185
+ background: image-url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
186
+ background: image-url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
187
+ background: image-url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
188
+ background: image-url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
189
+ background: image-url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
190
+ background: image-url('select2.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
191
+ padding: 4px 20px 4px 5px;
192
+ outline: 0;
193
+ border: 1px solid #aaa;
194
+ font-family: sans-serif;
195
+ font-size: 1em;
196
+ width:100%;
197
+ margin:0;
198
+ height:auto !important;
199
+ min-height: 26px;
200
+ -webkit-box-shadow: none;
201
+ -moz-box-shadow: none;
202
+ box-shadow: none;
203
+ border-radius: 0;
204
+ -moz-border-radius: 0;
205
+ -webkit-border-radius: 0;
206
+ }
207
+
208
+ .select2-drop.select2-drop-above .select2-search input
209
+ {
210
+ margin-top:4px;
211
+ }
212
+
213
+ .select2-search input.select2-active {
214
+ background: #fff image-url('spinner.gif') no-repeat 100%;
215
+ background: image-url('spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
216
+ background: image-url('spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
217
+ background: image-url('spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
218
+ background: image-url('spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
219
+ background: image-url('spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
220
+ background: image-url('spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
221
+ }
222
+
223
+
224
+ .select2-container-active .select2-choice,
225
+ .select2-container-active .select2-choices {
226
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
227
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
228
+ -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
229
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
230
+ border: 1px solid #5897fb;
231
+ outline: none;
232
+ }
233
+
234
+ .select2-dropdown-open .select2-choice {
235
+ border: 1px solid #aaa;
236
+ border-bottom-color: transparent;
237
+ -webkit-box-shadow: 0 1px 0 #fff inset;
238
+ -moz-box-shadow : 0 1px 0 #fff inset;
239
+ -o-box-shadow : 0 1px 0 #fff inset;
240
+ box-shadow : 0 1px 0 #fff inset;
241
+ background-color: #eee;
242
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
243
+ background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
244
+ background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
245
+ background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
246
+ background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
247
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
248
+ background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
249
+ -webkit-border-bottom-left-radius : 0;
250
+ -webkit-border-bottom-right-radius: 0;
251
+ -moz-border-radius-bottomleft : 0;
252
+ -moz-border-radius-bottomright: 0;
253
+ border-bottom-left-radius : 0;
254
+ border-bottom-right-radius: 0;
255
+ }
256
+
257
+ .select2-dropdown-open .select2-choice div {
258
+ background: transparent;
259
+ border-left: none;
260
+ }
261
+ .select2-dropdown-open .select2-choice div b {
262
+ background-position: -18px 1px;
263
+ }
264
+
265
+ /* results */
266
+ .select2-results {
267
+ margin: 4px 4px 4px 0;
268
+ padding: 0 0 0 4px;
269
+ position: relative;
270
+ overflow-x: hidden;
271
+ overflow-y: auto;
272
+ max-height: 200px;
273
+ }
274
+
275
+ .select2-results ul.select2-result-sub {
276
+ margin: 0 0 0 0;
277
+ }
278
+
279
+ .select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
280
+ .select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 40px }
281
+ .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 60px }
282
+ .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 80px }
283
+ .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 100px }
284
+ .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 110px }
285
+ .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px }
286
+
287
+ .select2-results li {
288
+ list-style: none;
289
+ display: list-item;
290
+ }
291
+
292
+ .select2-results li.select2-result-with-children > .select2-result-label {
293
+ font-weight: bold;
294
+ }
295
+
296
+ .select2-results .select2-result-label {
297
+ padding: 3px 7px 4px;
298
+ margin: 0;
299
+ cursor: pointer;
300
+ }
301
+
302
+ .select2-results .select2-highlighted {
303
+ background: #3875d7;
304
+ color: #fff;
305
+ }
306
+ .select2-results li em {
307
+ background: #feffde;
308
+ font-style: normal;
309
+ }
310
+ .select2-results .select2-highlighted em {
311
+ background: transparent;
312
+ }
313
+ .select2-results .select2-no-results,
314
+ .select2-results .select2-searching,
315
+ .select2-results .select2-selection-limit {
316
+ background: #f4f4f4;
317
+ display: list-item;
318
+ }
319
+
320
+ /*
321
+ disabled look for already selected choices in the results dropdown
322
+ .select2-results .select2-disabled.select2-highlighted {
323
+ color: #666;
324
+ background: #f4f4f4;
325
+ display: list-item;
326
+ cursor: default;
327
+ }
328
+ .select2-results .select2-disabled {
329
+ background: #f4f4f4;
330
+ display: list-item;
331
+ cursor: default;
332
+ }
333
+ */
334
+ .select2-results .select2-disabled {
335
+ display: none;
336
+ }
337
+
338
+ .select2-more-results.select2-active {
339
+ background: #f4f4f4 image-url('spinner.gif') no-repeat 100%;
340
+ }
341
+
342
+ .select2-more-results {
343
+ background: #f4f4f4;
344
+ display: list-item;
345
+ }
346
+
347
+ /* disabled styles */
348
+
349
+ .select2-container.select2-container-disabled .select2-choice {
350
+ background-color: #f4f4f4;
351
+ background-image: none;
352
+ border: 1px solid #ddd;
353
+ cursor: default;
354
+ }
355
+
356
+ .select2-container.select2-container-disabled .select2-choice div {
357
+ background-color: #f4f4f4;
358
+ background-image: none;
359
+ border-left: 0;
360
+ }
361
+
362
+
363
+ /* multiselect */
364
+
365
+ .select2-container-multi .select2-choices {
366
+ background-color: #fff;
367
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
368
+ background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
369
+ background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
370
+ background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
371
+ background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
372
+ background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
373
+ border: 1px solid #aaa;
374
+ margin: 0;
375
+ padding: 0;
376
+ cursor: text;
377
+ overflow: hidden;
378
+ height: auto !important;
379
+ height: 1%;
380
+ position: relative;
381
+ }
382
+
383
+ .select2-container-multi .select2-choices {
384
+ min-height: 26px;
385
+ }
386
+
387
+ .select2-container-multi.select2-container-active .select2-choices {
388
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
389
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
390
+ -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
391
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
392
+ border: 1px solid #5897fb;
393
+ outline: none;
394
+ }
395
+ .select2-container-multi .select2-choices li {
396
+ float: left;
397
+ list-style: none;
398
+ }
399
+ .select2-container-multi .select2-choices .select2-search-field {
400
+ white-space: nowrap;
401
+ margin: 0;
402
+ padding: 0;
403
+ }
404
+
405
+ .select2-container-multi .select2-choices .select2-search-field input {
406
+ color: #666;
407
+ background: transparent !important;
408
+ font-family: sans-serif;
409
+ font-size: 100%;
410
+ height: 15px;
411
+ padding: 5px;
412
+ margin: 1px 0;
413
+ outline: 0;
414
+ border: 0;
415
+ -webkit-box-shadow: none;
416
+ -moz-box-shadow : none;
417
+ -o-box-shadow : none;
418
+ box-shadow : none;
419
+ }
420
+
421
+ .select2-container-multi .select2-choices .select2-search-field input.select2-active {
422
+ background: #fff image-url('spinner.gif') no-repeat 100% !important;
423
+ }
424
+
425
+ .select2-default {
426
+ color: #999 !important;
427
+ }
428
+
429
+ .select2-container-multi .select2-choices .select2-search-choice {
430
+ -webkit-border-radius: 3px;
431
+ -moz-border-radius : 3px;
432
+ border-radius : 3px;
433
+ -moz-background-clip : padding;
434
+ -webkit-background-clip: padding-box;
435
+ background-clip : padding-box;
436
+ background-color: #e4e4e4;
437
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
438
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
439
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
440
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
441
+ background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
442
+ background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
443
+ background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
444
+ -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
445
+ -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
446
+ box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
447
+ color: #333;
448
+ border: 1px solid #aaaaaa;
449
+ line-height: 13px;
450
+ padding: 3px 5px 3px 18px;
451
+ margin: 3px 0 3px 5px;
452
+ position: relative;
453
+ cursor: default;
454
+ }
455
+ .select2-container-multi .select2-choices .select2-search-choice span {
456
+ cursor: default;
457
+ }
458
+ .select2-container-multi .select2-choices .select2-search-choice-focus {
459
+ background: #d4d4d4;
460
+ }
461
+
462
+ .select2-search-choice-close {
463
+ display: block;
464
+ position: absolute;
465
+ right: 3px;
466
+ top: 4px;
467
+ width: 12px;
468
+ height: 13px;
469
+ font-size: 1px;
470
+ background: image-url('select2.png') right top no-repeat;
471
+ outline: none;
472
+ }
473
+
474
+ .select2-container-multi .select2-search-choice-close {
475
+ left: 3px;
476
+ }
477
+
478
+
479
+ .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
480
+ background-position: right -11px;
481
+ }
482
+ .select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
483
+ background-position: right -11px;
484
+ }
485
+
486
+ /* disabled styles */
487
+
488
+ .select2-container-multi.select2-container-disabled .select2-choices{
489
+ background-color: #f4f4f4;
490
+ background-image: none;
491
+ border: 1px solid #ddd;
492
+ cursor: default;
493
+ }
494
+
495
+ .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
496
+ background-image: none;
497
+ background-color: #f4f4f4;
498
+ border: 1px solid #ddd;
499
+ padding: 3px 5px 3px 5px;
500
+ }
501
+
502
+ .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close {
503
+ display: none;
504
+ }
505
+ /* end multiselect */
506
+
507
+ .select2-result-selectable .select2-match,
508
+ .select2-result-unselectable .select2-result-selectable .select2-match { text-decoration: underline; }
509
+ .select2-result-unselectable .select2-match { text-decoration: none; }
510
+
511
+ .select2-offscreen { position: absolute; left: -10000px; }
metadata CHANGED
@@ -1,11 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: select2-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Rogerio Medeiros
9
+ - Pedro Nascimento
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
@@ -60,13 +61,13 @@ dependencies:
60
61
  - !ruby/object:Gem::Version
61
62
  version: '3.0'
62
63
  - !ruby/object:Gem::Dependency
63
- name: sass
64
+ name: httpclient
64
65
  requirement: !ruby/object:Gem::Requirement
65
66
  none: false
66
67
  requirements:
67
68
  - - ~>
68
69
  - !ruby/object:Gem::Version
69
- version: '3.1'
70
+ version: '2.2'
70
71
  type: :development
71
72
  prerelease: false
72
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,12 +75,13 @@ dependencies:
74
75
  requirements:
75
76
  - - ~>
76
77
  - !ruby/object:Gem::Version
77
- version: '3.1'
78
+ version: '2.2'
78
79
  description: Select2 is a jQuery based replacement for select boxes. It supports searching,
79
80
  remote data sets, and infinite scrolling of results. This gem integrates Select2
80
81
  with Rails asset pipeline for easy of use.
81
82
  email:
82
83
  - argerim@gmail.com
84
+ - pnascimento@gmail.com
83
85
  executables: []
84
86
  extensions: []
85
87
  extra_rdoc_files: []
@@ -97,7 +99,7 @@ files:
97
99
  - vendor/assets/images/select2.png
98
100
  - vendor/assets/images/spinner.gif
99
101
  - vendor/assets/javascripts/select2.js
100
- - vendor/assets/stylesheets/select2.css.sass
102
+ - vendor/assets/stylesheets/select2.css.scss
101
103
  homepage: https://github.com/argerim/select2-rails
102
104
  licenses: []
103
105
  post_install_message:
@@ -112,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
114
  version: '0'
113
115
  segments:
114
116
  - 0
115
- hash: -2917332029930381823
117
+ hash: -1950273225062917402
116
118
  required_rubygems_version: !ruby/object:Gem::Requirement
117
119
  none: false
118
120
  requirements:
@@ -121,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
123
  version: '0'
122
124
  segments:
123
125
  - 0
124
- hash: -2917332029930381823
126
+ hash: -1950273225062917402
125
127
  requirements: []
126
128
  rubyforge_project:
127
129
  rubygems_version: 1.8.24
@@ -1,501 +0,0 @@
1
- /*
2
- *Version: 3.1 Timestamp: Tue Aug 14 09:05:17 PDT 2012
3
-
4
- .select2-container
5
- position: relative
6
- display: inline-block
7
- /* inline-block for ie7
8
- zoom: 1
9
- *display: inline
10
- vertical-align: top
11
- /*
12
- * Force border-box so that % widths fit the parent
13
- * container without overlap because of margin/padding.
14
- *
15
- * More Info : http://www.quirksmode.org/css/box.html
16
- -moz-box-sizing: border-box
17
- /* firefox
18
- -ms-box-sizing: border-box
19
- /* ie
20
- -webkit-box-sizing: border-box
21
- /* webkit
22
- -khtml-box-sizing: border-box
23
- /* konqueror
24
- box-sizing: border-box
25
- /* css3
26
-
27
- .select2-drop
28
- /*
29
- * Force border-box so that % widths fit the parent
30
- * container without overlap because of margin/padding.
31
- *
32
- * More Info : http://www.quirksmode.org/css/box.html
33
- -moz-box-sizing: border-box
34
- /* firefox
35
- -ms-box-sizing: border-box
36
- /* ie
37
- -webkit-box-sizing: border-box
38
- /* webkit
39
- -khtml-box-sizing: border-box
40
- /* konqueror
41
- box-sizing: border-box
42
- /* css3
43
-
44
- .select2-search
45
- /*
46
- * Force border-box so that % widths fit the parent
47
- * container without overlap because of margin/padding.
48
- *
49
- * More Info : http://www.quirksmode.org/css/box.html
50
- -moz-box-sizing: border-box
51
- /* firefox
52
- -ms-box-sizing: border-box
53
- /* ie
54
- -webkit-box-sizing: border-box
55
- /* webkit
56
- -khtml-box-sizing: border-box
57
- /* konqueror
58
- box-sizing: border-box
59
- /* css3
60
- input
61
- /*
62
- * Force border-box so that % widths fit the parent
63
- * container without overlap because of margin/padding.
64
- *
65
- * More Info : http://www.quirksmode.org/css/box.html
66
- -moz-box-sizing: border-box
67
- /* firefox
68
- -ms-box-sizing: border-box
69
- /* ie
70
- -webkit-box-sizing: border-box
71
- /* webkit
72
- -khtml-box-sizing: border-box
73
- /* konqueror
74
- box-sizing: border-box
75
- /* css3
76
-
77
- .select2-container
78
- .select2-choice
79
- background-color: #fff
80
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white))
81
- background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%)
82
- background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%)
83
- background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 50%)
84
- background-image: -ms-linear-gradient(top, #eeeeee 0%, white 50%)
85
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#ffffff', GradientType = 0)
86
- background-image: linear-gradient(top, #eeeeee 0%, white 50%)
87
- -webkit-border-radius: 4px
88
- -moz-border-radius: 4px
89
- border-radius: 4px
90
- -moz-background-clip: padding
91
- -webkit-background-clip: padding-box
92
- background-clip: padding-box
93
- border: 1px solid #aaa
94
- display: block
95
- overflow: hidden
96
- white-space: nowrap
97
- position: relative
98
- height: 26px
99
- line-height: 26px
100
- padding: 0 0 0 8px
101
- color: #444
102
- text-decoration: none
103
- &.select2-drop-above .select2-choice
104
- border-bottom-color: #aaa
105
- -webkit-border-radius: 0px 0px 4px 4px
106
- -moz-border-radius: 0px 0px 4px 4px
107
- border-radius: 0px 0px 4px 4px
108
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.9, white))
109
- background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 90%)
110
- background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 90%)
111
- background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 90%)
112
- background-image: -ms-linear-gradient(top, #eeeeee 0%, white 90%)
113
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 )
114
- background-image: linear-gradient(top, #eeeeee 0%, white 90%)
115
- .select2-choice
116
- span
117
- margin-right: 26px
118
- display: block
119
- overflow: hidden
120
- white-space: nowrap
121
- -o-text-overflow: ellipsis
122
- -ms-text-overflow: ellipsis
123
- text-overflow: ellipsis
124
- abbr
125
- display: block
126
- position: absolute
127
- right: 26px
128
- top: 8px
129
- width: 12px
130
- height: 12px
131
- font-size: 1px
132
- background: image-url('select2.png') right top no-repeat
133
- cursor: pointer
134
- text-decoration: none
135
- border: 0
136
- outline: 0
137
- &:hover
138
- background-position: right -11px
139
- cursor: pointer
140
-
141
- .select2-drop
142
- background: #fff
143
- color: #000
144
- border: 1px solid #aaa
145
- border-top: 0
146
- position: absolute
147
- top: 100%
148
- -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
149
- -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
150
- -o-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
151
- box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
152
- z-index: 9999
153
- width: 100%
154
- margin-top: -1px
155
- -webkit-border-radius: 0 0 4px 4px
156
- -moz-border-radius: 0 0 4px 4px
157
- border-radius: 0 0 4px 4px
158
- &.select2-drop-above
159
- -webkit-border-radius: 4px 4px 0px 0px
160
- -moz-border-radius: 4px 4px 0px 0px
161
- border-radius: 4px 4px 0px 0px
162
- margin-top: 1px
163
- border-top: 1px solid #aaa
164
- border-bottom: 0
165
- -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15)
166
- -moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15)
167
- -o-box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15)
168
- box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15)
169
-
170
- .select2-container div
171
- -webkit-border-radius: 0 4px 4px 0
172
- -moz-border-radius: 0 4px 4px 0
173
- border-radius: 0 4px 4px 0
174
- -moz-background-clip: padding
175
- -webkit-background-clip: padding-box
176
- background-clip: padding-box
177
- background: #ccc
178
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #cccccc), color-stop(0.6, #eeeeee))
179
- background-image: -webkit-linear-gradient(center bottom, #cccccc 0%, #eeeeee 60%)
180
- background-image: -moz-linear-gradient(center bottom, #cccccc 0%, #eeeeee 60%)
181
- background-image: -o-linear-gradient(bottom, #cccccc 0%, #eeeeee 60%)
182
- background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%)
183
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#cccccc', endColorstr = '#eeeeee', GradientType = 0)
184
- background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%)
185
- border-left: 1px solid #aaa
186
- position: absolute
187
- right: 0
188
- top: 0
189
- display: block
190
- height: 100%
191
- width: 18px
192
- b
193
- background: image-url('select2.png') no-repeat 0 1px
194
- display: block
195
- width: 100%
196
- height: 100%
197
-
198
- .select2-search
199
- display: inline-block
200
- white-space: nowrap
201
- z-index: 10000
202
- min-height: 26px
203
- width: 100%
204
- margin: 0
205
- padding-left: 4px
206
- padding-right: 4px
207
-
208
- .select2-search-hidden
209
- display: block
210
- position: absolute
211
- left: -10000px
212
-
213
- .select2-search input
214
- background: white image-url('select2.png') no-repeat 100% -22px
215
- background: image-url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee))
216
- background: image-url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%)
217
- background: image-url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%)
218
- background: image-url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%)
219
- background: image-url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, white 85%, #eeeeee 99%)
220
- background: image-url('select2.png') no-repeat 100% -22px, linear-gradient(top, white 85%, #eeeeee 99%)
221
- padding: 4px 20px 4px 5px
222
- outline: 0
223
- border: 1px solid #aaa
224
- font-family: sans-serif
225
- font-size: 1em
226
- width: 100%
227
- margin: 0
228
- height: auto !important
229
- min-height: 26px
230
- -webkit-box-shadow: none
231
- -moz-box-shadow: none
232
- box-shadow: none
233
- border-radius: 0
234
- -moz-border-radius: 0
235
- -webkit-border-radius: 0
236
-
237
- .select2-drop.select2-drop-above input
238
- margin-top: 4px
239
-
240
- .select2-search input.select2-active
241
- background: white image-url('spinner.gif') no-repeat 100%
242
- background: image-url('spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee))
243
- background: image-url('spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%)
244
- background: image-url('spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%)
245
- background: image-url('spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%)
246
- background: image-url('spinner.gif') no-repeat 100%, -ms-linear-gradient(top, white 85%, #eeeeee 99%)
247
- background: image-url('spinner.gif') no-repeat 100%, linear-gradient(top, white 85%, #eeeeee 99%)
248
-
249
- .select2-container-active
250
- .select2-choice, .select2-choices
251
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
252
- -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
253
- -o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
254
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
255
- border: 1px solid #5897fb
256
- outline: none
257
-
258
- .select2-dropdown-open .select2-choice
259
- border: 1px solid #aaa
260
- border-bottom-color: transparent
261
- -webkit-box-shadow: 0 1px 0 #fff inset
262
- -moz-box-shadow: 0 1px 0 #fff inset
263
- -o-box-shadow: 0 1px 0 #fff inset
264
- box-shadow: 0 1px 0 #fff inset
265
- background-color: #eee
266
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee))
267
- background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%)
268
- background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%)
269
- background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%)
270
- background-image: -ms-linear-gradient(top, white 0%, #eeeeee 50%)
271
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 )
272
- background-image: linear-gradient(top, white 0%, #eeeeee 50%)
273
- -webkit-border-bottom-left-radius: 0
274
- -webkit-border-bottom-right-radius: 0
275
- -moz-border-radius-bottomleft: 0
276
- -moz-border-radius-bottomright: 0
277
- border-bottom-left-radius: 0
278
- border-bottom-right-radius: 0
279
- div
280
- background: transparent
281
- border-left: none
282
- b
283
- background-position: -18px 1px
284
-
285
- /* results
286
-
287
- .select2-results
288
- margin: 4px 4px 4px 0
289
- padding: 0 0 0 4px
290
- position: relative
291
- overflow-x: hidden
292
- overflow-y: auto
293
- max-height: 200px
294
- ul.select2-result-sub
295
- margin: 0 0 0 0
296
- > .select2-result-label
297
- padding-left: 20px
298
- ul.select2-result-sub
299
- > .select2-result-label
300
- padding-left: 40px
301
- ul.select2-result-sub
302
- > .select2-result-label
303
- padding-left: 60px
304
- ul.select2-result-sub
305
- > .select2-result-label
306
- padding-left: 80px
307
- ul.select2-result-sub
308
- > .select2-result-label
309
- padding-left: 100px
310
- ul.select2-result-sub
311
- > .select2-result-label
312
- padding-left: 110px
313
- ul.select2-result-sub .select2-result-label
314
- padding-left: 120px
315
- li
316
- list-style: none
317
- display: list-item
318
- &.select2-result-with-children .select2-result-label
319
- font-weight: bold
320
- .select2-result-label
321
- padding: 3px 7px 4px
322
- margin: 0
323
- cursor: pointer
324
- .select2-highlighted
325
- background: #3875d7
326
- color: #fff
327
- li em
328
- background: #feffde
329
- font-style: normal
330
- .select2-highlighted em
331
- background: transparent
332
- .select2-no-results, .select2-searching, .select2-selection-limit
333
- background: #f4f4f4
334
- display: list-item
335
- .select2-disabled
336
- display: none
337
-
338
- /*
339
- *disabled look for already selected choices in the results dropdown
340
- *.select2-results .select2-disabled.select2-highlighted {
341
- * color: #666;
342
- * background: #f4f4f4;
343
- * display: list-item;
344
- * cursor: default;
345
- *}
346
- *.select2-results .select2-disabled {
347
- * background: #f4f4f4;
348
- * display: list-item;
349
- * cursor: default;
350
- *}
351
-
352
- .select2-more-results
353
- &.select2-active
354
- background: #f4f4f4 image-url('spinner.gif') no-repeat 100%
355
- background: #f4f4f4
356
- display: list-item
357
-
358
- /* disabled styles
359
-
360
- .select2-container.select2-container-disabled .select2-choice
361
- background-color: #f4f4f4
362
- background-image: none
363
- border: 1px solid #ddd
364
- cursor: default
365
- div
366
- background-color: #f4f4f4
367
- background-image: none
368
- border-left: 0
369
-
370
- /* multiselect
371
-
372
- .select2-container-multi
373
- .select2-choices
374
- background-color: #fff
375
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, white))
376
- background-image: -webkit-linear-gradient(top, #eeeeee 1%, white 15%)
377
- background-image: -moz-linear-gradient(top, #eeeeee 1%, white 15%)
378
- background-image: -o-linear-gradient(top, #eeeeee 1%, white 15%)
379
- background-image: -ms-linear-gradient(top, #eeeeee 1%, white 15%)
380
- background-image: linear-gradient(top, #eeeeee 1%, white 15%)
381
- border: 1px solid #aaa
382
- margin: 0
383
- padding: 0
384
- cursor: text
385
- overflow: hidden
386
- height: auto !important
387
- height: 1%
388
- position: relative
389
- min-height: 26px
390
- &.select2-container-active .select2-choices
391
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
392
- -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
393
- -o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
394
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
395
- border: 1px solid #5897fb
396
- outline: none
397
- .select2-choices
398
- li
399
- float: left
400
- list-style: none
401
- .select2-search-field
402
- white-space: nowrap
403
- margin: 0
404
- padding: 0
405
- input
406
- color: #666
407
- background: transparent !important
408
- font-family: sans-serif
409
- font-size: 100%
410
- height: 15px
411
- padding: 5px
412
- margin: 1px 0
413
- outline: 0
414
- border: 0
415
- -webkit-box-shadow: none
416
- -moz-box-shadow: none
417
- -o-box-shadow: none
418
- box-shadow: none
419
- &.select2-active
420
- background: white image-url('spinner.gif') no-repeat 100% !important
421
-
422
- .select2-default
423
- color: #999 !important
424
-
425
- .select2-container-multi .select2-choices
426
- .select2-search-choice
427
- -webkit-border-radius: 3px
428
- -moz-border-radius: 3px
429
- border-radius: 3px
430
- -moz-background-clip: padding
431
- -webkit-background-clip: padding-box
432
- background-clip: padding-box
433
- background-color: #e4e4e4
434
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 )
435
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee))
436
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
437
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
438
- background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
439
- background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
440
- background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
441
- -webkit-box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
442
- -moz-box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
443
- box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
444
- color: #333
445
- border: 1px solid #aaaaaa
446
- line-height: 13px
447
- padding: 3px 5px 3px 18px
448
- margin: 3px 0 3px 5px
449
- position: relative
450
- cursor: default
451
- span
452
- cursor: default
453
- .select2-search-choice-focus
454
- background: #d4d4d4
455
-
456
- .select2-search-choice-close
457
- display: block
458
- position: absolute
459
- right: 3px
460
- top: 4px
461
- width: 12px
462
- height: 13px
463
- font-size: 1px
464
- background: image-url('select2.png') right top no-repeat
465
- outline: none
466
-
467
- .select2-container-multi
468
- .select2-search-choice-close
469
- left: 3px
470
- .select2-choices
471
- .select2-search-choice .select2-search-choice-close:hover, .select2-search-choice-focus .select2-search-choice-close
472
- background-position: right -11px
473
- &.select2-container-disabled .select2-choices
474
- background-color: #f4f4f4
475
- background-image: none
476
- border: 1px solid #ddd
477
- cursor: default
478
- .select2-search-choice
479
- background-image: none
480
- background-color: #f4f4f4
481
- border: 1px solid #ddd
482
- padding: 3px 5px 3px 5px
483
- .select2-search-choice-close
484
- display: none
485
-
486
- /* disabled styles
487
-
488
- /* end multiselect
489
-
490
- .select2-result-selectable .select2-match
491
- text-decoration: underline
492
-
493
- .select2-result-unselectable
494
- .select2-result-selectable .select2-match
495
- text-decoration: underline
496
- .select2-match
497
- text-decoration: none
498
-
499
- .select2-offscreen
500
- position: absolute
501
- left: -10000px