Commit 12782adf03ec6afef85434bfe0091a21cdb69b8e
Exists in
master
and in
4 other branches
Merge branch 'master' of dev.gitlabhq.com:gitlabhq
Showing
69 changed files
with
1765 additions
and
1712 deletions
Show diff stats
app/assets/javascripts/application.js
@@ -10,6 +10,8 @@ | @@ -10,6 +10,8 @@ | ||
10 | //= require jquery.ui.selectmenu | 10 | //= require jquery.ui.selectmenu |
11 | //= require jquery.tagify | 11 | //= require jquery.tagify |
12 | //= require jquery.cookie | 12 | //= require jquery.cookie |
13 | +//= require modernizr | ||
14 | +//= require chosen | ||
13 | //= require raphael | 15 | //= require raphael |
14 | //= require branch-graph | 16 | //= require branch-graph |
15 | //= require_tree . | 17 | //= require_tree . |
@@ -22,9 +24,9 @@ $(function(){ | @@ -22,9 +24,9 @@ $(function(){ | ||
22 | $('select#branch').selectmenu({style:'popup', width:200}); | 24 | $('select#branch').selectmenu({style:'popup', width:200}); |
23 | $('select#tag').selectmenu({style:'popup', width:200}); | 25 | $('select#tag').selectmenu({style:'popup', width:200}); |
24 | 26 | ||
25 | - $(".account-box").mouseenter(showMenu); | ||
26 | - $(".account-box").mouseleave(resetMenu); | ||
27 | - | 27 | + $(".account-box").mouseenter(showMenu); |
28 | + $(".account-box").mouseleave(resetMenu); | ||
29 | + | ||
28 | }); | 30 | }); |
29 | 31 | ||
30 | function updatePage(data){ | 32 | function updatePage(data){ |
@@ -32,9 +34,9 @@ function updatePage(data){ | @@ -32,9 +34,9 @@ function updatePage(data){ | ||
32 | } | 34 | } |
33 | 35 | ||
34 | function showMenu() { | 36 | function showMenu() { |
35 | - $(this).toggleClass('hover'); | 37 | + $(this).toggleClass('hover'); |
36 | } | 38 | } |
37 | 39 | ||
38 | function resetMenu() { | 40 | function resetMenu() { |
39 | - $(this).removeClass("hover"); | 41 | + $(this).removeClass("hover"); |
40 | } | 42 | } |
app/assets/javascripts/chosen.jquery.js
@@ -1,901 +0,0 @@ | @@ -1,901 +0,0 @@ | ||
1 | -// Chosen, a Select Box Enhancer for jQuery and Protoype | ||
2 | -// by Patrick Filler for Harvest, http://getharvest.com | ||
3 | -// | ||
4 | -// Version 0.9.5 | ||
5 | -// Full source at https://github.com/harvesthq/chosen | ||
6 | -// Copyright (c) 2011 Harvest http://getharvest.com | ||
7 | - | ||
8 | -// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md | ||
9 | -// This file is generated by `cake build`, do not edit it by hand. | ||
10 | -(function() { | ||
11 | - var SelectParser; | ||
12 | - SelectParser = (function() { | ||
13 | - function SelectParser() { | ||
14 | - this.options_index = 0; | ||
15 | - this.parsed = []; | ||
16 | - } | ||
17 | - SelectParser.prototype.add_node = function(child) { | ||
18 | - if (child.nodeName === "OPTGROUP") { | ||
19 | - return this.add_group(child); | ||
20 | - } else { | ||
21 | - return this.add_option(child); | ||
22 | - } | ||
23 | - }; | ||
24 | - SelectParser.prototype.add_group = function(group) { | ||
25 | - var group_position, option, _i, _len, _ref, _results; | ||
26 | - group_position = this.parsed.length; | ||
27 | - this.parsed.push({ | ||
28 | - array_index: group_position, | ||
29 | - group: true, | ||
30 | - label: group.label, | ||
31 | - children: 0, | ||
32 | - disabled: group.disabled | ||
33 | - }); | ||
34 | - _ref = group.childNodes; | ||
35 | - _results = []; | ||
36 | - for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
37 | - option = _ref[_i]; | ||
38 | - _results.push(this.add_option(option, group_position, group.disabled)); | ||
39 | - } | ||
40 | - return _results; | ||
41 | - }; | ||
42 | - SelectParser.prototype.add_option = function(option, group_position, group_disabled) { | ||
43 | - if (option.nodeName === "OPTION") { | ||
44 | - if (option.text !== "") { | ||
45 | - if (group_position != null) { | ||
46 | - this.parsed[group_position].children += 1; | ||
47 | - } | ||
48 | - this.parsed.push({ | ||
49 | - array_index: this.parsed.length, | ||
50 | - options_index: this.options_index, | ||
51 | - value: option.value, | ||
52 | - text: option.text, | ||
53 | - html: option.innerHTML, | ||
54 | - selected: option.selected, | ||
55 | - disabled: group_disabled === true ? group_disabled : option.disabled, | ||
56 | - group_array_index: group_position, | ||
57 | - classes: option.className, | ||
58 | - style: option.style.cssText | ||
59 | - }); | ||
60 | - } else { | ||
61 | - this.parsed.push({ | ||
62 | - array_index: this.parsed.length, | ||
63 | - options_index: this.options_index, | ||
64 | - empty: true | ||
65 | - }); | ||
66 | - } | ||
67 | - return this.options_index += 1; | ||
68 | - } | ||
69 | - }; | ||
70 | - return SelectParser; | ||
71 | - })(); | ||
72 | - SelectParser.select_to_array = function(select) { | ||
73 | - var child, parser, _i, _len, _ref; | ||
74 | - parser = new SelectParser(); | ||
75 | - _ref = select.childNodes; | ||
76 | - for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
77 | - child = _ref[_i]; | ||
78 | - parser.add_node(child); | ||
79 | - } | ||
80 | - return parser.parsed; | ||
81 | - }; | ||
82 | - this.SelectParser = SelectParser; | ||
83 | -}).call(this); | ||
84 | -(function() { | ||
85 | - /* | ||
86 | - Chosen source: generate output using 'cake build' | ||
87 | - Copyright (c) 2011 by Harvest | ||
88 | - */ | ||
89 | - var AbstractChosen, root; | ||
90 | - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | ||
91 | - root = this; | ||
92 | - AbstractChosen = (function() { | ||
93 | - function AbstractChosen(form_field, options) { | ||
94 | - this.form_field = form_field; | ||
95 | - this.options = options != null ? options : {}; | ||
96 | - this.set_default_values(); | ||
97 | - this.is_multiple = this.form_field.multiple; | ||
98 | - this.default_text_default = this.is_multiple ? "Select Some Options" : "Select an Option"; | ||
99 | - this.setup(); | ||
100 | - this.set_up_html(); | ||
101 | - this.register_observers(); | ||
102 | - this.finish_setup(); | ||
103 | - } | ||
104 | - AbstractChosen.prototype.set_default_values = function() { | ||
105 | - this.click_test_action = __bind(function(evt) { | ||
106 | - return this.test_active_click(evt); | ||
107 | - }, this); | ||
108 | - this.activate_action = __bind(function(evt) { | ||
109 | - return this.activate_field(evt); | ||
110 | - }, this); | ||
111 | - this.active_field = false; | ||
112 | - this.mouse_on_container = false; | ||
113 | - this.results_showing = false; | ||
114 | - this.result_highlighted = null; | ||
115 | - this.result_single_selected = null; | ||
116 | - this.allow_single_deselect = (this.options.allow_single_deselect != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false; | ||
117 | - this.disable_search_threshold = this.options.disable_search_threshold || 0; | ||
118 | - this.choices = 0; | ||
119 | - return this.results_none_found = this.options.no_results_text || "No results match"; | ||
120 | - }; | ||
121 | - AbstractChosen.prototype.mouse_enter = function() { | ||
122 | - return this.mouse_on_container = true; | ||
123 | - }; | ||
124 | - AbstractChosen.prototype.mouse_leave = function() { | ||
125 | - return this.mouse_on_container = false; | ||
126 | - }; | ||
127 | - AbstractChosen.prototype.input_focus = function(evt) { | ||
128 | - if (!this.active_field) { | ||
129 | - return setTimeout((__bind(function() { | ||
130 | - return this.container_mousedown(); | ||
131 | - }, this)), 50); | ||
132 | - } | ||
133 | - }; | ||
134 | - AbstractChosen.prototype.input_blur = function(evt) { | ||
135 | - if (!this.mouse_on_container) { | ||
136 | - this.active_field = false; | ||
137 | - return setTimeout((__bind(function() { | ||
138 | - return this.blur_test(); | ||
139 | - }, this)), 100); | ||
140 | - } | ||
141 | - }; | ||
142 | - AbstractChosen.prototype.result_add_option = function(option) { | ||
143 | - var classes, style; | ||
144 | - if (!option.disabled) { | ||
145 | - option.dom_id = this.container_id + "_o_" + option.array_index; | ||
146 | - classes = option.selected && this.is_multiple ? [] : ["active-result"]; | ||
147 | - if (option.selected) { | ||
148 | - classes.push("result-selected"); | ||
149 | - } | ||
150 | - if (option.group_array_index != null) { | ||
151 | - classes.push("group-option"); | ||
152 | - } | ||
153 | - if (option.classes !== "") { | ||
154 | - classes.push(option.classes); | ||
155 | - } | ||
156 | - style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : ""; | ||
157 | - return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"' + style + '>' + option.html + '</li>'; | ||
158 | - } else { | ||
159 | - return ""; | ||
160 | - } | ||
161 | - }; | ||
162 | - AbstractChosen.prototype.results_update_field = function() { | ||
163 | - this.result_clear_highlight(); | ||
164 | - this.result_single_selected = null; | ||
165 | - return this.results_build(); | ||
166 | - }; | ||
167 | - AbstractChosen.prototype.results_toggle = function() { | ||
168 | - if (this.results_showing) { | ||
169 | - return this.results_hide(); | ||
170 | - } else { | ||
171 | - return this.results_show(); | ||
172 | - } | ||
173 | - }; | ||
174 | - AbstractChosen.prototype.results_search = function(evt) { | ||
175 | - if (this.results_showing) { | ||
176 | - return this.winnow_results(); | ||
177 | - } else { | ||
178 | - return this.results_show(); | ||
179 | - } | ||
180 | - }; | ||
181 | - AbstractChosen.prototype.keyup_checker = function(evt) { | ||
182 | - var stroke, _ref; | ||
183 | - stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; | ||
184 | - this.search_field_scale(); | ||
185 | - switch (stroke) { | ||
186 | - case 8: | ||
187 | - if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) { | ||
188 | - return this.keydown_backstroke(); | ||
189 | - } else if (!this.pending_backstroke) { | ||
190 | - this.result_clear_highlight(); | ||
191 | - return this.results_search(); | ||
192 | - } | ||
193 | - break; | ||
194 | - case 13: | ||
195 | - evt.preventDefault(); | ||
196 | - if (this.results_showing) { | ||
197 | - return this.result_select(evt); | ||
198 | - } | ||
199 | - break; | ||
200 | - case 27: | ||
201 | - if (this.results_showing) { | ||
202 | - return this.results_hide(); | ||
203 | - } | ||
204 | - break; | ||
205 | - case 9: | ||
206 | - case 38: | ||
207 | - case 40: | ||
208 | - case 16: | ||
209 | - case 91: | ||
210 | - case 17: | ||
211 | - break; | ||
212 | - default: | ||
213 | - return this.results_search(); | ||
214 | - } | ||
215 | - }; | ||
216 | - AbstractChosen.prototype.generate_field_id = function() { | ||
217 | - var new_id; | ||
218 | - new_id = this.generate_random_id(); | ||
219 | - this.form_field.id = new_id; | ||
220 | - return new_id; | ||
221 | - }; | ||
222 | - AbstractChosen.prototype.generate_random_char = function() { | ||
223 | - var chars, newchar, rand; | ||
224 | - chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ"; | ||
225 | - rand = Math.floor(Math.random() * chars.length); | ||
226 | - return newchar = chars.substring(rand, rand + 1); | ||
227 | - }; | ||
228 | - return AbstractChosen; | ||
229 | - })(); | ||
230 | - root.AbstractChosen = AbstractChosen; | ||
231 | -}).call(this); | ||
232 | -(function() { | ||
233 | - /* | ||
234 | - Chosen source: generate output using 'cake build' | ||
235 | - Copyright (c) 2011 by Harvest | ||
236 | - */ | ||
237 | - var $, Chosen, get_side_border_padding, root; | ||
238 | - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { | ||
239 | - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } | ||
240 | - function ctor() { this.constructor = child; } | ||
241 | - ctor.prototype = parent.prototype; | ||
242 | - child.prototype = new ctor; | ||
243 | - child.__super__ = parent.prototype; | ||
244 | - return child; | ||
245 | - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | ||
246 | - root = this; | ||
247 | - $ = jQuery; | ||
248 | - $.fn.extend({ | ||
249 | - chosen: function(options) { | ||
250 | - if ($.browser.msie && ($.browser.version === "6.0" || $.browser.version === "7.0")) { | ||
251 | - return this; | ||
252 | - } | ||
253 | - return $(this).each(function(input_field) { | ||
254 | - if (!($(this)).hasClass("chzn-done")) { | ||
255 | - return new Chosen(this, options); | ||
256 | - } | ||
257 | - }); | ||
258 | - } | ||
259 | - }); | ||
260 | - Chosen = (function() { | ||
261 | - __extends(Chosen, AbstractChosen); | ||
262 | - function Chosen() { | ||
263 | - Chosen.__super__.constructor.apply(this, arguments); | ||
264 | - } | ||
265 | - Chosen.prototype.setup = function() { | ||
266 | - this.form_field_jq = $(this.form_field); | ||
267 | - return this.is_rtl = this.form_field_jq.hasClass("chzn-rtl"); | ||
268 | - }; | ||
269 | - Chosen.prototype.finish_setup = function() { | ||
270 | - return this.form_field_jq.addClass("chzn-done"); | ||
271 | - }; | ||
272 | - Chosen.prototype.set_up_html = function() { | ||
273 | - var container_div, dd_top, dd_width, sf_width; | ||
274 | - this.container_id = this.form_field.id.length ? this.form_field.id.replace(/(:|\.)/g, '_') : this.generate_field_id(); | ||
275 | - this.container_id += "_chzn"; | ||
276 | - this.f_width = this.form_field_jq.outerWidth(); | ||
277 | - this.default_text = this.form_field_jq.data('placeholder') ? this.form_field_jq.data('placeholder') : this.default_text_default; | ||
278 | - container_div = $("<div />", { | ||
279 | - id: this.container_id, | ||
280 | - "class": "chzn-container" + (this.is_rtl ? ' chzn-rtl' : ''), | ||
281 | - style: 'width: ' + this.f_width + 'px;' | ||
282 | - }); | ||
283 | - if (this.is_multiple) { | ||
284 | - container_div.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'); | ||
285 | - } else { | ||
286 | - container_div.html('<a href="javascript:void(0)" class="chzn-single"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'); | ||
287 | - } | ||
288 | - this.form_field_jq.hide().after(container_div); | ||
289 | - this.container = $('#' + this.container_id); | ||
290 | - this.container.addClass("chzn-container-" + (this.is_multiple ? "multi" : "single")); | ||
291 | - this.dropdown = this.container.find('div.chzn-drop').first(); | ||
292 | - dd_top = this.container.height(); | ||
293 | - dd_width = this.f_width - get_side_border_padding(this.dropdown); | ||
294 | - this.dropdown.css({ | ||
295 | - "width": dd_width + "px", | ||
296 | - "top": dd_top + "px" | ||
297 | - }); | ||
298 | - this.search_field = this.container.find('input').first(); | ||
299 | - this.search_results = this.container.find('ul.chzn-results').first(); | ||
300 | - this.search_field_scale(); | ||
301 | - this.search_no_results = this.container.find('li.no-results').first(); | ||
302 | - if (this.is_multiple) { | ||
303 | - this.search_choices = this.container.find('ul.chzn-choices').first(); | ||
304 | - this.search_container = this.container.find('li.search-field').first(); | ||
305 | - } else { | ||
306 | - this.search_container = this.container.find('div.chzn-search').first(); | ||
307 | - this.selected_item = this.container.find('.chzn-single').first(); | ||
308 | - sf_width = dd_width - get_side_border_padding(this.search_container) - get_side_border_padding(this.search_field); | ||
309 | - this.search_field.css({ | ||
310 | - "width": sf_width + "px" | ||
311 | - }); | ||
312 | - } | ||
313 | - this.results_build(); | ||
314 | - this.set_tab_index(); | ||
315 | - return this.form_field_jq.trigger("liszt:ready", { | ||
316 | - chosen: this | ||
317 | - }); | ||
318 | - }; | ||
319 | - Chosen.prototype.register_observers = function() { | ||
320 | - this.container.mousedown(__bind(function(evt) { | ||
321 | - return this.container_mousedown(evt); | ||
322 | - }, this)); | ||
323 | - this.container.mouseup(__bind(function(evt) { | ||
324 | - return this.container_mouseup(evt); | ||
325 | - }, this)); | ||
326 | - this.container.mouseenter(__bind(function(evt) { | ||
327 | - return this.mouse_enter(evt); | ||
328 | - }, this)); | ||
329 | - this.container.mouseleave(__bind(function(evt) { | ||
330 | - return this.mouse_leave(evt); | ||
331 | - }, this)); | ||
332 | - this.search_results.mouseup(__bind(function(evt) { | ||
333 | - return this.search_results_mouseup(evt); | ||
334 | - }, this)); | ||
335 | - this.search_results.mouseover(__bind(function(evt) { | ||
336 | - return this.search_results_mouseover(evt); | ||
337 | - }, this)); | ||
338 | - this.search_results.mouseout(__bind(function(evt) { | ||
339 | - return this.search_results_mouseout(evt); | ||
340 | - }, this)); | ||
341 | - this.form_field_jq.bind("liszt:updated", __bind(function(evt) { | ||
342 | - return this.results_update_field(evt); | ||
343 | - }, this)); | ||
344 | - this.search_field.blur(__bind(function(evt) { | ||
345 | - return this.input_blur(evt); | ||
346 | - }, this)); | ||
347 | - this.search_field.keyup(__bind(function(evt) { | ||
348 | - return this.keyup_checker(evt); | ||
349 | - }, this)); | ||
350 | - this.search_field.keydown(__bind(function(evt) { | ||
351 | - return this.keydown_checker(evt); | ||
352 | - }, this)); | ||
353 | - if (this.is_multiple) { | ||
354 | - this.search_choices.click(__bind(function(evt) { | ||
355 | - return this.choices_click(evt); | ||
356 | - }, this)); | ||
357 | - return this.search_field.focus(__bind(function(evt) { | ||
358 | - return this.input_focus(evt); | ||
359 | - }, this)); | ||
360 | - } | ||
361 | - }; | ||
362 | - Chosen.prototype.search_field_disabled = function() { | ||
363 | - this.is_disabled = this.form_field_jq[0].disabled; | ||
364 | - if (this.is_disabled) { | ||
365 | - this.container.addClass('chzn-disabled'); | ||
366 | - this.search_field[0].disabled = true; | ||
367 | - if (!this.is_multiple) { | ||
368 | - this.selected_item.unbind("focus", this.activate_action); | ||
369 | - } | ||
370 | - return this.close_field(); | ||
371 | - } else { | ||
372 | - this.container.removeClass('chzn-disabled'); | ||
373 | - this.search_field[0].disabled = false; | ||
374 | - if (!this.is_multiple) { | ||
375 | - return this.selected_item.bind("focus", this.activate_action); | ||
376 | - } | ||
377 | - } | ||
378 | - }; | ||
379 | - Chosen.prototype.container_mousedown = function(evt) { | ||
380 | - var target_closelink; | ||
381 | - if (!this.is_disabled) { | ||
382 | - target_closelink = evt != null ? ($(evt.target)).hasClass("search-choice-close") : false; | ||
383 | - if (evt && evt.type === "mousedown") { | ||
384 | - evt.stopPropagation(); | ||
385 | - } | ||
386 | - if (!this.pending_destroy_click && !target_closelink) { | ||
387 | - if (!this.active_field) { | ||
388 | - if (this.is_multiple) { | ||
389 | - this.search_field.val(""); | ||
390 | - } | ||
391 | - $(document).click(this.click_test_action); | ||
392 | - this.results_show(); | ||
393 | - } else if (!this.is_multiple && evt && ($(evt.target) === this.selected_item || $(evt.target).parents("a.chzn-single").length)) { | ||
394 | - evt.preventDefault(); | ||
395 | - this.results_toggle(); | ||
396 | - } | ||
397 | - return this.activate_field(); | ||
398 | - } else { | ||
399 | - return this.pending_destroy_click = false; | ||
400 | - } | ||
401 | - } | ||
402 | - }; | ||
403 | - Chosen.prototype.container_mouseup = function(evt) { | ||
404 | - if (evt.target.nodeName === "ABBR") { | ||
405 | - return this.results_reset(evt); | ||
406 | - } | ||
407 | - }; | ||
408 | - Chosen.prototype.blur_test = function(evt) { | ||
409 | - if (!this.active_field && this.container.hasClass("chzn-container-active")) { | ||
410 | - return this.close_field(); | ||
411 | - } | ||
412 | - }; | ||
413 | - Chosen.prototype.close_field = function() { | ||
414 | - $(document).unbind("click", this.click_test_action); | ||
415 | - if (!this.is_multiple) { | ||
416 | - this.selected_item.attr("tabindex", this.search_field.attr("tabindex")); | ||
417 | - this.search_field.attr("tabindex", -1); | ||
418 | - } | ||
419 | - this.active_field = false; | ||
420 | - this.results_hide(); | ||
421 | - this.container.removeClass("chzn-container-active"); | ||
422 | - this.winnow_results_clear(); | ||
423 | - this.clear_backstroke(); | ||
424 | - this.show_search_field_default(); | ||
425 | - return this.search_field_scale(); | ||
426 | - }; | ||
427 | - Chosen.prototype.activate_field = function() { | ||
428 | - if (!this.is_multiple && !this.active_field) { | ||
429 | - this.search_field.attr("tabindex", this.selected_item.attr("tabindex")); | ||
430 | - this.selected_item.attr("tabindex", -1); | ||
431 | - } | ||
432 | - this.container.addClass("chzn-container-active"); | ||
433 | - this.active_field = true; | ||
434 | - this.search_field.val(this.search_field.val()); | ||
435 | - return this.search_field.focus(); | ||
436 | - }; | ||
437 | - Chosen.prototype.test_active_click = function(evt) { | ||
438 | - if ($(evt.target).parents('#' + this.container_id).length) { | ||
439 | - return this.active_field = true; | ||
440 | - } else { | ||
441 | - return this.close_field(); | ||
442 | - } | ||
443 | - }; | ||
444 | - Chosen.prototype.results_build = function() { | ||
445 | - var content, data, startTime, _i, _len, _ref; | ||
446 | - startTime = new Date(); | ||
447 | - this.parsing = true; | ||
448 | - this.results_data = root.SelectParser.select_to_array(this.form_field); | ||
449 | - if (this.is_multiple && this.choices > 0) { | ||
450 | - this.search_choices.find("li.search-choice").remove(); | ||
451 | - this.choices = 0; | ||
452 | - } else if (!this.is_multiple) { | ||
453 | - this.selected_item.find("span").text(this.default_text); | ||
454 | - if (this.form_field.options.length <= this.disable_search_threshold) { | ||
455 | - this.container.addClass("chzn-container-single-nosearch"); | ||
456 | - } else { | ||
457 | - this.container.removeClass("chzn-container-single-nosearch"); | ||
458 | - } | ||
459 | - } | ||
460 | - content = ''; | ||
461 | - _ref = this.results_data; | ||
462 | - for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
463 | - data = _ref[_i]; | ||
464 | - if (data.group) { | ||
465 | - content += this.result_add_group(data); | ||
466 | - } else if (!data.empty) { | ||
467 | - content += this.result_add_option(data); | ||
468 | - if (data.selected && this.is_multiple) { | ||
469 | - this.choice_build(data); | ||
470 | - } else if (data.selected && !this.is_multiple) { | ||
471 | - this.selected_item.find("span").text(data.text); | ||
472 | - if (this.allow_single_deselect) { | ||
473 | - this.single_deselect_control_build(); | ||
474 | - } | ||
475 | - } | ||
476 | - } | ||
477 | - } | ||
478 | - this.search_field_disabled(); | ||
479 | - this.show_search_field_default(); | ||
480 | - this.search_field_scale(); | ||
481 | - this.search_results.html(content); | ||
482 | - return this.parsing = false; | ||
483 | - }; | ||
484 | - Chosen.prototype.result_add_group = function(group) { | ||
485 | - if (!group.disabled) { | ||
486 | - group.dom_id = this.container_id + "_g_" + group.array_index; | ||
487 | - return '<li id="' + group.dom_id + '" class="group-result">' + $("<div />").text(group.label).html() + '</li>'; | ||
488 | - } else { | ||
489 | - return ""; | ||
490 | - } | ||
491 | - }; | ||
492 | - Chosen.prototype.result_do_highlight = function(el) { | ||
493 | - var high_bottom, high_top, maxHeight, visible_bottom, visible_top; | ||
494 | - if (el.length) { | ||
495 | - this.result_clear_highlight(); | ||
496 | - this.result_highlight = el; | ||
497 | - this.result_highlight.addClass("highlighted"); | ||
498 | - maxHeight = parseInt(this.search_results.css("maxHeight"), 10); | ||
499 | - visible_top = this.search_results.scrollTop(); | ||
500 | - visible_bottom = maxHeight + visible_top; | ||
501 | - high_top = this.result_highlight.position().top + this.search_results.scrollTop(); | ||
502 | - high_bottom = high_top + this.result_highlight.outerHeight(); | ||
503 | - if (high_bottom >= visible_bottom) { | ||
504 | - return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0); | ||
505 | - } else if (high_top < visible_top) { | ||
506 | - return this.search_results.scrollTop(high_top); | ||
507 | - } | ||
508 | - } | ||
509 | - }; | ||
510 | - Chosen.prototype.result_clear_highlight = function() { | ||
511 | - if (this.result_highlight) { | ||
512 | - this.result_highlight.removeClass("highlighted"); | ||
513 | - } | ||
514 | - return this.result_highlight = null; | ||
515 | - }; | ||
516 | - Chosen.prototype.results_show = function() { | ||
517 | - var dd_top; | ||
518 | - if (!this.is_multiple) { | ||
519 | - this.selected_item.addClass("chzn-single-with-drop"); | ||
520 | - if (this.result_single_selected) { | ||
521 | - this.result_do_highlight(this.result_single_selected); | ||
522 | - } | ||
523 | - } | ||
524 | - dd_top = this.is_multiple ? this.container.height() : this.container.height() - 1; | ||
525 | - this.dropdown.css({ | ||
526 | - "top": dd_top + "px", | ||
527 | - "left": 0 | ||
528 | - }); | ||
529 | - this.results_showing = true; | ||
530 | - this.search_field.focus(); | ||
531 | - this.search_field.val(this.search_field.val()); | ||
532 | - return this.winnow_results(); | ||
533 | - }; | ||
534 | - Chosen.prototype.results_hide = function() { | ||
535 | - if (!this.is_multiple) { | ||
536 | - this.selected_item.removeClass("chzn-single-with-drop"); | ||
537 | - } | ||
538 | - this.result_clear_highlight(); | ||
539 | - this.dropdown.css({ | ||
540 | - "left": "-9000px" | ||
541 | - }); | ||
542 | - return this.results_showing = false; | ||
543 | - }; | ||
544 | - Chosen.prototype.set_tab_index = function(el) { | ||
545 | - var ti; | ||
546 | - if (this.form_field_jq.attr("tabindex")) { | ||
547 | - ti = this.form_field_jq.attr("tabindex"); | ||
548 | - this.form_field_jq.attr("tabindex", -1); | ||
549 | - if (this.is_multiple) { | ||
550 | - return this.search_field.attr("tabindex", ti); | ||
551 | - } else { | ||
552 | - this.selected_item.attr("tabindex", ti); | ||
553 | - return this.search_field.attr("tabindex", -1); | ||
554 | - } | ||
555 | - } | ||
556 | - }; | ||
557 | - Chosen.prototype.show_search_field_default = function() { | ||
558 | - if (this.is_multiple && this.choices < 1 && !this.active_field) { | ||
559 | - this.search_field.val(this.default_text); | ||
560 | - return this.search_field.addClass("default"); | ||
561 | - } else { | ||
562 | - this.search_field.val(""); | ||
563 | - return this.search_field.removeClass("default"); | ||
564 | - } | ||
565 | - }; | ||
566 | - Chosen.prototype.search_results_mouseup = function(evt) { | ||
567 | - var target; | ||
568 | - target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first(); | ||
569 | - if (target.length) { | ||
570 | - this.result_highlight = target; | ||
571 | - return this.result_select(evt); | ||
572 | - } | ||
573 | - }; | ||
574 | - Chosen.prototype.search_results_mouseover = function(evt) { | ||
575 | - var target; | ||
576 | - target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first(); | ||
577 | - if (target) { | ||
578 | - return this.result_do_highlight(target); | ||
579 | - } | ||
580 | - }; | ||
581 | - Chosen.prototype.search_results_mouseout = function(evt) { | ||
582 | - if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) { | ||
583 | - return this.result_clear_highlight(); | ||
584 | - } | ||
585 | - }; | ||
586 | - Chosen.prototype.choices_click = function(evt) { | ||
587 | - evt.preventDefault(); | ||
588 | - if (this.active_field && !($(evt.target).hasClass("search-choice" || $(evt.target).parents('.search-choice').first)) && !this.results_showing) { | ||
589 | - return this.results_show(); | ||
590 | - } | ||
591 | - }; | ||
592 | - Chosen.prototype.choice_build = function(item) { | ||
593 | - var choice_id, link; | ||
594 | - choice_id = this.container_id + "_c_" + item.array_index; | ||
595 | - this.choices += 1; | ||
596 | - this.search_container.before('<li class="search-choice" id="' + choice_id + '"><span>' + item.html + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + item.array_index + '"></a></li>'); | ||
597 | - link = $('#' + choice_id).find("a").first(); | ||
598 | - return link.click(__bind(function(evt) { | ||
599 | - return this.choice_destroy_link_click(evt); | ||
600 | - }, this)); | ||
601 | - }; | ||
602 | - Chosen.prototype.choice_destroy_link_click = function(evt) { | ||
603 | - evt.preventDefault(); | ||
604 | - if (!this.is_disabled) { | ||
605 | - this.pending_destroy_click = true; | ||
606 | - return this.choice_destroy($(evt.target)); | ||
607 | - } else { | ||
608 | - return evt.stopPropagation; | ||
609 | - } | ||
610 | - }; | ||
611 | - Chosen.prototype.choice_destroy = function(link) { | ||
612 | - this.choices -= 1; | ||
613 | - this.show_search_field_default(); | ||
614 | - if (this.is_multiple && this.choices > 0 && this.search_field.val().length < 1) { | ||
615 | - this.results_hide(); | ||
616 | - } | ||
617 | - this.result_deselect(link.attr("rel")); | ||
618 | - return link.parents('li').first().remove(); | ||
619 | - }; | ||
620 | - Chosen.prototype.results_reset = function(evt) { | ||
621 | - this.form_field.options[0].selected = true; | ||
622 | - this.selected_item.find("span").text(this.default_text); | ||
623 | - this.show_search_field_default(); | ||
624 | - $(evt.target).remove(); | ||
625 | - this.form_field_jq.trigger("change"); | ||
626 | - if (this.active_field) { | ||
627 | - return this.results_hide(); | ||
628 | - } | ||
629 | - }; | ||
630 | - Chosen.prototype.result_select = function(evt) { | ||
631 | - var high, high_id, item, position; | ||
632 | - if (this.result_highlight) { | ||
633 | - high = this.result_highlight; | ||
634 | - high_id = high.attr("id"); | ||
635 | - this.result_clear_highlight(); | ||
636 | - if (this.is_multiple) { | ||
637 | - this.result_deactivate(high); | ||
638 | - } else { | ||
639 | - this.search_results.find(".result-selected").removeClass("result-selected"); | ||
640 | - this.result_single_selected = high; | ||
641 | - } | ||
642 | - high.addClass("result-selected"); | ||
643 | - position = high_id.substr(high_id.lastIndexOf("_") + 1); | ||
644 | - item = this.results_data[position]; | ||
645 | - item.selected = true; | ||
646 | - this.form_field.options[item.options_index].selected = true; | ||
647 | - if (this.is_multiple) { | ||
648 | - this.choice_build(item); | ||
649 | - } else { | ||
650 | - this.selected_item.find("span").first().text(item.text); | ||
651 | - if (this.allow_single_deselect) { | ||
652 | - this.single_deselect_control_build(); | ||
653 | - } | ||
654 | - } | ||
655 | - if (!(evt.metaKey && this.is_multiple)) { | ||
656 | - this.results_hide(); | ||
657 | - } | ||
658 | - this.search_field.val(""); | ||
659 | - this.form_field_jq.trigger("change"); | ||
660 | - return this.search_field_scale(); | ||
661 | - } | ||
662 | - }; | ||
663 | - Chosen.prototype.result_activate = function(el) { | ||
664 | - return el.addClass("active-result"); | ||
665 | - }; | ||
666 | - Chosen.prototype.result_deactivate = function(el) { | ||
667 | - return el.removeClass("active-result"); | ||
668 | - }; | ||
669 | - Chosen.prototype.result_deselect = function(pos) { | ||
670 | - var result, result_data; | ||
671 | - result_data = this.results_data[pos]; | ||
672 | - result_data.selected = false; | ||
673 | - this.form_field.options[result_data.options_index].selected = false; | ||
674 | - result = $("#" + this.container_id + "_o_" + pos); | ||
675 | - result.removeClass("result-selected").addClass("active-result").show(); | ||
676 | - this.result_clear_highlight(); | ||
677 | - this.winnow_results(); | ||
678 | - this.form_field_jq.trigger("change"); | ||
679 | - return this.search_field_scale(); | ||
680 | - }; | ||
681 | - Chosen.prototype.single_deselect_control_build = function() { | ||
682 | - if (this.allow_single_deselect && this.selected_item.find("abbr").length < 1) { | ||
683 | - return this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>"); | ||
684 | - } | ||
685 | - }; | ||
686 | - Chosen.prototype.winnow_results = function() { | ||
687 | - var found, option, part, parts, regex, result_id, results, searchText, startTime, startpos, text, zregex, _i, _j, _len, _len2, _ref; | ||
688 | - startTime = new Date(); | ||
689 | - this.no_results_clear(); | ||
690 | - results = 0; | ||
691 | - searchText = this.search_field.val() === this.default_text ? "" : $('<div/>').text($.trim(this.search_field.val())).html(); | ||
692 | - regex = new RegExp('^' + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i'); | ||
693 | - zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i'); | ||
694 | - _ref = this.results_data; | ||
695 | - for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
696 | - option = _ref[_i]; | ||
697 | - if (!option.disabled && !option.empty) { | ||
698 | - if (option.group) { | ||
699 | - $('#' + option.dom_id).hide(); | ||
700 | - } else if (!(this.is_multiple && option.selected)) { | ||
701 | - found = false; | ||
702 | - result_id = option.dom_id; | ||
703 | - if (regex.test(option.html)) { | ||
704 | - found = true; | ||
705 | - results += 1; | ||
706 | - } else if (option.html.indexOf(" ") >= 0 || option.html.indexOf("[") === 0) { | ||
707 | - parts = option.html.replace(/\[|\]/g, "").split(" "); | ||
708 | - if (parts.length) { | ||
709 | - for (_j = 0, _len2 = parts.length; _j < _len2; _j++) { | ||
710 | - part = parts[_j]; | ||
711 | - if (regex.test(part)) { | ||
712 | - found = true; | ||
713 | - results += 1; | ||
714 | - } | ||
715 | - } | ||
716 | - } | ||
717 | - } | ||
718 | - if (found) { | ||
719 | - if (searchText.length) { | ||
720 | - startpos = option.html.search(zregex); | ||
721 | - text = option.html.substr(0, startpos + searchText.length) + '</em>' + option.html.substr(startpos + searchText.length); | ||
722 | - text = text.substr(0, startpos) + '<em>' + text.substr(startpos); | ||
723 | - } else { | ||
724 | - text = option.html; | ||
725 | - } | ||
726 | - if ($("#" + result_id).html !== text) { | ||
727 | - $("#" + result_id).html(text); | ||
728 | - } | ||
729 | - this.result_activate($("#" + result_id)); | ||
730 | - if (option.group_array_index != null) { | ||
731 | - $("#" + this.results_data[option.group_array_index].dom_id).show(); | ||
732 | - } | ||
733 | - } else { | ||
734 | - if (this.result_highlight && result_id === this.result_highlight.attr('id')) { | ||
735 | - this.result_clear_highlight(); | ||
736 | - } | ||
737 | - this.result_deactivate($("#" + result_id)); | ||
738 | - } | ||
739 | - } | ||
740 | - } | ||
741 | - } | ||
742 | - if (results < 1 && searchText.length) { | ||
743 | - return this.no_results(searchText); | ||
744 | - } else { | ||
745 | - return this.winnow_results_set_highlight(); | ||
746 | - } | ||
747 | - }; | ||
748 | - Chosen.prototype.winnow_results_clear = function() { | ||
749 | - var li, lis, _i, _len, _results; | ||
750 | - this.search_field.val(""); | ||
751 | - lis = this.search_results.find("li"); | ||
752 | - _results = []; | ||
753 | - for (_i = 0, _len = lis.length; _i < _len; _i++) { | ||
754 | - li = lis[_i]; | ||
755 | - li = $(li); | ||
756 | - _results.push(li.hasClass("group-result") ? li.show() : !this.is_multiple || !li.hasClass("result-selected") ? this.result_activate(li) : void 0); | ||
757 | - } | ||
758 | - return _results; | ||
759 | - }; | ||
760 | - Chosen.prototype.winnow_results_set_highlight = function() { | ||
761 | - var do_high, selected_results; | ||
762 | - if (!this.result_highlight) { | ||
763 | - selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : []; | ||
764 | - do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first(); | ||
765 | - if (do_high != null) { | ||
766 | - return this.result_do_highlight(do_high); | ||
767 | - } | ||
768 | - } | ||
769 | - }; | ||
770 | - Chosen.prototype.no_results = function(terms) { | ||
771 | - var no_results_html; | ||
772 | - no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>'); | ||
773 | - no_results_html.find("span").first().html(terms); | ||
774 | - return this.search_results.append(no_results_html); | ||
775 | - }; | ||
776 | - Chosen.prototype.no_results_clear = function() { | ||
777 | - return this.search_results.find(".no-results").remove(); | ||
778 | - }; | ||
779 | - Chosen.prototype.keydown_arrow = function() { | ||
780 | - var first_active, next_sib; | ||
781 | - if (!this.result_highlight) { | ||
782 | - first_active = this.search_results.find("li.active-result").first(); | ||
783 | - if (first_active) { | ||
784 | - this.result_do_highlight($(first_active)); | ||
785 | - } | ||
786 | - } else if (this.results_showing) { | ||
787 | - next_sib = this.result_highlight.nextAll("li.active-result").first(); | ||
788 | - if (next_sib) { | ||
789 | - this.result_do_highlight(next_sib); | ||
790 | - } | ||
791 | - } | ||
792 | - if (!this.results_showing) { | ||
793 | - return this.results_show(); | ||
794 | - } | ||
795 | - }; | ||
796 | - Chosen.prototype.keyup_arrow = function() { | ||
797 | - var prev_sibs; | ||
798 | - if (!this.results_showing && !this.is_multiple) { | ||
799 | - return this.results_show(); | ||
800 | - } else if (this.result_highlight) { | ||
801 | - prev_sibs = this.result_highlight.prevAll("li.active-result"); | ||
802 | - if (prev_sibs.length) { | ||
803 | - return this.result_do_highlight(prev_sibs.first()); | ||
804 | - } else { | ||
805 | - if (this.choices > 0) { | ||
806 | - this.results_hide(); | ||
807 | - } | ||
808 | - return this.result_clear_highlight(); | ||
809 | - } | ||
810 | - } | ||
811 | - }; | ||
812 | - Chosen.prototype.keydown_backstroke = function() { | ||
813 | - if (this.pending_backstroke) { | ||
814 | - this.choice_destroy(this.pending_backstroke.find("a").first()); | ||
815 | - return this.clear_backstroke(); | ||
816 | - } else { | ||
817 | - this.pending_backstroke = this.search_container.siblings("li.search-choice").last(); | ||
818 | - return this.pending_backstroke.addClass("search-choice-focus"); | ||
819 | - } | ||
820 | - }; | ||
821 | - Chosen.prototype.clear_backstroke = function() { | ||
822 | - if (this.pending_backstroke) { | ||
823 | - this.pending_backstroke.removeClass("search-choice-focus"); | ||
824 | - } | ||
825 | - return this.pending_backstroke = null; | ||
826 | - }; | ||
827 | - Chosen.prototype.keydown_checker = function(evt) { | ||
828 | - var stroke, _ref; | ||
829 | - stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; | ||
830 | - this.search_field_scale(); | ||
831 | - if (stroke !== 8 && this.pending_backstroke) { | ||
832 | - this.clear_backstroke(); | ||
833 | - } | ||
834 | - switch (stroke) { | ||
835 | - case 8: | ||
836 | - this.backstroke_length = this.search_field.val().length; | ||
837 | - break; | ||
838 | - case 9: | ||
839 | - if (this.results_showing && !this.is_multiple) { | ||
840 | - this.result_select(evt); | ||
841 | - } | ||
842 | - this.mouse_on_container = false; | ||
843 | - break; | ||
844 | - case 13: | ||
845 | - evt.preventDefault(); | ||
846 | - break; | ||
847 | - case 38: | ||
848 | - evt.preventDefault(); | ||
849 | - this.keyup_arrow(); | ||
850 | - break; | ||
851 | - case 40: | ||
852 | - this.keydown_arrow(); | ||
853 | - break; | ||
854 | - } | ||
855 | - }; | ||
856 | - Chosen.prototype.search_field_scale = function() { | ||
857 | - var dd_top, div, h, style, style_block, styles, w, _i, _len; | ||
858 | - if (this.is_multiple) { | ||
859 | - h = 0; | ||
860 | - w = 0; | ||
861 | - style_block = "position:absolute; left: -1000px; top: -1000px; display:none;"; | ||
862 | - styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing']; | ||
863 | - for (_i = 0, _len = styles.length; _i < _len; _i++) { | ||
864 | - style = styles[_i]; | ||
865 | - style_block += style + ":" + this.search_field.css(style) + ";"; | ||
866 | - } | ||
867 | - div = $('<div />', { | ||
868 | - 'style': style_block | ||
869 | - }); | ||
870 | - div.text(this.search_field.val()); | ||
871 | - $('body').append(div); | ||
872 | - w = div.width() + 25; | ||
873 | - div.remove(); | ||
874 | - if (w > this.f_width - 10) { | ||
875 | - w = this.f_width - 10; | ||
876 | - } | ||
877 | - this.search_field.css({ | ||
878 | - 'width': w + 'px' | ||
879 | - }); | ||
880 | - dd_top = this.container.height(); | ||
881 | - return this.dropdown.css({ | ||
882 | - "top": dd_top + "px" | ||
883 | - }); | ||
884 | - } | ||
885 | - }; | ||
886 | - Chosen.prototype.generate_random_id = function() { | ||
887 | - var string; | ||
888 | - string = "sel" + this.generate_random_char() + this.generate_random_char() + this.generate_random_char(); | ||
889 | - while ($("#" + string).length > 0) { | ||
890 | - string += this.generate_random_char(); | ||
891 | - } | ||
892 | - return string; | ||
893 | - }; | ||
894 | - return Chosen; | ||
895 | - })(); | ||
896 | - get_side_border_padding = function(elmt) { | ||
897 | - var side_border_padding; | ||
898 | - return side_border_padding = elmt.outerWidth() - elmt.width(); | ||
899 | - }; | ||
900 | - root.get_side_border_padding = get_side_border_padding; | ||
901 | -}).call(this); |
app/assets/javascripts/commits.js
@@ -8,25 +8,23 @@ $(document).ready(function(){ | @@ -8,25 +8,23 @@ $(document).ready(function(){ | ||
8 | }); | 8 | }); |
9 | }); | 9 | }); |
10 | 10 | ||
11 | - | ||
12 | - | ||
13 | -var CommitsList = { | 11 | +var CommitsList = { |
14 | 12 | ||
15 | ref:null, | 13 | ref:null, |
16 | limit:0, | 14 | limit:0, |
17 | offset:0, | 15 | offset:0, |
18 | 16 | ||
19 | -init: | ||
20 | - function(ref, limit) { | ||
21 | - this.ref=ref; | ||
22 | - this.limit=limit; | ||
23 | - this.offset=limit; | 17 | +init: |
18 | + function(ref, limit) { | ||
19 | + this.ref=ref; | ||
20 | + this.limit=limit; | ||
21 | + this.offset=limit; | ||
24 | this.initLoadMore(); | 22 | this.initLoadMore(); |
25 | $('.loading').show(); | 23 | $('.loading').show(); |
26 | }, | 24 | }, |
27 | 25 | ||
28 | getOld: | 26 | getOld: |
29 | - function() { | 27 | + function() { |
30 | $('.loading').show(); | 28 | $('.loading').show(); |
31 | $.ajax({ | 29 | $.ajax({ |
32 | type: "GET", | 30 | type: "GET", |
@@ -39,14 +37,14 @@ getOld: | @@ -39,14 +37,14 @@ getOld: | ||
39 | append: | 37 | append: |
40 | function(count, html) { | 38 | function(count, html) { |
41 | $("#commits_list").append(html); | 39 | $("#commits_list").append(html); |
42 | - if(count > 0) { | 40 | + if(count > 0) { |
43 | this.offset += count; | 41 | this.offset += count; |
44 | this.initLoadMore(); | 42 | this.initLoadMore(); |
45 | - } | 43 | + } |
46 | }, | 44 | }, |
47 | 45 | ||
48 | initLoadMore: | 46 | initLoadMore: |
49 | - function() { | 47 | + function() { |
50 | $(window).bind('scroll', function(){ | 48 | $(window).bind('scroll', function(){ |
51 | if($(window).scrollTop() == $(document).height() - $(window).height()){ | 49 | if($(window).scrollTop() == $(document).height() - $(window).height()){ |
52 | $(window).unbind('scroll'); | 50 | $(window).unbind('scroll'); |
app/assets/javascripts/modernizr-2.0.6.min.js
@@ -1,4 +0,0 @@ | @@ -1,4 +0,0 @@ | ||
1 | -/* Modernizr 2.0.6 | MIT & BSD | ||
2 | - * Contains: All core tests, html5shiv, yepnope, respond.js. Get your own custom build at www.modernizr.com/download/ | ||
3 | - */ | ||
4 | -;window.Modernizr=function(a,b,c){function I(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=a[b]in l;return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function G(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return F(d,b)}function F(a,b){for(var d in a)if(k[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function E(a,b){return!!~(""+a).indexOf(b)}function D(a,b){return typeof a===b}function C(a,b){return B(o.join(a+";")+(b||""))}function B(a){k.cssText=a}var d="2.0.6",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v=function(a,c,d,e){var f,h,j,k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:i+(d+1),k.appendChild(j);f=["­","<style>",a,"</style>"].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},w=function(b){if(a.matchMedia)return matchMedia(b).matches;var c;v("@media "+b+" { #"+i+" { position: absolute; } }",function(b){c=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position=="absolute"});return c},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y,z={}.hasOwnProperty,A;!D(z,c)&&!D(z.call,c)?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],c)};var H=function(c,d){var f=c.join(""),g=d.length;v(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||j.touch.offsetTop===9,e.csstransforms3d=j.csstransforms3d.offsetLeft===9,e.generatedcontent=j.generatedcontent.offsetHeight>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",o.join("touch-enabled),("),i,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",o.join("transform-3d),("),i,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',m,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!D(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return e.touch},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b].toLowerCase()+"IndexedDB"])return!0;return!!a.indexedDB},r.hashchange=function(){return x("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b]+"WebSocket"])return!0;return"WebSocket"in a},r.rgba=function(){B("background-color:rgba(150,255,150,.5)");return E(k.backgroundColor,"rgba")},r.hsla=function(){B("background-color:hsla(120,40%,100%,.5)");return E(k.backgroundColor,"rgba")||E(k.backgroundColor,"hsla")},r.multiplebgs=function(){B("background:url(https://),url(https://),red url(https://)");return/(url\s*\(.*?){3}/.test(k.background)},r.backgroundsize=function(){return G("backgroundSize")},r.borderimage=function(){return G("borderImage")},r.borderradius=function(){return G("borderRadius")},r.boxshadow=function(){return G("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){C("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return G("animationName")},r.csscolumns=function(){return G("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";B((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return E(k.backgroundImage,"gradient")},r.cssreflections=function(){return G("boxReflect")},r.csstransforms=function(){return!!F(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!F(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d);return a},r.csstransitions=function(){return G("transitionProperty")},r.fontface=function(){return e.fontface},r.generatedcontent=function(){return e.generatedcontent},r.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}}catch(e){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}catch(d){}return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webworkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var J in r)A(r,J)&&(y=J.toLowerCase(),e[y]=r[J](),u.push((e[y]?"":"no-")+y));e.input||I(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return;b=typeof b=="boolean"?b:!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},B(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b<g)a.createElement(f[b])}a.iepp=a.iepp||{};var d=a.iepp,e=d.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",f=e.split("|"),g=f.length,h=new RegExp("(^|\\s)("+e+")","gi"),i=new RegExp("<(/*)("+e+")","gi"),j=/^\s*[\{\}]\s*$/,k=new RegExp("(^|[^\\n]*?\\s)("+e+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),l=b.createDocumentFragment(),m=b.documentElement,n=m.firstChild,o=b.createElement("body"),p=b.createElement("style"),q=/print|all/,r;d.getCSS=function(a,b){if(a+""===c)return"";var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,q.test(b)&&h.push(d.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},d.parseCSS=function(a){var b=[],c;while((c=k.exec(a))!=null)b.push(((j.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(h,"$1.iepp_$2")+c[4]);return b.join("\n")},d.writeHTML=function(){var a=-1;r=r||b.body;while(++a<g){var c=b.getElementsByTagName(f[a]),d=c.length,e=-1;while(++e<d)c[e].className.indexOf("iepp_")<0&&(c[e].className+=" iepp_"+f[a])}l.appendChild(r),m.appendChild(o),o.className=r.className,o.id=r.id,o.innerHTML=r.innerHTML.replace(i,"<$1font")},d._beforePrint=function(){p.styleSheet.cssText=d.parseCSS(d.getCSS(b.styleSheets,"all")),d.writeHTML()},d.restoreHTML=function(){o.innerHTML="",m.removeChild(o),m.appendChild(r)},d._afterPrint=function(){d.restoreHTML(),p.styleSheet.cssText=""},s(b),s(l);d.disablePP||(n.insertBefore(p,n.firstChild),p.media="print",p.className="iepp-printshim",a.attachEvent("onbeforeprint",d._beforePrint),a.attachEvent("onafterprint",d._afterPrint))}(a,b),e._version=d,e._prefixes=o,e._domPrefixes=p,e.mq=w,e.hasEvent=x,e.testProp=function(a){return F([a])},e.testAllProps=G,e.testStyles=v,e.prefixed=function(a){return G(a,"pfx")},g.className=g.className.replace(/\bno-js\b/,"")+(f?" js "+u.join(" "):"");return e}(this,this.document),function(a,b){function u(){r(!0)}a.respond={},respond.update=function(){},respond.mediaQueriesSupported=b;if(!b){var c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=j.getElementsByTagName("link"),l=[],m=function(){var b=k,c=b.length,d=0,e,f,g,i;for(;d<c;d++)e=b[d],f=e.href,g=e.media,i=e.rel&&e.rel.toLowerCase()==="stylesheet",!!f&&i&&!h[f]&&(!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(f)||f.replace(RegExp.$1,"").split("/")[0]===a.location.host?l.push({href:f,media:g}):h[f]=!0);n()},n=function(){if(l.length){var a=l.shift();s(a.href,function(b){o(b,a.href,a.media),h[a.href]=!0,n()})}},o=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),g=d&&d.length||0,b=b.substring(0,b.lastIndexOf("/")),h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c,j=0,k,l,m,n,o;b.length&&(b+="/"),i&&(g=1);for(;j<g;j++){k=0,i?(l=c,f.push(h(a))):(l=d[j].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),n=l.split(","),o=n.length;for(;k<o;k++)m=n[k],e.push({media:m.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:f.length-1,minw:m.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:m.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}r()},p,q,r=function(a){var b="clientWidth",h=d[b],l=c.compatMode==="CSS1Compat"&&h||c.body[b]||h,m={},n=c.createDocumentFragment(),o=k[k.length-1],s=(new Date).getTime();if(a&&p&&s-p<i)clearTimeout(q),q=setTimeout(r,i);else{p=s;for(var t in e){var u=e[t];if(!u.minw&&!u.maxw||(!u.minw||u.minw&&l>=u.minw)&&(!u.maxw||u.maxw&&l<=u.maxw))m[u.media]||(m[u.media]=[]),m[u.media].push(f[u.rules])}for(var t in g)g[t]&&g[t].parentNode===j&&j.removeChild(g[t]);for(var t in m){var v=c.createElement("style"),w=m[t].join("\n");v.type="text/css",v.media=t,v.styleSheet?v.styleSheet.cssText=w:v.appendChild(c.createTextNode(w)),n.appendChild(v),g.push(v)}j.insertBefore(n,o.nextSibling)}},s=function(a,b){var c=t();if(!!c){c.open("GET",a,!0),c.onreadystatechange=function(){c.readyState==4&&(c.status==200||c.status==304)&&b(c.responseText)};if(c.readyState==4)return;c.send()}},t=function(){var a=!1,b=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest}],c=b.length;while(c--){try{a=b[c]()}catch(d){continue}break}return function(){return a}}();m(),respond.update=m,a.addEventListener?a.addEventListener("resize",u,!1):a.attachEvent&&a.attachEvent("onresize",u)}}(this,Modernizr.mq("only all")),function(a,b,c){function k(a){return!a||a=="loaded"||a=="complete"}function j(){var a=1,b=-1;while(p.length- ++b)if(p[b].s&&!(a=p[b].r))break;a&&g()}function i(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&k(c.readyState)&&(d=1,j(),c.onload=c.onreadystatechange=null)},m(function(){d||(d=1,j())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function h(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css";if(!a.e&&(w||r)){var e=function(a){m(function(){if(!d)try{a.sheet.cssRules.length?(d=1,j()):e(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,m(function(){j()},0)):e(a)}},0)};e(c)}else c.onload=function(){d||(d=1,m(function(){j()},0))},a.e&&c.onload();m(function(){d||(d=1,j())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function g(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?h(a):i(a)},0):(a(),j()):q=0}function f(a,c,d,e,f,h){function i(){!o&&k(l.readyState)&&(r.r=o=1,!q&&j(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:d,s:c,e:h};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=d),l.onload=l.onreadystatechange=i,a=="img"?l.onerror=i:a=="script"&&(l.onerror=function(){r.e=r.r=1,g()}),p.splice(e,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,j())},H.errorTimeout)}function e(a,b,c){var d=b=="c"?z:y;q=0,b=b||"j",C(a)?f(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&g());return this}function d(){var a=H;a.loader={load:e,i:0};return a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return Object(a)===a},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function f(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=F[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=E[h](f);return f}function e(a,b,e,g,h){var i=f(a),j=i.autoCallback;if(!i.bypass){b&&(b=D(b)?b:b[a]||b[g]||b[a.split("/").pop().split("?")[0]]);if(i.instead)return i.instead(a,b,e,g,h);e.load(i.url,i.forceCSS||!i.forceJS&&/css$/.test(i.url)?"c":c,i.noexec),(D(b)||D(j))&&e.load(function(){d(),b&&b(i.origUrl,h,g),j&&j(i.origUrl,h,g)})}}function b(a,b){function c(a){if(C(a))e(a,h,b,0,d);else if(B(a))for(i in a)a.hasOwnProperty(i)&&e(a[i],h,b,i,d)}var d=!!a.test,f=d?a.yep:a.nope,g=a.load||a.both,h=a.callback,i;c(f),c(g),a.complete&&b.load(a.complete)}var g,h,i=this.yepnope.loader;if(C(a))e(a,0,i,0);else if(A(a))for(g=0;g<a.length;g++)h=a[g],C(h)?e(h,0,i,0):A(h)?H(h):B(h)&&b(h,i);else B(a)&&b(a,i)},H.addPrefix=function(a,b){F[a]=b},H.addFilter=function(a){E.push(a)},H.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",G=function(){b.removeEventListener("DOMContentLoaded",G,0),b.readyState="complete"},0)),a.yepnope=d()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))}; | ||
5 | \ No newline at end of file | 0 | \ No newline at end of file |
app/assets/javascripts/note.js
1 | -var NoteList = { | 1 | +var NoteList = { |
2 | 2 | ||
3 | first_id: 0, | 3 | first_id: 0, |
4 | last_id: 0, | 4 | last_id: 0, |
5 | resource_name: null, | 5 | resource_name: null, |
6 | 6 | ||
7 | -init: | ||
8 | - function(resource_name, first_id, last_id) { | ||
9 | - this.resource_name = resource_name; | ||
10 | - this.first_id = first_id; | ||
11 | - this.last_id = last_id; | 7 | +init: |
8 | + function(resource_name, first_id, last_id) { | ||
9 | + this.resource_name = resource_name; | ||
10 | + this.first_id = first_id; | ||
11 | + this.last_id = last_id; | ||
12 | this.initRefresh(); | 12 | this.initRefresh(); |
13 | this.initLoadMore(); | 13 | this.initLoadMore(); |
14 | }, | 14 | }, |
15 | 15 | ||
16 | getOld: | 16 | getOld: |
17 | - function() { | 17 | + function() { |
18 | $('.loading').show(); | 18 | $('.loading').show(); |
19 | $.ajax({ | 19 | $.ajax({ |
20 | type: "GET", | 20 | type: "GET", |
@@ -31,7 +31,7 @@ append: | @@ -31,7 +31,7 @@ append: | ||
31 | this.initLoadMore(); | 31 | this.initLoadMore(); |
32 | }, | 32 | }, |
33 | 33 | ||
34 | -replace: | 34 | +replace: |
35 | function(fid, lid, html) { | 35 | function(fid, lid, html) { |
36 | this.first_id = fid; | 36 | this.first_id = fid; |
37 | this.last_id = lid; | 37 | this.last_id = lid; |
@@ -39,17 +39,16 @@ replace: | @@ -39,17 +39,16 @@ replace: | ||
39 | this.initLoadMore(); | 39 | this.initLoadMore(); |
40 | }, | 40 | }, |
41 | 41 | ||
42 | - | ||
43 | prepend: | 42 | prepend: |
44 | function(id, html) { | 43 | function(id, html) { |
45 | - if(id != this.last_id) { | 44 | + if(id != this.last_id) { |
46 | this.last_id = id; | 45 | this.last_id = id; |
47 | $("#notes-list").prepend(html); | 46 | $("#notes-list").prepend(html); |
48 | } | 47 | } |
49 | }, | 48 | }, |
50 | 49 | ||
51 | getNew: | 50 | getNew: |
52 | - function() { | 51 | + function() { |
53 | // refersh notes list | 52 | // refersh notes list |
54 | $.ajax({ | 53 | $.ajax({ |
55 | type: "GET", | 54 | type: "GET", |
@@ -59,7 +58,7 @@ getNew: | @@ -59,7 +58,7 @@ getNew: | ||
59 | }, | 58 | }, |
60 | 59 | ||
61 | refresh: | 60 | refresh: |
62 | - function() { | 61 | + function() { |
63 | // refersh notes list | 62 | // refersh notes list |
64 | $.ajax({ | 63 | $.ajax({ |
65 | type: "GET", | 64 | type: "GET", |
@@ -68,8 +67,6 @@ refresh: | @@ -68,8 +67,6 @@ refresh: | ||
68 | dataType: "script"}); | 67 | dataType: "script"}); |
69 | }, | 68 | }, |
70 | 69 | ||
71 | - | ||
72 | - | ||
73 | initRefresh: | 70 | initRefresh: |
74 | function() { | 71 | function() { |
75 | // init timer | 72 | // init timer |
@@ -78,7 +75,7 @@ initRefresh: | @@ -78,7 +75,7 @@ initRefresh: | ||
78 | }, | 75 | }, |
79 | 76 | ||
80 | initLoadMore: | 77 | initLoadMore: |
81 | - function() { | 78 | + function() { |
82 | $(window).bind('scroll', function(){ | 79 | $(window).bind('scroll', function(){ |
83 | if($(window).scrollTop() == $(document).height() - $(window).height()){ | 80 | if($(window).scrollTop() == $(document).height() - $(window).height()){ |
84 | $(window).unbind('scroll'); | 81 | $(window).unbind('scroll'); |
app/assets/javascripts/projects.js
@@ -48,7 +48,6 @@ function taggifyForm(){ | @@ -48,7 +48,6 @@ function taggifyForm(){ | ||
48 | source: '/tags.json' | 48 | source: '/tags.json' |
49 | }); | 49 | }); |
50 | 50 | ||
51 | - | ||
52 | $('form').submit( function() { | 51 | $('form').submit( function() { |
53 | var tag_field = $('#tag_field') | 52 | var tag_field = $('#tag_field') |
54 | tag_field.val( tag_field.tagify('serialize') ); | 53 | tag_field.val( tag_field.tagify('serialize') ); |
app/assets/stylesheets/application.css
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | *= require jquery-ui/jquery-ui | 5 | *= require jquery-ui/jquery-ui |
6 | *= require jquery-ui/jquery.ui.selectmenu | 6 | *= require jquery-ui/jquery.ui.selectmenu |
7 | *= require jquery-ui/jquery.tagify | 7 | *= require jquery-ui/jquery.tagify |
8 | + *= require chosen | ||
8 | *= require_self | 9 | *= require_self |
9 | *= require_tree . | 10 | *= require_tree . |
10 | */ | 11 | */ |
@@ -15,10 +16,10 @@ | @@ -15,10 +16,10 @@ | ||
15 | .cgreen { color:#44aa22; } | 16 | .cgreen { color:#44aa22; } |
16 | 17 | ||
17 | /** COMMON STYLES **/ | 18 | /** COMMON STYLES **/ |
18 | -.left { | 19 | +.left { |
19 | float:left; | 20 | float:left; |
20 | } | 21 | } |
21 | -.right { | 22 | +.right { |
22 | float:right; | 23 | float:right; |
23 | } | 24 | } |
24 | .width-50p{ | 25 | .width-50p{ |
@@ -33,7 +34,7 @@ | @@ -33,7 +34,7 @@ | ||
33 | .width-65p{ | 34 | .width-65p{ |
34 | width:65%; | 35 | width:65%; |
35 | } | 36 | } |
36 | -.append-bottom-10 { | 37 | +.append-bottom-10 { |
37 | margin-bottom:10px; | 38 | margin-bottom:10px; |
38 | } | 39 | } |
39 | .prepend-top-10 { | 40 | .prepend-top-10 { |
app/assets/stylesheets/chosen.css
@@ -1,367 +0,0 @@ | @@ -1,367 +0,0 @@ | ||
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(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('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('chosen-sprite.png') no-repeat 100% -22px; | ||
111 | - background: url('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('chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
113 | - background: url('chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
114 | - background: url('chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%); | ||
115 | - background: url('chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
116 | - background: url('chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
117 | - margin: 1px 0; | ||
118 | - padding: 4px 20px 4px 5px; | ||
119 | - outline: 0; | ||
120 | - border: 1px solid #aaa; | ||
121 | - font-family: sans-serif; | ||
122 | - font-size: 1em; | ||
123 | -} | ||
124 | -.chzn-container-single .chzn-drop { | ||
125 | - -webkit-border-radius: 0 0 4px 4px; | ||
126 | - -moz-border-radius : 0 0 4px 4px; | ||
127 | - border-radius : 0 0 4px 4px; | ||
128 | - -moz-background-clip : padding; | ||
129 | - -webkit-background-clip: padding-box; | ||
130 | - background-clip : padding-box; | ||
131 | -} | ||
132 | -/* @end */ | ||
133 | - | ||
134 | -.chzn-container-single-nosearch .chzn-search input { | ||
135 | - position: absolute; | ||
136 | - left: -9000px; | ||
137 | -} | ||
138 | - | ||
139 | -/* @group Multi Chosen */ | ||
140 | -.chzn-container-multi .chzn-choices { | ||
141 | - background-color: #fff; | ||
142 | - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); | ||
143 | - background-image: -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
144 | - background-image: -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
145 | - background-image: -o-linear-gradient(bottom, white 85%, #eeeeee 99%); | ||
146 | - background-image: -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
147 | - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 ); | ||
148 | - background-image: linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
149 | - border: 1px solid #aaa; | ||
150 | - margin: 0; | ||
151 | - padding: 0; | ||
152 | - cursor: text; | ||
153 | - overflow: hidden; | ||
154 | - height: auto !important; | ||
155 | - height: 1%; | ||
156 | - position: relative; | ||
157 | -} | ||
158 | -.chzn-container-multi .chzn-choices li { | ||
159 | - float: left; | ||
160 | - list-style: none; | ||
161 | -} | ||
162 | -.chzn-container-multi .chzn-choices .search-field { | ||
163 | - white-space: nowrap; | ||
164 | - margin: 0; | ||
165 | - padding: 0; | ||
166 | -} | ||
167 | -.chzn-container-multi .chzn-choices .search-field input { | ||
168 | - color: #666; | ||
169 | - background: transparent !important; | ||
170 | - border: 0 !important; | ||
171 | - padding: 5px; | ||
172 | - margin: 1px 0; | ||
173 | - outline: 0; | ||
174 | - -webkit-box-shadow: none; | ||
175 | - -moz-box-shadow : none; | ||
176 | - -o-box-shadow : none; | ||
177 | - box-shadow : none; | ||
178 | -} | ||
179 | -.chzn-container-multi .chzn-choices .search-field .default { | ||
180 | - color: #999; | ||
181 | -} | ||
182 | -.chzn-container-multi .chzn-choices .search-choice { | ||
183 | - -webkit-border-radius: 3px; | ||
184 | - -moz-border-radius : 3px; | ||
185 | - border-radius : 3px; | ||
186 | - -moz-background-clip : padding; | ||
187 | - -webkit-background-clip: padding-box; | ||
188 | - background-clip : padding-box; | ||
189 | - background-color: #e4e4e4; | ||
190 | - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #e4e4e4), color-stop(0.7, #eeeeee)); | ||
191 | - background-image: -webkit-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%); | ||
192 | - background-image: -moz-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%); | ||
193 | - background-image: -o-linear-gradient(bottom, #e4e4e4 0%, #eeeeee 70%); | ||
194 | - background-image: -ms-linear-gradient(top, #e4e4e4 0%,#eeeeee 70%); | ||
195 | - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e4e4e4', endColorstr='#eeeeee',GradientType=0 ); | ||
196 | - background-image: linear-gradient(top, #e4e4e4 0%,#eeeeee 70%); | ||
197 | - color: #333; | ||
198 | - border: 1px solid #b4b4b4; | ||
199 | - line-height: 13px; | ||
200 | - padding: 3px 19px 3px 6px; | ||
201 | - margin: 3px 0 3px 5px; | ||
202 | - position: relative; | ||
203 | -} | ||
204 | -.chzn-container-multi .chzn-choices .search-choice span { | ||
205 | - cursor: default; | ||
206 | -} | ||
207 | -.chzn-container-multi .chzn-choices .search-choice-focus { | ||
208 | - background: #d4d4d4; | ||
209 | -} | ||
210 | -.chzn-container-multi .chzn-choices .search-choice .search-choice-close { | ||
211 | - display: block; | ||
212 | - position: absolute; | ||
213 | - right: 3px; | ||
214 | - top: 4px; | ||
215 | - width: 12px; | ||
216 | - height: 13px; | ||
217 | - font-size: 1px; | ||
218 | - background: url(chosen-sprite.png) right top no-repeat; | ||
219 | -} | ||
220 | -.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover { | ||
221 | - background-position: right -11px; | ||
222 | -} | ||
223 | -.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close { | ||
224 | - background-position: right -11px; | ||
225 | -} | ||
226 | -/* @end */ | ||
227 | - | ||
228 | -/* @group Results */ | ||
229 | -.chzn-container .chzn-results { | ||
230 | - margin: 0 4px 4px 0; | ||
231 | - max-height: 190px; | ||
232 | - padding: 0 0 0 4px; | ||
233 | - position: relative; | ||
234 | - overflow-x: hidden; | ||
235 | - overflow-y: auto; | ||
236 | -} | ||
237 | -.chzn-container-multi .chzn-results { | ||
238 | - margin: -1px 0 0; | ||
239 | - padding: 0; | ||
240 | -} | ||
241 | -.chzn-container .chzn-results li { | ||
242 | - display: none; | ||
243 | - line-height: 80%; | ||
244 | - padding: 7px 7px 8px; | ||
245 | - margin: 0; | ||
246 | - list-style: none; | ||
247 | -} | ||
248 | -.chzn-container .chzn-results .active-result { | ||
249 | - cursor: pointer; | ||
250 | - display: list-item; | ||
251 | -} | ||
252 | -.chzn-container .chzn-results .highlighted { | ||
253 | - background: #3875d7; | ||
254 | - color: #fff; | ||
255 | -} | ||
256 | -.chzn-container .chzn-results li em { | ||
257 | - background: #feffde; | ||
258 | - font-style: normal; | ||
259 | -} | ||
260 | -.chzn-container .chzn-results .highlighted em { | ||
261 | - background: transparent; | ||
262 | -} | ||
263 | -.chzn-container .chzn-results .no-results { | ||
264 | - background: #f4f4f4; | ||
265 | - display: list-item; | ||
266 | -} | ||
267 | -.chzn-container .chzn-results .group-result { | ||
268 | - cursor: default; | ||
269 | - color: #999; | ||
270 | - font-weight: bold; | ||
271 | -} | ||
272 | -.chzn-container .chzn-results .group-option { | ||
273 | - padding-left: 20px; | ||
274 | -} | ||
275 | -.chzn-container-multi .chzn-drop .result-selected { | ||
276 | - display: none; | ||
277 | -} | ||
278 | -/* @end */ | ||
279 | - | ||
280 | -/* @group Active */ | ||
281 | -.chzn-container-active .chzn-single { | ||
282 | - -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3); | ||
283 | - -moz-box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
284 | - -o-box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
285 | - box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
286 | - border: 1px solid #5897fb; | ||
287 | -} | ||
288 | -.chzn-container-active .chzn-single-with-drop { | ||
289 | - border: 1px solid #aaa; | ||
290 | - -webkit-box-shadow: 0 1px 0 #fff inset; | ||
291 | - -moz-box-shadow : 0 1px 0 #fff inset; | ||
292 | - -o-box-shadow : 0 1px 0 #fff inset; | ||
293 | - box-shadow : 0 1px 0 #fff inset; | ||
294 | - background-color: #eee; | ||
295 | - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee)); | ||
296 | - background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%); | ||
297 | - background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%); | ||
298 | - background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%); | ||
299 | - background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%); | ||
300 | - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 ); | ||
301 | - background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%); | ||
302 | - -webkit-border-bottom-left-radius : 0; | ||
303 | - -webkit-border-bottom-right-radius: 0; | ||
304 | - -moz-border-radius-bottomleft : 0; | ||
305 | - -moz-border-radius-bottomright: 0; | ||
306 | - border-bottom-left-radius : 0; | ||
307 | - border-bottom-right-radius: 0; | ||
308 | -} | ||
309 | -.chzn-container-active .chzn-single-with-drop div { | ||
310 | - background: transparent; | ||
311 | - border-left: none; | ||
312 | -} | ||
313 | -.chzn-container-active .chzn-single-with-drop div b { | ||
314 | - background-position: -18px 1px; | ||
315 | -} | ||
316 | -.chzn-container-active .chzn-choices { | ||
317 | - -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3); | ||
318 | - -moz-box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
319 | - -o-box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
320 | - box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
321 | - border: 1px solid #5897fb; | ||
322 | -} | ||
323 | -.chzn-container-active .chzn-choices .search-field input { | ||
324 | - color: #111 !important; | ||
325 | -} | ||
326 | -/* @end */ | ||
327 | - | ||
328 | -/* @group Disabled Support */ | ||
329 | -.chzn-disabled { | ||
330 | - cursor: default; | ||
331 | - opacity:0.5 !important; | ||
332 | -} | ||
333 | -.chzn-disabled .chzn-single { | ||
334 | - cursor: default; | ||
335 | -} | ||
336 | -.chzn-disabled .chzn-choices .search-choice .search-choice-close { | ||
337 | - cursor: default; | ||
338 | -} | ||
339 | - | ||
340 | -/* @group Right to Left */ | ||
341 | -.chzn-rtl { direction:rtl;text-align: right; } | ||
342 | -.chzn-rtl .chzn-single { padding-left: 0; padding-right: 8px; } | ||
343 | -.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; } | ||
344 | -.chzn-rtl .chzn-single div { | ||
345 | - left: 0; right: auto; | ||
346 | - border-left: none; border-right: 1px solid #aaaaaa; | ||
347 | - -webkit-border-radius: 4px 0 0 4px; | ||
348 | - -moz-border-radius : 4px 0 0 4px; | ||
349 | - border-radius : 4px 0 0 4px; | ||
350 | -} | ||
351 | -.chzn-rtl .chzn-choices li { float: right; } | ||
352 | -.chzn-rtl .chzn-choices .search-choice { padding: 3px 6px 3px 19px; margin: 3px 5px 3px 0; } | ||
353 | -.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 5px; right: auto; background-position: right top;} | ||
354 | -.chzn-rtl.chzn-container-single .chzn-results { margin-left: 4px; margin-right: 0; padding-left: 0; padding-right: 4px; } | ||
355 | -.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 20px; } | ||
356 | -.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; } | ||
357 | -.chzn-rtl .chzn-search input { | ||
358 | - background: url('chosen-sprite.png') no-repeat -38px -22px, #ffffff; | ||
359 | - background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); | ||
360 | - background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
361 | - background: url('chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
362 | - background: url('chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%); | ||
363 | - background: url('chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
364 | - background: url('chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
365 | - padding: 4px 5px 4px 20px; | ||
366 | -} | ||
367 | -/* @end */ |
app/assets/stylesheets/issues.css.scss
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | 12 | ||
13 | .issues_filter { | 13 | .issues_filter { |
14 | margin-top:10px; | 14 | margin-top:10px; |
15 | - .left { | 15 | + .left { |
16 | margin-right:15px; | 16 | margin-right:15px; |
17 | } | 17 | } |
18 | } | 18 | } |
@@ -38,11 +38,10 @@ | @@ -38,11 +38,10 @@ | ||
38 | 38 | ||
39 | /** ISSUES LIST **/ | 39 | /** ISSUES LIST **/ |
40 | .issue .action-links { | 40 | .issue .action-links { |
41 | - display:none; | ||
42 | - a { | 41 | + display:none; |
42 | + a { | ||
43 | margin-left:10px; | 43 | margin-left:10px; |
44 | } | 44 | } |
45 | } | 45 | } |
46 | .issue:hover .action-links { display:block; } | 46 | .issue:hover .action-links { display:block; } |
47 | 47 | ||
48 | - |
app/assets/stylesheets/notes.css.scss
app/assets/stylesheets/projects.css.scss
@@ -99,15 +99,15 @@ a { | @@ -99,15 +99,15 @@ a { | ||
99 | } | 99 | } |
100 | } | 100 | } |
101 | 101 | ||
102 | -td.code { | 102 | +td.code { |
103 | width: 100%; | 103 | width: 100%; |
104 | - .highlight { | 104 | + .highlight { |
105 | margin-left: 55px; | 105 | margin-left: 55px; |
106 | overflow:auto; | 106 | overflow:auto; |
107 | overflow-y:hidden; | 107 | overflow-y:hidden; |
108 | } | 108 | } |
109 | } | 109 | } |
110 | -.highlight pre { | 110 | +.highlight pre { |
111 | white-space: pre; | 111 | white-space: pre; |
112 | word-wrap:normal; | 112 | word-wrap:normal; |
113 | } | 113 | } |
@@ -115,12 +115,11 @@ td.code { | @@ -115,12 +115,11 @@ td.code { | ||
115 | .highlighttable tr:hover { | 115 | .highlighttable tr:hover { |
116 | background:white; | 116 | background:white; |
117 | } | 117 | } |
118 | -table.highlighttable pre{ | 118 | +table.highlighttable pre{ |
119 | line-height:16px !important; | 119 | line-height:16px !important; |
120 | font-size:12px !important; | 120 | font-size:12px !important; |
121 | } | 121 | } |
122 | 122 | ||
123 | - | ||
124 | table.highlighttable .linenodiv pre { | 123 | table.highlighttable .linenodiv pre { |
125 | text-align: right; | 124 | text-align: right; |
126 | padding-right: 4px; | 125 | padding-right: 4px; |
@@ -235,7 +234,6 @@ input.ssh_project_url { | @@ -235,7 +234,6 @@ input.ssh_project_url { | ||
235 | } | 234 | } |
236 | } | 235 | } |
237 | 236 | ||
238 | - | ||
239 | #user_projects_limit{ | 237 | #user_projects_limit{ |
240 | width: 60px; | 238 | width: 60px; |
241 | } | 239 | } |
@@ -244,7 +242,7 @@ input.ssh_project_url { | @@ -244,7 +242,7 @@ input.ssh_project_url { | ||
244 | cursor: move; | 242 | cursor: move; |
245 | } | 243 | } |
246 | 244 | ||
247 | -.project-refs-form { | 245 | +.project-refs-form { |
248 | span { | 246 | span { |
249 | background: none !important; | 247 | background: none !important; |
250 | position:static !important; | 248 | position:static !important; |
@@ -258,18 +256,18 @@ input.ssh_project_url { | @@ -258,18 +256,18 @@ input.ssh_project_url { | ||
258 | } | 256 | } |
259 | 257 | ||
260 | .filter .left { margin-right:15px; } | 258 | .filter .left { margin-right:15px; } |
261 | - | ||
262 | -body.project-page table .commit { | ||
263 | - a.tree-commit-link { | 259 | + |
260 | +body.project-page table .commit { | ||
261 | + a.tree-commit-link { | ||
264 | color:gray; | 262 | color:gray; |
265 | - &:hover { | 263 | + &:hover { |
266 | text-decoration:underline; | 264 | text-decoration:underline; |
267 | } | 265 | } |
268 | } | 266 | } |
269 | } | 267 | } |
270 | 268 | ||
271 | /** NEW PROJECT **/ | 269 | /** NEW PROJECT **/ |
272 | -.new-project-hodler { | 270 | +.new-project-hodler { |
273 | .icon span { background-position: -31px -70px; } | 271 | .icon span { background-position: -31px -70px; } |
274 | td { border-bottom: 1px solid #DEE2E3; } | 272 | td { border-bottom: 1px solid #DEE2E3; } |
275 | } | 273 | } |
@@ -277,8 +275,8 @@ body.project-page table .commit { | @@ -277,8 +275,8 @@ body.project-page table .commit { | ||
277 | /** Feed entry **/ | 275 | /** Feed entry **/ |
278 | .commit, | 276 | .commit, |
279 | .snippet, | 277 | .snippet, |
280 | -.message { | ||
281 | - .title { | 278 | +.message { |
279 | + .title { | ||
282 | color:#666; | 280 | color:#666; |
283 | a { color:#666 !important; } | 281 | a { color:#666 !important; } |
284 | p { margin-top:0px; } | 282 | p { margin-top:0px; } |
@@ -295,21 +293,21 @@ body.project-page table .commit { | @@ -295,21 +293,21 @@ body.project-page table .commit { | ||
295 | font-size:1.5em; | 293 | font-size:1.5em; |
296 | height:auto; | 294 | height:auto; |
297 | font-weight:bold; | 295 | font-weight:bold; |
298 | - .ui-selectmenu-status { | 296 | + .ui-selectmenu-status { |
299 | padding:3px 10px; | 297 | padding:3px 10px; |
300 | } | 298 | } |
301 | } | 299 | } |
302 | - | 300 | + |
303 | /** Snippets **/ | 301 | /** Snippets **/ |
304 | -.new_snippet textarea, | ||
305 | -.edit_snippet textarea { | 302 | +.new_snippet textarea, |
303 | +.edit_snippet textarea { | ||
306 | height:300px; | 304 | height:300px; |
307 | padding: 8px; | 305 | padding: 8px; |
308 | width: 95%; | 306 | width: 95%; |
309 | } | 307 | } |
310 | .snippet .action-links { | 308 | .snippet .action-links { |
311 | - display:none; | ||
312 | - a { | 309 | + display:none; |
310 | + a { | ||
313 | margin-left:10px; | 311 | margin-left:10px; |
314 | } | 312 | } |
315 | } | 313 | } |
@@ -348,11 +346,11 @@ body.project-page table .commit { | @@ -348,11 +346,11 @@ body.project-page table .commit { | ||
348 | background: #2c5c66; | 346 | background: #2c5c66; |
349 | color:white; | 347 | color:white; |
350 | } | 348 | } |
351 | - &.issue { | 349 | + &.issue { |
352 | background: #D12F19; | 350 | background: #D12F19; |
353 | color:white; | 351 | color:white; |
354 | } | 352 | } |
355 | - &.commit { | 353 | + &.commit { |
356 | background: #44aacc; | 354 | background: #44aacc; |
357 | color:white; | 355 | color:white; |
358 | } | 356 | } |
app/assets/stylesheets/style.scss
@@ -60,7 +60,6 @@ input:invalid, textarea:invalid { background-color: #f0dddd; } | @@ -60,7 +60,6 @@ input:invalid, textarea:invalid { background-color: #f0dddd; } | ||
60 | table { border-collapse: collapse; border-spacing: 0; } | 60 | table { border-collapse: collapse; border-spacing: 0; } |
61 | td { vertical-align: top; } | 61 | td { vertical-align: top; } |
62 | 62 | ||
63 | - | ||
64 | /* ==|== primary styles ===================================================== | 63 | /* ==|== primary styles ===================================================== |
65 | Author: Ricardo Rauch | 64 | Author: Ricardo Rauch |
66 | ========================================================================== */ | 65 | ========================================================================== */ |
@@ -89,13 +88,13 @@ input[type="text"]:focus, input[type="password"]:focus { outline: none; } | @@ -89,13 +88,13 @@ input[type="text"]:focus, input[type="password"]:focus { outline: none; } | ||
89 | input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: 10px} | 88 | input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: 10px} |
90 | 89 | ||
91 | .form-row{ | 90 | .form-row{ |
92 | - padding: 0px 0px 10px 0px; | 91 | + padding: 0px 0px 10px 0px; |
93 | } | 92 | } |
94 | 93 | ||
95 | .form-row label{ | 94 | .form-row label{ |
96 | - font-weight:bold; | ||
97 | - display: inline-block; | ||
98 | - padding: 0px 0px 5px 0px; | 95 | + font-weight:bold; |
96 | + display: inline-block; | ||
97 | + padding: 0px 0px 5px 0px; | ||
99 | } | 98 | } |
100 | 99 | ||
101 | /* eo Forms */ | 100 | /* eo Forms */ |
@@ -103,23 +102,23 @@ input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: | @@ -103,23 +102,23 @@ input.text{border: 1px solid #ccc; border-radius: 4px; display: block; padding: | ||
103 | /* Tables */ | 102 | /* Tables */ |
104 | table {width:100%; border: 1px solid #DEE2E3; margin-bottom: 20px} | 103 | table {width:100%; border: 1px solid #DEE2E3; margin-bottom: 20px} |
105 | table thead{ | 104 | table thead{ |
106 | - -webkit-border-top-left-radius: 5px; | ||
107 | - -webkit-border-top-right-radius: 5px; | ||
108 | - -moz-border-radius-topleft: 5px; | ||
109 | - -moz-border-radius-topright: 5px; | ||
110 | - border-top-left-radius: 5px; | ||
111 | - border-top-right-radius: 5px; | 105 | + -webkit-border-top-left-radius: 5px; |
106 | + -webkit-border-top-right-radius: 5px; | ||
107 | + -moz-border-radius-topleft: 5px; | ||
108 | + -moz-border-radius-topright: 5px; | ||
109 | + border-top-left-radius: 5px; | ||
110 | + border-top-right-radius: 5px; | ||
112 | } | 111 | } |
113 | table thead th{ | 112 | table thead th{ |
114 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); | ||
115 | - background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
116 | - background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
117 | - background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
118 | - margin: 0; | ||
119 | - font-weight: normal; | ||
120 | - font-weight: bold; | ||
121 | - text-align: left; | ||
122 | - color: #97A0A5; | 113 | + background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); |
114 | + background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
115 | + background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
116 | + background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
117 | + margin: 0; | ||
118 | + font-weight: normal; | ||
119 | + font-weight: bold; | ||
120 | + text-align: left; | ||
121 | + color: #97A0A5; | ||
123 | } | 122 | } |
124 | td, th{ padding: .9em 1em; vertical-align: middle; } | 123 | td, th{ padding: .9em 1em; vertical-align: middle; } |
125 | 124 | ||
@@ -127,37 +126,36 @@ table thead .image{width:100px} | @@ -127,37 +126,36 @@ table thead .image{width:100px} | ||
127 | table tr:hover, .listed_items tr.odd:hover{background-color:#FFFFCF} | 126 | table tr:hover, .listed_items tr.odd:hover{background-color:#FFFFCF} |
128 | /* eo Tables */ | 127 | /* eo Tables */ |
129 | 128 | ||
130 | - | ||
131 | /* Buttons */ | 129 | /* Buttons */ |
132 | .grey-button{ | 130 | .grey-button{ |
133 | - border-radius: 5px; | ||
134 | - font-size: 12px; | ||
135 | - font-weight: bold; | ||
136 | - padding: 6px 20px; | ||
137 | - border: 1px solid #999; | ||
138 | - color: #666; | ||
139 | - display: inline-block; | ||
140 | - box-shadow: 0 1px 2px rgba(0,0,0,.3); | ||
141 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #f7f7f7), to(#d5d5d5)); | ||
142 | - background-image: -webkit-linear-gradient(#f7f7f7 7.6%, #d5d5d5); | ||
143 | - background-image: -moz-linear-gradient(#f7f7f7 7.6%, #d5d5d5); | ||
144 | - background-image: -o-linear-gradient(#f7f7f7 7.6%, #d5d5d5); | 131 | + border-radius: 5px; |
132 | + font-size: 12px; | ||
133 | + font-weight: bold; | ||
134 | + padding: 6px 20px; | ||
135 | + border: 1px solid #999; | ||
136 | + color: #666; | ||
137 | + display: inline-block; | ||
138 | + box-shadow: 0 1px 2px rgba(0,0,0,.3); | ||
139 | + background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #f7f7f7), to(#d5d5d5)); | ||
140 | + background-image: -webkit-linear-gradient(#f7f7f7 7.6%, #d5d5d5); | ||
141 | + background-image: -moz-linear-gradient(#f7f7f7 7.6%, #d5d5d5); | ||
142 | + background-image: -o-linear-gradient(#f7f7f7 7.6%, #d5d5d5); | ||
145 | } | 143 | } |
146 | 144 | ||
147 | a.button, input.button { | 145 | a.button, input.button { |
148 | - font-weight: bold; | ||
149 | - padding: 10px 20px; | ||
150 | - text-align: center; | ||
151 | - display: inline-block; | ||
152 | - border-radius: 5px; | ||
153 | - color: #578E91; | ||
154 | - font-size: 12px; | ||
155 | - text-transform: uppercase; | ||
156 | - border: 1px solid #8CE2E6; | ||
157 | - background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #dbf5f6), to(#c5eef0)); | ||
158 | - background-image: -webkit-linear-gradient(#dbf5f6 79.4%, #c5eef0); | ||
159 | - background-image: -moz-linear-gradient(#dbf5f6 79.4%, #c5eef0); | ||
160 | - background-image: -o-linear-gradient(#dbf5f6 79.4%, #c5eef0); | 146 | + font-weight: bold; |
147 | + padding: 10px 20px; | ||
148 | + text-align: center; | ||
149 | + display: inline-block; | ||
150 | + border-radius: 5px; | ||
151 | + color: #578E91; | ||
152 | + font-size: 12px; | ||
153 | + text-transform: uppercase; | ||
154 | + border: 1px solid #8CE2E6; | ||
155 | + background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #dbf5f6), to(#c5eef0)); | ||
156 | + background-image: -webkit-linear-gradient(#dbf5f6 79.4%, #c5eef0); | ||
157 | + background-image: -moz-linear-gradient(#dbf5f6 79.4%, #c5eef0); | ||
158 | + background-image: -o-linear-gradient(#dbf5f6 79.4%, #c5eef0); | ||
161 | } | 159 | } |
162 | 160 | ||
163 | input.button{margin-bottom: 1.5em} | 161 | input.button{margin-bottom: 1.5em} |
@@ -167,21 +165,21 @@ input.button{margin-bottom: 1.5em} | @@ -167,21 +165,21 @@ input.button{margin-bottom: 1.5em} | ||
167 | .button.green {margin-right: 0; } | 165 | .button.green {margin-right: 0; } |
168 | 166 | ||
169 | .button.yellow{ | 167 | .button.yellow{ |
170 | - color: #908054; | ||
171 | - border-color: #DDCDA1; | ||
172 | - background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #FFEFC3), to(#F3E3B7)); | ||
173 | - background-image: -webkit-linear-gradient(#FFEFC3 79.4%, #F3E3B7); | ||
174 | - background-image: -moz-linear-gradient(#FFEFC3 79.4%, #F3E3B7); | ||
175 | - background-image: -o-linear-gradient(#FFEFC3 79.4%, #F3E3B7); | 168 | + color: #908054; |
169 | + border-color: #DDCDA1; | ||
170 | + background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #FFEFC3), to(#F3E3B7)); | ||
171 | + background-image: -webkit-linear-gradient(#FFEFC3 79.4%, #F3E3B7); | ||
172 | + background-image: -moz-linear-gradient(#FFEFC3 79.4%, #F3E3B7); | ||
173 | + background-image: -o-linear-gradient(#FFEFC3 79.4%, #F3E3B7); | ||
176 | } | 174 | } |
177 | 175 | ||
178 | .button.blue{ | 176 | .button.blue{ |
179 | - color: #417E97; | ||
180 | - border-color: #b2cdec; | ||
181 | - background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #dbe8f6), to(#c7daf1)); | ||
182 | - background-image: -webkit-linear-gradient(#dbe8f6 79.4%, #c7daf1); | ||
183 | - background-image: -moz-linear-gradient(#dbe8f6 79.4%, #c7daf1); | ||
184 | - background-image: -o-linear-gradient(#dbe8f6 79.4%, #c7daf1); | 177 | + color: #417E97; |
178 | + border-color: #b2cdec; | ||
179 | + background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #dbe8f6), to(#c7daf1)); | ||
180 | + background-image: -webkit-linear-gradient(#dbe8f6 79.4%, #c7daf1); | ||
181 | + background-image: -moz-linear-gradient(#dbe8f6 79.4%, #c7daf1); | ||
182 | + background-image: -o-linear-gradient(#dbe8f6 79.4%, #c7daf1); | ||
185 | } | 183 | } |
186 | 184 | ||
187 | .button-small{ text-shadow: none; padding: 4px 10px; } | 185 | .button-small{ text-shadow: none; padding: 4px 10px; } |
@@ -192,50 +190,49 @@ input.button{margin-bottom: 1.5em} | @@ -192,50 +190,49 @@ input.button{margin-bottom: 1.5em} | ||
192 | /* UI Box */ | 190 | /* UI Box */ |
193 | .ui-box{border: 1px solid #DEDFE1; float: left; border-radius: 5px} | 191 | .ui-box{border: 1px solid #DEDFE1; float: left; border-radius: 5px} |
194 | .ui-box h3{ | 192 | .ui-box h3{ |
195 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); | ||
196 | - background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
197 | - background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
198 | - background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
199 | - margin: 0; | ||
200 | - padding: 1em; | ||
201 | - font-size: 12px; | ||
202 | - font-weight: normal; | ||
203 | - font-weight: bold; | ||
204 | - font-size: 16px; | ||
205 | - border-bottom: 1px solid #DEDFE1; | ||
206 | - -webkit-border-top-left-radius: 5px; | ||
207 | - -webkit-border-top-right-radius: 5px; | ||
208 | - -moz-border-radius-topleft: 5px; | ||
209 | - -moz-border-radius-topright: 5px; | ||
210 | - border-top-left-radius: 5px; | ||
211 | - border-top-right-radius: 5px; | 193 | + background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); |
194 | + background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
195 | + background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
196 | + background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); | ||
197 | + margin: 0; | ||
198 | + padding: 1em; | ||
199 | + font-size: 12px; | ||
200 | + font-weight: normal; | ||
201 | + font-weight: bold; | ||
202 | + font-size: 16px; | ||
203 | + border-bottom: 1px solid #DEDFE1; | ||
204 | + -webkit-border-top-left-radius: 5px; | ||
205 | + -webkit-border-top-right-radius: 5px; | ||
206 | + -moz-border-radius-topleft: 5px; | ||
207 | + -moz-border-radius-topright: 5px; | ||
208 | + border-top-left-radius: 5px; | ||
209 | + border-top-right-radius: 5px; | ||
212 | } | 210 | } |
213 | 211 | ||
214 | .ui-box.ui-box-small h3{ | 212 | .ui-box.ui-box-small h3{ |
215 | - padding: 8px 10px; | ||
216 | - font-size: 12px; | 213 | + padding: 8px 10px; |
214 | + font-size: 12px; | ||
217 | } | 215 | } |
218 | 216 | ||
219 | - | ||
220 | .ui-box .data{padding: .5em 1em} | 217 | .ui-box .data{padding: .5em 1em} |
221 | 218 | ||
222 | .ui-box .buttons{background-color: #f7f8f9; padding: 1em; | 219 | .ui-box .buttons{background-color: #f7f8f9; padding: 1em; |
223 | - -webkit-border-bottom-right-radius: 5px; | ||
224 | - -webkit-border-bottom-left-radius: 5px; | ||
225 | - -moz-border-radius-bottomright: 5px; | ||
226 | - -moz-border-radius-bottomleft: 5px; | ||
227 | - border-bottom-right-radius: 5px; | ||
228 | - border-bottom-left-radius: 5px; | 220 | + -webkit-border-bottom-right-radius: 5px; |
221 | + -webkit-border-bottom-left-radius: 5px; | ||
222 | + -moz-border-radius-bottomright: 5px; | ||
223 | + -moz-border-radius-bottomleft: 5px; | ||
224 | + border-bottom-right-radius: 5px; | ||
225 | + border-bottom-left-radius: 5px; | ||
229 | } | 226 | } |
230 | 227 | ||
231 | .ui-box .buttons .button{padding: 8px 9px; font-size: 11px} | 228 | .ui-box .buttons .button{padding: 8px 9px; font-size: 11px} |
232 | 229 | ||
233 | .ui-box.hover:hover{box-shadow: 0 0 10px rgba(0,0,0,.1); border: 1px solid #ccc; | 230 | .ui-box.hover:hover{box-shadow: 0 0 10px rgba(0,0,0,.1); border: 1px solid #ccc; |
234 | - | ||
235 | - -webkit-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
236 | - -moz-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
237 | - -o-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
238 | - transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | 231 | + |
232 | + -webkit-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
233 | + -moz-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
234 | + -o-transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
235 | + transition: all 200ms cubic-bezier(0.470, 0.000, 0.745, 0.715); | ||
239 | } | 236 | } |
240 | 237 | ||
241 | /* eo UI Box */ | 238 | /* eo UI Box */ |
@@ -244,62 +241,61 @@ input.button{margin-bottom: 1.5em} | @@ -244,62 +241,61 @@ input.button{margin-bottom: 1.5em} | ||
244 | body.login-page{background-color: #f1f1f1; padding-top: 10%} | 241 | body.login-page{background-color: #f1f1f1; padding-top: 10%} |
245 | 242 | ||
246 | .login-box{ | 243 | .login-box{ |
247 | - width: 304px; | ||
248 | - position: relative; | ||
249 | - border-radius: 5px; | ||
250 | - margin: auto; | ||
251 | - padding: 20px; | ||
252 | - background: white; | ||
253 | - box-shadow: rgba(0, 0, 0, 0.07) 0 1px 0,white 0 2px 0,rgba(0, 0, 0, 0.07) 0 3px 0,white 0 4px 0, rgba(0, 0, 0, 0.07) 0 5px 0; | 244 | + width: 304px; |
245 | + position: relative; | ||
246 | + border-radius: 5px; | ||
247 | + margin: auto; | ||
248 | + padding: 20px; | ||
249 | + background: white; | ||
250 | + box-shadow: rgba(0, 0, 0, 0.07) 0 1px 0,white 0 2px 0,rgba(0, 0, 0, 0.07) 0 3px 0,white 0 4px 0, rgba(0, 0, 0, 0.07) 0 5px 0; | ||
254 | } | 251 | } |
255 | 252 | ||
256 | .login-box .login-logo{ | 253 | .login-box .login-logo{ |
257 | - margin: 10px 0 30px 0; | ||
258 | - display: block; | 254 | + margin: 10px 0 30px 0; |
255 | + display: block; | ||
259 | } | 256 | } |
260 | 257 | ||
261 | .login-box input.text{background-color: #f1f1f1; font-size: 16px; border-radius: 0; padding: 14px 10px; width: 280px} | 258 | .login-box input.text{background-color: #f1f1f1; font-size: 16px; border-radius: 0; padding: 14px 10px; width: 280px} |
262 | 259 | ||
263 | .login-box input.text.top{ | 260 | .login-box input.text.top{ |
264 | - -webkit-border-top-left-radius: 5px; | ||
265 | - -webkit-border-top-right-radius: 5px; | ||
266 | - -moz-border-radius-topleft: 5px; | ||
267 | - -moz-border-radius-topright: 5px; | ||
268 | - border-top-left-radius: 5px; | ||
269 | - border-top-right-radius: 5px; | 261 | + -webkit-border-top-left-radius: 5px; |
262 | + -webkit-border-top-right-radius: 5px; | ||
263 | + -moz-border-radius-topleft: 5px; | ||
264 | + -moz-border-radius-topright: 5px; | ||
265 | + border-top-left-radius: 5px; | ||
266 | + border-top-right-radius: 5px; | ||
270 | } | 267 | } |
271 | 268 | ||
272 | .login-box input.text.bottom{ | 269 | .login-box input.text.bottom{ |
273 | - -webkit-border-bottom-right-radius: 5px; | ||
274 | - -webkit-border-bottom-left-radius: 5px; | ||
275 | - -moz-border-radius-bottomright: 5px; | ||
276 | - -moz-border-radius-bottomleft: 5px; | ||
277 | - border-bottom-right-radius: 5px; | ||
278 | - border-bottom-left-radius: 5px; | ||
279 | - border-top: 0; | ||
280 | - margin-bottom: 20px; | 270 | + -webkit-border-bottom-right-radius: 5px; |
271 | + -webkit-border-bottom-left-radius: 5px; | ||
272 | + -moz-border-radius-bottomright: 5px; | ||
273 | + -moz-border-radius-bottomleft: 5px; | ||
274 | + border-bottom-right-radius: 5px; | ||
275 | + border-bottom-left-radius: 5px; | ||
276 | + border-top: 0; | ||
277 | + margin-bottom: 20px; | ||
281 | } | 278 | } |
282 | 279 | ||
283 | .login-box a.forgot{float: right; padding-top: 6px} | 280 | .login-box a.forgot{float: right; padding-top: 6px} |
284 | 281 | ||
285 | - | ||
286 | /* Icons */ | 282 | /* Icons */ |
287 | .directory, .file{ | 283 | .directory, .file{ |
288 | - display: inline-block; | ||
289 | - margin-right: 10px; | ||
290 | - width: 14px; | 284 | + display: inline-block; |
285 | + margin-right: 10px; | ||
286 | + width: 14px; | ||
291 | } | 287 | } |
292 | 288 | ||
293 | .directory{ | 289 | .directory{ |
294 | - background: url('images.png') no-repeat -73px -26px; | ||
295 | - height: 11px; | ||
296 | - margin-bottom: -1px; | 290 | + background: url('images.png') no-repeat -73px -26px; |
291 | + height: 11px; | ||
292 | + margin-bottom: -1px; | ||
297 | } | 293 | } |
298 | 294 | ||
299 | .file{ | 295 | .file{ |
300 | - background: url('images.png') no-repeat -114px -24px; | ||
301 | - height: 16px; | ||
302 | - margin-bottom: -3px; | 296 | + background: url('images.png') no-repeat -114px -24px; |
297 | + height: 16px; | ||
298 | + margin-bottom: -3px; | ||
303 | } | 299 | } |
304 | 300 | ||
305 | /* eo Icons*/ | 301 | /* eo Icons*/ |
@@ -315,7 +311,7 @@ body.login-page{background-color: #f1f1f1; padding-top: 10%} | @@ -315,7 +311,7 @@ body.login-page{background-color: #f1f1f1; padding-top: 10%} | ||
315 | textarea | 311 | textarea |
316 | { | 312 | { |
317 | border: 1px solid #FFBBBB; | 313 | border: 1px solid #FFBBBB; |
318 | - background: #fff4f6; | 314 | + background: #fff4f6; |
319 | } | 315 | } |
320 | } | 316 | } |
321 | /* eo Errors */ | 317 | /* eo Errors */ |
@@ -324,91 +320,84 @@ body.login-page{background-color: #f1f1f1; padding-top: 10%} | @@ -324,91 +320,84 @@ body.login-page{background-color: #f1f1f1; padding-top: 10%} | ||
324 | #container{background-color: white; overflow: hidden; } | 320 | #container{background-color: white; overflow: hidden; } |
325 | body.collapsed #container{margin: auto; width: 980px; border: 1px solid rgba(0,0,0,.22); border-top: 0; box-shadow: 0 0 0px 4px rgba(0,0,0,.04)} | 321 | body.collapsed #container{margin: auto; width: 980px; border: 1px solid rgba(0,0,0,.22); border-top: 0; box-shadow: 0 0 0px 4px rgba(0,0,0,.04)} |
326 | 322 | ||
327 | - | ||
328 | - | ||
329 | /* Header */ | 323 | /* Header */ |
330 | header{background: #474D57 url('bg-header.png') repeat-x bottom; z-index: 10000; height: 44px; padding: 10px 2% 6px 2%; position: relative} | 324 | header{background: #474D57 url('bg-header.png') repeat-x bottom; z-index: 10000; height: 44px; padding: 10px 2% 6px 2%; position: relative} |
331 | header a{color: white; text-shadow: 0 -1px 0 black} | 325 | header a{color: white; text-shadow: 0 -1px 0 black} |
332 | header a:hover{color: #f1f1f1} | 326 | header a:hover{color: #f1f1f1} |
333 | header h1{ | 327 | header h1{ |
334 | - width: 65px; | 328 | + width: 65px; |
335 | } | 329 | } |
336 | header h1.logo{margin: 0; padding: 0} | 330 | header h1.logo{margin: 0; padding: 0} |
337 | header h1.logo a{ | 331 | header h1.logo a{ |
338 | - background: url('images.png') no-repeat -3px -7px; | ||
339 | - width: 65px; | ||
340 | - height: 26px; | ||
341 | - margin: 5px 0; | ||
342 | - padding: 0; | ||
343 | - display: block; | ||
344 | - float: left; | ||
345 | - text-indent: -1000em; | 332 | + background: url('images.png') no-repeat -3px -7px; |
333 | + width: 65px; | ||
334 | + height: 26px; | ||
335 | + margin: 5px 0; | ||
336 | + padding: 0; | ||
337 | + display: block; | ||
338 | + float: left; | ||
339 | + text-indent: -1000em; | ||
346 | } | 340 | } |
347 | 341 | ||
348 | - | ||
349 | - | ||
350 | header nav{border-radius: 4px; box-shadow: 0 1px 2px black; width: 294px; margin: auto; | 342 | header nav{border-radius: 4px; box-shadow: 0 1px 2px black; width: 294px; margin: auto; |
351 | - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#31363e)); | ||
352 | - background-image: -webkit-linear-gradient(#595d63 6.6%, #31363e); | ||
353 | - background-image: -moz-linear-gradient(#595d63 6.6%, #31363e); | ||
354 | - background-image: -o-linear-gradient(#595d63 6.6%, #31363e); | ||
355 | - margin-top: 2px; | ||
356 | - height:30px | 343 | + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#31363e)); |
344 | + background-image: -webkit-linear-gradient(#595d63 6.6%, #31363e); | ||
345 | + background-image: -moz-linear-gradient(#595d63 6.6%, #31363e); | ||
346 | + background-image: -o-linear-gradient(#595d63 6.6%, #31363e); | ||
347 | + margin-top: 2px; | ||
348 | + height:30px | ||
357 | } | 349 | } |
358 | header nav a{padding: 8px 12px 8px 34px; display: inline-block; color: #D6DADF; border-right: 1px solid #31363E; position: relative; box-shadow: 1px 0 0 rgba(255,255,255,.1); margin: 0} | 350 | header nav a{padding: 8px 12px 8px 34px; display: inline-block; color: #D6DADF; border-right: 1px solid #31363E; position: relative; box-shadow: 1px 0 0 rgba(255,255,255,.1); margin: 0} |
359 | header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 6px;} | 351 | header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 6px;} |
360 | header nav a:last-child {border: 0; box-shadow: none} | 352 | header nav a:last-child {border: 0; box-shadow: none} |
361 | header nav a:hover, header nav a.current{ | 353 | header nav a:hover, header nav a.current{ |
362 | - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#2c2f35)); | ||
363 | - background-image: -webkit-linear-gradient(#595d63 6.6%, #2c2f35); | ||
364 | - background-image: -moz-linear-gradient(#595d63 6.6%, #202227); | ||
365 | - background-image: -o-linear-gradient(#595d63 6.6%, #202227); | 354 | + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#2c2f35)); |
355 | + background-image: -webkit-linear-gradient(#595d63 6.6%, #2c2f35); | ||
356 | + background-image: -moz-linear-gradient(#595d63 6.6%, #202227); | ||
357 | + background-image: -o-linear-gradient(#595d63 6.6%, #202227); | ||
366 | } | 358 | } |
367 | 359 | ||
368 | header nav a:active{ | 360 | header nav a:active{ |
369 | - box-shadow: 0 1px 4px rgba(0,0,0,.8) inset; | 361 | + box-shadow: 0 1px 4px rgba(0,0,0,.8) inset; |
370 | } | 362 | } |
371 | 363 | ||
372 | - | ||
373 | header nav a.dashboard { | 364 | header nav a.dashboard { |
374 | - -webkit-border-top-left-radius: 4px; | ||
375 | - -webkit-border-bottom-left-radius: 4px; | ||
376 | - -moz-border-radius-topleft: 4px; | ||
377 | - -moz-border-radius-bottomleft: 4px; | ||
378 | - border-top-left-radius: 4px; | ||
379 | - border-bottom-left-radius: 4px; | 365 | + -webkit-border-top-left-radius: 4px; |
366 | + -webkit-border-bottom-left-radius: 4px; | ||
367 | + -moz-border-radius-topleft: 4px; | ||
368 | + -moz-border-radius-bottomleft: 4px; | ||
369 | + border-top-left-radius: 4px; | ||
370 | + border-bottom-left-radius: 4px; | ||
380 | } | 371 | } |
381 | 372 | ||
382 | header nav a.admin{ | 373 | header nav a.admin{ |
383 | - -webkit-border-top-right-radius: 4px; | ||
384 | - -webkit-border-bottom-right-radius: 4px; | ||
385 | - -moz-border-radius-topright: 4px; | ||
386 | - -moz-border-radius-bottomright: 4px; | ||
387 | - border-top-right-radius: 4px; | ||
388 | - border-bottom-right-radius: 4px; | 374 | + -webkit-border-top-right-radius: 4px; |
375 | + -webkit-border-bottom-right-radius: 4px; | ||
376 | + -moz-border-radius-topright: 4px; | ||
377 | + -moz-border-radius-bottomright: 4px; | ||
378 | + border-top-right-radius: 4px; | ||
379 | + border-bottom-right-radius: 4px; | ||
389 | } | 380 | } |
390 | 381 | ||
391 | - | ||
392 | header .search{ display: inline-block; float: right; margin-right: 46px} | 382 | header .search{ display: inline-block; float: right; margin-right: 46px} |
393 | 383 | ||
394 | header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 6px;} | 384 | header nav a span{width: 20px; height: 20px; display: inline-block; background: red; position: absolute; left: 8px; top: 6px;} |
395 | 385 | ||
396 | header nav a.dashboard span{background: url('images.png') no-repeat -161px 0;} | 386 | header nav a.dashboard span{background: url('images.png') no-repeat -161px 0;} |
397 | -header nav a.admin span{background: url('images.png') no-repeat -184px 0;} | ||
398 | -header nav a.project span{background: url('images.png') no-repeat -209px -1px; top: 7px} | ||
399 | - | 387 | +header nav a.admin span{background: url('images.png') no-repeat -184px 0;} |
388 | +header nav a.project span{background: url('images.png') no-repeat -209px -1px; top: 7px} | ||
400 | 389 | ||
401 | header .login-top{float: right; width: 180px; | 390 | header .login-top{float: right; width: 180px; |
402 | - background-image: -webkit-gradient(linear, 0 0, 0 62, color-stop(0.032, #464c56), to(#363c45)); | ||
403 | - background-image: -webkit-linear-gradient(#464c56 3.2%, #363c45); | ||
404 | - background-image: -moz-linear-gradient(#464c56 3.2%, #363c45); | ||
405 | - background-image: -o-linear-gradient(#464c56 3.2%, #363c45); | ||
406 | - padding: 0 10px; | ||
407 | - height: 44px; | 391 | + background-image: -webkit-gradient(linear, 0 0, 0 62, color-stop(0.032, #464c56), to(#363c45)); |
392 | + background-image: -webkit-linear-gradient(#464c56 3.2%, #363c45); | ||
393 | + background-image: -moz-linear-gradient(#464c56 3.2%, #363c45); | ||
394 | + background-image: -o-linear-gradient(#464c56 3.2%, #363c45); | ||
395 | + padding: 0 10px; | ||
396 | + height: 44px; | ||
408 | } | 397 | } |
409 | header .login-top a{display: block;} | 398 | header .login-top a{display: block;} |
410 | header .login-top a.pic{float: left; margin-right: 10px; | 399 | header .login-top a.pic{float: left; margin-right: 10px; |
411 | - img{ height: 36px; width: 36px; border: 1px solid black} | 400 | + img{ height: 36px; width: 36px; border: 1px solid black} |
412 | } | 401 | } |
413 | header .login-top a.username{margin-bottom: 5px} | 402 | header .login-top a.username{margin-bottom: 5px} |
414 | header .login-top a.logout{color: #ccc} | 403 | header .login-top a.logout{color: #ccc} |
@@ -419,12 +408,11 @@ header{margin-bottom: 0; clear: both; } | @@ -419,12 +408,11 @@ header{margin-bottom: 0; clear: both; } | ||
419 | .page-title a.grey-button{float: right;} | 408 | .page-title a.grey-button{float: right;} |
420 | .right{float: right;} | 409 | .right{float: right;} |
421 | 410 | ||
422 | - | ||
423 | /* Account box */ | 411 | /* Account box */ |
424 | header .account-box{position: absolute; right: 0; top: 8px; z-index: 10000; width: 128px; font-size: 11px; float: right; display: block; cursor: pointer;} | 412 | header .account-box{position: absolute; right: 0; top: 8px; z-index: 10000; width: 128px; font-size: 11px; float: right; display: block; cursor: pointer;} |
425 | header .account-box img{ border-radius: 4px; right: 20px; position: absolute; width: 38px; height: 38px; display: block; box-shadow: 0 1px 2px black} | 413 | header .account-box img{ border-radius: 4px; right: 20px; position: absolute; width: 38px; height: 38px; display: block; box-shadow: 0 1px 2px black} |
426 | header .account-box img:after{ | 414 | header .account-box img:after{ |
427 | - content: " "; | 415 | + content: " "; |
428 | display: block; | 416 | display: block; |
429 | position: absolute; | 417 | position: absolute; |
430 | top: 0; | 418 | top: 0; |
@@ -432,7 +420,7 @@ header .account-box img:after{ | @@ -432,7 +420,7 @@ header .account-box img:after{ | ||
432 | left: 0; | 420 | left: 0; |
433 | bottom: 0; | 421 | bottom: 0; |
434 | float: right; | 422 | float: right; |
435 | - border-radius: 5px; | 423 | + border-radius: 5px; |
436 | border: 1px solid rgba(255, 255, 255, .1); | 424 | border: 1px solid rgba(255, 255, 255, .1); |
437 | border-bottom: 0; | 425 | border-bottom: 0; |
438 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, .15)), to(rgba(0, 0, 0, .25))), -webkit-gradient(linear, left top, right bottom, color-stop(0, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, .1)), color-stop(0.501, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0))); | 426 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, .15)), to(rgba(0, 0, 0, .25))), -webkit-gradient(linear, left top, right bottom, color-stop(0, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, .1)), color-stop(0.501, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0))); |
@@ -462,7 +450,6 @@ header .account-links:before { | @@ -462,7 +450,6 @@ header .account-links:before { | ||
462 | z-index:10; | 450 | z-index:10; |
463 | } | 451 | } |
464 | 452 | ||
465 | - | ||
466 | /* Inspired by http://maxvoltar.com/temp/nowplaying/ */ | 453 | /* Inspired by http://maxvoltar.com/temp/nowplaying/ */ |
467 | header .account-links{background: white; display: none; z-index: 100000; border-radius: 5px; width: 100px; position: absolute; right: 20px; top: 46px; margin-top: 0; float: right; box-shadow: 0 1px 1px rgba(0,0,0,.2); } | 454 | header .account-links{background: white; display: none; z-index: 100000; border-radius: 5px; width: 100px; position: absolute; right: 20px; top: 46px; margin-top: 0; float: right; box-shadow: 0 1px 1px rgba(0,0,0,.2); } |
468 | header .account-links a{color: #666; padding: 6px 10px; display: block; text-shadow: none; border-bottom: 1px solid #eee} | 455 | header .account-links a{color: #666; padding: 6px 10px; display: block; text-shadow: none; border-bottom: 1px solid #eee} |
@@ -470,28 +457,28 @@ header .account-links a:hover{ | @@ -470,28 +457,28 @@ header .account-links a:hover{ | ||
470 | background: #3aacec; | 457 | background: #3aacec; |
471 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#39acec), to(#279ada), color-stop(.05, #4cbefe)); | 458 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#39acec), to(#279ada), color-stop(.05, #4cbefe)); |
472 | background: -moz-linear-gradient(top, #39acec, #4cbefe 5%, #279ada); | 459 | background: -moz-linear-gradient(top, #39acec, #4cbefe 5%, #279ada); |
473 | - background: linear-gradient(top, #39acec, #4cbefe 5%, #279ada); | ||
474 | - color: #fff; | 460 | + background: linear-gradient(top, #39acec, #4cbefe 5%, #279ada); |
461 | + color: #fff; | ||
475 | text-shadow: #1488c8 0 -1px 0; | 462 | text-shadow: #1488c8 0 -1px 0; |
476 | } | 463 | } |
477 | .account-box.hover .arrow-up{top: 41px; right: 6px; position: absolute} | 464 | .account-box.hover .arrow-up{top: 41px; right: 6px; position: absolute} |
478 | header .account-links a:first-child{ | 465 | header .account-links a:first-child{ |
479 | - -webkit-border-top-left-radius: 5px; | ||
480 | - -webkit-border-top-right-radius: 5px; | ||
481 | - -moz-border-radius-topleft: 5px; | ||
482 | - -moz-border-radius-topright: 5px; | ||
483 | - border-top-left-radius: 5px; | ||
484 | - border-top-right-radius: 5px; | 466 | + -webkit-border-top-left-radius: 5px; |
467 | + -webkit-border-top-right-radius: 5px; | ||
468 | + -moz-border-radius-topleft: 5px; | ||
469 | + -moz-border-radius-topright: 5px; | ||
470 | + border-top-left-radius: 5px; | ||
471 | + border-top-right-radius: 5px; | ||
485 | } | 472 | } |
486 | 473 | ||
487 | header .account-links a:last-child{ | 474 | header .account-links a:last-child{ |
488 | - -webkit-border-bottom-right-radius: 5px; | ||
489 | - -webkit-border-bottom-left-radius: 5px; | ||
490 | - -moz-border-radius-bottomright: 5px; | ||
491 | - -moz-border-radius-bottomleft: 5px; | ||
492 | - border-bottom-right-radius: 5px; | ||
493 | - border-bottom-left-radius: 5px; | ||
494 | - border-bottom: 0; | 475 | + -webkit-border-bottom-right-radius: 5px; |
476 | + -webkit-border-bottom-left-radius: 5px; | ||
477 | + -moz-border-radius-bottomright: 5px; | ||
478 | + -moz-border-radius-bottomleft: 5px; | ||
479 | + border-bottom-right-radius: 5px; | ||
480 | + border-bottom-left-radius: 5px; | ||
481 | + border-bottom: 0; | ||
495 | } | 482 | } |
496 | 483 | ||
497 | #no_ssh_key_defined { | 484 | #no_ssh_key_defined { |
@@ -509,13 +496,10 @@ input.search-input:focus{ background-color: white; width: 216px;} | @@ -509,13 +496,10 @@ input.search-input:focus{ background-color: white; width: 216px;} | ||
509 | input.search-input::-webkit-input-placeholder {color: #666} | 496 | input.search-input::-webkit-input-placeholder {color: #666} |
510 | /* eo Header */ | 497 | /* eo Header */ |
511 | 498 | ||
512 | - | ||
513 | h2.icon{position: relative; padding-left: 40px; float: left; } | 499 | h2.icon{position: relative; padding-left: 40px; float: left; } |
514 | /*h2 a{font-weight: normal;}*/ | 500 | /*h2 a{font-weight: normal;}*/ |
515 | h2.icon span{background: #E3E5EA url('images.png'); height: 32px; width: 32px; left: 0; top: -5px; border-radius: 4px; display: inline-block; position: absolute} | 501 | h2.icon span{background: #E3E5EA url('images.png'); height: 32px; width: 32px; left: 0; top: -5px; border-radius: 4px; display: inline-block; position: absolute} |
516 | 502 | ||
517 | - | ||
518 | - | ||
519 | /* Dashboard Page */ | 503 | /* Dashboard Page */ |
520 | html, body { height: 100%; } | 504 | html, body { height: 100%; } |
521 | 505 | ||
@@ -545,25 +529,22 @@ body.dashboard-page .news-feed .project-updates a.project-update span.update-aut | @@ -545,25 +529,22 @@ body.dashboard-page .news-feed .project-updates a.project-update span.update-aut | ||
545 | body.dashboard-page .news-feed .project-updates a.project-update span.update-author strong{font-weight: bold; font-style: normal;} | 529 | body.dashboard-page .news-feed .project-updates a.project-update span.update-author strong{font-weight: bold; font-style: normal;} |
546 | /* eo Dashboard Page */ | 530 | /* eo Dashboard Page */ |
547 | 531 | ||
548 | - | ||
549 | .grey-button.right{margin-top: 20px} | 532 | .grey-button.right{margin-top: 20px} |
550 | 533 | ||
551 | /* Project Page */ | 534 | /* Project Page */ |
552 | 535 | ||
553 | body.project-page h2.icon .project-name, body.project-page h2.icon d{border: 1px solid #eee; padding: 5px 30px 5px 10px; border-radius: 5px; position: relative;} | 536 | body.project-page h2.icon .project-name, body.project-page h2.icon d{border: 1px solid #eee; padding: 5px 30px 5px 10px; border-radius: 5px; position: relative;} |
554 | body.project-page h2.icon .project-name i.arrow{float: right; | 537 | body.project-page h2.icon .project-name i.arrow{float: right; |
555 | - position: absolute; | ||
556 | - right: 10px; | ||
557 | - top: 13px; | ||
558 | - display: block; | ||
559 | - background: url('images.png') no-repeat -97px -29px; | ||
560 | - width: 4px; | ||
561 | - height: 5px; | 538 | + position: absolute; |
539 | + right: 10px; | ||
540 | + top: 13px; | ||
541 | + display: block; | ||
542 | + background: url('images.png') no-repeat -97px -29px; | ||
543 | + width: 4px; | ||
544 | + height: 5px; | ||
562 | } | 545 | } |
563 | 546 | ||
564 | - | ||
565 | - | ||
566 | -body.project-page h2.icon span{ background-position: -78px -68px; } | 547 | +body.project-page h2.icon span{ background-position: -78px -68px; } |
567 | body.project-page .project-container{ position: relative; float: left; width: 100%; height: 100%; } | 548 | body.project-page .project-container{ position: relative; float: left; width: 100%; height: 100%; } |
568 | body.project-page .page-title{margin-bottom: 0} | 549 | body.project-page .page-title{margin-bottom: 0} |
569 | body.project-page .project-sidebar {width: 220px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #f7f7f7; float: left; display: inline-block; background: #f7f7f7; padding: 20px 0 20px 2%; margin: 0; } | 550 | body.project-page .project-sidebar {width: 220px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #f7f7f7; float: left; display: inline-block; background: #f7f7f7; padding: 20px 0 20px 2%; margin: 0; } |
@@ -575,18 +556,17 @@ body.projects-page input.text.git-url {margin:10px 0 0 } | @@ -575,18 +556,17 @@ body.projects-page input.text.git-url {margin:10px 0 0 } | ||
575 | 556 | ||
576 | .projects_selector:hover > .project-box{ -moz-box-shadow:0px 0px 10px rgba(0, 0, 0, .1); -webkit-box-shadow:0px 0px 10px rgba(0, 0, 0, .1); box-shadow:0px 0px 10px rgba(0, 0, 0, .1); } | 557 | .projects_selector:hover > .project-box{ -moz-box-shadow:0px 0px 10px rgba(0, 0, 0, .1); -webkit-box-shadow:0px 0px 10px rgba(0, 0, 0, .1); box-shadow:0px 0px 10px rgba(0, 0, 0, .1); } |
577 | 558 | ||
578 | - | ||
579 | body.project-page .project-sidebar aside{width: 219px} | 559 | body.project-page .project-sidebar aside{width: 219px} |
580 | body.project-page .project-sidebar aside a{display: block; position: relative; background: white; padding: 15px 10px; border-bottom: 1px solid #eee} | 560 | body.project-page .project-sidebar aside a{display: block; position: relative; background: white; padding: 15px 10px; border-bottom: 1px solid #eee} |
581 | body.project-page .project-sidebar aside a:first-child{ | 561 | body.project-page .project-sidebar aside a:first-child{ |
582 | - -webkit-border-top-left-radius: 5px; | ||
583 | - -moz-border-radius-topleft: 5px; | ||
584 | - border-top-left-radius: 5px; | 562 | + -webkit-border-top-left-radius: 5px; |
563 | + -moz-border-radius-topleft: 5px; | ||
564 | + border-top-left-radius: 5px; | ||
585 | } | 565 | } |
586 | .project-page .project-sidebar aside a:last-child{ | 566 | .project-page .project-sidebar aside a:last-child{ |
587 | - -webkit-border-bottom-left-radius: 5px; | ||
588 | - -moz-border-radius-bottomleft: 5px; | ||
589 | - border-bottom-left-radius: 5px; | 567 | + -webkit-border-bottom-left-radius: 5px; |
568 | + -moz-border-radius-bottomleft: 5px; | ||
569 | + border-bottom-left-radius: 5px; | ||
590 | } | 570 | } |
591 | body.project-page .project-sidebar aside a:hover{background-color: #eee;} | 571 | body.project-page .project-sidebar aside a:hover{background-color: #eee;} |
592 | body.project-page .project-sidebar aside a span.number{float: right; border-radius: 5px; text-shadow: none; background: rgba(0,0,0,.12); text-align: center; padding: 5px 8px; position: absolute; top: 10px; right: 10px} | 572 | body.project-page .project-sidebar aside a span.number{float: right; border-radius: 5px; text-shadow: none; background: rgba(0,0,0,.12); text-align: center; padding: 5px 8px; position: absolute; top: 10px; right: 10px} |
@@ -595,7 +575,7 @@ body.project-page .project-content{ padding: 20px; display: block; margin-left: | @@ -595,7 +575,7 @@ body.project-page .project-content{ padding: 20px; display: block; margin-left: | ||
595 | body.project-page .project-content h2{ margin-top: 6px} | 575 | body.project-page .project-content h2{ margin-top: 6px} |
596 | body.project-page .project-content .button.right{margin-left: 20px} | 576 | body.project-page .project-content .button.right{margin-left: 20px} |
597 | body.project-page table .commit a{color: #{$blue_link}} | 577 | body.project-page table .commit a{color: #{$blue_link}} |
598 | -body.project-page table th, body.project-page table td{ border-bottom: 1px solid #DEE2E3;} | 578 | +body.project-page table th, body.project-page table td{ border-bottom: 1px solid #DEE2E3;} |
599 | body.project-page .fixed{position: fixed; } | 579 | body.project-page .fixed{position: fixed; } |
600 | 580 | ||
601 | /* New project Page */ | 581 | /* New project Page */ |
@@ -606,32 +586,31 @@ body.project-page .fixed{position: fixed; } | @@ -606,32 +586,31 @@ body.project-page .fixed{position: fixed; } | ||
606 | /* Commit Page */ | 586 | /* Commit Page */ |
607 | body.project-page.commits-page .commit-info{float: right;} | 587 | body.project-page.commits-page .commit-info{float: right;} |
608 | body.project-page.commits-page .commit-info data{ | 588 | body.project-page.commits-page .commit-info data{ |
609 | - padding: 4px 10px; | ||
610 | - font-size: 11px; | 589 | + padding: 4px 10px; |
590 | + font-size: 11px; | ||
611 | } | 591 | } |
612 | body.project-page.commits-page .commit-info data.commit-button{ | 592 | body.project-page.commits-page .commit-info data.commit-button{ |
613 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4)); | ||
614 | - background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4); | ||
615 | - background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4); | ||
616 | - background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4); | ||
617 | - box-shadow: 0 -1px 0 white inset; | ||
618 | - display: block; | ||
619 | - border: 1px solid #eee; | ||
620 | - border-radius: 5px; | ||
621 | - margin-bottom: 2px; | ||
622 | - position: relative; | ||
623 | - padding-right: 20px; | 593 | + background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4)); |
594 | + background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4); | ||
595 | + background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4); | ||
596 | + background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4); | ||
597 | + box-shadow: 0 -1px 0 white inset; | ||
598 | + display: block; | ||
599 | + border: 1px solid #eee; | ||
600 | + border-radius: 5px; | ||
601 | + margin-bottom: 2px; | ||
602 | + position: relative; | ||
603 | + padding-right: 20px; | ||
624 | } | 604 | } |
625 | 605 | ||
626 | - | ||
627 | body.project-page.commits-page .commit-button i{ | 606 | body.project-page.commits-page .commit-button i{ |
628 | - background: url('images.png') no-repeat -138px -27px; | ||
629 | - width: 6px; | ||
630 | - height: 9px; | ||
631 | - float: right; | ||
632 | - position: absolute; | ||
633 | - top: 6px; | ||
634 | - right: 5px; | 607 | + background: url('images.png') no-repeat -138px -27px; |
608 | + width: 6px; | ||
609 | + height: 9px; | ||
610 | + float: right; | ||
611 | + position: absolute; | ||
612 | + top: 6px; | ||
613 | + right: 5px; | ||
635 | } | 614 | } |
636 | body.project-page.commits-page .commits-date {display: block; width: 100%; margin-bottom: 20px} | 615 | body.project-page.commits-page .commits-date {display: block; width: 100%; margin-bottom: 20px} |
637 | body.project-page.commits-page .commits-date .data {padding: 0} | 616 | body.project-page.commits-page .commits-date .data {padding: 0} |
@@ -648,9 +627,6 @@ body.project-page.commits-page .commits-date a.commit span.commit-author strong{ | @@ -648,9 +627,6 @@ body.project-page.commits-page .commits-date a.commit span.commit-author strong{ | ||
648 | 627 | ||
649 | /* eo Project Page */ | 628 | /* eo Project Page */ |
650 | 629 | ||
651 | - | ||
652 | - | ||
653 | - | ||
654 | /* Projects Page */ | 630 | /* Projects Page */ |
655 | body.projects-page h2.icon span{background-position: -31px -70px;} | 631 | body.projects-page h2.icon span{background-position: -31px -70px;} |
656 | body.projects-page .project-box.ui-box .data .repository {margin-bottom: 20px} | 632 | body.projects-page .project-box.ui-box .data .repository {margin-bottom: 20px} |
@@ -659,7 +635,6 @@ body.projects-page .project-box{width: 100%; margin-bottom: 3em} | @@ -659,7 +635,6 @@ body.projects-page .project-box{width: 100%; margin-bottom: 3em} | ||
659 | body.projects-page .browse-code{margin-right: 10px} | 635 | body.projects-page .browse-code{margin-right: 10px} |
660 | /* eo Projects Page */ | 636 | /* eo Projects Page */ |
661 | 637 | ||
662 | - | ||
663 | /* ==|== non-semantic helper classes ======================================== */ | 638 | /* ==|== non-semantic helper classes ======================================== */ |
664 | .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; } | 639 | .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; } |
665 | .ir br { display: none; } | 640 | .ir br { display: none; } |
@@ -671,28 +646,24 @@ body.projects-page .browse-code{margin-right: 10px} | @@ -671,28 +646,24 @@ body.projects-page .browse-code{margin-right: 10px} | ||
671 | .clearfix:after { clear: both; } | 646 | .clearfix:after { clear: both; } |
672 | .clearfix { zoom: 1; } | 647 | .clearfix { zoom: 1; } |
673 | 648 | ||
674 | - | ||
675 | /* ==|== media queries ====================================================== */ | 649 | /* ==|== media queries ====================================================== */ |
676 | 650 | ||
677 | @media only screen and (min-width: 480px) { | 651 | @media only screen and (min-width: 480px) { |
678 | 652 | ||
679 | - | ||
680 | } | 653 | } |
681 | 654 | ||
682 | @media only screen and (min-width: 768px) { | 655 | @media only screen and (min-width: 768px) { |
683 | 656 | ||
684 | } | 657 | } |
685 | 658 | ||
686 | - | ||
687 | - | ||
688 | /* ==|== print styles ======================================================= */ | 659 | /* ==|== print styles ======================================================= */ |
689 | - | 660 | + |
690 | @media print { | 661 | @media print { |
691 | - * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } | 662 | + * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } |
692 | a, a:visited { text-decoration: underline; } | 663 | a, a:visited { text-decoration: underline; } |
693 | a[href]:after { content: " (" attr(href) ")"; } | 664 | a[href]:after { content: " (" attr(href) ")"; } |
694 | abbr[title]:after { content: " (" attr(title) ")"; } | 665 | abbr[title]:after { content: " (" attr(title) ")"; } |
695 | - .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } | 666 | + .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } |
696 | pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } | 667 | pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } |
697 | thead { display: table-header-group; } | 668 | thead { display: table-header-group; } |
698 | tr, img { page-break-inside: avoid; } | 669 | tr, img { page-break-inside: avoid; } |
app/assets/stylesheets/tags.css.css
1 | .tags-list { | 1 | .tags-list { |
2 | - padding : 0px 10px 10px 10px; | ||
3 | - | 2 | + padding : 0px 10px 10px 10px; |
3 | + | ||
4 | } | 4 | } |
5 | 5 | ||
6 | .tags-list a { | 6 | .tags-list a { |
@@ -15,7 +15,6 @@ | @@ -15,7 +15,6 @@ | ||
15 | font-size: 14px; | 15 | font-size: 14px; |
16 | } | 16 | } |
17 | 17 | ||
18 | - | ||
19 | .small-tags a{ | 18 | .small-tags a{ |
20 | font-size: 9px; | 19 | font-size: 9px; |
21 | 20 | ||
@@ -26,10 +25,9 @@ | @@ -26,10 +25,9 @@ | ||
26 | background-color: #72bbdf; | 25 | background-color: #72bbdf; |
27 | color: #FFF; | 26 | color: #FFF; |
28 | text-shadow: none; | 27 | text-shadow: none; |
29 | - font-weight: bold; | 28 | + font-weight: bold; |
30 | } | 29 | } |
31 | 30 | ||
32 | - | ||
33 | .medium-tags a{ | 31 | .medium-tags a{ |
34 | font-size: 12px; | 32 | font-size: 12px; |
35 | 33 | ||
@@ -40,5 +38,5 @@ | @@ -40,5 +38,5 @@ | ||
40 | background-color: #72bbdf; | 38 | background-color: #72bbdf; |
41 | color: #FFF; | 39 | color: #FFF; |
42 | text-shadow: none; | 40 | text-shadow: none; |
43 | - font-weight: bold; | ||
44 | -} | ||
45 | \ No newline at end of file | 41 | \ No newline at end of file |
42 | + font-weight: bold; | ||
43 | +} |
app/controllers/application_controller.rb
@@ -79,8 +79,8 @@ class ApplicationController < ActionController::Base | @@ -79,8 +79,8 @@ class ApplicationController < ActionController::Base | ||
79 | elsif params[:last_id] | 79 | elsif params[:last_id] |
80 | @notes = @notes.where("id > ?", params[:last_id]) | 80 | @notes = @notes.where("id > ?", params[:last_id]) |
81 | elsif params[:first_id] | 81 | elsif params[:first_id] |
82 | - @notes = @notes.where("id < ?", params[:first_id]) | ||
83 | - else | 82 | + @notes = @notes.where("id < ?", params[:first_id]) |
83 | + else | ||
84 | nil | 84 | nil |
85 | end | 85 | end |
86 | end | 86 | end |
app/controllers/commits_controller.rb
@@ -10,10 +10,9 @@ class CommitsController < ApplicationController | @@ -10,10 +10,9 @@ class CommitsController < ApplicationController | ||
10 | before_filter :require_non_empty_project | 10 | before_filter :require_non_empty_project |
11 | before_filter :load_refs, :only => :index # load @branch, @tag & @ref | 11 | before_filter :load_refs, :only => :index # load @branch, @tag & @ref |
12 | 12 | ||
13 | - | ||
14 | def index | 13 | def index |
15 | @repo = project.repo | 14 | @repo = project.repo |
16 | - limit, offset = (params[:limit] || 20), (params[:offset] || 0) | 15 | + limit, offset = (params[:limit] || 20), (params[:offset] || 0) |
17 | 16 | ||
18 | @commits = if params[:path] | 17 | @commits = if params[:path] |
19 | @repo.log(@ref, params[:path], :max_count => limit, :skip => offset) | 18 | @repo.log(@ref, params[:path], :max_count => limit, :skip => offset) |
@@ -24,6 +23,7 @@ class CommitsController < ApplicationController | @@ -24,6 +23,7 @@ class CommitsController < ApplicationController | ||
24 | respond_to do |format| | 23 | respond_to do |format| |
25 | format.html # index.html.erb | 24 | format.html # index.html.erb |
26 | format.js | 25 | format.js |
26 | + format.atom { render :layout => false } | ||
27 | end | 27 | end |
28 | end | 28 | end |
29 | 29 | ||
@@ -32,7 +32,7 @@ class CommitsController < ApplicationController | @@ -32,7 +32,7 @@ class CommitsController < ApplicationController | ||
32 | @notes = project.commit_notes(@commit).fresh.limit(20) | 32 | @notes = project.commit_notes(@commit).fresh.limit(20) |
33 | @note = @project.build_commit_note(@commit) | 33 | @note = @project.build_commit_note(@commit) |
34 | 34 | ||
35 | - respond_to do |format| | 35 | + respond_to do |format| |
36 | format.html | 36 | format.html |
37 | format.js { respond_with_notes } | 37 | format.js { respond_with_notes } |
38 | end | 38 | end |
app/controllers/issues_controller.rb
@@ -24,6 +24,7 @@ class IssuesController < ApplicationController | @@ -24,6 +24,7 @@ class IssuesController < ApplicationController | ||
24 | respond_to do |format| | 24 | respond_to do |format| |
25 | format.html # index.html.erb | 25 | format.html # index.html.erb |
26 | format.js | 26 | format.js |
27 | + format.atom { render :layout => false } | ||
27 | end | 28 | end |
28 | end | 29 | end |
29 | 30 | ||
@@ -40,7 +41,7 @@ class IssuesController < ApplicationController | @@ -40,7 +41,7 @@ class IssuesController < ApplicationController | ||
40 | @notes = @issue.notes.inc_author.order("created_at DESC").limit(20) | 41 | @notes = @issue.notes.inc_author.order("created_at DESC").limit(20) |
41 | @note = @project.notes.new(:noteable => @issue) | 42 | @note = @project.notes.new(:noteable => @issue) |
42 | 43 | ||
43 | - respond_to do |format| | 44 | + respond_to do |format| |
44 | format.html | 45 | format.html |
45 | format.js { respond_with_notes } | 46 | format.js { respond_with_notes } |
46 | end | 47 | end |
@@ -97,7 +98,7 @@ class IssuesController < ApplicationController | @@ -97,7 +98,7 @@ class IssuesController < ApplicationController | ||
97 | else @project.issues.opened | 98 | else @project.issues.opened |
98 | end | 99 | end |
99 | 100 | ||
100 | - @issues = @issues.where("title LIKE ? OR content LIKE ?", "%#{terms}%", "%#{terms}%") unless terms.blank? | 101 | + @issues = @issues.where("title LIKE ?", "%#{terms}%") unless terms.blank? |
101 | 102 | ||
102 | render :partial => 'issues' | 103 | render :partial => 'issues' |
103 | end | 104 | end |
app/controllers/projects_controller.rb
@@ -79,7 +79,7 @@ class ProjectsController < ApplicationController | @@ -79,7 +79,7 @@ class ProjectsController < ApplicationController | ||
79 | @notes = @project.common_notes.order("created_at DESC") | 79 | @notes = @project.common_notes.order("created_at DESC") |
80 | @notes = @notes.fresh.limit(20) | 80 | @notes = @notes.fresh.limit(20) |
81 | 81 | ||
82 | - respond_to do |format| | 82 | + respond_to do |format| |
83 | format.html | 83 | format.html |
84 | format.js { respond_with_notes } | 84 | format.js { respond_with_notes } |
85 | end | 85 | end |
@@ -168,7 +168,7 @@ class ProjectsController < ApplicationController | @@ -168,7 +168,7 @@ class ProjectsController < ApplicationController | ||
168 | 168 | ||
169 | def add_refs(commit, ref_cache) | 169 | def add_refs(commit, ref_cache) |
170 | if ref_cache.empty? | 170 | if ref_cache.empty? |
171 | - @repo.refs.each do |ref| | 171 | + @repo.refs.each do |ref| |
172 | ref_cache[ref.commit.id] ||= [] | 172 | ref_cache[ref.commit.id] ||= [] |
173 | ref_cache[ref.commit.id] << ref | 173 | ref_cache[ref.commit.id] << ref |
174 | end | 174 | end |
app/controllers/tags_controller.rb
1 | class TagsController < ApplicationController | 1 | class TagsController < ApplicationController |
2 | - def index | ||
3 | - @tags = Project.tag_counts.order('count DESC') | ||
4 | - @tags = @tags.where('name like ?', "%#{params[:term]}%") unless params[:term].blank? | 2 | + def index |
3 | + @tags = Project.tag_counts.order('count DESC') | ||
4 | + @tags = @tags.where('name like ?', "%#{params[:term]}%") unless params[:term].blank? | ||
5 | 5 | ||
6 | - respond_to do |format| | ||
7 | - format.html | ||
8 | - format.json { render json: @tags.limit(8).map {|t| t.name}} | ||
9 | - end | ||
10 | - end | 6 | + respond_to do |format| |
7 | + format.html | ||
8 | + format.json { render json: @tags.limit(8).map {|t| t.name}} | ||
9 | + end | ||
10 | + end | ||
11 | end | 11 | end |
app/helpers/application_helper.rb
@@ -11,7 +11,7 @@ module ApplicationHelper | @@ -11,7 +11,7 @@ module ApplicationHelper | ||
11 | end | 11 | end |
12 | 12 | ||
13 | def body_class(default_class = nil) | 13 | def body_class(default_class = nil) |
14 | - main = content_for(:body_class).blank? ? | 14 | + main = content_for(:body_class).blank? ? |
15 | default_class : | 15 | default_class : |
16 | content_for(:body_class) | 16 | content_for(:body_class) |
17 | 17 | ||
@@ -42,7 +42,7 @@ module ApplicationHelper | @@ -42,7 +42,7 @@ module ApplicationHelper | ||
42 | else | 42 | else |
43 | "Never" | 43 | "Never" |
44 | end | 44 | end |
45 | - rescue | 45 | + rescue |
46 | "Never" | 46 | "Never" |
47 | end | 47 | end |
48 | 48 |
app/helpers/dashboard_helper.rb
@@ -4,7 +4,7 @@ module DashboardHelper | @@ -4,7 +4,7 @@ module DashboardHelper | ||
4 | when "Issue" then project_issue_path(project, project.issues.find(object.id)) | 4 | when "Issue" then project_issue_path(project, project.issues.find(object.id)) |
5 | when "Grit::Commit" then project_commit_path(project, project.repo.commits(object.id).first) | 5 | when "Grit::Commit" then project_commit_path(project, project.repo.commits(object.id).first) |
6 | when "Note" | 6 | when "Note" |
7 | - then | 7 | + then |
8 | note = object | 8 | note = object |
9 | case note.noteable_type | 9 | case note.noteable_type |
10 | when "Issue" then project_issue_path(project, note.noteable_id) | 10 | when "Issue" then project_issue_path(project, note.noteable_id) |
@@ -12,9 +12,9 @@ module DashboardHelper | @@ -12,9 +12,9 @@ module DashboardHelper | ||
12 | when "Commit" then project_commit_path(project, :id => note.noteable_id) | 12 | when "Commit" then project_commit_path(project, :id => note.noteable_id) |
13 | else wall_project_path(project) | 13 | else wall_project_path(project) |
14 | end | 14 | end |
15 | - else wall_project_path(project) | 15 | + else wall_project_path(project) |
16 | end | 16 | end |
17 | - rescue | 17 | + rescue |
18 | "#" | 18 | "#" |
19 | end | 19 | end |
20 | 20 |
app/models/issue.rb
@@ -11,8 +11,8 @@ class Issue < ActiveRecord::Base | @@ -11,8 +11,8 @@ class Issue < ActiveRecord::Base | ||
11 | validates_presence_of :author_id | 11 | validates_presence_of :author_id |
12 | 12 | ||
13 | delegate :name, | 13 | delegate :name, |
14 | - :email, | ||
15 | - :to => :author, | 14 | + :email, |
15 | + :to => :author, | ||
16 | :prefix => true | 16 | :prefix => true |
17 | 17 | ||
18 | validates :title, | 18 | validates :title, |
app/models/note.rb
@@ -8,8 +8,8 @@ class Note < ActiveRecord::Base | @@ -8,8 +8,8 @@ class Note < ActiveRecord::Base | ||
8 | :class_name => "User" | 8 | :class_name => "User" |
9 | 9 | ||
10 | delegate :name, | 10 | delegate :name, |
11 | - :email, | ||
12 | - :to => :author, | 11 | + :email, |
12 | + :to => :author, | ||
13 | :prefix => true | 13 | :prefix => true |
14 | 14 | ||
15 | attr_protected :author, :author_id | 15 | attr_protected :author, :author_id |
app/models/project.rb
@@ -129,9 +129,9 @@ class Project < ActiveRecord::Base | @@ -129,9 +129,9 @@ class Project < ActiveRecord::Base | ||
129 | private_flag | 129 | private_flag |
130 | end | 130 | end |
131 | 131 | ||
132 | - def last_activity | 132 | + def last_activity |
133 | updates(1).first | 133 | updates(1).first |
134 | - rescue | 134 | + rescue |
135 | nil | 135 | nil |
136 | end | 136 | end |
137 | 137 | ||
@@ -140,7 +140,7 @@ class Project < ActiveRecord::Base | @@ -140,7 +140,7 @@ class Project < ActiveRecord::Base | ||
140 | end | 140 | end |
141 | 141 | ||
142 | def updates(n = 3) | 142 | def updates(n = 3) |
143 | - [ | 143 | + [ |
144 | fresh_commits(n), | 144 | fresh_commits(n), |
145 | fresh_issues(n), | 145 | fresh_issues(n), |
146 | fresh_notes(n) | 146 | fresh_notes(n) |
app/models/repository.rb
app/models/user.rb
1 | class User < ActiveRecord::Base | 1 | class User < ActiveRecord::Base |
2 | # Include default devise modules. Others available are: | 2 | # Include default devise modules. Others available are: |
3 | # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable | 3 | # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable |
4 | - devise :database_authenticatable, | 4 | + devise :database_authenticatable, :token_authenticatable, |
5 | :recoverable, :rememberable, :trackable, :validatable | 5 | :recoverable, :rememberable, :trackable, :validatable |
6 | 6 | ||
7 | # Setup accessible (or protected) attributes for your model | 7 | # Setup accessible (or protected) attributes for your model |
@@ -25,6 +25,8 @@ class User < ActiveRecord::Base | @@ -25,6 +25,8 @@ class User < ActiveRecord::Base | ||
25 | :foreign_key => :assignee_id, | 25 | :foreign_key => :assignee_id, |
26 | :dependent => :destroy | 26 | :dependent => :destroy |
27 | 27 | ||
28 | + before_create :ensure_authentication_token | ||
29 | + alias_attribute :private_token, :authentication_token | ||
28 | scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) } | 30 | scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) } |
29 | 31 | ||
30 | def identifier | 32 | def identifier |
app/views/admin/projects/_form.html.haml
1 | = form_for [:admin, @admin_project] do |f| | 1 | = form_for [:admin, @admin_project] do |f| |
2 | -if @admin_project.errors.any? | 2 | -if @admin_project.errors.any? |
3 | #error_explanation | 3 | #error_explanation |
4 | - %h2= "#{pluralize(@admin_project.errors.count, "error")} prohibited this admin_project from being saved:" | 4 | + %h2= "#{pluralize(@admin_project.errors.count, "error")} prohibited this admin_project from being saved:" |
5 | %ul | 5 | %ul |
6 | - @admin_project.errors.full_messages.each do |msg| | 6 | - @admin_project.errors.full_messages.each do |msg| |
7 | %li= msg | 7 | %li= msg |
@@ -19,7 +19,6 @@ | @@ -19,7 +19,6 @@ | ||
19 | %br | 19 | %br |
20 | = f.text_field :path | 20 | = f.text_field :path |
21 | 21 | ||
22 | - | ||
23 | .form-row | 22 | .form-row |
24 | = f.label :tag_list | 23 | = f.label :tag_list |
25 | %br | 24 | %br |
@@ -36,4 +35,4 @@ | @@ -36,4 +35,4 @@ | ||
36 | :javascript | 35 | :javascript |
37 | $(function(){ | 36 | $(function(){ |
38 | taggifyForm(); | 37 | taggifyForm(); |
39 | - }) | 38 | + }) |
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +xml.instruct! | ||
2 | +xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do | ||
3 | + xml.title "Recent commits to #{@project.name}:#{@ref}" | ||
4 | + xml.link :href => project_commits_url(@project, :atom, :ref => @ref), :rel => "self", :type => "application/atom+xml" | ||
5 | + xml.link :href => project_commits_url(@project), :rel => "alternate", :type => "text/html" | ||
6 | + xml.id project_commits_url(@project) | ||
7 | + xml.updated @commits.first.committed_date.strftime("%Y-%m-%dT%H:%M:%SZ") if @commits.any? | ||
8 | + | ||
9 | + @commits.each do |commit| | ||
10 | + xml.entry do | ||
11 | + xml.id project_commit_url(@project, :id => commit.id) | ||
12 | + xml.link :href => project_commit_url(@project, :id => commit.id) | ||
13 | + xml.title truncate(commit.safe_message, :length => 80) | ||
14 | + xml.updated commit.committed_date.strftime("%Y-%m-%dT%H:%M:%SZ") | ||
15 | + xml.media :thumbnail, :width => "40", :height => "40", :url => gravatar_icon(commit.author_email) | ||
16 | + xml.author do |author| | ||
17 | + xml.name commit.author_name | ||
18 | + xml.email commit.author_email | ||
19 | + end | ||
20 | + xml.summary commit.safe_message | ||
21 | + end | ||
22 | + end | ||
23 | +end |
app/views/commits/index.html.haml
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | %h2.icon | 6 | %h2.icon |
7 | %span | 7 | %span |
8 | %d | 8 | %d |
9 | - = link_to project_commits_path(@project) do | 9 | + = link_to project_commits_path(@project) do |
10 | = @project.name | 10 | = @project.name |
11 | - if params[:path] | 11 | - if params[:path] |
12 | \/ | 12 | \/ |
@@ -20,8 +20,6 @@ | @@ -20,8 +20,6 @@ | ||
20 | .loading{ :style => "display:none;"} | 20 | .loading{ :style => "display:none;"} |
21 | %center= image_tag "ajax-loader.gif" | 21 | %center= image_tag "ajax-loader.gif" |
22 | 22 | ||
23 | - | ||
24 | - | ||
25 | :javascript | 23 | :javascript |
26 | $(function(){ | 24 | $(function(){ |
27 | CommitsList.init("#{@ref}", 20); | 25 | CommitsList.init("#{@ref}", 20); |
app/views/dashboard/index.html.haml
@@ -27,13 +27,13 @@ | @@ -27,13 +27,13 @@ | ||
27 | %a.project-update{:href => dashboard_feed_path(project, update)} | 27 | %a.project-update{:href => dashboard_feed_path(project, update)} |
28 | = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 | 28 | = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40 |
29 | %span.update-title | 29 | %span.update-title |
30 | - - if update.kind_of?(Grit::Commit) | 30 | + - if update.kind_of?(Grit::Commit) |
31 | %span.right.tag.commit= update.head.name | 31 | %span.right.tag.commit= update.head.name |
32 | = dashboard_feed_title(update) | 32 | = dashboard_feed_title(update) |
33 | %span.update-author | 33 | %span.update-author |
34 | %strong= update.author_name | 34 | %strong= update.author_name |
35 | authored | 35 | authored |
36 | - = time_ago_in_words(update.created_at) | 36 | + = time_ago_in_words(update.created_at) |
37 | ago | 37 | ago |
38 | / #news-feed | 38 | / #news-feed |
39 | / #dashboard-content | 39 | / #dashboard-content |
app/views/issues/_show.html.haml
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | - if can? current_user, :write_issue, issue | 18 | - if can? current_user, :write_issue, issue |
19 | - if issue.closed | 19 | - if issue.closed |
20 | = link_to 'Reopen', project_issue_path(@project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "cgray", :remote => true | 20 | = link_to 'Reopen', project_issue_path(@project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "cgray", :remote => true |
21 | - - else | 21 | + - else |
22 | = link_to 'Resolve', project_issue_path(@project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true | 22 | = link_to 'Resolve', project_issue_path(@project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "cgray", :remote => true |
23 | - if can? current_user, :write_issue, issue | 23 | - if can? current_user, :write_issue, issue |
24 | = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray edit-issue-link", :remote => true | 24 | = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray edit-issue-link", :remote => true |
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +xml.instruct! | ||
2 | +xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do | ||
3 | + xml.title "#{@project.name} issues" | ||
4 | + xml.link :href => project_issues_url(@project, :atom), :rel => "self", :type => "application/atom+xml" | ||
5 | + xml.link :href => project_issues_url(@project), :rel => "alternate", :type => "text/html" | ||
6 | + xml.id project_issues_url(@project) | ||
7 | + xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any? | ||
8 | + | ||
9 | + @issues.each do |issue| | ||
10 | + xml.entry do | ||
11 | + xml.id project_issue_url(@project, issue) | ||
12 | + xml.link :href => project_issue_url(@project, issue) | ||
13 | + xml.title truncate(issue.title, :length => 80) | ||
14 | + xml.updated issue.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") | ||
15 | + xml.media :thumbnail, :width => "40", :height => "40", :url => gravatar_icon(issue.author_email) | ||
16 | + xml.author do |author| | ||
17 | + xml.name issue.author_name | ||
18 | + xml.email issue.author_email | ||
19 | + end | ||
20 | + xml.summary issue.title | ||
21 | + end | ||
22 | + end | ||
23 | +end |
app/views/issues/index.html.haml
@@ -31,7 +31,6 @@ | @@ -31,7 +31,6 @@ | ||
31 | var href = $('.issue_search').parent().attr('action'); | 31 | var href = $('.issue_search').parent().attr('action'); |
32 | var last_terms = ''; | 32 | var last_terms = ''; |
33 | 33 | ||
34 | - | ||
35 | var setIssueFilter = function(form, value){ | 34 | var setIssueFilter = function(form, value){ |
36 | $.cookie('issue_filter', value, { expires: 140 }); | 35 | $.cookie('issue_filter', value, { expires: 140 }); |
37 | form.submit(); | 36 | form.submit(); |
app/views/issues/show.html.haml
@@ -22,12 +22,12 @@ | @@ -22,12 +22,12 @@ | ||
22 | %td | 22 | %td |
23 | = image_tag gravatar_icon(@issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;" | 23 | = image_tag gravatar_icon(@issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;" |
24 | = @issue.assignee.name | 24 | = @issue.assignee.name |
25 | - %tr | 25 | + %tr |
26 | %td Tags | 26 | %td Tags |
27 | %td | 27 | %td |
28 | - if @issue.critical | 28 | - if @issue.critical |
29 | %span.tag.high critical | 29 | %span.tag.high critical |
30 | - - else | 30 | + - else |
31 | %span.tag.normal normal | 31 | %span.tag.normal normal |
32 | 32 | ||
33 | - if @issue.today? | 33 | - if @issue.today? |
@@ -42,7 +42,6 @@ | @@ -42,7 +42,6 @@ | ||
42 | - else | 42 | - else |
43 | = check_box_tag "closed", 1, @issue.closed, :disabled => true | 43 | = check_box_tag "closed", 1, @issue.closed, :disabled => true |
44 | 44 | ||
45 | - | ||
46 | - if can?(current_user, :write_issue, @issue) | 45 | - if can?(current_user, :write_issue, @issue) |
47 | .clear | 46 | .clear |
48 | %br | 47 | %br |
app/views/layouts/_head_panel.html.erb
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | 10 | ||
11 | <div class="account-links"> | 11 | <div class="account-links"> |
12 | <%= link_to profile_path, :class => "username" do %> | 12 | <%= link_to profile_path, :class => "username" do %> |
13 | - <%#= current_user.name %> | 13 | + <%#= current_user.name %> |
14 | My profile | 14 | My profile |
15 | <% end %> | 15 | <% end %> |
16 | <%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %> | 16 | <%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %> |
app/views/layouts/profile.html.haml
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | %aside | 19 | %aside |
20 | = link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil | 20 | = link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil |
21 | = link_to "Password", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil | 21 | = link_to "Password", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil |
22 | - = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do | 22 | + = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do |
23 | Keys | 23 | Keys |
24 | - unless current_user.keys.empty? | 24 | - unless current_user.keys.empty? |
25 | %span{ :class => "number" }= current_user.keys.count | 25 | %span{ :class => "number" }= current_user.keys.count |
app/views/layouts/project.html.haml
@@ -5,6 +5,10 @@ | @@ -5,6 +5,10 @@ | ||
5 | GitLab #{" - #{@project.name}" if @project && !@project.new_record?} | 5 | GitLab #{" - #{@project.name}" if @project && !@project.new_record?} |
6 | = stylesheet_link_tag "application" | 6 | = stylesheet_link_tag "application" |
7 | = javascript_include_tag "application" | 7 | = javascript_include_tag "application" |
8 | + - if current_page?(tree_project_path(@project)) || current_page?(project_commits_path(@project)) | ||
9 | + = auto_discovery_link_tag(:atom, project_commits_url(@project, :atom, :ref => @ref, :private_token => current_user.private_token), :title => "Recent commits to #{@project.name}:#{@ref}") | ||
10 | + - if request.path == project_issues_path(@project) | ||
11 | + = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, :private_token => current_user.private_token), :title => "#{@project.name} issues") | ||
8 | = csrf_meta_tags | 12 | = csrf_meta_tags |
9 | = javascript_tag do | 13 | = javascript_tag do |
10 | REQ_URI = "#{request.env["REQUEST_URI"]}"; | 14 | REQ_URI = "#{request.env["REQUEST_URI"]}"; |
app/views/notes/_form.html.haml
app/views/notes/_load.js.haml
@@ -4,7 +4,6 @@ | @@ -4,7 +4,6 @@ | ||
4 | :plain | 4 | :plain |
5 | NoteList.replace(#{@notes.last.id}, #{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}"); | 5 | NoteList.replace(#{@notes.last.id}, #{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}"); |
6 | 6 | ||
7 | - | ||
8 | - elsif params[:last_id] | 7 | - elsif params[:last_id] |
9 | :plain | 8 | :plain |
10 | NoteList.prepend(#{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}"); | 9 | NoteList.prepend(#{@notes.first.id}, "#{escape_javascript(render(:partial => 'notes/notes_list'))}"); |
app/views/notes/_show.html.haml
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | ago | 7 | ago |
8 | - if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project) | 8 | - if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project) |
9 | = link_to "Remove", [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-note right" | 9 | = link_to "Remove", [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-note right" |
10 | - | 10 | + |
11 | %div.note-title | 11 | %div.note-title |
12 | = markdown(note.note) | 12 | = markdown(note.note) |
13 | - if note.attachment.url | 13 | - if note.attachment.url |
app/views/notify/new_issue_email.html.haml
@@ -10,9 +10,7 @@ | @@ -10,9 +10,7 @@ | ||
10 | %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} | 10 | %td{:style => "font-size: 1px; line-height: 1px;", :width => "21"} |
11 | %td{:align => "left", :style => "padding: 20px 0 0;"} | 11 | %td{:align => "left", :style => "padding: 20px 0 0;"} |
12 | %h2{:style => "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} | 12 | %h2{:style => "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} |
13 | - = link_to project_issue_url(@project, @issue) do | 13 | + = link_to project_issue_url(@project, @issue), :title => @issue.title do |
14 | = "Issue ##{@issue.id.to_s}" | 14 | = "Issue ##{@issue.id.to_s}" |
15 | = truncate(@issue.title, :length => 45) | 15 | = truncate(@issue.title, :length => 45) |
16 | %br | 16 | %br |
17 | - %cite{:style => "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "} | ||
18 | - = @issue.content |
app/views/projects/_feed.html.haml
@@ -5,11 +5,11 @@ | @@ -5,11 +5,11 @@ | ||
5 | %span.update-author | 5 | %span.update-author |
6 | %strong= update.author_name | 6 | %strong= update.author_name |
7 | authored | 7 | authored |
8 | - = time_ago_in_words(update.created_at) | 8 | + = time_ago_in_words(update.created_at) |
9 | ago | 9 | ago |
10 | .right | 10 | .right |
11 | - klass = update.class.to_s.split("::").last.downcase | 11 | - klass = update.class.to_s.split("::").last.downcase |
12 | %span.tag{ :class => klass }= klass | 12 | %span.tag{ :class => klass }= klass |
13 | - - if update.kind_of?(Grit::Commit) | 13 | + - if update.kind_of?(Grit::Commit) |
14 | %span.tag.commit= update.head.name | 14 | %span.tag.commit= update.head.name |
15 | 15 |
app/views/projects/_form.html.haml
1 | = form_for(@project, :remote => true) do |f| | 1 | = form_for(@project, :remote => true) do |f| |
2 | %div.form_content | 2 | %div.form_content |
3 | - unless @project.new_record? | 3 | - unless @project.new_record? |
4 | - %h2.icon | 4 | + %h2.icon |
5 | %span | 5 | %span |
6 | = @project.name | 6 | = @project.name |
7 | - if @project.errors.any? | 7 | - if @project.errors.any? |
@@ -56,4 +56,4 @@ | @@ -56,4 +56,4 @@ | ||
56 | :javascript | 56 | :javascript |
57 | $(function(){ | 57 | $(function(){ |
58 | taggifyForm(); | 58 | taggifyForm(); |
59 | - }) | 59 | + }) |
app/views/projects/_list.html.haml
@@ -14,7 +14,6 @@ | @@ -14,7 +14,6 @@ | ||
14 | = project.name | 14 | = project.name |
15 | .small-tags= tag_list project | 15 | .small-tags= tag_list project |
16 | 16 | ||
17 | - | ||
18 | %td= truncate project.url_to_repo | 17 | %td= truncate project.url_to_repo |
19 | %td= project.code | 18 | %td= project.code |
20 | %td= check_box_tag "read", 1, project.readers.include?(current_user), :disabled => :disabled | 19 | %td= check_box_tag "read", 1, project.readers.include?(current_user), :disabled => :disabled |
app/views/projects/_refs.html.haml
1 | = form_tag destination, :method => :get, :class => "project-refs-form" do | 1 | = form_tag destination, :method => :get, :class => "project-refs-form" do |
2 | = select_tag "ref", grouped_options_refs, :onchange => "this.form.submit();", :class => "project-refs-select" | 2 | = select_tag "ref", grouped_options_refs, :onchange => "this.form.submit();", :class => "project-refs-select" |
3 | 3 | ||
4 | - | ||
5 | :javascript | 4 | :javascript |
6 | $(function(){ | 5 | $(function(){ |
7 | $('.project-refs-select').chosen(); | 6 | $('.project-refs-select').chosen(); |
app/views/projects/_tile.html.haml
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | - projects.each_with_index do |project, i| | 2 | - projects.each_with_index do |project, i| |
3 | %div.grid_1.projects_selector | 3 | %div.grid_1.projects_selector |
4 | %div{ :class => "project-box ui-box ui-box-big" } | 4 | %div{ :class => "project-box ui-box ui-box-big" } |
5 | - = link_to project_path(project) do | 5 | + = link_to project_path(project) do |
6 | %h3= truncate(project.name, :length => 20) | 6 | %h3= truncate(project.name, :length => 20) |
7 | .data | 7 | .data |
8 | %p.title.repository.git_url_wrapper | 8 | %p.title.repository.git_url_wrapper |
app/views/projects/_tree.html.haml
1 | - | ||
2 | -#%a.right.button{:href => "#"} Download | 1 | -#%a.right.button{:href => "#"} Download |
3 | -#-if can? current_user, :admin_project, @project | 2 | -#-if can? current_user, :admin_project, @project |
4 | %a.right.button.blue{:href => "#"} EDIT | 3 | %a.right.button.blue{:href => "#"} EDIT |
@@ -6,7 +5,7 @@ | @@ -6,7 +5,7 @@ | ||
6 | %h2.icon | 5 | %h2.icon |
7 | %span | 6 | %span |
8 | %d | 7 | %d |
9 | - = link_to tree_project_path(@project, :path => nil, :commit_id => @commit.try(:id)), :remote => true do | 8 | + = link_to tree_project_path(@project, :path => nil, :commit_id => @commit.try(:id)), :remote => true do |
10 | = @project.name | 9 | = @project.name |
11 | - if params[:path] | 10 | - if params[:path] |
12 | - part_path = "" | 11 | - part_path = "" |
app/views/projects/index.html.haml
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | .grid_4 | 4 | .grid_4 |
5 | - if current_user.can_create_project? | 5 | - if current_user.can_create_project? |
6 | %a.grey-button.right{:href => new_project_path} Create new project | 6 | %a.grey-button.right{:href => new_project_path} Create new project |
7 | - %h2.icon | 7 | + %h2.icon |
8 | %span | 8 | %span |
9 | Projects | 9 | Projects |
10 | 10 |
app/views/projects/new.html.haml
1 | - content_for(:body_class, "new-project-page") | 1 | - content_for(:body_class, "new-project-page") |
2 | - content_for(:page_title) do | 2 | - content_for(:page_title) do |
3 | - .new-project-hodler | ||
4 | - .container | ||
5 | - %h2.icon | ||
6 | - %span | ||
7 | - New Project | 3 | + .new-project-hodler |
4 | + .container | ||
5 | + %h2.icon | ||
6 | + %span | ||
7 | + New Project | ||
8 | 8 | ||
9 | - %div.clear | ||
10 | - = render 'form' | 9 | + %div.clear |
10 | + = render 'form' |
app/views/snippets/index.html.haml
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | 4 | ||
5 | %table.round-borders#snippets-table | 5 | %table.round-borders#snippets-table |
6 | %thead | 6 | %thead |
7 | - %th | 7 | + %th |
8 | = render @snippets.fresh | 8 | = render @snippets.fresh |
9 | :javascript | 9 | :javascript |
10 | $('.delete-snippet').live('ajax:success', function() { | 10 | $('.delete-snippet').live('ajax:success', function() { |
app/views/tags/index.html.haml
1 | - content_for(:body_class, "projects-page") | 1 | - content_for(:body_class, "projects-page") |
2 | - content_for(:page_title) do | 2 | - content_for(:page_title) do |
3 | .grid_4 | 3 | .grid_4 |
4 | - %h2 | 4 | + %h2 |
5 | Tags | 5 | Tags |
6 | 6 | ||
7 | - | ||
8 | .tags-list | 7 | .tags-list |
9 | - @tags.all.each do |tag| | 8 | - @tags.all.each do |tag| |
10 | = link_to "#{tag.name}(#{tag.count})", tag_path(name) | 9 | = link_to "#{tag.name}(#{tag.count})", tag_path(name) |
11 | - | 10 | + |
config/initializers/devise.rb
@@ -158,11 +158,11 @@ Devise.setup do |config| | @@ -158,11 +158,11 @@ Devise.setup do |config| | ||
158 | 158 | ||
159 | # ==> Configuration for :token_authenticatable | 159 | # ==> Configuration for :token_authenticatable |
160 | # Defines name of the authentication token params key | 160 | # Defines name of the authentication token params key |
161 | - # config.token_authentication_key = :auth_token | 161 | + config.token_authentication_key = :private_token |
162 | 162 | ||
163 | # If true, authentication through token does not store user in session and needs | 163 | # If true, authentication through token does not store user in session and needs |
164 | # to be supplied on each request. Useful if you are using the token as API token. | 164 | # to be supplied on each request. Useful if you are using the token as API token. |
165 | - # config.stateless_token = false | 165 | + config.stateless_token = true |
166 | 166 | ||
167 | # ==> Scopes configuration | 167 | # ==> Scopes configuration |
168 | # Turn scoped views on. Before rendering "sessions/new", it will first check for | 168 | # Turn scoped views on. Before rendering "sessions/new", it will first check for |
config/routes.rb
@@ -3,7 +3,6 @@ Gitlab::Application.routes.draw do | @@ -3,7 +3,6 @@ Gitlab::Application.routes.draw do | ||
3 | get 'tags'=> 'tags#index' | 3 | get 'tags'=> 'tags#index' |
4 | get 'tags/:tag' => 'projects#index' | 4 | get 'tags/:tag' => 'projects#index' |
5 | 5 | ||
6 | - | ||
7 | namespace :admin do | 6 | namespace :admin do |
8 | resources :users | 7 | resources :users |
9 | resources :projects | 8 | resources :projects |
@@ -53,10 +52,8 @@ Gitlab::Application.routes.draw do | @@ -53,10 +52,8 @@ Gitlab::Application.routes.draw do | ||
53 | resources :team_members | 52 | resources :team_members |
54 | resources :issues do | 53 | resources :issues do |
55 | collection do | 54 | collection do |
56 | - post :sort | ||
57 | - end | ||
58 | - collection do | ||
59 | - get :search | 55 | + post :sort |
56 | + get :search | ||
60 | end | 57 | end |
61 | end | 58 | end |
62 | resources :notes, :only => [:create, :destroy] | 59 | resources :notes, :only => [:create, :destroy] |
db/migrate/20111027152724_issue_conten_to_note.rb
@@ -15,16 +15,16 @@ class IssueContenToNote < ActiveRecord::Migration | @@ -15,16 +15,16 @@ class IssueContenToNote < ActiveRecord::Migration | ||
15 | if note.save | 15 | if note.save |
16 | issue.update_attributes(:content => nil) | 16 | issue.update_attributes(:content => nil) |
17 | print "." | 17 | print "." |
18 | - else | 18 | + else |
19 | print "F" | 19 | print "F" |
20 | end | 20 | end |
21 | end | 21 | end |
22 | 22 | ||
23 | total = Issue.where("content is not null").count | 23 | total = Issue.where("content is not null").count |
24 | 24 | ||
25 | - if total > 0 | ||
26 | - puts "content of #{total} issues were not migrated" | ||
27 | - else | 25 | + if total > 0 |
26 | + puts "content of #{total} issues were not migrated" | ||
27 | + else | ||
28 | puts "Done" | 28 | puts "Done" |
29 | end | 29 | end |
30 | end | 30 | end |
db/migrate/20111115063954_add_authentication_token_to_users.rb
0 → 100644
db/schema.rb
@@ -11,11 +11,10 @@ | @@ -11,11 +11,10 @@ | ||
11 | # | 11 | # |
12 | # It's strongly recommended to check this file into your version control system. | 12 | # It's strongly recommended to check this file into your version control system. |
13 | 13 | ||
14 | -ActiveRecord::Schema.define(:version => 20111101222453) do | 14 | +ActiveRecord::Schema.define(:version => 20111115063954) do |
15 | 15 | ||
16 | create_table "issues", :force => true do |t| | 16 | create_table "issues", :force => true do |t| |
17 | t.string "title" | 17 | t.string "title" |
18 | - t.text "content" | ||
19 | t.integer "assignee_id" | 18 | t.integer "assignee_id" |
20 | t.integer "author_id" | 19 | t.integer "author_id" |
21 | t.integer "project_id" | 20 | t.integer "project_id" |
@@ -104,6 +103,7 @@ ActiveRecord::Schema.define(:version => 20111101222453) do | @@ -104,6 +103,7 @@ ActiveRecord::Schema.define(:version => 20111101222453) do | ||
104 | t.string "skype", :default => "", :null => false | 103 | t.string "skype", :default => "", :null => false |
105 | t.string "linkedin", :default => "", :null => false | 104 | t.string "linkedin", :default => "", :null => false |
106 | t.string "twitter", :default => "", :null => false | 105 | t.string "twitter", :default => "", :null => false |
106 | + t.string "authentication_token" | ||
107 | end | 107 | end |
108 | 108 | ||
109 | add_index "users", ["email"], :name => "index_users_on_email", :unique => true | 109 | add_index "users", ["email"], :name => "index_users_on_email", :unique => true |
lib/assets/javascripts/branch-graph.js
@@ -39,7 +39,7 @@ function branchGraph(holder) { | @@ -39,7 +39,7 @@ function branchGraph(holder) { | ||
39 | var cuday = 0, cumonth = ""; | 39 | var cuday = 0, cumonth = ""; |
40 | r.rect(0, 0, days.length * 20 + 20, 20).attr({fill: "#474D57"}); | 40 | r.rect(0, 0, days.length * 20 + 20, 20).attr({fill: "#474D57"}); |
41 | r.rect(0, 20, days.length * 20 + 20, 20).attr({fill: "#f7f7f7"}); | 41 | r.rect(0, 20, days.length * 20 + 20, 20).attr({fill: "#f7f7f7"}); |
42 | - | 42 | + |
43 | for (mm = 0; mm < days.length; mm++) { | 43 | for (mm = 0; mm < days.length; mm++) { |
44 | if(days[mm] != null){ | 44 | if(days[mm] != null){ |
45 | if(cuday != days[mm][0]){ | 45 | if(cuday != days[mm][0]){ |
@@ -50,7 +50,7 @@ function branchGraph(holder) { | @@ -50,7 +50,7 @@ function branchGraph(holder) { | ||
50 | r.text(10 + mm * 20, 10, days[mm][1]).attr({font: "12px Fontin-Sans, Arial", fill: "#444"}); | 50 | r.text(10 + mm * 20, 10, days[mm][1]).attr({font: "12px Fontin-Sans, Arial", fill: "#444"}); |
51 | cumonth = days[mm][1] | 51 | cumonth = days[mm][1] |
52 | } | 52 | } |
53 | - | 53 | + |
54 | } | 54 | } |
55 | } | 55 | } |
56 | for (i = 0; i < ii; i++) { | 56 | for (i = 0; i < ii; i++) { |
@@ -65,7 +65,7 @@ function branchGraph(holder) { | @@ -65,7 +65,7 @@ function branchGraph(holder) { | ||
65 | } | 65 | } |
66 | var t = r.text(x+5, y+5, shortrefs).attr({font: "12px Fontin-Sans, Arial", fill: "#666", | 66 | var t = r.text(x+5, y+5, shortrefs).attr({font: "12px Fontin-Sans, Arial", fill: "#666", |
67 | title: longrefs, cursor: "pointer", rotation: "90"}); | 67 | title: longrefs, cursor: "pointer", rotation: "90"}); |
68 | - | 68 | + |
69 | var textbox = t.getBBox(); | 69 | var textbox = t.getBBox(); |
70 | t.translate(textbox.height/-4,textbox.width/2); | 70 | t.translate(textbox.height/-4,textbox.width/2); |
71 | } | 71 | } |
@@ -77,7 +77,7 @@ function branchGraph(holder) { | @@ -77,7 +77,7 @@ function branchGraph(holder) { | ||
77 | if (c.space == commits[i].space) { | 77 | if (c.space == commits[i].space) { |
78 | r.path("M" + (x - 5) + "," + (y + .0001) + "L" + (15 + 20 * c.time) + "," + (y + .0001)) | 78 | r.path("M" + (x - 5) + "," + (y + .0001) + "L" + (15 + 20 * c.time) + "," + (y + .0001)) |
79 | .attr({stroke: colors[c.space], "stroke-width": 2}); | 79 | .attr({stroke: colors[c.space], "stroke-width": 2}); |
80 | - | 80 | + |
81 | } else if (c.space < commits[i].space) { | 81 | } else if (c.space < commits[i].space) { |
82 | r.path(["M", x - 5, y + .0001, "l-5-2,0,4,5,-2C",x-5,y,x -17, y+2, x -20, y-10,"L", cx,y-10,cx , cy]) | 82 | r.path(["M", x - 5, y + .0001, "l-5-2,0,4,5,-2C",x-5,y,x -17, y+2, x -20, y-10,"L", cx,y-10,cx , cy]) |
83 | .attr({stroke: colors[commits[i].space], "stroke-width": 2}); | 83 | .attr({stroke: colors[commits[i].space], "stroke-width": 2}); |
lib/graph_commit.rb
@@ -12,20 +12,20 @@ class GraphCommit | @@ -12,20 +12,20 @@ class GraphCommit | ||
12 | @_commit.send(m, *args, &block) | 12 | @_commit.send(m, *args, &block) |
13 | end | 13 | end |
14 | 14 | ||
15 | - # Method is adding time and space on the | ||
16 | - # list of commits. As well as returns date list | 15 | + # Method is adding time and space on the |
16 | + # list of commits. As well as returns date list | ||
17 | # corelated with time set on commits. | 17 | # corelated with time set on commits. |
18 | # | 18 | # |
19 | # @param [Array<GraphCommit>] comits to index | 19 | # @param [Array<GraphCommit>] comits to index |
20 | # | 20 | # |
21 | - # @return [Array<TimeDate>] list of commit dates corelated with time on commits | 21 | + # @return [Array<TimeDate>] list of commit dates corelated with time on commits |
22 | def self.index_commits(commits) | 22 | def self.index_commits(commits) |
23 | days, heads = [], [] | 23 | days, heads = [], [] |
24 | map = {} | 24 | map = {} |
25 | 25 | ||
26 | commits.reverse.each_with_index do |c,i| | 26 | commits.reverse.each_with_index do |c,i| |
27 | c.time = i | 27 | c.time = i |
28 | - days[i] = c.committed_date | 28 | + days[i] = c.committed_date |
29 | map[c.id] = c | 29 | map[c.id] = c |
30 | heads += c.refs unless c.refs.nil? | 30 | heads += c.refs unless c.refs.nil? |
31 | end | 31 | end |
@@ -35,7 +35,7 @@ class GraphCommit | @@ -35,7 +35,7 @@ class GraphCommit | ||
35 | heads.sort! do |a,b| | 35 | heads.sort! do |a,b| |
36 | if a.name == "master" | 36 | if a.name == "master" |
37 | -1 | 37 | -1 |
38 | - elsif b.name == "master" | 38 | + elsif b.name == "master" |
39 | 1 | 39 | 1 |
40 | else | 40 | else |
41 | b.commit.committed_date <=> a.commit.committed_date | 41 | b.commit.committed_date <=> a.commit.committed_date |
@@ -45,7 +45,7 @@ class GraphCommit | @@ -45,7 +45,7 @@ class GraphCommit | ||
45 | j = 0 | 45 | j = 0 |
46 | heads.each do |h| | 46 | heads.each do |h| |
47 | if map.include? h.commit.id then | 47 | if map.include? h.commit.id then |
48 | - j = mark_chain(j+=1, map[h.commit.id], map) | 48 | + j = mark_chain(j+=1, map[h.commit.id], map) |
49 | end | 49 | end |
50 | end | 50 | end |
51 | days | 51 | days |
@@ -55,15 +55,15 @@ class GraphCommit | @@ -55,15 +55,15 @@ class GraphCommit | ||
55 | # | 55 | # |
56 | # @param [Fixnum] space (row on the graph) to be set | 56 | # @param [Fixnum] space (row on the graph) to be set |
57 | # @param [GraphCommit] the commit object. | 57 | # @param [GraphCommit] the commit object. |
58 | - # @param [Hash<String,GraphCommit>] map of commits | 58 | + # @param [Hash<String,GraphCommit>] map of commits |
59 | # | 59 | # |
60 | - # @return [Fixnum] max space used. | 60 | + # @return [Fixnum] max space used. |
61 | def self.mark_chain(mark, commit, map) | 61 | def self.mark_chain(mark, commit, map) |
62 | commit.space = mark if commit.space == 0 | 62 | commit.space = mark if commit.space == 0 |
63 | m1 = mark - 1 | 63 | m1 = mark - 1 |
64 | marks = commit.parents.collect do |p| | 64 | marks = commit.parents.collect do |p| |
65 | if map.include? p.id and map[p.id].space == 0 then | 65 | if map.include? p.id and map[p.id].space == 0 then |
66 | - mark_chain(m1 += 1, map[p.id],map) | 66 | + mark_chain(m1 += 1, map[p.id],map) |
67 | else | 67 | else |
68 | m1 + 1 | 68 | m1 + 1 |
69 | end | 69 | end |
@@ -71,5 +71,5 @@ class GraphCommit | @@ -71,5 +71,5 @@ class GraphCommit | ||
71 | marks << mark | 71 | marks << mark |
72 | marks.compact.max | 72 | marks.compact.max |
73 | end | 73 | end |
74 | - | 74 | + |
75 | end | 75 | end |
spec/models/project_spec.rb
@@ -62,10 +62,10 @@ describe Project do | @@ -62,10 +62,10 @@ describe Project do | ||
62 | end | 62 | end |
63 | end | 63 | end |
64 | 64 | ||
65 | - describe "updates" do | 65 | + describe "updates" do |
66 | let(:project) { Factory :project } | 66 | let(:project) { Factory :project } |
67 | 67 | ||
68 | - before do | 68 | + before do |
69 | @issue = Factory :issue, | 69 | @issue = Factory :issue, |
70 | :project => project, | 70 | :project => project, |
71 | :author => Factory(:user), | 71 | :author => Factory(:user), |
@@ -86,10 +86,10 @@ describe Project do | @@ -86,10 +86,10 @@ describe Project do | ||
86 | end | 86 | end |
87 | end | 87 | end |
88 | 88 | ||
89 | - describe "last_activity" do | 89 | + describe "last_activity" do |
90 | let(:project) { Factory :project } | 90 | let(:project) { Factory :project } |
91 | 91 | ||
92 | - before do | 92 | + before do |
93 | @note = Factory :note, | 93 | @note = Factory :note, |
94 | :project => project, | 94 | :project => project, |
95 | :author => Factory(:user) | 95 | :author => Factory(:user) |
@@ -99,7 +99,7 @@ describe Project do | @@ -99,7 +99,7 @@ describe Project do | ||
99 | it { project.last_activity_date.to_s.should == @note.created_at.to_s } | 99 | it { project.last_activity_date.to_s.should == @note.created_at.to_s } |
100 | end | 100 | end |
101 | 101 | ||
102 | - describe "fresh commits" do | 102 | + describe "fresh commits" do |
103 | let(:project) { Factory :project } | 103 | let(:project) { Factory :project } |
104 | 104 | ||
105 | it { project.fresh_commits(3).count.should == 3 } | 105 | it { project.fresh_commits(3).count.should == 3 } |
spec/models/user_spec.rb
@@ -19,15 +19,20 @@ describe User do | @@ -19,15 +19,20 @@ describe User do | ||
19 | user.identifier.should == "test_mail.com" | 19 | user.identifier.should == "test_mail.com" |
20 | end | 20 | end |
21 | 21 | ||
22 | + it "should have authentication token" do | ||
23 | + user = Factory(:user) | ||
24 | + user.authentication_token.should_not == "" | ||
25 | + end | ||
26 | + | ||
22 | describe "dependent" do | 27 | describe "dependent" do |
23 | - before do | 28 | + before do |
24 | @user = Factory :user | 29 | @user = Factory :user |
25 | - @note = Factory :note, | 30 | + @note = Factory :note, |
26 | :author => @user, | 31 | :author => @user, |
27 | :project => Factory(:project) | 32 | :project => Factory(:project) |
28 | end | 33 | end |
29 | 34 | ||
30 | - it "should destroy all notes with user" do | 35 | + it "should destroy all notes with user" do |
31 | Note.find_by_id(@note.id).should_not be_nil | 36 | Note.find_by_id(@note.id).should_not be_nil |
32 | @user.destroy | 37 | @user.destroy |
33 | Note.find_by_id(@note.id).should be_nil | 38 | Note.find_by_id(@note.id).should be_nil |
spec/requests/commits_spec.rb
@@ -25,6 +25,25 @@ describe "Commits" do | @@ -25,6 +25,25 @@ describe "Commits" do | ||
25 | page.should have_content(commit.author) | 25 | page.should have_content(commit.author) |
26 | page.should have_content(commit.message) | 26 | page.should have_content(commit.message) |
27 | end | 27 | end |
28 | + | ||
29 | + it "should render atom feed" do | ||
30 | + visit project_commits_path(project, :atom) | ||
31 | + | ||
32 | + page.response_headers['Content-Type'].should have_content("application/atom+xml") | ||
33 | + page.body.should have_selector("title", :text => "Recent commits to #{project.name}") | ||
34 | + page.body.should have_selector("author email", :text => commit.author_email) | ||
35 | + page.body.should have_selector("entry summary", :text => commit.message) | ||
36 | + end | ||
37 | + | ||
38 | + it "should render atom feed via private token" do | ||
39 | + logout | ||
40 | + visit project_commits_path(project, :atom, :private_token => @user.private_token) | ||
41 | + | ||
42 | + page.response_headers['Content-Type'].should have_content("application/atom+xml") | ||
43 | + page.body.should have_selector("title", :text => "Recent commits to #{project.name}") | ||
44 | + page.body.should have_selector("author email", :text => commit.author_email) | ||
45 | + page.body.should have_selector("entry summary", :text => commit.message) | ||
46 | + end | ||
28 | end | 47 | end |
29 | 48 | ||
30 | describe "GET /commits/:id" do | 49 | describe "GET /commits/:id" do |
spec/requests/dashboard_spec.rb
@@ -15,13 +15,13 @@ describe "Dashboard" do | @@ -15,13 +15,13 @@ describe "Dashboard" do | ||
15 | end | 15 | end |
16 | 16 | ||
17 | it "should have projects panel" do | 17 | it "should have projects panel" do |
18 | - within ".project-list" do | 18 | + within ".project-list" do |
19 | page.should have_content(@project.name) | 19 | page.should have_content(@project.name) |
20 | end | 20 | end |
21 | end | 21 | end |
22 | - | 22 | + |
23 | it "should have news feed" do | 23 | it "should have news feed" do |
24 | - within "#news-feed" do | 24 | + within "#news-feed" do |
25 | page.should have_content("master") | 25 | page.should have_content("master") |
26 | page.should have_content(@project.commit.author.name) | 26 | page.should have_content(@project.commit.author.name) |
27 | page.should have_content(@project.commit.safe_message) | 27 | page.should have_content(@project.commit.safe_message) |
spec/requests/issues_spec.rb
@@ -27,6 +27,25 @@ describe "Issues" do | @@ -27,6 +27,25 @@ describe "Issues" do | ||
27 | it { should have_content(@issue.project.name) } | 27 | it { should have_content(@issue.project.name) } |
28 | it { should have_content(@issue.assignee.name) } | 28 | it { should have_content(@issue.assignee.name) } |
29 | 29 | ||
30 | + it "should render atom feed" do | ||
31 | + visit project_issues_path(project, :atom) | ||
32 | + | ||
33 | + page.response_headers['Content-Type'].should have_content("application/atom+xml") | ||
34 | + page.body.should have_selector("title", :text => "#{project.name} issues") | ||
35 | + page.body.should have_selector("author email", :text => @issue.author_email) | ||
36 | + page.body.should have_selector("entry summary", :text => @issue.title) | ||
37 | + end | ||
38 | + | ||
39 | + it "should render atom feed via private token" do | ||
40 | + logout | ||
41 | + visit project_issues_path(project, :atom, :private_token => @user.private_token) | ||
42 | + | ||
43 | + page.response_headers['Content-Type'].should have_content("application/atom+xml") | ||
44 | + page.body.should have_selector("title", :text => "#{project.name} issues") | ||
45 | + page.body.should have_selector("author email", :text => @issue.author_email) | ||
46 | + page.body.should have_selector("entry summary", :text => @issue.title) | ||
47 | + end | ||
48 | + | ||
30 | describe "Destroy" do | 49 | describe "Destroy" do |
31 | before do | 50 | before do |
32 | # admin access to remove issue | 51 | # admin access to remove issue |
@@ -81,13 +100,13 @@ describe "Issues" do | @@ -81,13 +100,13 @@ describe "Issues" do | ||
81 | end | 100 | end |
82 | 101 | ||
83 | describe "fill in" do | 102 | describe "fill in" do |
84 | - describe 'assign to me' do | 103 | + describe 'assign to me' do |
85 | before do | 104 | before do |
86 | fill_in "issue_title", :with => "bug 345" | 105 | fill_in "issue_title", :with => "bug 345" |
87 | click_link "Select user" | 106 | click_link "Select user" |
88 | within "#issue_assignee_id-menu" do | 107 | within "#issue_assignee_id-menu" do |
89 | click_link @user.name | 108 | click_link @user.name |
90 | - end | 109 | + end |
91 | end | 110 | end |
92 | 111 | ||
93 | it { expect { click_button "Save" }.to change {Issue.count}.by(1) } | 112 | it { expect { click_button "Save" }.to change {Issue.count}.by(1) } |
@@ -107,13 +126,13 @@ describe "Issues" do | @@ -107,13 +126,13 @@ describe "Issues" do | ||
107 | end | 126 | end |
108 | end | 127 | end |
109 | 128 | ||
110 | - describe 'assign to other' do | 129 | + describe 'assign to other' do |
111 | before do | 130 | before do |
112 | fill_in "issue_title", :with => "bug 345" | 131 | fill_in "issue_title", :with => "bug 345" |
113 | click_link "Select user" | 132 | click_link "Select user" |
114 | within "#issue_assignee_id-menu" do | 133 | within "#issue_assignee_id-menu" do |
115 | click_link @user2.name | 134 | click_link @user2.name |
116 | - end | 135 | + end |
117 | end | 136 | end |
118 | 137 | ||
119 | it { expect { click_button "Save" }.to change {Issue.count}.by(1) } | 138 | it { expect { click_button "Save" }.to change {Issue.count}.by(1) } |
@@ -145,7 +164,7 @@ describe "Issues" do | @@ -145,7 +164,7 @@ describe "Issues" do | ||
145 | end | 164 | end |
146 | end | 165 | end |
147 | 166 | ||
148 | - describe "Show issue" do | 167 | + describe "Show issue" do |
149 | before do | 168 | before do |
150 | @issue = Factory :issue, | 169 | @issue = Factory :issue, |
151 | :author => @user, | 170 | :author => @user, |
@@ -205,7 +224,7 @@ describe "Issues" do | @@ -205,7 +224,7 @@ describe "Issues" do | ||
205 | @issue.save | 224 | @issue.save |
206 | end | 225 | end |
207 | end | 226 | end |
208 | - | 227 | + |
209 | it "should be able to search on different statuses" do | 228 | it "should be able to search on different statuses" do |
210 | @issue = Issue.first | 229 | @issue = Issue.first |
211 | @issue.closed = true | 230 | @issue.closed = true |
@@ -214,13 +233,13 @@ describe "Issues" do | @@ -214,13 +233,13 @@ describe "Issues" do | ||
214 | visit project_issues_path(project) | 233 | visit project_issues_path(project) |
215 | choose 'closed_issues' | 234 | choose 'closed_issues' |
216 | fill_in 'issue_search', :with => 'foobar' | 235 | fill_in 'issue_search', :with => 'foobar' |
217 | - | 236 | + |
218 | page.should have_content 'foobar' | 237 | page.should have_content 'foobar' |
219 | page.should_not have_content 'foobar2' | 238 | page.should_not have_content 'foobar2' |
220 | page.should_not have_content 'gitlab' | 239 | page.should_not have_content 'gitlab' |
221 | end | 240 | end |
222 | 241 | ||
223 | - it "should search for term and return the correct results" do | 242 | + it "should search for term and return the correct results" do |
224 | visit project_issues_path(project) | 243 | visit project_issues_path(project) |
225 | fill_in 'issue_search', :with => 'foobar' | 244 | fill_in 'issue_search', :with => 'foobar' |
226 | 245 |
spec/requests/projects_spec.rb
@@ -73,7 +73,7 @@ describe "Projects" do | @@ -73,7 +73,7 @@ describe "Projects" do | ||
73 | end | 73 | end |
74 | 74 | ||
75 | it "should beahave like activities page" do | 75 | it "should beahave like activities page" do |
76 | - within ".project-update" do | 76 | + within ".project-update" do |
77 | page.should have_content("master") | 77 | page.should have_content("master") |
78 | page.should have_content(@project.commit.author.name) | 78 | page.should have_content(@project.commit.author.name) |
79 | page.should have_content(@project.commit.safe_message) | 79 | page.should have_content(@project.commit.safe_message) |
spec/requests/tags_spec.rb
@@ -10,7 +10,6 @@ describe "Tags" do | @@ -10,7 +10,6 @@ describe "Tags" do | ||
10 | # end | 10 | # end |
11 | # end | 11 | # end |
12 | 12 | ||
13 | - | ||
14 | describe "GET '/tags.json'" do | 13 | describe "GET '/tags.json'" do |
15 | before do | 14 | before do |
16 | @project = Factory :project | 15 | @project = Factory :project |
@@ -20,12 +19,9 @@ describe "Tags" do | @@ -20,12 +19,9 @@ describe "Tags" do | ||
20 | visit '/tags.json' | 19 | visit '/tags.json' |
21 | end | 20 | end |
22 | 21 | ||
23 | - | ||
24 | it "should contains tags" do | 22 | it "should contains tags" do |
25 | page.should have_content('demo1') | 23 | page.should have_content('demo1') |
26 | end | 24 | end |
27 | end | 25 | end |
28 | 26 | ||
29 | - | ||
30 | - | ||
31 | end | 27 | end |
spec/requests/top_panel_spec.rb
@@ -7,7 +7,7 @@ describe "Top Panel", :js => true do | @@ -7,7 +7,7 @@ describe "Top Panel", :js => true do | ||
7 | before do | 7 | before do |
8 | visit projects_path | 8 | visit projects_path |
9 | fill_in "search", :with => "Ke" | 9 | fill_in "search", :with => "Ke" |
10 | - within ".ui-autocomplete" do | 10 | + within ".ui-autocomplete" do |
11 | find(:xpath, "//a[.=\"Keys\"]").click | 11 | find(:xpath, "//a[.=\"Keys\"]").click |
12 | end | 12 | end |
13 | end | 13 | end |
@@ -24,7 +24,7 @@ describe "Top Panel", :js => true do | @@ -24,7 +24,7 @@ describe "Top Panel", :js => true do | ||
24 | visit project_path(@project) | 24 | visit project_path(@project) |
25 | 25 | ||
26 | fill_in "search", :with => "Commi" | 26 | fill_in "search", :with => "Commi" |
27 | - within ".ui-autocomplete" do | 27 | + within ".ui-autocomplete" do |
28 | find(:xpath, "//a[.=\"#{@project.code} / Commits\"]").click | 28 | find(:xpath, "//a[.=\"#{@project.code} / Commits\"]").click |
29 | end | 29 | end |
30 | end | 30 | end |
@@ -0,0 +1,901 @@ | @@ -0,0 +1,901 @@ | ||
1 | +// Chosen, a Select Box Enhancer for jQuery and Protoype | ||
2 | +// by Patrick Filler for Harvest, http://getharvest.com | ||
3 | +// | ||
4 | +// Version 0.9.5 | ||
5 | +// Full source at https://github.com/harvesthq/chosen | ||
6 | +// Copyright (c) 2011 Harvest http://getharvest.com | ||
7 | + | ||
8 | +// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md | ||
9 | +// This file is generated by `cake build`, do not edit it by hand. | ||
10 | +(function() { | ||
11 | + var SelectParser; | ||
12 | + SelectParser = (function() { | ||
13 | + function SelectParser() { | ||
14 | + this.options_index = 0; | ||
15 | + this.parsed = []; | ||
16 | + } | ||
17 | + SelectParser.prototype.add_node = function(child) { | ||
18 | + if (child.nodeName === "OPTGROUP") { | ||
19 | + return this.add_group(child); | ||
20 | + } else { | ||
21 | + return this.add_option(child); | ||
22 | + } | ||
23 | + }; | ||
24 | + SelectParser.prototype.add_group = function(group) { | ||
25 | + var group_position, option, _i, _len, _ref, _results; | ||
26 | + group_position = this.parsed.length; | ||
27 | + this.parsed.push({ | ||
28 | + array_index: group_position, | ||
29 | + group: true, | ||
30 | + label: group.label, | ||
31 | + children: 0, | ||
32 | + disabled: group.disabled | ||
33 | + }); | ||
34 | + _ref = group.childNodes; | ||
35 | + _results = []; | ||
36 | + for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
37 | + option = _ref[_i]; | ||
38 | + _results.push(this.add_option(option, group_position, group.disabled)); | ||
39 | + } | ||
40 | + return _results; | ||
41 | + }; | ||
42 | + SelectParser.prototype.add_option = function(option, group_position, group_disabled) { | ||
43 | + if (option.nodeName === "OPTION") { | ||
44 | + if (option.text !== "") { | ||
45 | + if (group_position != null) { | ||
46 | + this.parsed[group_position].children += 1; | ||
47 | + } | ||
48 | + this.parsed.push({ | ||
49 | + array_index: this.parsed.length, | ||
50 | + options_index: this.options_index, | ||
51 | + value: option.value, | ||
52 | + text: option.text, | ||
53 | + html: option.innerHTML, | ||
54 | + selected: option.selected, | ||
55 | + disabled: group_disabled === true ? group_disabled : option.disabled, | ||
56 | + group_array_index: group_position, | ||
57 | + classes: option.className, | ||
58 | + style: option.style.cssText | ||
59 | + }); | ||
60 | + } else { | ||
61 | + this.parsed.push({ | ||
62 | + array_index: this.parsed.length, | ||
63 | + options_index: this.options_index, | ||
64 | + empty: true | ||
65 | + }); | ||
66 | + } | ||
67 | + return this.options_index += 1; | ||
68 | + } | ||
69 | + }; | ||
70 | + return SelectParser; | ||
71 | + })(); | ||
72 | + SelectParser.select_to_array = function(select) { | ||
73 | + var child, parser, _i, _len, _ref; | ||
74 | + parser = new SelectParser(); | ||
75 | + _ref = select.childNodes; | ||
76 | + for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
77 | + child = _ref[_i]; | ||
78 | + parser.add_node(child); | ||
79 | + } | ||
80 | + return parser.parsed; | ||
81 | + }; | ||
82 | + this.SelectParser = SelectParser; | ||
83 | +}).call(this); | ||
84 | +(function() { | ||
85 | + /* | ||
86 | + Chosen source: generate output using 'cake build' | ||
87 | + Copyright (c) 2011 by Harvest | ||
88 | + */ | ||
89 | + var AbstractChosen, root; | ||
90 | + var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | ||
91 | + root = this; | ||
92 | + AbstractChosen = (function() { | ||
93 | + function AbstractChosen(form_field, options) { | ||
94 | + this.form_field = form_field; | ||
95 | + this.options = options != null ? options : {}; | ||
96 | + this.set_default_values(); | ||
97 | + this.is_multiple = this.form_field.multiple; | ||
98 | + this.default_text_default = this.is_multiple ? "Select Some Options" : "Select an Option"; | ||
99 | + this.setup(); | ||
100 | + this.set_up_html(); | ||
101 | + this.register_observers(); | ||
102 | + this.finish_setup(); | ||
103 | + } | ||
104 | + AbstractChosen.prototype.set_default_values = function() { | ||
105 | + this.click_test_action = __bind(function(evt) { | ||
106 | + return this.test_active_click(evt); | ||
107 | + }, this); | ||
108 | + this.activate_action = __bind(function(evt) { | ||
109 | + return this.activate_field(evt); | ||
110 | + }, this); | ||
111 | + this.active_field = false; | ||
112 | + this.mouse_on_container = false; | ||
113 | + this.results_showing = false; | ||
114 | + this.result_highlighted = null; | ||
115 | + this.result_single_selected = null; | ||
116 | + this.allow_single_deselect = (this.options.allow_single_deselect != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false; | ||
117 | + this.disable_search_threshold = this.options.disable_search_threshold || 0; | ||
118 | + this.choices = 0; | ||
119 | + return this.results_none_found = this.options.no_results_text || "No results match"; | ||
120 | + }; | ||
121 | + AbstractChosen.prototype.mouse_enter = function() { | ||
122 | + return this.mouse_on_container = true; | ||
123 | + }; | ||
124 | + AbstractChosen.prototype.mouse_leave = function() { | ||
125 | + return this.mouse_on_container = false; | ||
126 | + }; | ||
127 | + AbstractChosen.prototype.input_focus = function(evt) { | ||
128 | + if (!this.active_field) { | ||
129 | + return setTimeout((__bind(function() { | ||
130 | + return this.container_mousedown(); | ||
131 | + }, this)), 50); | ||
132 | + } | ||
133 | + }; | ||
134 | + AbstractChosen.prototype.input_blur = function(evt) { | ||
135 | + if (!this.mouse_on_container) { | ||
136 | + this.active_field = false; | ||
137 | + return setTimeout((__bind(function() { | ||
138 | + return this.blur_test(); | ||
139 | + }, this)), 100); | ||
140 | + } | ||
141 | + }; | ||
142 | + AbstractChosen.prototype.result_add_option = function(option) { | ||
143 | + var classes, style; | ||
144 | + if (!option.disabled) { | ||
145 | + option.dom_id = this.container_id + "_o_" + option.array_index; | ||
146 | + classes = option.selected && this.is_multiple ? [] : ["active-result"]; | ||
147 | + if (option.selected) { | ||
148 | + classes.push("result-selected"); | ||
149 | + } | ||
150 | + if (option.group_array_index != null) { | ||
151 | + classes.push("group-option"); | ||
152 | + } | ||
153 | + if (option.classes !== "") { | ||
154 | + classes.push(option.classes); | ||
155 | + } | ||
156 | + style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : ""; | ||
157 | + return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"' + style + '>' + option.html + '</li>'; | ||
158 | + } else { | ||
159 | + return ""; | ||
160 | + } | ||
161 | + }; | ||
162 | + AbstractChosen.prototype.results_update_field = function() { | ||
163 | + this.result_clear_highlight(); | ||
164 | + this.result_single_selected = null; | ||
165 | + return this.results_build(); | ||
166 | + }; | ||
167 | + AbstractChosen.prototype.results_toggle = function() { | ||
168 | + if (this.results_showing) { | ||
169 | + return this.results_hide(); | ||
170 | + } else { | ||
171 | + return this.results_show(); | ||
172 | + } | ||
173 | + }; | ||
174 | + AbstractChosen.prototype.results_search = function(evt) { | ||
175 | + if (this.results_showing) { | ||
176 | + return this.winnow_results(); | ||
177 | + } else { | ||
178 | + return this.results_show(); | ||
179 | + } | ||
180 | + }; | ||
181 | + AbstractChosen.prototype.keyup_checker = function(evt) { | ||
182 | + var stroke, _ref; | ||
183 | + stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; | ||
184 | + this.search_field_scale(); | ||
185 | + switch (stroke) { | ||
186 | + case 8: | ||
187 | + if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) { | ||
188 | + return this.keydown_backstroke(); | ||
189 | + } else if (!this.pending_backstroke) { | ||
190 | + this.result_clear_highlight(); | ||
191 | + return this.results_search(); | ||
192 | + } | ||
193 | + break; | ||
194 | + case 13: | ||
195 | + evt.preventDefault(); | ||
196 | + if (this.results_showing) { | ||
197 | + return this.result_select(evt); | ||
198 | + } | ||
199 | + break; | ||
200 | + case 27: | ||
201 | + if (this.results_showing) { | ||
202 | + return this.results_hide(); | ||
203 | + } | ||
204 | + break; | ||
205 | + case 9: | ||
206 | + case 38: | ||
207 | + case 40: | ||
208 | + case 16: | ||
209 | + case 91: | ||
210 | + case 17: | ||
211 | + break; | ||
212 | + default: | ||
213 | + return this.results_search(); | ||
214 | + } | ||
215 | + }; | ||
216 | + AbstractChosen.prototype.generate_field_id = function() { | ||
217 | + var new_id; | ||
218 | + new_id = this.generate_random_id(); | ||
219 | + this.form_field.id = new_id; | ||
220 | + return new_id; | ||
221 | + }; | ||
222 | + AbstractChosen.prototype.generate_random_char = function() { | ||
223 | + var chars, newchar, rand; | ||
224 | + chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ"; | ||
225 | + rand = Math.floor(Math.random() * chars.length); | ||
226 | + return newchar = chars.substring(rand, rand + 1); | ||
227 | + }; | ||
228 | + return AbstractChosen; | ||
229 | + })(); | ||
230 | + root.AbstractChosen = AbstractChosen; | ||
231 | +}).call(this); | ||
232 | +(function() { | ||
233 | + /* | ||
234 | + Chosen source: generate output using 'cake build' | ||
235 | + Copyright (c) 2011 by Harvest | ||
236 | + */ | ||
237 | + var $, Chosen, get_side_border_padding, root; | ||
238 | + var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { | ||
239 | + for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } | ||
240 | + function ctor() { this.constructor = child; } | ||
241 | + ctor.prototype = parent.prototype; | ||
242 | + child.prototype = new ctor; | ||
243 | + child.__super__ = parent.prototype; | ||
244 | + return child; | ||
245 | + }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | ||
246 | + root = this; | ||
247 | + $ = jQuery; | ||
248 | + $.fn.extend({ | ||
249 | + chosen: function(options) { | ||
250 | + if ($.browser.msie && ($.browser.version === "6.0" || $.browser.version === "7.0")) { | ||
251 | + return this; | ||
252 | + } | ||
253 | + return $(this).each(function(input_field) { | ||
254 | + if (!($(this)).hasClass("chzn-done")) { | ||
255 | + return new Chosen(this, options); | ||
256 | + } | ||
257 | + }); | ||
258 | + } | ||
259 | + }); | ||
260 | + Chosen = (function() { | ||
261 | + __extends(Chosen, AbstractChosen); | ||
262 | + function Chosen() { | ||
263 | + Chosen.__super__.constructor.apply(this, arguments); | ||
264 | + } | ||
265 | + Chosen.prototype.setup = function() { | ||
266 | + this.form_field_jq = $(this.form_field); | ||
267 | + return this.is_rtl = this.form_field_jq.hasClass("chzn-rtl"); | ||
268 | + }; | ||
269 | + Chosen.prototype.finish_setup = function() { | ||
270 | + return this.form_field_jq.addClass("chzn-done"); | ||
271 | + }; | ||
272 | + Chosen.prototype.set_up_html = function() { | ||
273 | + var container_div, dd_top, dd_width, sf_width; | ||
274 | + this.container_id = this.form_field.id.length ? this.form_field.id.replace(/(:|\.)/g, '_') : this.generate_field_id(); | ||
275 | + this.container_id += "_chzn"; | ||
276 | + this.f_width = this.form_field_jq.outerWidth(); | ||
277 | + this.default_text = this.form_field_jq.data('placeholder') ? this.form_field_jq.data('placeholder') : this.default_text_default; | ||
278 | + container_div = $("<div />", { | ||
279 | + id: this.container_id, | ||
280 | + "class": "chzn-container" + (this.is_rtl ? ' chzn-rtl' : ''), | ||
281 | + style: 'width: ' + this.f_width + 'px;' | ||
282 | + }); | ||
283 | + if (this.is_multiple) { | ||
284 | + container_div.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'); | ||
285 | + } else { | ||
286 | + container_div.html('<a href="javascript:void(0)" class="chzn-single"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'); | ||
287 | + } | ||
288 | + this.form_field_jq.hide().after(container_div); | ||
289 | + this.container = $('#' + this.container_id); | ||
290 | + this.container.addClass("chzn-container-" + (this.is_multiple ? "multi" : "single")); | ||
291 | + this.dropdown = this.container.find('div.chzn-drop').first(); | ||
292 | + dd_top = this.container.height(); | ||
293 | + dd_width = this.f_width - get_side_border_padding(this.dropdown); | ||
294 | + this.dropdown.css({ | ||
295 | + "width": dd_width + "px", | ||
296 | + "top": dd_top + "px" | ||
297 | + }); | ||
298 | + this.search_field = this.container.find('input').first(); | ||
299 | + this.search_results = this.container.find('ul.chzn-results').first(); | ||
300 | + this.search_field_scale(); | ||
301 | + this.search_no_results = this.container.find('li.no-results').first(); | ||
302 | + if (this.is_multiple) { | ||
303 | + this.search_choices = this.container.find('ul.chzn-choices').first(); | ||
304 | + this.search_container = this.container.find('li.search-field').first(); | ||
305 | + } else { | ||
306 | + this.search_container = this.container.find('div.chzn-search').first(); | ||
307 | + this.selected_item = this.container.find('.chzn-single').first(); | ||
308 | + sf_width = dd_width - get_side_border_padding(this.search_container) - get_side_border_padding(this.search_field); | ||
309 | + this.search_field.css({ | ||
310 | + "width": sf_width + "px" | ||
311 | + }); | ||
312 | + } | ||
313 | + this.results_build(); | ||
314 | + this.set_tab_index(); | ||
315 | + return this.form_field_jq.trigger("liszt:ready", { | ||
316 | + chosen: this | ||
317 | + }); | ||
318 | + }; | ||
319 | + Chosen.prototype.register_observers = function() { | ||
320 | + this.container.mousedown(__bind(function(evt) { | ||
321 | + return this.container_mousedown(evt); | ||
322 | + }, this)); | ||
323 | + this.container.mouseup(__bind(function(evt) { | ||
324 | + return this.container_mouseup(evt); | ||
325 | + }, this)); | ||
326 | + this.container.mouseenter(__bind(function(evt) { | ||
327 | + return this.mouse_enter(evt); | ||
328 | + }, this)); | ||
329 | + this.container.mouseleave(__bind(function(evt) { | ||
330 | + return this.mouse_leave(evt); | ||
331 | + }, this)); | ||
332 | + this.search_results.mouseup(__bind(function(evt) { | ||
333 | + return this.search_results_mouseup(evt); | ||
334 | + }, this)); | ||
335 | + this.search_results.mouseover(__bind(function(evt) { | ||
336 | + return this.search_results_mouseover(evt); | ||
337 | + }, this)); | ||
338 | + this.search_results.mouseout(__bind(function(evt) { | ||
339 | + return this.search_results_mouseout(evt); | ||
340 | + }, this)); | ||
341 | + this.form_field_jq.bind("liszt:updated", __bind(function(evt) { | ||
342 | + return this.results_update_field(evt); | ||
343 | + }, this)); | ||
344 | + this.search_field.blur(__bind(function(evt) { | ||
345 | + return this.input_blur(evt); | ||
346 | + }, this)); | ||
347 | + this.search_field.keyup(__bind(function(evt) { | ||
348 | + return this.keyup_checker(evt); | ||
349 | + }, this)); | ||
350 | + this.search_field.keydown(__bind(function(evt) { | ||
351 | + return this.keydown_checker(evt); | ||
352 | + }, this)); | ||
353 | + if (this.is_multiple) { | ||
354 | + this.search_choices.click(__bind(function(evt) { | ||
355 | + return this.choices_click(evt); | ||
356 | + }, this)); | ||
357 | + return this.search_field.focus(__bind(function(evt) { | ||
358 | + return this.input_focus(evt); | ||
359 | + }, this)); | ||
360 | + } | ||
361 | + }; | ||
362 | + Chosen.prototype.search_field_disabled = function() { | ||
363 | + this.is_disabled = this.form_field_jq[0].disabled; | ||
364 | + if (this.is_disabled) { | ||
365 | + this.container.addClass('chzn-disabled'); | ||
366 | + this.search_field[0].disabled = true; | ||
367 | + if (!this.is_multiple) { | ||
368 | + this.selected_item.unbind("focus", this.activate_action); | ||
369 | + } | ||
370 | + return this.close_field(); | ||
371 | + } else { | ||
372 | + this.container.removeClass('chzn-disabled'); | ||
373 | + this.search_field[0].disabled = false; | ||
374 | + if (!this.is_multiple) { | ||
375 | + return this.selected_item.bind("focus", this.activate_action); | ||
376 | + } | ||
377 | + } | ||
378 | + }; | ||
379 | + Chosen.prototype.container_mousedown = function(evt) { | ||
380 | + var target_closelink; | ||
381 | + if (!this.is_disabled) { | ||
382 | + target_closelink = evt != null ? ($(evt.target)).hasClass("search-choice-close") : false; | ||
383 | + if (evt && evt.type === "mousedown") { | ||
384 | + evt.stopPropagation(); | ||
385 | + } | ||
386 | + if (!this.pending_destroy_click && !target_closelink) { | ||
387 | + if (!this.active_field) { | ||
388 | + if (this.is_multiple) { | ||
389 | + this.search_field.val(""); | ||
390 | + } | ||
391 | + $(document).click(this.click_test_action); | ||
392 | + this.results_show(); | ||
393 | + } else if (!this.is_multiple && evt && ($(evt.target) === this.selected_item || $(evt.target).parents("a.chzn-single").length)) { | ||
394 | + evt.preventDefault(); | ||
395 | + this.results_toggle(); | ||
396 | + } | ||
397 | + return this.activate_field(); | ||
398 | + } else { | ||
399 | + return this.pending_destroy_click = false; | ||
400 | + } | ||
401 | + } | ||
402 | + }; | ||
403 | + Chosen.prototype.container_mouseup = function(evt) { | ||
404 | + if (evt.target.nodeName === "ABBR") { | ||
405 | + return this.results_reset(evt); | ||
406 | + } | ||
407 | + }; | ||
408 | + Chosen.prototype.blur_test = function(evt) { | ||
409 | + if (!this.active_field && this.container.hasClass("chzn-container-active")) { | ||
410 | + return this.close_field(); | ||
411 | + } | ||
412 | + }; | ||
413 | + Chosen.prototype.close_field = function() { | ||
414 | + $(document).unbind("click", this.click_test_action); | ||
415 | + if (!this.is_multiple) { | ||
416 | + this.selected_item.attr("tabindex", this.search_field.attr("tabindex")); | ||
417 | + this.search_field.attr("tabindex", -1); | ||
418 | + } | ||
419 | + this.active_field = false; | ||
420 | + this.results_hide(); | ||
421 | + this.container.removeClass("chzn-container-active"); | ||
422 | + this.winnow_results_clear(); | ||
423 | + this.clear_backstroke(); | ||
424 | + this.show_search_field_default(); | ||
425 | + return this.search_field_scale(); | ||
426 | + }; | ||
427 | + Chosen.prototype.activate_field = function() { | ||
428 | + if (!this.is_multiple && !this.active_field) { | ||
429 | + this.search_field.attr("tabindex", this.selected_item.attr("tabindex")); | ||
430 | + this.selected_item.attr("tabindex", -1); | ||
431 | + } | ||
432 | + this.container.addClass("chzn-container-active"); | ||
433 | + this.active_field = true; | ||
434 | + this.search_field.val(this.search_field.val()); | ||
435 | + return this.search_field.focus(); | ||
436 | + }; | ||
437 | + Chosen.prototype.test_active_click = function(evt) { | ||
438 | + if ($(evt.target).parents('#' + this.container_id).length) { | ||
439 | + return this.active_field = true; | ||
440 | + } else { | ||
441 | + return this.close_field(); | ||
442 | + } | ||
443 | + }; | ||
444 | + Chosen.prototype.results_build = function() { | ||
445 | + var content, data, startTime, _i, _len, _ref; | ||
446 | + startTime = new Date(); | ||
447 | + this.parsing = true; | ||
448 | + this.results_data = root.SelectParser.select_to_array(this.form_field); | ||
449 | + if (this.is_multiple && this.choices > 0) { | ||
450 | + this.search_choices.find("li.search-choice").remove(); | ||
451 | + this.choices = 0; | ||
452 | + } else if (!this.is_multiple) { | ||
453 | + this.selected_item.find("span").text(this.default_text); | ||
454 | + if (this.form_field.options.length <= this.disable_search_threshold) { | ||
455 | + this.container.addClass("chzn-container-single-nosearch"); | ||
456 | + } else { | ||
457 | + this.container.removeClass("chzn-container-single-nosearch"); | ||
458 | + } | ||
459 | + } | ||
460 | + content = ''; | ||
461 | + _ref = this.results_data; | ||
462 | + for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
463 | + data = _ref[_i]; | ||
464 | + if (data.group) { | ||
465 | + content += this.result_add_group(data); | ||
466 | + } else if (!data.empty) { | ||
467 | + content += this.result_add_option(data); | ||
468 | + if (data.selected && this.is_multiple) { | ||
469 | + this.choice_build(data); | ||
470 | + } else if (data.selected && !this.is_multiple) { | ||
471 | + this.selected_item.find("span").text(data.text); | ||
472 | + if (this.allow_single_deselect) { | ||
473 | + this.single_deselect_control_build(); | ||
474 | + } | ||
475 | + } | ||
476 | + } | ||
477 | + } | ||
478 | + this.search_field_disabled(); | ||
479 | + this.show_search_field_default(); | ||
480 | + this.search_field_scale(); | ||
481 | + this.search_results.html(content); | ||
482 | + return this.parsing = false; | ||
483 | + }; | ||
484 | + Chosen.prototype.result_add_group = function(group) { | ||
485 | + if (!group.disabled) { | ||
486 | + group.dom_id = this.container_id + "_g_" + group.array_index; | ||
487 | + return '<li id="' + group.dom_id + '" class="group-result">' + $("<div />").text(group.label).html() + '</li>'; | ||
488 | + } else { | ||
489 | + return ""; | ||
490 | + } | ||
491 | + }; | ||
492 | + Chosen.prototype.result_do_highlight = function(el) { | ||
493 | + var high_bottom, high_top, maxHeight, visible_bottom, visible_top; | ||
494 | + if (el.length) { | ||
495 | + this.result_clear_highlight(); | ||
496 | + this.result_highlight = el; | ||
497 | + this.result_highlight.addClass("highlighted"); | ||
498 | + maxHeight = parseInt(this.search_results.css("maxHeight"), 10); | ||
499 | + visible_top = this.search_results.scrollTop(); | ||
500 | + visible_bottom = maxHeight + visible_top; | ||
501 | + high_top = this.result_highlight.position().top + this.search_results.scrollTop(); | ||
502 | + high_bottom = high_top + this.result_highlight.outerHeight(); | ||
503 | + if (high_bottom >= visible_bottom) { | ||
504 | + return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0); | ||
505 | + } else if (high_top < visible_top) { | ||
506 | + return this.search_results.scrollTop(high_top); | ||
507 | + } | ||
508 | + } | ||
509 | + }; | ||
510 | + Chosen.prototype.result_clear_highlight = function() { | ||
511 | + if (this.result_highlight) { | ||
512 | + this.result_highlight.removeClass("highlighted"); | ||
513 | + } | ||
514 | + return this.result_highlight = null; | ||
515 | + }; | ||
516 | + Chosen.prototype.results_show = function() { | ||
517 | + var dd_top; | ||
518 | + if (!this.is_multiple) { | ||
519 | + this.selected_item.addClass("chzn-single-with-drop"); | ||
520 | + if (this.result_single_selected) { | ||
521 | + this.result_do_highlight(this.result_single_selected); | ||
522 | + } | ||
523 | + } | ||
524 | + dd_top = this.is_multiple ? this.container.height() : this.container.height() - 1; | ||
525 | + this.dropdown.css({ | ||
526 | + "top": dd_top + "px", | ||
527 | + "left": 0 | ||
528 | + }); | ||
529 | + this.results_showing = true; | ||
530 | + this.search_field.focus(); | ||
531 | + this.search_field.val(this.search_field.val()); | ||
532 | + return this.winnow_results(); | ||
533 | + }; | ||
534 | + Chosen.prototype.results_hide = function() { | ||
535 | + if (!this.is_multiple) { | ||
536 | + this.selected_item.removeClass("chzn-single-with-drop"); | ||
537 | + } | ||
538 | + this.result_clear_highlight(); | ||
539 | + this.dropdown.css({ | ||
540 | + "left": "-9000px" | ||
541 | + }); | ||
542 | + return this.results_showing = false; | ||
543 | + }; | ||
544 | + Chosen.prototype.set_tab_index = function(el) { | ||
545 | + var ti; | ||
546 | + if (this.form_field_jq.attr("tabindex")) { | ||
547 | + ti = this.form_field_jq.attr("tabindex"); | ||
548 | + this.form_field_jq.attr("tabindex", -1); | ||
549 | + if (this.is_multiple) { | ||
550 | + return this.search_field.attr("tabindex", ti); | ||
551 | + } else { | ||
552 | + this.selected_item.attr("tabindex", ti); | ||
553 | + return this.search_field.attr("tabindex", -1); | ||
554 | + } | ||
555 | + } | ||
556 | + }; | ||
557 | + Chosen.prototype.show_search_field_default = function() { | ||
558 | + if (this.is_multiple && this.choices < 1 && !this.active_field) { | ||
559 | + this.search_field.val(this.default_text); | ||
560 | + return this.search_field.addClass("default"); | ||
561 | + } else { | ||
562 | + this.search_field.val(""); | ||
563 | + return this.search_field.removeClass("default"); | ||
564 | + } | ||
565 | + }; | ||
566 | + Chosen.prototype.search_results_mouseup = function(evt) { | ||
567 | + var target; | ||
568 | + target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first(); | ||
569 | + if (target.length) { | ||
570 | + this.result_highlight = target; | ||
571 | + return this.result_select(evt); | ||
572 | + } | ||
573 | + }; | ||
574 | + Chosen.prototype.search_results_mouseover = function(evt) { | ||
575 | + var target; | ||
576 | + target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first(); | ||
577 | + if (target) { | ||
578 | + return this.result_do_highlight(target); | ||
579 | + } | ||
580 | + }; | ||
581 | + Chosen.prototype.search_results_mouseout = function(evt) { | ||
582 | + if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) { | ||
583 | + return this.result_clear_highlight(); | ||
584 | + } | ||
585 | + }; | ||
586 | + Chosen.prototype.choices_click = function(evt) { | ||
587 | + evt.preventDefault(); | ||
588 | + if (this.active_field && !($(evt.target).hasClass("search-choice" || $(evt.target).parents('.search-choice').first)) && !this.results_showing) { | ||
589 | + return this.results_show(); | ||
590 | + } | ||
591 | + }; | ||
592 | + Chosen.prototype.choice_build = function(item) { | ||
593 | + var choice_id, link; | ||
594 | + choice_id = this.container_id + "_c_" + item.array_index; | ||
595 | + this.choices += 1; | ||
596 | + this.search_container.before('<li class="search-choice" id="' + choice_id + '"><span>' + item.html + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + item.array_index + '"></a></li>'); | ||
597 | + link = $('#' + choice_id).find("a").first(); | ||
598 | + return link.click(__bind(function(evt) { | ||
599 | + return this.choice_destroy_link_click(evt); | ||
600 | + }, this)); | ||
601 | + }; | ||
602 | + Chosen.prototype.choice_destroy_link_click = function(evt) { | ||
603 | + evt.preventDefault(); | ||
604 | + if (!this.is_disabled) { | ||
605 | + this.pending_destroy_click = true; | ||
606 | + return this.choice_destroy($(evt.target)); | ||
607 | + } else { | ||
608 | + return evt.stopPropagation; | ||
609 | + } | ||
610 | + }; | ||
611 | + Chosen.prototype.choice_destroy = function(link) { | ||
612 | + this.choices -= 1; | ||
613 | + this.show_search_field_default(); | ||
614 | + if (this.is_multiple && this.choices > 0 && this.search_field.val().length < 1) { | ||
615 | + this.results_hide(); | ||
616 | + } | ||
617 | + this.result_deselect(link.attr("rel")); | ||
618 | + return link.parents('li').first().remove(); | ||
619 | + }; | ||
620 | + Chosen.prototype.results_reset = function(evt) { | ||
621 | + this.form_field.options[0].selected = true; | ||
622 | + this.selected_item.find("span").text(this.default_text); | ||
623 | + this.show_search_field_default(); | ||
624 | + $(evt.target).remove(); | ||
625 | + this.form_field_jq.trigger("change"); | ||
626 | + if (this.active_field) { | ||
627 | + return this.results_hide(); | ||
628 | + } | ||
629 | + }; | ||
630 | + Chosen.prototype.result_select = function(evt) { | ||
631 | + var high, high_id, item, position; | ||
632 | + if (this.result_highlight) { | ||
633 | + high = this.result_highlight; | ||
634 | + high_id = high.attr("id"); | ||
635 | + this.result_clear_highlight(); | ||
636 | + if (this.is_multiple) { | ||
637 | + this.result_deactivate(high); | ||
638 | + } else { | ||
639 | + this.search_results.find(".result-selected").removeClass("result-selected"); | ||
640 | + this.result_single_selected = high; | ||
641 | + } | ||
642 | + high.addClass("result-selected"); | ||
643 | + position = high_id.substr(high_id.lastIndexOf("_") + 1); | ||
644 | + item = this.results_data[position]; | ||
645 | + item.selected = true; | ||
646 | + this.form_field.options[item.options_index].selected = true; | ||
647 | + if (this.is_multiple) { | ||
648 | + this.choice_build(item); | ||
649 | + } else { | ||
650 | + this.selected_item.find("span").first().text(item.text); | ||
651 | + if (this.allow_single_deselect) { | ||
652 | + this.single_deselect_control_build(); | ||
653 | + } | ||
654 | + } | ||
655 | + if (!(evt.metaKey && this.is_multiple)) { | ||
656 | + this.results_hide(); | ||
657 | + } | ||
658 | + this.search_field.val(""); | ||
659 | + this.form_field_jq.trigger("change"); | ||
660 | + return this.search_field_scale(); | ||
661 | + } | ||
662 | + }; | ||
663 | + Chosen.prototype.result_activate = function(el) { | ||
664 | + return el.addClass("active-result"); | ||
665 | + }; | ||
666 | + Chosen.prototype.result_deactivate = function(el) { | ||
667 | + return el.removeClass("active-result"); | ||
668 | + }; | ||
669 | + Chosen.prototype.result_deselect = function(pos) { | ||
670 | + var result, result_data; | ||
671 | + result_data = this.results_data[pos]; | ||
672 | + result_data.selected = false; | ||
673 | + this.form_field.options[result_data.options_index].selected = false; | ||
674 | + result = $("#" + this.container_id + "_o_" + pos); | ||
675 | + result.removeClass("result-selected").addClass("active-result").show(); | ||
676 | + this.result_clear_highlight(); | ||
677 | + this.winnow_results(); | ||
678 | + this.form_field_jq.trigger("change"); | ||
679 | + return this.search_field_scale(); | ||
680 | + }; | ||
681 | + Chosen.prototype.single_deselect_control_build = function() { | ||
682 | + if (this.allow_single_deselect && this.selected_item.find("abbr").length < 1) { | ||
683 | + return this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>"); | ||
684 | + } | ||
685 | + }; | ||
686 | + Chosen.prototype.winnow_results = function() { | ||
687 | + var found, option, part, parts, regex, result_id, results, searchText, startTime, startpos, text, zregex, _i, _j, _len, _len2, _ref; | ||
688 | + startTime = new Date(); | ||
689 | + this.no_results_clear(); | ||
690 | + results = 0; | ||
691 | + searchText = this.search_field.val() === this.default_text ? "" : $('<div/>').text($.trim(this.search_field.val())).html(); | ||
692 | + regex = new RegExp('^' + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i'); | ||
693 | + zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i'); | ||
694 | + _ref = this.results_data; | ||
695 | + for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
696 | + option = _ref[_i]; | ||
697 | + if (!option.disabled && !option.empty) { | ||
698 | + if (option.group) { | ||
699 | + $('#' + option.dom_id).hide(); | ||
700 | + } else if (!(this.is_multiple && option.selected)) { | ||
701 | + found = false; | ||
702 | + result_id = option.dom_id; | ||
703 | + if (regex.test(option.html)) { | ||
704 | + found = true; | ||
705 | + results += 1; | ||
706 | + } else if (option.html.indexOf(" ") >= 0 || option.html.indexOf("[") === 0) { | ||
707 | + parts = option.html.replace(/\[|\]/g, "").split(" "); | ||
708 | + if (parts.length) { | ||
709 | + for (_j = 0, _len2 = parts.length; _j < _len2; _j++) { | ||
710 | + part = parts[_j]; | ||
711 | + if (regex.test(part)) { | ||
712 | + found = true; | ||
713 | + results += 1; | ||
714 | + } | ||
715 | + } | ||
716 | + } | ||
717 | + } | ||
718 | + if (found) { | ||
719 | + if (searchText.length) { | ||
720 | + startpos = option.html.search(zregex); | ||
721 | + text = option.html.substr(0, startpos + searchText.length) + '</em>' + option.html.substr(startpos + searchText.length); | ||
722 | + text = text.substr(0, startpos) + '<em>' + text.substr(startpos); | ||
723 | + } else { | ||
724 | + text = option.html; | ||
725 | + } | ||
726 | + if ($("#" + result_id).html !== text) { | ||
727 | + $("#" + result_id).html(text); | ||
728 | + } | ||
729 | + this.result_activate($("#" + result_id)); | ||
730 | + if (option.group_array_index != null) { | ||
731 | + $("#" + this.results_data[option.group_array_index].dom_id).show(); | ||
732 | + } | ||
733 | + } else { | ||
734 | + if (this.result_highlight && result_id === this.result_highlight.attr('id')) { | ||
735 | + this.result_clear_highlight(); | ||
736 | + } | ||
737 | + this.result_deactivate($("#" + result_id)); | ||
738 | + } | ||
739 | + } | ||
740 | + } | ||
741 | + } | ||
742 | + if (results < 1 && searchText.length) { | ||
743 | + return this.no_results(searchText); | ||
744 | + } else { | ||
745 | + return this.winnow_results_set_highlight(); | ||
746 | + } | ||
747 | + }; | ||
748 | + Chosen.prototype.winnow_results_clear = function() { | ||
749 | + var li, lis, _i, _len, _results; | ||
750 | + this.search_field.val(""); | ||
751 | + lis = this.search_results.find("li"); | ||
752 | + _results = []; | ||
753 | + for (_i = 0, _len = lis.length; _i < _len; _i++) { | ||
754 | + li = lis[_i]; | ||
755 | + li = $(li); | ||
756 | + _results.push(li.hasClass("group-result") ? li.show() : !this.is_multiple || !li.hasClass("result-selected") ? this.result_activate(li) : void 0); | ||
757 | + } | ||
758 | + return _results; | ||
759 | + }; | ||
760 | + Chosen.prototype.winnow_results_set_highlight = function() { | ||
761 | + var do_high, selected_results; | ||
762 | + if (!this.result_highlight) { | ||
763 | + selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : []; | ||
764 | + do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first(); | ||
765 | + if (do_high != null) { | ||
766 | + return this.result_do_highlight(do_high); | ||
767 | + } | ||
768 | + } | ||
769 | + }; | ||
770 | + Chosen.prototype.no_results = function(terms) { | ||
771 | + var no_results_html; | ||
772 | + no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>'); | ||
773 | + no_results_html.find("span").first().html(terms); | ||
774 | + return this.search_results.append(no_results_html); | ||
775 | + }; | ||
776 | + Chosen.prototype.no_results_clear = function() { | ||
777 | + return this.search_results.find(".no-results").remove(); | ||
778 | + }; | ||
779 | + Chosen.prototype.keydown_arrow = function() { | ||
780 | + var first_active, next_sib; | ||
781 | + if (!this.result_highlight) { | ||
782 | + first_active = this.search_results.find("li.active-result").first(); | ||
783 | + if (first_active) { | ||
784 | + this.result_do_highlight($(first_active)); | ||
785 | + } | ||
786 | + } else if (this.results_showing) { | ||
787 | + next_sib = this.result_highlight.nextAll("li.active-result").first(); | ||
788 | + if (next_sib) { | ||
789 | + this.result_do_highlight(next_sib); | ||
790 | + } | ||
791 | + } | ||
792 | + if (!this.results_showing) { | ||
793 | + return this.results_show(); | ||
794 | + } | ||
795 | + }; | ||
796 | + Chosen.prototype.keyup_arrow = function() { | ||
797 | + var prev_sibs; | ||
798 | + if (!this.results_showing && !this.is_multiple) { | ||
799 | + return this.results_show(); | ||
800 | + } else if (this.result_highlight) { | ||
801 | + prev_sibs = this.result_highlight.prevAll("li.active-result"); | ||
802 | + if (prev_sibs.length) { | ||
803 | + return this.result_do_highlight(prev_sibs.first()); | ||
804 | + } else { | ||
805 | + if (this.choices > 0) { | ||
806 | + this.results_hide(); | ||
807 | + } | ||
808 | + return this.result_clear_highlight(); | ||
809 | + } | ||
810 | + } | ||
811 | + }; | ||
812 | + Chosen.prototype.keydown_backstroke = function() { | ||
813 | + if (this.pending_backstroke) { | ||
814 | + this.choice_destroy(this.pending_backstroke.find("a").first()); | ||
815 | + return this.clear_backstroke(); | ||
816 | + } else { | ||
817 | + this.pending_backstroke = this.search_container.siblings("li.search-choice").last(); | ||
818 | + return this.pending_backstroke.addClass("search-choice-focus"); | ||
819 | + } | ||
820 | + }; | ||
821 | + Chosen.prototype.clear_backstroke = function() { | ||
822 | + if (this.pending_backstroke) { | ||
823 | + this.pending_backstroke.removeClass("search-choice-focus"); | ||
824 | + } | ||
825 | + return this.pending_backstroke = null; | ||
826 | + }; | ||
827 | + Chosen.prototype.keydown_checker = function(evt) { | ||
828 | + var stroke, _ref; | ||
829 | + stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; | ||
830 | + this.search_field_scale(); | ||
831 | + if (stroke !== 8 && this.pending_backstroke) { | ||
832 | + this.clear_backstroke(); | ||
833 | + } | ||
834 | + switch (stroke) { | ||
835 | + case 8: | ||
836 | + this.backstroke_length = this.search_field.val().length; | ||
837 | + break; | ||
838 | + case 9: | ||
839 | + if (this.results_showing && !this.is_multiple) { | ||
840 | + this.result_select(evt); | ||
841 | + } | ||
842 | + this.mouse_on_container = false; | ||
843 | + break; | ||
844 | + case 13: | ||
845 | + evt.preventDefault(); | ||
846 | + break; | ||
847 | + case 38: | ||
848 | + evt.preventDefault(); | ||
849 | + this.keyup_arrow(); | ||
850 | + break; | ||
851 | + case 40: | ||
852 | + this.keydown_arrow(); | ||
853 | + break; | ||
854 | + } | ||
855 | + }; | ||
856 | + Chosen.prototype.search_field_scale = function() { | ||
857 | + var dd_top, div, h, style, style_block, styles, w, _i, _len; | ||
858 | + if (this.is_multiple) { | ||
859 | + h = 0; | ||
860 | + w = 0; | ||
861 | + style_block = "position:absolute; left: -1000px; top: -1000px; display:none;"; | ||
862 | + styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing']; | ||
863 | + for (_i = 0, _len = styles.length; _i < _len; _i++) { | ||
864 | + style = styles[_i]; | ||
865 | + style_block += style + ":" + this.search_field.css(style) + ";"; | ||
866 | + } | ||
867 | + div = $('<div />', { | ||
868 | + 'style': style_block | ||
869 | + }); | ||
870 | + div.text(this.search_field.val()); | ||
871 | + $('body').append(div); | ||
872 | + w = div.width() + 25; | ||
873 | + div.remove(); | ||
874 | + if (w > this.f_width - 10) { | ||
875 | + w = this.f_width - 10; | ||
876 | + } | ||
877 | + this.search_field.css({ | ||
878 | + 'width': w + 'px' | ||
879 | + }); | ||
880 | + dd_top = this.container.height(); | ||
881 | + return this.dropdown.css({ | ||
882 | + "top": dd_top + "px" | ||
883 | + }); | ||
884 | + } | ||
885 | + }; | ||
886 | + Chosen.prototype.generate_random_id = function() { | ||
887 | + var string; | ||
888 | + string = "sel" + this.generate_random_char() + this.generate_random_char() + this.generate_random_char(); | ||
889 | + while ($("#" + string).length > 0) { | ||
890 | + string += this.generate_random_char(); | ||
891 | + } | ||
892 | + return string; | ||
893 | + }; | ||
894 | + return Chosen; | ||
895 | + })(); | ||
896 | + get_side_border_padding = function(elmt) { | ||
897 | + var side_border_padding; | ||
898 | + return side_border_padding = elmt.outerWidth() - elmt.width(); | ||
899 | + }; | ||
900 | + root.get_side_border_padding = get_side_border_padding; | ||
901 | +}).call(this); |
@@ -0,0 +1,4 @@ | @@ -0,0 +1,4 @@ | ||
1 | +/* Modernizr 2.0.6 | MIT & BSD | ||
2 | + * Contains: All core tests, html5shiv, yepnope, respond.js. Get your own custom build at www.modernizr.com/download/ | ||
3 | + */ | ||
4 | +;window.Modernizr=function(a,b,c){function I(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=a[b]in l;return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function G(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return F(d,b)}function F(a,b){for(var d in a)if(k[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function E(a,b){return!!~(""+a).indexOf(b)}function D(a,b){return typeof a===b}function C(a,b){return B(o.join(a+";")+(b||""))}function B(a){k.cssText=a}var d="2.0.6",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v=function(a,c,d,e){var f,h,j,k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:i+(d+1),k.appendChild(j);f=["­","<style>",a,"</style>"].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},w=function(b){if(a.matchMedia)return matchMedia(b).matches;var c;v("@media "+b+" { #"+i+" { position: absolute; } }",function(b){c=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position=="absolute"});return c},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y,z={}.hasOwnProperty,A;!D(z,c)&&!D(z.call,c)?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],c)};var H=function(c,d){var f=c.join(""),g=d.length;v(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||j.touch.offsetTop===9,e.csstransforms3d=j.csstransforms3d.offsetLeft===9,e.generatedcontent=j.generatedcontent.offsetHeight>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",o.join("touch-enabled),("),i,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",o.join("transform-3d),("),i,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',m,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!D(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return e.touch},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b].toLowerCase()+"IndexedDB"])return!0;return!!a.indexedDB},r.hashchange=function(){return x("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b]+"WebSocket"])return!0;return"WebSocket"in a},r.rgba=function(){B("background-color:rgba(150,255,150,.5)");return E(k.backgroundColor,"rgba")},r.hsla=function(){B("background-color:hsla(120,40%,100%,.5)");return E(k.backgroundColor,"rgba")||E(k.backgroundColor,"hsla")},r.multiplebgs=function(){B("background:url(https://),url(https://),red url(https://)");return/(url\s*\(.*?){3}/.test(k.background)},r.backgroundsize=function(){return G("backgroundSize")},r.borderimage=function(){return G("borderImage")},r.borderradius=function(){return G("borderRadius")},r.boxshadow=function(){return G("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){C("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return G("animationName")},r.csscolumns=function(){return G("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";B((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return E(k.backgroundImage,"gradient")},r.cssreflections=function(){return G("boxReflect")},r.csstransforms=function(){return!!F(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!F(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d);return a},r.csstransitions=function(){return G("transitionProperty")},r.fontface=function(){return e.fontface},r.generatedcontent=function(){return e.generatedcontent},r.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}}catch(e){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}catch(d){}return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webworkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var J in r)A(r,J)&&(y=J.toLowerCase(),e[y]=r[J](),u.push((e[y]?"":"no-")+y));e.input||I(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return;b=typeof b=="boolean"?b:!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},B(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b<g)a.createElement(f[b])}a.iepp=a.iepp||{};var d=a.iepp,e=d.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",f=e.split("|"),g=f.length,h=new RegExp("(^|\\s)("+e+")","gi"),i=new RegExp("<(/*)("+e+")","gi"),j=/^\s*[\{\}]\s*$/,k=new RegExp("(^|[^\\n]*?\\s)("+e+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),l=b.createDocumentFragment(),m=b.documentElement,n=m.firstChild,o=b.createElement("body"),p=b.createElement("style"),q=/print|all/,r;d.getCSS=function(a,b){if(a+""===c)return"";var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,q.test(b)&&h.push(d.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},d.parseCSS=function(a){var b=[],c;while((c=k.exec(a))!=null)b.push(((j.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(h,"$1.iepp_$2")+c[4]);return b.join("\n")},d.writeHTML=function(){var a=-1;r=r||b.body;while(++a<g){var c=b.getElementsByTagName(f[a]),d=c.length,e=-1;while(++e<d)c[e].className.indexOf("iepp_")<0&&(c[e].className+=" iepp_"+f[a])}l.appendChild(r),m.appendChild(o),o.className=r.className,o.id=r.id,o.innerHTML=r.innerHTML.replace(i,"<$1font")},d._beforePrint=function(){p.styleSheet.cssText=d.parseCSS(d.getCSS(b.styleSheets,"all")),d.writeHTML()},d.restoreHTML=function(){o.innerHTML="",m.removeChild(o),m.appendChild(r)},d._afterPrint=function(){d.restoreHTML(),p.styleSheet.cssText=""},s(b),s(l);d.disablePP||(n.insertBefore(p,n.firstChild),p.media="print",p.className="iepp-printshim",a.attachEvent("onbeforeprint",d._beforePrint),a.attachEvent("onafterprint",d._afterPrint))}(a,b),e._version=d,e._prefixes=o,e._domPrefixes=p,e.mq=w,e.hasEvent=x,e.testProp=function(a){return F([a])},e.testAllProps=G,e.testStyles=v,e.prefixed=function(a){return G(a,"pfx")},g.className=g.className.replace(/\bno-js\b/,"")+(f?" js "+u.join(" "):"");return e}(this,this.document),function(a,b){function u(){r(!0)}a.respond={},respond.update=function(){},respond.mediaQueriesSupported=b;if(!b){var c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=j.getElementsByTagName("link"),l=[],m=function(){var b=k,c=b.length,d=0,e,f,g,i;for(;d<c;d++)e=b[d],f=e.href,g=e.media,i=e.rel&&e.rel.toLowerCase()==="stylesheet",!!f&&i&&!h[f]&&(!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(f)||f.replace(RegExp.$1,"").split("/")[0]===a.location.host?l.push({href:f,media:g}):h[f]=!0);n()},n=function(){if(l.length){var a=l.shift();s(a.href,function(b){o(b,a.href,a.media),h[a.href]=!0,n()})}},o=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),g=d&&d.length||0,b=b.substring(0,b.lastIndexOf("/")),h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c,j=0,k,l,m,n,o;b.length&&(b+="/"),i&&(g=1);for(;j<g;j++){k=0,i?(l=c,f.push(h(a))):(l=d[j].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),n=l.split(","),o=n.length;for(;k<o;k++)m=n[k],e.push({media:m.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:f.length-1,minw:m.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:m.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}r()},p,q,r=function(a){var b="clientWidth",h=d[b],l=c.compatMode==="CSS1Compat"&&h||c.body[b]||h,m={},n=c.createDocumentFragment(),o=k[k.length-1],s=(new Date).getTime();if(a&&p&&s-p<i)clearTimeout(q),q=setTimeout(r,i);else{p=s;for(var t in e){var u=e[t];if(!u.minw&&!u.maxw||(!u.minw||u.minw&&l>=u.minw)&&(!u.maxw||u.maxw&&l<=u.maxw))m[u.media]||(m[u.media]=[]),m[u.media].push(f[u.rules])}for(var t in g)g[t]&&g[t].parentNode===j&&j.removeChild(g[t]);for(var t in m){var v=c.createElement("style"),w=m[t].join("\n");v.type="text/css",v.media=t,v.styleSheet?v.styleSheet.cssText=w:v.appendChild(c.createTextNode(w)),n.appendChild(v),g.push(v)}j.insertBefore(n,o.nextSibling)}},s=function(a,b){var c=t();if(!!c){c.open("GET",a,!0),c.onreadystatechange=function(){c.readyState==4&&(c.status==200||c.status==304)&&b(c.responseText)};if(c.readyState==4)return;c.send()}},t=function(){var a=!1,b=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest}],c=b.length;while(c--){try{a=b[c]()}catch(d){continue}break}return function(){return a}}();m(),respond.update=m,a.addEventListener?a.addEventListener("resize",u,!1):a.attachEvent&&a.attachEvent("onresize",u)}}(this,Modernizr.mq("only all")),function(a,b,c){function k(a){return!a||a=="loaded"||a=="complete"}function j(){var a=1,b=-1;while(p.length- ++b)if(p[b].s&&!(a=p[b].r))break;a&&g()}function i(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&k(c.readyState)&&(d=1,j(),c.onload=c.onreadystatechange=null)},m(function(){d||(d=1,j())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function h(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css";if(!a.e&&(w||r)){var e=function(a){m(function(){if(!d)try{a.sheet.cssRules.length?(d=1,j()):e(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,m(function(){j()},0)):e(a)}},0)};e(c)}else c.onload=function(){d||(d=1,m(function(){j()},0))},a.e&&c.onload();m(function(){d||(d=1,j())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function g(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?h(a):i(a)},0):(a(),j()):q=0}function f(a,c,d,e,f,h){function i(){!o&&k(l.readyState)&&(r.r=o=1,!q&&j(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:d,s:c,e:h};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=d),l.onload=l.onreadystatechange=i,a=="img"?l.onerror=i:a=="script"&&(l.onerror=function(){r.e=r.r=1,g()}),p.splice(e,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,j())},H.errorTimeout)}function e(a,b,c){var d=b=="c"?z:y;q=0,b=b||"j",C(a)?f(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&g());return this}function d(){var a=H;a.loader={load:e,i:0};return a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return Object(a)===a},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function f(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=F[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=E[h](f);return f}function e(a,b,e,g,h){var i=f(a),j=i.autoCallback;if(!i.bypass){b&&(b=D(b)?b:b[a]||b[g]||b[a.split("/").pop().split("?")[0]]);if(i.instead)return i.instead(a,b,e,g,h);e.load(i.url,i.forceCSS||!i.forceJS&&/css$/.test(i.url)?"c":c,i.noexec),(D(b)||D(j))&&e.load(function(){d(),b&&b(i.origUrl,h,g),j&&j(i.origUrl,h,g)})}}function b(a,b){function c(a){if(C(a))e(a,h,b,0,d);else if(B(a))for(i in a)a.hasOwnProperty(i)&&e(a[i],h,b,i,d)}var d=!!a.test,f=d?a.yep:a.nope,g=a.load||a.both,h=a.callback,i;c(f),c(g),a.complete&&b.load(a.complete)}var g,h,i=this.yepnope.loader;if(C(a))e(a,0,i,0);else if(A(a))for(g=0;g<a.length;g++)h=a[g],C(h)?e(h,0,i,0):A(h)?H(h):B(h)&&b(h,i);else B(a)&&b(a,i)},H.addPrefix=function(a,b){F[a]=b},H.addFilter=function(a){E.push(a)},H.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",G=function(){b.removeEventListener("DOMContentLoaded",G,0),b.readyState="complete"},0)),a.yepnope=d()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))}; | ||
0 | \ No newline at end of file | 5 | \ No newline at end of file |
@@ -0,0 +1,367 @@ | @@ -0,0 +1,367 @@ | ||
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(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('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('chosen-sprite.png') no-repeat 100% -22px; | ||
111 | + background: url('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('chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
113 | + background: url('chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
114 | + background: url('chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%); | ||
115 | + background: url('chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
116 | + background: url('chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
117 | + margin: 1px 0; | ||
118 | + padding: 4px 20px 4px 5px; | ||
119 | + outline: 0; | ||
120 | + border: 1px solid #aaa; | ||
121 | + font-family: sans-serif; | ||
122 | + font-size: 1em; | ||
123 | +} | ||
124 | +.chzn-container-single .chzn-drop { | ||
125 | + -webkit-border-radius: 0 0 4px 4px; | ||
126 | + -moz-border-radius : 0 0 4px 4px; | ||
127 | + border-radius : 0 0 4px 4px; | ||
128 | + -moz-background-clip : padding; | ||
129 | + -webkit-background-clip: padding-box; | ||
130 | + background-clip : padding-box; | ||
131 | +} | ||
132 | +/* @end */ | ||
133 | + | ||
134 | +.chzn-container-single-nosearch .chzn-search input { | ||
135 | + position: absolute; | ||
136 | + left: -9000px; | ||
137 | +} | ||
138 | + | ||
139 | +/* @group Multi Chosen */ | ||
140 | +.chzn-container-multi .chzn-choices { | ||
141 | + background-color: #fff; | ||
142 | + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); | ||
143 | + background-image: -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
144 | + background-image: -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
145 | + background-image: -o-linear-gradient(bottom, white 85%, #eeeeee 99%); | ||
146 | + background-image: -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
147 | + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 ); | ||
148 | + background-image: linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
149 | + border: 1px solid #aaa; | ||
150 | + margin: 0; | ||
151 | + padding: 0; | ||
152 | + cursor: text; | ||
153 | + overflow: hidden; | ||
154 | + height: auto !important; | ||
155 | + height: 1%; | ||
156 | + position: relative; | ||
157 | +} | ||
158 | +.chzn-container-multi .chzn-choices li { | ||
159 | + float: left; | ||
160 | + list-style: none; | ||
161 | +} | ||
162 | +.chzn-container-multi .chzn-choices .search-field { | ||
163 | + white-space: nowrap; | ||
164 | + margin: 0; | ||
165 | + padding: 0; | ||
166 | +} | ||
167 | +.chzn-container-multi .chzn-choices .search-field input { | ||
168 | + color: #666; | ||
169 | + background: transparent !important; | ||
170 | + border: 0 !important; | ||
171 | + padding: 5px; | ||
172 | + margin: 1px 0; | ||
173 | + outline: 0; | ||
174 | + -webkit-box-shadow: none; | ||
175 | + -moz-box-shadow : none; | ||
176 | + -o-box-shadow : none; | ||
177 | + box-shadow : none; | ||
178 | +} | ||
179 | +.chzn-container-multi .chzn-choices .search-field .default { | ||
180 | + color: #999; | ||
181 | +} | ||
182 | +.chzn-container-multi .chzn-choices .search-choice { | ||
183 | + -webkit-border-radius: 3px; | ||
184 | + -moz-border-radius : 3px; | ||
185 | + border-radius : 3px; | ||
186 | + -moz-background-clip : padding; | ||
187 | + -webkit-background-clip: padding-box; | ||
188 | + background-clip : padding-box; | ||
189 | + background-color: #e4e4e4; | ||
190 | + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #e4e4e4), color-stop(0.7, #eeeeee)); | ||
191 | + background-image: -webkit-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%); | ||
192 | + background-image: -moz-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%); | ||
193 | + background-image: -o-linear-gradient(bottom, #e4e4e4 0%, #eeeeee 70%); | ||
194 | + background-image: -ms-linear-gradient(top, #e4e4e4 0%,#eeeeee 70%); | ||
195 | + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e4e4e4', endColorstr='#eeeeee',GradientType=0 ); | ||
196 | + background-image: linear-gradient(top, #e4e4e4 0%,#eeeeee 70%); | ||
197 | + color: #333; | ||
198 | + border: 1px solid #b4b4b4; | ||
199 | + line-height: 13px; | ||
200 | + padding: 3px 19px 3px 6px; | ||
201 | + margin: 3px 0 3px 5px; | ||
202 | + position: relative; | ||
203 | +} | ||
204 | +.chzn-container-multi .chzn-choices .search-choice span { | ||
205 | + cursor: default; | ||
206 | +} | ||
207 | +.chzn-container-multi .chzn-choices .search-choice-focus { | ||
208 | + background: #d4d4d4; | ||
209 | +} | ||
210 | +.chzn-container-multi .chzn-choices .search-choice .search-choice-close { | ||
211 | + display: block; | ||
212 | + position: absolute; | ||
213 | + right: 3px; | ||
214 | + top: 4px; | ||
215 | + width: 12px; | ||
216 | + height: 13px; | ||
217 | + font-size: 1px; | ||
218 | + background: url(chosen-sprite.png) right top no-repeat; | ||
219 | +} | ||
220 | +.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover { | ||
221 | + background-position: right -11px; | ||
222 | +} | ||
223 | +.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close { | ||
224 | + background-position: right -11px; | ||
225 | +} | ||
226 | +/* @end */ | ||
227 | + | ||
228 | +/* @group Results */ | ||
229 | +.chzn-container .chzn-results { | ||
230 | + margin: 0 4px 4px 0; | ||
231 | + max-height: 190px; | ||
232 | + padding: 0 0 0 4px; | ||
233 | + position: relative; | ||
234 | + overflow-x: hidden; | ||
235 | + overflow-y: auto; | ||
236 | +} | ||
237 | +.chzn-container-multi .chzn-results { | ||
238 | + margin: -1px 0 0; | ||
239 | + padding: 0; | ||
240 | +} | ||
241 | +.chzn-container .chzn-results li { | ||
242 | + display: none; | ||
243 | + line-height: 80%; | ||
244 | + padding: 7px 7px 8px; | ||
245 | + margin: 0; | ||
246 | + list-style: none; | ||
247 | +} | ||
248 | +.chzn-container .chzn-results .active-result { | ||
249 | + cursor: pointer; | ||
250 | + display: list-item; | ||
251 | +} | ||
252 | +.chzn-container .chzn-results .highlighted { | ||
253 | + background: #3875d7; | ||
254 | + color: #fff; | ||
255 | +} | ||
256 | +.chzn-container .chzn-results li em { | ||
257 | + background: #feffde; | ||
258 | + font-style: normal; | ||
259 | +} | ||
260 | +.chzn-container .chzn-results .highlighted em { | ||
261 | + background: transparent; | ||
262 | +} | ||
263 | +.chzn-container .chzn-results .no-results { | ||
264 | + background: #f4f4f4; | ||
265 | + display: list-item; | ||
266 | +} | ||
267 | +.chzn-container .chzn-results .group-result { | ||
268 | + cursor: default; | ||
269 | + color: #999; | ||
270 | + font-weight: bold; | ||
271 | +} | ||
272 | +.chzn-container .chzn-results .group-option { | ||
273 | + padding-left: 20px; | ||
274 | +} | ||
275 | +.chzn-container-multi .chzn-drop .result-selected { | ||
276 | + display: none; | ||
277 | +} | ||
278 | +/* @end */ | ||
279 | + | ||
280 | +/* @group Active */ | ||
281 | +.chzn-container-active .chzn-single { | ||
282 | + -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3); | ||
283 | + -moz-box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
284 | + -o-box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
285 | + box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
286 | + border: 1px solid #5897fb; | ||
287 | +} | ||
288 | +.chzn-container-active .chzn-single-with-drop { | ||
289 | + border: 1px solid #aaa; | ||
290 | + -webkit-box-shadow: 0 1px 0 #fff inset; | ||
291 | + -moz-box-shadow : 0 1px 0 #fff inset; | ||
292 | + -o-box-shadow : 0 1px 0 #fff inset; | ||
293 | + box-shadow : 0 1px 0 #fff inset; | ||
294 | + background-color: #eee; | ||
295 | + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee)); | ||
296 | + background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%); | ||
297 | + background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%); | ||
298 | + background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%); | ||
299 | + background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%); | ||
300 | + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 ); | ||
301 | + background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%); | ||
302 | + -webkit-border-bottom-left-radius : 0; | ||
303 | + -webkit-border-bottom-right-radius: 0; | ||
304 | + -moz-border-radius-bottomleft : 0; | ||
305 | + -moz-border-radius-bottomright: 0; | ||
306 | + border-bottom-left-radius : 0; | ||
307 | + border-bottom-right-radius: 0; | ||
308 | +} | ||
309 | +.chzn-container-active .chzn-single-with-drop div { | ||
310 | + background: transparent; | ||
311 | + border-left: none; | ||
312 | +} | ||
313 | +.chzn-container-active .chzn-single-with-drop div b { | ||
314 | + background-position: -18px 1px; | ||
315 | +} | ||
316 | +.chzn-container-active .chzn-choices { | ||
317 | + -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3); | ||
318 | + -moz-box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
319 | + -o-box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
320 | + box-shadow : 0 0 5px rgba(0,0,0,.3); | ||
321 | + border: 1px solid #5897fb; | ||
322 | +} | ||
323 | +.chzn-container-active .chzn-choices .search-field input { | ||
324 | + color: #111 !important; | ||
325 | +} | ||
326 | +/* @end */ | ||
327 | + | ||
328 | +/* @group Disabled Support */ | ||
329 | +.chzn-disabled { | ||
330 | + cursor: default; | ||
331 | + opacity:0.5 !important; | ||
332 | +} | ||
333 | +.chzn-disabled .chzn-single { | ||
334 | + cursor: default; | ||
335 | +} | ||
336 | +.chzn-disabled .chzn-choices .search-choice .search-choice-close { | ||
337 | + cursor: default; | ||
338 | +} | ||
339 | + | ||
340 | +/* @group Right to Left */ | ||
341 | +.chzn-rtl { direction:rtl;text-align: right; } | ||
342 | +.chzn-rtl .chzn-single { padding-left: 0; padding-right: 8px; } | ||
343 | +.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; } | ||
344 | +.chzn-rtl .chzn-single div { | ||
345 | + left: 0; right: auto; | ||
346 | + border-left: none; border-right: 1px solid #aaaaaa; | ||
347 | + -webkit-border-radius: 4px 0 0 4px; | ||
348 | + -moz-border-radius : 4px 0 0 4px; | ||
349 | + border-radius : 4px 0 0 4px; | ||
350 | +} | ||
351 | +.chzn-rtl .chzn-choices li { float: right; } | ||
352 | +.chzn-rtl .chzn-choices .search-choice { padding: 3px 6px 3px 19px; margin: 3px 5px 3px 0; } | ||
353 | +.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 5px; right: auto; background-position: right top;} | ||
354 | +.chzn-rtl.chzn-container-single .chzn-results { margin-left: 4px; margin-right: 0; padding-left: 0; padding-right: 4px; } | ||
355 | +.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 20px; } | ||
356 | +.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; } | ||
357 | +.chzn-rtl .chzn-search input { | ||
358 | + background: url('chosen-sprite.png') no-repeat -38px -22px, #ffffff; | ||
359 | + background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); | ||
360 | + background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
361 | + background: url('chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); | ||
362 | + background: url('chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%); | ||
363 | + background: url('chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
364 | + background: url('chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%); | ||
365 | + padding: 4px 5px 4px 20px; | ||
366 | +} | ||
367 | +/* @end */ |