bitlove-rollout_ui 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/README.markdown +73 -0
  2. data/Rakefile +12 -0
  3. data/lib/rollout_ui.rb +25 -0
  4. data/lib/rollout_ui/engine/Rakefile +12 -0
  5. data/lib/rollout_ui/engine/app/assets/images/rollout_ui/dark_brick_wall.png +0 -0
  6. data/lib/rollout_ui/engine/app/assets/images/rollout_ui/rollout.png +0 -0
  7. data/lib/rollout_ui/engine/app/assets/javascripts/rollout_ui/application.js +9 -0
  8. data/lib/rollout_ui/engine/app/assets/stylesheets/rollout_ui/application.css +9 -0
  9. data/lib/rollout_ui/engine/app/assets/stylesheets/rollout_ui/layout.css +108 -0
  10. data/lib/rollout_ui/engine/app/controllers/rollout_ui/application_controller.rb +4 -0
  11. data/lib/rollout_ui/engine/app/controllers/rollout_ui/features_controller.rb +25 -0
  12. data/lib/rollout_ui/engine/app/helpers/rollout_ui/application_helper.rb +4 -0
  13. data/lib/rollout_ui/engine/app/views/layouts/rollout_ui/application.html.erb +29 -0
  14. data/lib/rollout_ui/engine/app/views/rollout_ui/features/_feature.html.erb +34 -0
  15. data/lib/rollout_ui/engine/app/views/rollout_ui/features/index.html.erb +14 -0
  16. data/lib/rollout_ui/engine/config/routes.rb +5 -0
  17. data/lib/rollout_ui/engine/lib/rollout_ui/engine.rb +5 -0
  18. data/lib/rollout_ui/engine/lib/tasks/rollout_ui_tasks.rake +4 -0
  19. data/lib/rollout_ui/engine/script/rails +6 -0
  20. data/lib/rollout_ui/engine/vendor/assets/images/rollout_ui/chosen-sprite.png +0 -0
  21. data/lib/rollout_ui/engine/vendor/assets/javascripts/chosen.jquery.js +1011 -0
  22. data/lib/rollout_ui/engine/vendor/assets/javascripts/jquery-ujs.js +367 -0
  23. data/lib/rollout_ui/engine/vendor/assets/stylesheets/chosen.css +369 -0
  24. data/lib/rollout_ui/engine/vendor/assets/stylesheets/normalize.css +431 -0
  25. data/lib/rollout_ui/feature.rb +50 -0
  26. data/lib/rollout_ui/monkey_patch.rb +8 -0
  27. data/lib/rollout_ui/server.rb +71 -0
  28. data/lib/rollout_ui/server/public/rollout_ui/application.css +916 -0
  29. data/lib/rollout_ui/server/public/rollout_ui/application.js +45 -0
  30. data/lib/rollout_ui/server/public/rollout_ui/chosen-sprite.png +0 -0
  31. data/lib/rollout_ui/server/public/rollout_ui/dark_brick_wall.png +0 -0
  32. data/lib/rollout_ui/server/public/rollout_ui/rollout.png +0 -0
  33. data/lib/rollout_ui/server/views/feature.erb +34 -0
  34. data/lib/rollout_ui/server/views/index.erb +5 -0
  35. data/lib/rollout_ui/server/views/layout.erb +32 -0
  36. data/lib/rollout_ui/version.rb +3 -0
  37. data/lib/rollout_ui/wrapper.rb +28 -0
  38. data/spec/dummy/Rakefile +7 -0
  39. data/spec/dummy/app/assets/javascripts/application.js +7 -0
  40. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  41. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  42. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  43. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  44. data/spec/dummy/config.ru +12 -0
  45. data/spec/dummy/config/application.rb +45 -0
  46. data/spec/dummy/config/boot.rb +10 -0
  47. data/spec/dummy/config/database.yml +14 -0
  48. data/spec/dummy/config/environment.rb +5 -0
  49. data/spec/dummy/config/environments/development.rb +30 -0
  50. data/spec/dummy/config/environments/production.rb +60 -0
  51. data/spec/dummy/config/environments/test.rb +39 -0
  52. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  53. data/spec/dummy/config/initializers/inflections.rb +10 -0
  54. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  55. data/spec/dummy/config/initializers/rollout.rb +6 -0
  56. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  57. data/spec/dummy/config/initializers/session_store.rb +8 -0
  58. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  59. data/spec/dummy/config/locales/en.yml +5 -0
  60. data/spec/dummy/config/routes.rb +5 -0
  61. data/spec/dummy/public/404.html +26 -0
  62. data/spec/dummy/public/422.html +26 -0
  63. data/spec/dummy/public/500.html +26 -0
  64. data/spec/dummy/public/favicon.ico +0 -0
  65. data/spec/dummy/script/rails +6 -0
  66. data/spec/lib/rollout_ui/feature_spec.rb +52 -0
  67. data/spec/lib/rollout_ui/wrapper_spec.rb +63 -0
  68. data/spec/requests/engine/engine_spec.rb +95 -0
  69. data/spec/spec_helper.rb +22 -0
  70. metadata +267 -0
@@ -0,0 +1,367 @@
1
+ /**
2
+ * Unobtrusive scripting adapter for jQuery
3
+ *
4
+ * Requires jQuery 1.6.0 or later.
5
+ * https://github.com/rails/jquery-ujs
6
+
7
+ * Uploading file using rails.js
8
+ * =============================
9
+ *
10
+ * By default, browsers do not allow files to be uploaded via AJAX. As a result, if there are any non-blank file fields
11
+ * in the remote form, this adapter aborts the AJAX submission and allows the form to submit through standard means.
12
+ *
13
+ * The `ajax:aborted:file` event allows you to bind your own handler to process the form submission however you wish.
14
+ *
15
+ * Ex:
16
+ * $('form').live('ajax:aborted:file', function(event, elements){
17
+ * // Implement own remote file-transfer handler here for non-blank file inputs passed in `elements`.
18
+ * // Returning false in this handler tells rails.js to disallow standard form submission
19
+ * return false;
20
+ * });
21
+ *
22
+ * The `ajax:aborted:file` event is fired when a file-type input is detected with a non-blank value.
23
+ *
24
+ * Third-party tools can use this hook to detect when an AJAX file upload is attempted, and then use
25
+ * techniques like the iframe method to upload the file instead.
26
+ *
27
+ * Required fields in rails.js
28
+ * ===========================
29
+ *
30
+ * If any blank required inputs (required="required") are detected in the remote form, the whole form submission
31
+ * is canceled. Note that this is unlike file inputs, which still allow standard (non-AJAX) form submission.
32
+ *
33
+ * The `ajax:aborted:required` event allows you to bind your own handler to inform the user of blank required inputs.
34
+ *
35
+ * !! Note that Opera does not fire the form's submit event if there are blank required inputs, so this event may never
36
+ * get fired in Opera. This event is what causes other browsers to exhibit the same submit-aborting behavior.
37
+ *
38
+ * Ex:
39
+ * $('form').live('ajax:aborted:required', function(event, elements){
40
+ * // Returning false in this handler tells rails.js to submit the form anyway.
41
+ * // The blank required inputs are passed to this function in `elements`.
42
+ * return ! confirm("Would you like to submit the form with missing info?");
43
+ * });
44
+ */
45
+
46
+ (function($, undefined) {
47
+ // Shorthand to make it a little easier to call public rails functions from within rails.js
48
+ var rails;
49
+
50
+ $.rails = rails = {
51
+ // Link elements bound by jquery-ujs
52
+ linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]',
53
+
54
+ // Select elements bound by jquery-ujs
55
+ inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
56
+
57
+ // Form elements bound by jquery-ujs
58
+ formSubmitSelector: 'form',
59
+
60
+ // Form input elements bound by jquery-ujs
61
+ formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])',
62
+
63
+ // Form input elements disabled during form submission
64
+ disableSelector: 'input[data-disable-with], button[data-disable-with], textarea[data-disable-with]',
65
+
66
+ // Form input elements re-enabled after form submission
67
+ enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled',
68
+
69
+ // Form required input elements
70
+ requiredInputSelector: 'input[name][required]:not([disabled]),textarea[name][required]:not([disabled])',
71
+
72
+ // Form file input elements
73
+ fileInputSelector: 'input:file',
74
+
75
+ // Link onClick disable selector with possible reenable after remote submission
76
+ linkDisableSelector: 'a[data-disable-with]',
77
+
78
+ // Make sure that every Ajax request sends the CSRF token
79
+ CSRFProtection: function(xhr) {
80
+ var token = $('meta[name="csrf-token"]').attr('content');
81
+ if (token) xhr.setRequestHeader('X-CSRF-Token', token);
82
+ },
83
+
84
+ // Triggers an event on an element and returns false if the event result is false
85
+ fire: function(obj, name, data) {
86
+ var event = $.Event(name);
87
+ obj.trigger(event, data);
88
+ return event.result !== false;
89
+ },
90
+
91
+ // Default confirm dialog, may be overridden with custom confirm dialog in $.rails.confirm
92
+ confirm: function(message) {
93
+ return confirm(message);
94
+ },
95
+
96
+ // Default ajax function, may be overridden with custom function in $.rails.ajax
97
+ ajax: function(options) {
98
+ return $.ajax(options);
99
+ },
100
+
101
+ // Submits "remote" forms and links with ajax
102
+ handleRemote: function(element) {
103
+ var method, url, data,
104
+ crossDomain = element.data('cross-domain') || null,
105
+ dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType),
106
+ options;
107
+
108
+ if (rails.fire(element, 'ajax:before')) {
109
+
110
+ if (element.is('form')) {
111
+ method = element.attr('method');
112
+ url = element.attr('action');
113
+ data = element.serializeArray();
114
+ // memoized value from clicked submit button
115
+ var button = element.data('ujs:submit-button');
116
+ if (button) {
117
+ data.push(button);
118
+ element.data('ujs:submit-button', null);
119
+ }
120
+ } else if (element.is(rails.inputChangeSelector)) {
121
+ method = element.data('method');
122
+ url = element.data('url');
123
+ data = element.serialize();
124
+ if (element.data('params')) data = data + "&" + element.data('params');
125
+ } else {
126
+ method = element.data('method');
127
+ url = element.attr('href');
128
+ data = element.data('params') || null;
129
+ }
130
+
131
+ options = {
132
+ type: method || 'GET', data: data, dataType: dataType, crossDomain: crossDomain,
133
+ // stopping the "ajax:beforeSend" event will cancel the ajax request
134
+ beforeSend: function(xhr, settings) {
135
+ if (settings.dataType === undefined) {
136
+ xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
137
+ }
138
+ return rails.fire(element, 'ajax:beforeSend', [xhr, settings]);
139
+ },
140
+ success: function(data, status, xhr) {
141
+ element.trigger('ajax:success', [data, status, xhr]);
142
+ },
143
+ complete: function(xhr, status) {
144
+ element.trigger('ajax:complete', [xhr, status]);
145
+ },
146
+ error: function(xhr, status, error) {
147
+ element.trigger('ajax:error', [xhr, status, error]);
148
+ }
149
+ };
150
+ // Only pass url to `ajax` options if not blank
151
+ if (url) { options.url = url; }
152
+
153
+ rails.ajax(options);
154
+ }
155
+ },
156
+
157
+ // Handles "data-method" on links such as:
158
+ // <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
159
+ handleMethod: function(link) {
160
+ var href = link.attr('href'),
161
+ method = link.data('method'),
162
+ target = link.attr('target'),
163
+ csrf_token = $('meta[name=csrf-token]').attr('content'),
164
+ csrf_param = $('meta[name=csrf-param]').attr('content'),
165
+ form = $('<form method="post" action="' + href + '"></form>'),
166
+ metadata_input = '<input name="_method" value="' + method + '" type="hidden" />';
167
+
168
+ if (csrf_param !== undefined && csrf_token !== undefined) {
169
+ metadata_input += '<input name="' + csrf_param + '" value="' + csrf_token + '" type="hidden" />';
170
+ }
171
+
172
+ if (target) { form.attr('target', target); }
173
+
174
+ form.hide().append(metadata_input).appendTo('body');
175
+ form.submit();
176
+ },
177
+
178
+ /* Disables form elements:
179
+ - Caches element value in 'ujs:enable-with' data store
180
+ - Replaces element text with value of 'data-disable-with' attribute
181
+ - Sets disabled property to true
182
+ */
183
+ disableFormElements: function(form) {
184
+ form.find(rails.disableSelector).each(function() {
185
+ var element = $(this), method = element.is('button') ? 'html' : 'val';
186
+ element.data('ujs:enable-with', element[method]());
187
+ element[method](element.data('disable-with'));
188
+ element.prop('disabled', true);
189
+ });
190
+ },
191
+
192
+ /* Re-enables disabled form elements:
193
+ - Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`)
194
+ - Sets disabled property to false
195
+ */
196
+ enableFormElements: function(form) {
197
+ form.find(rails.enableSelector).each(function() {
198
+ var element = $(this), method = element.is('button') ? 'html' : 'val';
199
+ if (element.data('ujs:enable-with')) element[method](element.data('ujs:enable-with'));
200
+ element.prop('disabled', false);
201
+ });
202
+ },
203
+
204
+ /* For 'data-confirm' attribute:
205
+ - Fires `confirm` event
206
+ - Shows the confirmation dialog
207
+ - Fires the `confirm:complete` event
208
+
209
+ Returns `true` if no function stops the chain and user chose yes; `false` otherwise.
210
+ Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog.
211
+ Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function
212
+ return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog.
213
+ */
214
+ allowAction: function(element) {
215
+ var message = element.data('confirm'),
216
+ answer = false, callback;
217
+ if (!message) { return true; }
218
+
219
+ if (rails.fire(element, 'confirm')) {
220
+ answer = rails.confirm(message);
221
+ callback = rails.fire(element, 'confirm:complete', [answer]);
222
+ }
223
+ return answer && callback;
224
+ },
225
+
226
+ // Helper function which checks for blank inputs in a form that match the specified CSS selector
227
+ blankInputs: function(form, specifiedSelector, nonBlank) {
228
+ var inputs = $(), input,
229
+ selector = specifiedSelector || 'input,textarea';
230
+ form.find(selector).each(function() {
231
+ input = $(this);
232
+ // Collect non-blank inputs if nonBlank option is true, otherwise, collect blank inputs
233
+ if (nonBlank ? input.val() : !input.val()) {
234
+ inputs = inputs.add(input);
235
+ }
236
+ });
237
+ return inputs.length ? inputs : false;
238
+ },
239
+
240
+ // Helper function which checks for non-blank inputs in a form that match the specified CSS selector
241
+ nonBlankInputs: function(form, specifiedSelector) {
242
+ return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank
243
+ },
244
+
245
+ // Helper function, needed to provide consistent behavior in IE
246
+ stopEverything: function(e) {
247
+ $(e.target).trigger('ujs:everythingStopped');
248
+ e.stopImmediatePropagation();
249
+ return false;
250
+ },
251
+
252
+ // find all the submit events directly bound to the form and
253
+ // manually invoke them. If anyone returns false then stop the loop
254
+ callFormSubmitBindings: function(form) {
255
+ var events = form.data('events'), continuePropagation = true;
256
+ if (events !== undefined && events['submit'] !== undefined) {
257
+ $.each(events['submit'], function(i, obj){
258
+ if (typeof obj.handler === 'function') return continuePropagation = obj.handler(obj.data);
259
+ });
260
+ }
261
+ return continuePropagation;
262
+ },
263
+
264
+ // replace element's html with the 'data-disable-with' after storing original html
265
+ // and prevent clicking on it
266
+ disableElement: function(element) {
267
+ element.data('ujs:enable-with', element.html()); // store enabled state
268
+ element.html(element.data('disable-with')); // set to disabled state
269
+ element.bind('click.railsDisable', function(e) { // prevent further clicking
270
+ return rails.stopEverything(e)
271
+ });
272
+ },
273
+
274
+ // restore element to its original state which was disabled by 'disableElement' above
275
+ enableElement: function(element) {
276
+ if (element.data('ujs:enable-with') !== undefined) {
277
+ element.html(element.data('ujs:enable-with')); // set to old enabled state
278
+ // this should be element.removeData('ujs:enable-with')
279
+ // but, there is currently a bug in jquery which makes hyphenated data attributes not get removed
280
+ element.data('ujs:enable-with', false); // clean up cache
281
+ }
282
+ element.unbind('click.railsDisable'); // enable element
283
+ }
284
+
285
+ };
286
+
287
+ $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }});
288
+
289
+ $(rails.linkDisableSelector).live('ajax:complete', function() {
290
+ rails.enableElement($(this));
291
+ });
292
+
293
+ $(rails.linkClickSelector).live('click.rails', function(e) {
294
+ var link = $(this), method = link.data('method'), data = link.data('params');
295
+ if (!rails.allowAction(link)) return rails.stopEverything(e);
296
+
297
+ if (link.is(rails.linkDisableSelector)) rails.disableElement(link);
298
+
299
+ if (link.data('remote') !== undefined) {
300
+ if ( (e.metaKey || e.ctrlKey) && (!method || method === 'GET') && !data ) { return true; }
301
+ rails.handleRemote(link);
302
+ return false;
303
+ } else if (link.data('method')) {
304
+ rails.handleMethod(link);
305
+ return false;
306
+ }
307
+ });
308
+
309
+ $(rails.inputChangeSelector).live('change.rails', function(e) {
310
+ var link = $(this);
311
+ if (!rails.allowAction(link)) return rails.stopEverything(e);
312
+
313
+ rails.handleRemote(link);
314
+ return false;
315
+ });
316
+
317
+ $(rails.formSubmitSelector).live('submit.rails', function(e) {
318
+ var form = $(this),
319
+ remote = form.data('remote') !== undefined,
320
+ blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector),
321
+ nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector);
322
+
323
+ if (!rails.allowAction(form)) return rails.stopEverything(e);
324
+
325
+ // skip other logic when required values are missing or file upload is present
326
+ if (blankRequiredInputs && form.attr("novalidate") == undefined && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) {
327
+ return rails.stopEverything(e);
328
+ }
329
+
330
+ if (remote) {
331
+ if (nonBlankFileInputs) {
332
+ return rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);
333
+ }
334
+
335
+ // If browser does not support submit bubbling, then this live-binding will be called before direct
336
+ // bindings. Therefore, we should directly call any direct bindings before remotely submitting form.
337
+ if (!$.support.submitBubbles && rails.callFormSubmitBindings(form) === false) return rails.stopEverything(e);
338
+
339
+ rails.handleRemote(form);
340
+ return false;
341
+ } else {
342
+ // slight timeout so that the submit button gets properly serialized
343
+ setTimeout(function(){ rails.disableFormElements(form); }, 13);
344
+ }
345
+ });
346
+
347
+ $(rails.formInputClickSelector).live('click.rails', function(event) {
348
+ var button = $(this);
349
+
350
+ if (!rails.allowAction(button)) return rails.stopEverything(event);
351
+
352
+ // register the pressed submit button
353
+ var name = button.attr('name'),
354
+ data = name ? {name:name, value:button.val()} : null;
355
+
356
+ button.closest('form').data('ujs:submit-button', data);
357
+ });
358
+
359
+ $(rails.formSubmitSelector).live('ajax:beforeSend.rails', function(event) {
360
+ if (this == event.target) rails.disableFormElements($(this));
361
+ });
362
+
363
+ $(rails.formSubmitSelector).live('ajax:complete.rails', function(event) {
364
+ if (this == event.target) rails.enableFormElements($(this));
365
+ });
366
+
367
+ })( jQuery );
@@ -0,0 +1,369 @@
1
+ /* @group Base */
2
+ .chzn-container {
3
+ font-size: 13px;
4
+ position: relative;
5
+ display: inline-block;
6
+ zoom: 1;
7
+ *display: inline;
8
+ }
9
+ .chzn-container .chzn-drop {
10
+ background: #fff;
11
+ border: 1px solid #aaa;
12
+ border-top: 0;
13
+ position: absolute;
14
+ top: 29px;
15
+ left: 0;
16
+ -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
17
+ -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
18
+ -o-box-shadow : 0 4px 5px rgba(0,0,0,.15);
19
+ box-shadow : 0 4px 5px rgba(0,0,0,.15);
20
+ z-index: 999;
21
+ }
22
+ /* @end */
23
+
24
+ /* @group Single Chosen */
25
+ .chzn-container-single .chzn-single {
26
+ background-color: #fff;
27
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
28
+ background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
29
+ background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
30
+ background-image: -o-linear-gradient(top, #eeeeee 0%,#ffffff 50%);
31
+ background-image: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 50%);
32
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
33
+ background-image: linear-gradient(top, #eeeeee 0%,#ffffff 50%);
34
+ -webkit-border-radius: 4px;
35
+ -moz-border-radius : 4px;
36
+ border-radius : 4px;
37
+ -moz-background-clip : padding;
38
+ -webkit-background-clip: padding-box;
39
+ background-clip : padding-box;
40
+ border: 1px solid #aaa;
41
+ display: block;
42
+ overflow: hidden;
43
+ white-space: nowrap;
44
+ position: relative;
45
+ height: 26px;
46
+ line-height: 26px;
47
+ padding: 0 0 0 8px;
48
+ color: #444;
49
+ text-decoration: none;
50
+ }
51
+ .chzn-container-single .chzn-single span {
52
+ margin-right: 26px;
53
+ display: block;
54
+ overflow: hidden;
55
+ white-space: nowrap;
56
+ -o-text-overflow: ellipsis;
57
+ -ms-text-overflow: ellipsis;
58
+ text-overflow: ellipsis;
59
+ }
60
+ .chzn-container-single .chzn-single abbr {
61
+ display: block;
62
+ position: absolute;
63
+ right: 26px;
64
+ top: 8px;
65
+ width: 12px;
66
+ height: 13px;
67
+ font-size: 1px;
68
+ background: url(/assets/rollout_ui/chosen-sprite.png) right top no-repeat;
69
+ }
70
+ .chzn-container-single .chzn-single abbr:hover {
71
+ background-position: right -11px;
72
+ }
73
+ .chzn-container-single .chzn-single div {
74
+ -webkit-border-radius: 0 4px 4px 0;
75
+ -moz-border-radius : 0 4px 4px 0;
76
+ border-radius : 0 4px 4px 0;
77
+ -moz-background-clip : padding;
78
+ -webkit-background-clip: padding-box;
79
+ background-clip : padding-box;
80
+ background: #ccc;
81
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
82
+ background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
83
+ background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
84
+ background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
85
+ background-image: -ms-linear-gradient(top, #cccccc 0%,#eeeeee 60%);
86
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#eeeeee',GradientType=0 );
87
+ background-image: linear-gradient(top, #cccccc 0%,#eeeeee 60%);
88
+ border-left: 1px solid #aaa;
89
+ position: absolute;
90
+ right: 0;
91
+ top: 0;
92
+ display: block;
93
+ height: 100%;
94
+ width: 18px;
95
+ }
96
+ .chzn-container-single .chzn-single div b {
97
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat 0 1px;
98
+ display: block;
99
+ width: 100%;
100
+ height: 100%;
101
+ }
102
+ .chzn-container-single .chzn-search {
103
+ padding: 3px 4px;
104
+ position: relative;
105
+ margin: 0;
106
+ white-space: nowrap;
107
+ z-index: 1010;
108
+ }
109
+ .chzn-container-single .chzn-search input {
110
+ background: #fff url('/assets/rollout_ui/chosen-sprite.png') no-repeat 100% -22px;
111
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
112
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
113
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
114
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
115
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
116
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
117
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
118
+ margin: 1px 0;
119
+ padding: 4px 20px 4px 5px;
120
+ outline: 0;
121
+ border: 1px solid #aaa;
122
+ font-family: sans-serif;
123
+ font-size: 1em;
124
+ }
125
+ .chzn-container-single .chzn-drop {
126
+ -webkit-border-radius: 0 0 4px 4px;
127
+ -moz-border-radius : 0 0 4px 4px;
128
+ border-radius : 0 0 4px 4px;
129
+ -moz-background-clip : padding;
130
+ -webkit-background-clip: padding-box;
131
+ background-clip : padding-box;
132
+ }
133
+ /* @end */
134
+
135
+ .chzn-container-single-nosearch .chzn-search input {
136
+ position: absolute;
137
+ left: -9000px;
138
+ }
139
+
140
+ /* @group Multi Chosen */
141
+ .chzn-container-multi .chzn-choices {
142
+ background-color: #fff;
143
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
144
+ background-image: -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
145
+ background-image: -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
146
+ background-image: -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
147
+ background-image: -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
148
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
149
+ background-image: linear-gradient(top, #ffffff 85%,#eeeeee 99%);
150
+ border: 1px solid #aaa;
151
+ margin: 0;
152
+ padding: 0;
153
+ cursor: text;
154
+ overflow: hidden;
155
+ height: auto !important;
156
+ height: 1%;
157
+ position: relative;
158
+ }
159
+ .chzn-container-multi .chzn-choices li {
160
+ float: left;
161
+ list-style: none;
162
+ }
163
+ .chzn-container-multi .chzn-choices .search-field {
164
+ white-space: nowrap;
165
+ margin: 0;
166
+ padding: 0;
167
+ }
168
+ .chzn-container-multi .chzn-choices .search-field input {
169
+ color: #666;
170
+ background: transparent !important;
171
+ border: 0 !important;
172
+ padding: 5px;
173
+ margin: 1px 0;
174
+ outline: 0;
175
+ -webkit-box-shadow: none;
176
+ -moz-box-shadow : none;
177
+ -o-box-shadow : none;
178
+ box-shadow : none;
179
+ }
180
+ .chzn-container-multi .chzn-choices .search-field .default {
181
+ color: #999;
182
+ }
183
+ .chzn-container-multi .chzn-choices .search-choice {
184
+ -webkit-border-radius: 3px;
185
+ -moz-border-radius : 3px;
186
+ border-radius : 3px;
187
+ -moz-background-clip : padding;
188
+ -webkit-background-clip: padding-box;
189
+ background-clip : padding-box;
190
+ background-color: #e4e4e4;
191
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #e4e4e4), color-stop(0.7, #eeeeee));
192
+ background-image: -webkit-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%);
193
+ background-image: -moz-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%);
194
+ background-image: -o-linear-gradient(bottom, #e4e4e4 0%, #eeeeee 70%);
195
+ background-image: -ms-linear-gradient(top, #e4e4e4 0%,#eeeeee 70%);
196
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e4e4e4', endColorstr='#eeeeee',GradientType=0 );
197
+ background-image: linear-gradient(top, #e4e4e4 0%,#eeeeee 70%);
198
+ color: #333;
199
+ border: 1px solid #b4b4b4;
200
+ line-height: 13px;
201
+ padding: 3px 19px 3px 6px;
202
+ margin: 3px 0 3px 5px;
203
+ position: relative;
204
+ }
205
+ .chzn-container-multi .chzn-choices .search-choice span {
206
+ cursor: default;
207
+ }
208
+ .chzn-container-multi .chzn-choices .search-choice-focus {
209
+ background: #d4d4d4;
210
+ }
211
+ .chzn-container-multi .chzn-choices .search-choice .search-choice-close {
212
+ display: block;
213
+ position: absolute;
214
+ right: 3px;
215
+ top: 4px;
216
+ width: 12px;
217
+ height: 13px;
218
+ font-size: 1px;
219
+ background: url(/assets/rollout_ui/chosen-sprite.png) right top no-repeat;
220
+ }
221
+ .chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
222
+ background-position: right -11px;
223
+ }
224
+ .chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
225
+ background-position: right -11px;
226
+ }
227
+ /* @end */
228
+
229
+ /* @group Results */
230
+ .chzn-container .chzn-results {
231
+ margin: 0 4px 4px 0;
232
+ max-height: 190px;
233
+ padding: 0 0 0 4px;
234
+ position: relative;
235
+ overflow-x: hidden;
236
+ overflow-y: auto;
237
+ }
238
+ .chzn-container-multi .chzn-results {
239
+ margin: -1px 0 0;
240
+ padding: 0;
241
+ }
242
+ .chzn-container .chzn-results li {
243
+ display: none;
244
+ line-height: 80%;
245
+ padding: 7px 7px 8px;
246
+ margin: 0;
247
+ list-style: none;
248
+ }
249
+ .chzn-container .chzn-results .active-result {
250
+ cursor: pointer;
251
+ display: list-item;
252
+ }
253
+ .chzn-container .chzn-results .highlighted {
254
+ background: #3875d7;
255
+ color: #fff;
256
+ }
257
+ .chzn-container .chzn-results li em {
258
+ background: #feffde;
259
+ font-style: normal;
260
+ }
261
+ .chzn-container .chzn-results .highlighted em {
262
+ background: transparent;
263
+ }
264
+ .chzn-container .chzn-results .no-results {
265
+ background: #f4f4f4;
266
+ display: list-item;
267
+ }
268
+ .chzn-container .chzn-results .group-result {
269
+ cursor: default;
270
+ color: #999;
271
+ font-weight: bold;
272
+ }
273
+ .chzn-container .chzn-results .group-option {
274
+ padding-left: 20px;
275
+ }
276
+ .chzn-container-multi .chzn-drop .result-selected {
277
+ display: none;
278
+ }
279
+ /* @end */
280
+
281
+ /* @group Active */
282
+ .chzn-container-active .chzn-single {
283
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
284
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
285
+ -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
286
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
287
+ border: 1px solid #5897fb;
288
+ }
289
+ .chzn-container-active .chzn-single-with-drop {
290
+ border: 1px solid #aaa;
291
+ -webkit-box-shadow: 0 1px 0 #fff inset;
292
+ -moz-box-shadow : 0 1px 0 #fff inset;
293
+ -o-box-shadow : 0 1px 0 #fff inset;
294
+ box-shadow : 0 1px 0 #fff inset;
295
+ background-color: #eee;
296
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
297
+ background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
298
+ background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
299
+ background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
300
+ background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
301
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
302
+ background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
303
+ -webkit-border-bottom-left-radius : 0;
304
+ -webkit-border-bottom-right-radius: 0;
305
+ -moz-border-radius-bottomleft : 0;
306
+ -moz-border-radius-bottomright: 0;
307
+ border-bottom-left-radius : 0;
308
+ border-bottom-right-radius: 0;
309
+ }
310
+ .chzn-container-active .chzn-single-with-drop div {
311
+ background: transparent;
312
+ border-left: none;
313
+ }
314
+ .chzn-container-active .chzn-single-with-drop div b {
315
+ background-position: -18px 1px;
316
+ }
317
+ .chzn-container-active .chzn-choices {
318
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
319
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
320
+ -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
321
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
322
+ border: 1px solid #5897fb;
323
+ }
324
+ .chzn-container-active .chzn-choices .search-field input {
325
+ color: #111 !important;
326
+ }
327
+ /* @end */
328
+
329
+ /* @group Disabled Support */
330
+ .chzn-disabled {
331
+ cursor: default;
332
+ opacity:0.5 !important;
333
+ }
334
+ .chzn-disabled .chzn-single {
335
+ cursor: default;
336
+ }
337
+ .chzn-disabled .chzn-choices .search-choice .search-choice-close {
338
+ cursor: default;
339
+ }
340
+
341
+ /* @group Right to Left */
342
+ .chzn-rtl { direction:rtl;text-align: right; }
343
+ .chzn-rtl .chzn-single { padding-left: 0; padding-right: 8px; }
344
+ .chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; }
345
+ .chzn-rtl .chzn-single div {
346
+ left: 0; right: auto;
347
+ border-left: none; border-right: 1px solid #aaaaaa;
348
+ -webkit-border-radius: 4px 0 0 4px;
349
+ -moz-border-radius : 4px 0 0 4px;
350
+ border-radius : 4px 0 0 4px;
351
+ }
352
+ .chzn-rtl .chzn-choices li { float: right; }
353
+ .chzn-rtl .chzn-choices .search-choice { padding: 3px 6px 3px 19px; margin: 3px 5px 3px 0; }
354
+ .chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 5px; right: auto; background-position: right top;}
355
+ .chzn-rtl.chzn-container-single .chzn-results { margin-left: 4px; margin-right: 0; padding-left: 0; padding-right: 4px; }
356
+ .chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 20px; }
357
+ .chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
358
+ .chzn-rtl .chzn-search input {
359
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat -38px -22px, #ffffff;
360
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
361
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
362
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
363
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
364
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
365
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
366
+ background: url('/assets/rollout_ui/chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
367
+ padding: 4px 5px 4px 20px;
368
+ }
369
+ /* @end */