clean up styles

This commit is contained in:
Sven Fuchs 2012-09-18 10:57:35 +02:00
parent 66e2c07a80
commit f2c72926bd
42 changed files with 2793 additions and 1591 deletions

View File

@ -19,7 +19,6 @@ input 'assets/javascripts' do
vendor/ember-data.js vendor/ember-data.js
vendor/ansiparse.js vendor/ansiparse.js
vendor/i18n.js vendor/i18n.js
vendor/facebox.js
vendor/pusher.js vendor/pusher.js
vendor/jquery.cookie.js vendor/jquery.cookie.js
vendor/jquery.timeago.js vendor/jquery.timeago.js

View File

@ -38,10 +38,10 @@ Travis.reopen
@setCurrentUser(JSON.parse($.cookie('user'))) @setCurrentUser(JSON.parse($.cookie('user')))
signIn: -> signIn: ->
user = Travis.Auth.signIn() # user = Travis.Auth.signIn()
console.log(user) # console.log(user)
# @setCurrentUser(@USER_PAYLOAD) @setCurrentUser(@USER_PAYLOAD)
# @render.apply(this, @get('returnTo') || ['home', 'index']) @render.apply(this, @get('returnTo') || ['home', 'index'])
signOut: -> signOut: ->
@setCurrentUser() @setCurrentUser()

View File

@ -8,7 +8,7 @@
<table id="allowed_failure_jobs" class="list"> <table id="allowed_failure_jobs" class="list">
<caption> <caption>
{{t jobs.allowed_failures}} {{t jobs.allowed_failures}}
<a title="What's this?" class="help" {{action toggleHelp}}></a> <a title="What's this?" class="help" name="help-allowed_failures" {{action popup}}></a>
</caption> </caption>
{{/if}} {{/if}}
<thead> <thead>
@ -32,23 +32,23 @@
</tbody> </tbody>
</table> </table>
{{#unless required}} {{#unless view.required}}
<div id="allow_failure_help" class="context_help"> <div id="help-allowed_failures" class="popup">
<div class="context_help_caption">{{t "jobs.allowed_failures"}}</div> <h4>{{t "jobs.allowed_failures"}}</h4>
<div class="context_help_body"> <p>
<p> Allowed Failures are items in your build matrix that are allowed to
Allowed Failures are items in your build matrix that are allowed to fail without causing the entire build to be shown as failed.
fail without causing the entire build to be shown as failed. This lets you add </p>
in experimental and preparatory builds to test against versions or <p>
configurations that you are not ready to officially support. You can define allowed failures in the build matrix as follows:
</p> </p>
<p> <pre>matrix:
You can define allowed failures in the build matrix as follows:
</p>
<pre> matrix:
allow_failures: allow_failures:
- rvm: ruby-head </pre> - rvm: ruby-head</pre>
</div> <p>
This lets you add in experimental and preparatory builds to test against versions or
configurations that you are not ready to officially support.
</p>
</div> </div>
{{/unless}} {{/unless}}
{{/if}} {{/if}}

View File

@ -1,7 +1,7 @@
{{view.logSubscriber}} {{view.logSubscriber}}
{{#if log.isLoaded}} {{#if log.isLoaded}}
<pre id="log"><a href="#" id="tail" {{action toggleTailing}}> <pre id="log" class="ansi"><a href="#" id="tail" {{action toggleTailing}}>
<span class="status"></span> <span class="status"></span>
<label>Follow logs</label> <label>Follow logs</label>
</a>{{{formatLog log.body}}}</pre> </a>{{{formatLog log.body}}}</pre>

View File

@ -11,11 +11,6 @@
{{outlet queues}} {{outlet queues}}
{{outlet links}} {{outlet links}}
<div id="alpha_warning" class="box">
<h4>{{t layouts.about.alpha}}</h4>
<p>{{{t layouts.about.messages.alpha}}}</p>
</div>
<div id="about" class="box"> <div id="about" class="box">
<h4>{{t layouts.about.join}}</h4> <h4>{{t layouts.about.join}}</h4>
<ul> <ul>

View File

@ -5,6 +5,9 @@ require 'ext/ember/namespace'
route: (event) -> route: (event) ->
Travis.app.routes.route(event) Travis.app.routes.route(event)
popup: (event) ->
$("##{event.target.name}").remove().appendTo('body').toggle()
@Travis.reopen @Travis.reopen
HomeLayout: Travis.View.extend(templateName: 'layouts/home') HomeLayout: Travis.View.extend(templateName: 'layouts/home')
ProfileLayout: Travis.View.extend(templateName: 'layouts/profile') ProfileLayout: Travis.View.extend(templateName: 'layouts/profile')

View File

@ -3,9 +3,6 @@
templateName: 'jobs/list' templateName: 'jobs/list'
buildBinding: 'controller.build' buildBinding: 'controller.build'
toggleHelp: ->
$.facebox(div: '#allow_failure_help')
JobsItemView: Travis.View.extend JobsItemView: Travis.View.extend
tagName: 'tr' tagName: 'tr'
classNameBindings: ['color'] classNameBindings: ['color']

View File

@ -1,310 +0,0 @@
/*
* Facebox (for jQuery)
* version: 1.2 (05/05/2008)
* @requires jQuery v1.2 or later
*
* Examples at http://famspam.com/facebox/
*
* Licensed under the MIT:
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2007, 2008 Chris Wanstrath [ chris@ozmm.org ]
*
* Usage:
*
* jQuery(document).ready(function() {
* jQuery('a[rel*=facebox]').facebox()
* })
*
* <a href="#terms" rel="facebox">Terms</a>
* Loads the #terms div in the box
*
* <a href="terms.html" rel="facebox">Terms</a>
* Loads the terms.html page in the box
*
* <a href="terms.png" rel="facebox">Terms</a>
* Loads the terms.png image in the box
*
*
* You can also use it programmatically:
*
* jQuery.facebox('some html')
* jQuery.facebox('some html', 'my-groovy-style')
*
* The above will open a facebox with "some html" as the content.
*
* jQuery.facebox(function($) {
* $.get('blah.html', function(data) { $.facebox(data) })
* })
*
* The above will show a loading screen before the passed function is called,
* allowing for a better ajaxy experience.
*
* The facebox function can also display an ajax page, an image, or the contents of a div:
*
* jQuery.facebox({ ajax: 'remote.html' })
* jQuery.facebox({ ajax: 'remote.html' }, 'my-groovy-style')
* jQuery.facebox({ image: 'stairs.jpg' })
* jQuery.facebox({ image: 'stairs.jpg' }, 'my-groovy-style')
* jQuery.facebox({ div: '#box' })
* jQuery.facebox({ div: '#box' }, 'my-groovy-style')
*
* Want to close the facebox? Trigger the 'close.facebox' document event:
*
* jQuery(document).trigger('close.facebox')
*
* Facebox also has a bunch of other hooks:
*
* loading.facebox
* beforeReveal.facebox
* reveal.facebox (aliased as 'afterReveal.facebox')
* init.facebox
* afterClose.facebox
*
* Simply bind a function to any of these hooks:
*
* $(document).bind('reveal.facebox', function() { ...stuff to do after the facebox and contents are revealed... })
*
*/
(function($) {
$.facebox = function(data, klass) {
$.facebox.loading()
if (data.ajax) fillFaceboxFromAjax(data.ajax, klass)
else if (data.image) fillFaceboxFromImage(data.image, klass)
else if (data.div) fillFaceboxFromHref(data.div, klass)
else if ($.isFunction(data)) data.call($)
else $.facebox.reveal(data, klass)
}
/*
* Public, $.facebox methods
*/
$.extend($.facebox, {
settings: {
opacity : 0.2,
overlay : true,
loadingImage : '/facebox/loading.gif',
closeImage : '/facebox/closelabel.png',
imageTypes : [ 'png', 'jpg', 'jpeg', 'gif' ],
faceboxHtml : '\
<div id="facebox" style="display:none;"> \
<div class="popup"> \
<div class="content"> \
</div> \
<a href="#" class="close"><img src="/facebox/closelabel.png" title="close" class="close_image" /></a> \
</div> \
</div>'
},
loading: function() {
init()
if ($('#facebox .loading').length == 1) return true
showOverlay()
$('#facebox .content').empty()
$('#facebox .body').children().hide().end().
append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>')
$('#facebox').css({
top: getPageScroll()[1] + (getPageHeight() / 10),
left: $(window).width() / 2 - 205
}).show()
$(document).bind('keydown.facebox', function(e) {
if (e.keyCode == 27) $.facebox.close()
return true
})
$(document).trigger('loading.facebox')
},
reveal: function(data, klass) {
$(document).trigger('beforeReveal.facebox')
if (klass) $('#facebox .content').addClass(klass)
$('#facebox .content').append(data)
$('#facebox .loading').remove()
$('#facebox .body').children().fadeIn('normal')
$('#facebox').css('left', $(window).width() / 2 - ($('#facebox .popup').width() / 2))
$(document).trigger('reveal.facebox').trigger('afterReveal.facebox')
},
close: function() {
$(document).trigger('close.facebox')
return false
}
})
/*
* Public, $.fn methods
*/
$.fn.facebox = function(settings) {
if ($(this).length == 0) return
init(settings)
function clickHandler() {
$.facebox.loading(true)
// support for rel="facebox.inline_popup" syntax, to add a class
// also supports deprecated "facebox[.inline_popup]" syntax
var klass = this.rel.match(/facebox\[?\.(\w+)\]?/)
if (klass) klass = klass[1]
fillFaceboxFromHref(this.href, klass)
return false
}
return this.bind('click.facebox', clickHandler)
}
/*
* Private methods
*/
// called one time to setup facebox on this page
function init(settings) {
if ($.facebox.settings.inited) return true
else $.facebox.settings.inited = true
$(document).trigger('init.facebox')
makeCompatible()
var imageTypes = $.facebox.settings.imageTypes.join('|')
$.facebox.settings.imageTypesRegexp = new RegExp('\.(' + imageTypes + ')$', 'i')
if (settings) $.extend($.facebox.settings, settings)
$('body').append($.facebox.settings.faceboxHtml)
var preload = [ new Image(), new Image() ]
preload[0].src = $.facebox.settings.closeImage
preload[1].src = $.facebox.settings.loadingImage
$('#facebox').find('.b:first, .bl').each(function() {
preload.push(new Image())
preload.slice(-1).src = $(this).css('background-image').replace(/url\((.+)\)/, '$1')
})
$('#facebox .close').click($.facebox.close)
$('#facebox .close_image').attr('src', $.facebox.settings.closeImage)
}
// getPageScroll() by quirksmode.com
function getPageScroll() {
var xScroll, yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
yScroll = document.documentElement.scrollTop;
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
xScroll = document.body.scrollLeft;
}
return new Array(xScroll,yScroll)
}
// Adapted from getPageSize() by quirksmode.com
function getPageHeight() {
var windowHeight
if (self.innerHeight) { // all except Explorer
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowHeight = document.body.clientHeight;
}
return windowHeight
}
// Backwards compatibility
function makeCompatible() {
var $s = $.facebox.settings
$s.loadingImage = $s.loading_image || $s.loadingImage
$s.closeImage = $s.close_image || $s.closeImage
$s.imageTypes = $s.image_types || $s.imageTypes
$s.faceboxHtml = $s.facebox_html || $s.faceboxHtml
}
// Figures out what you want to display and displays it
// formats are:
// div: #id
// image: blah.extension
// ajax: anything else
function fillFaceboxFromHref(href, klass) {
// div
if (href.match(/#/)) {
var url = window.location.href.split('#')[0]
var target = href.replace(url,'')
if (target == '#') return
$.facebox.reveal($(target).html(), klass)
// image
} else if (href.match($.facebox.settings.imageTypesRegexp)) {
fillFaceboxFromImage(href, klass)
// ajax
} else {
fillFaceboxFromAjax(href, klass)
}
}
function fillFaceboxFromImage(href, klass) {
var image = new Image()
image.onload = function() {
$.facebox.reveal('<div class="image"><img src="' + image.src + '" /></div>', klass)
}
image.src = href
}
function fillFaceboxFromAjax(href, klass) {
$.get(href, function(data) { $.facebox.reveal(data, klass) })
}
function skipOverlay() {
return $.facebox.settings.overlay == false || $.facebox.settings.opacity === null
}
function showOverlay() {
if (skipOverlay()) return
if ($('#facebox_overlay').length == 0)
$("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')
$('#facebox_overlay').hide().addClass("facebox_overlayBG")
.css('opacity', $.facebox.settings.opacity)
.click(function() { $(document).trigger('close.facebox') })
.fadeIn(200)
return false
}
function hideOverlay() {
if (skipOverlay()) return
$('#facebox_overlay').fadeOut(200, function(){
$("#facebox_overlay").removeClass("facebox_overlayBG")
$("#facebox_overlay").addClass("facebox_hide")
$("#facebox_overlay").remove()
})
return false
}
/*
* Bindings
*/
$(document).bind('close.facebox', function() {
$(document).unbind('keydown.facebox')
$('#facebox').fadeOut(function() {
$('#facebox .content').removeClass().addClass('content')
$('#facebox .loading').remove()
$(document).trigger('afterClose.facebox')
})
hideOverlay()
})
})(jQuery);

View File

@ -1,2 +0,0 @@
@import "compass"

View File

@ -0,0 +1,20 @@
@import "compass"
@import "_mixins/ansi"
@import "_mixins/colors"
@import "_mixins/fonts"
@mixin popup
display: none
position: absolute
z-index: 100
background-color: #fff
border: 10px solid rgba(0, 0, 0, .5)
@include background-clip(padding-box)
@include border-radius(10px)

View File

@ -0,0 +1,43 @@
// ansi styles, see javascripts/lib/deansi.js
.ansi
.bold
font-weight: bold
.italic
font-style: italic
.underscore
// monochrome displays only according to http://ascii-table.com/ansi-escape-sequences.php
.black
color: black
.red
color: red
.green
color: lime
.yellow
color: yellow
.blue
color: blue
.magenta
color: magenta
.cyan
color: cyan
.white
color: white
.black.bright
color: #999
.bg-black
background-color: black
.bg-red
background-color: red
.bg-green
background-color: lime
.bg-yellow
background-color: yellow
.bg-blue
background-color: blue
.bg-magenta
background-color: magenta
.bg-cyan
background-color: cyan
.bg-white
background-color: white

View File

@ -0,0 +1,81 @@
$black: #000
$white: #fff
$green: green
$green-light-1: #dcffdc
$green-light-3: #fafffa
$red: #c00
$red-light-1: #ffdcdc
$red-light-3: #fffafa
$yellow-light-1: #ffffe1
$yellow-light-3: #fffffa
$gray-dark-1: #333
$gray-dark-2: #444
$gray-dark-3: #666
$gray-medium-1: #999
$gray-medium-2: #aaa
$gray-medium-3: #ccc
$gray-light-1: #ddd
$gray-light-2: #efefef
$gray-light-3: #f6f6f6
$slate-blue-1: #e5e8ee
$slate-blue-2: #f2f4f9
$slate-blue-3: #fafbfc
$slate-gray-1: #e1e2e6
$color-text: $gray-dark-3
$color-text-light: $gray-medium-1
$color-text-lighter: $gray-medium-2
$color-text-log: $white
$color-text-status-passed: $green
$color-text-status-failed: $red
$color-link: $gray-dark-3
$color-link-highlight: #c7371a
$color-link-sponsor: #575c7c
$color-link-top: $gray-medium-3
$color-link-top-highlight: $white
$color-bg-dark: $slate-blue-1
$color-bg-light: $gray-light-1
$color-bg-input: $white
$color-bg-link-top: $black
$color-bg-dropdown: $gray-dark-2
$color-bg-dropdown-highlight: $gray-dark-3
$color-bg-pre: $gray-light-2
$color-bg-tab: $gray-light-3
$color-bg-tab-hover: $white
$color-bg-tab-active: $white
$color-bg-log: $gray-dark-1
$color-bg-log-fold: $gray-dark-2
$color-bg-log-highlight: rgba(255, 255, 255, 0.05)
$color-bg-slider: $slate-blue-2
$color-bg-list-odd: $white
$color-bg-list-even: $gray-light-3
$color-bg-hooks-odd: $slate-blue-3
$color-bg-hooks-even: $white
$color-bg-tools-pane: $slate-blue-2
$color-bg-sidebar: $slate-blue-2
$color-bg-sidebar-box: $white
$color-bg-job: $yellow-light-3
$color-bg-job-highlight: $yellow-light-1
$color-bg-job-passed: $green-light-3
$color-bg-job-passed-highlight: $green-light-1
$color-bg-job-failed: $red-light-3
$color-bg-job-failed-highlight: $red-light-1
$color-border-normal: $gray-medium-3
$color-border-light: $gray-light-1
$color-border-log: $gray-light-1
$color-border-slider-normal: $slate-blue-2
$color-border-slider-light: $gray-medium-1
$color-border-slider-hover: $slate-gray-1
$color-bg-list-info: #fffcf4
$color-text-list-info: #7f7f75
$color-shadow-list-info: #bab9a7

View File

@ -0,0 +1,13 @@
$font-size-huge: 24px
$font-size-big: 16px
$font-size-normal: 14px
$font-size-small: 13px
$font-size-log: 12px
$font-size-smaller: 12px
$font-size-tiny: 11px
$font-size-tiniest: 10px
$line-height: 19px
$line-height-log: 18px

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
html html
margin: 0 margin: 0
@ -7,13 +7,15 @@ html
body body
overflow-x: hidden overflow-x: hidden
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif
line-height: 120% font-size: $font-size-small
line-height: $line-height
margin: 0 margin: 0
padding: 0 padding: 0
width: 100% width: 100%
color: $color-text
a a
color: #333 color: $color-link
text-decoration: none text-decoration: none
ul ul
@ -24,118 +26,3 @@ ul
li li
padding: 0 padding: 0
td, th
text-align: left
font-size: 80%
padding: 5px 10px
vertical-align: top
caption
text-align: left
font-size: 16px
font-weight: bold
color: #666
pre
background: none repeat scroll 0 0 #FAFAFA
border: 1px solid #DDDDDD
border-radius: 8px 8px 8px 8px
font-family: monospace
font-size: 13px
line-height: 1.5em
margin-top: 1em
overflow-x: scroll
padding: 1em 1.5em
pre::-webkit-scrollbar
height: 10px
width: 10px
pre::-webkit-scrollbar-button:start:decrement,
pre::-webkit-scrollbar-button:end:increment
display: none
pre::-webkit-scrollbar-track-piece
background: #444
-webkit-border-radius: 4px
pre::-webkit-scrollbar-thumb:horizontal
background: -webkit-gradient(linear, left top, left bottom, from(#85888E), to(#55585E))
-webkit-border-radius: 4px
width: 25px
#auth-frame
position: absolute
z-index: 10
top: 50%
left: 50%
width: 400px
height: 300px
margin: -200px 0 0 -150px
background-color: #fff
border: 10px solid rgba(0, 0, 0, .5)
@include background-clip(padding-box)
@include border-radius(10px)
#flash-messages
position: absolute
left: 400px
top: 10px
font-size: 25px
color: #FFFFFF
.loading
padding: 15px 25px 0 0
span
padding-right: 25px
font-size: 13px
color: #aaa
background: inline-image('spinner.gif') no-repeat right 4px
.loading
display: none
span.loading
padding: 0 25px 0 0
font-size: 13px
color: #aaa
background: inline-image('spinner.gif') no-repeat right 4px
.emoji
vertical-align: middle
width: 20px
height: 20px
.help
display: inline-block
height: 19px
width: 16px
margin: -9px 0 0 4px
vertical-align: middle
background: inline-image('icons/help.png') no-repeat scroll 0 3px transparent
cursor: pointer
.context_help_caption
text-align: left
font-size: 16px
font-weight: bold
color: #666
border-bottom: 1px solid #CCCCCC
.context_help
display: none
.context_help_body
font-size: 1em
line-height: 1.4286
margin: 1.4286em 0
#facebox
.content
display: block !important
.close
display: none
pre::-webkit-scrollbar
height: 0
width: 0

View File

@ -0,0 +1,10 @@
@import "_mixins/all"
#auth-frame
top: 50%
left: 50%
width: 400px
height: 300px
margin: -200px 0 0 -150px
@include popup

View File

@ -0,0 +1,9 @@
@import "_mixins/all"
#flash-messages
position: absolute
left: 400px
top: 10px
font-size: 25px
color: #FFFFFF

View File

@ -0,0 +1,19 @@
@import "_mixins/all"
.loading
padding: 15px 25px 0 0
span
padding-right: 25px
font-size: $font-size-small
color: $color-text-lighter
background: inline-image('spinner.gif') no-repeat right 4px
.loading
display: none
span.loading
padding: 0 25px 0 0
font-size: $font-size-small
color: $color-text-lighter
background: inline-image('spinner.gif') no-repeat right 4px

View File

@ -0,0 +1,7 @@
@import "_mixins/all"
.emoji
vertical-align: middle
width: 20px
height: 20px

View File

@ -0,0 +1,34 @@
@import "_mixins/all"
.help
display: inline-block
height: 19px
width: 16px
margin: -9px 0 0 4px
vertical-align: middle
background: inline-image('icons/help.png') no-repeat scroll 0 3px transparent
cursor: pointer
.popup
top: 50%
left: 50%
width: 400px
margin: -230px 0 0 -200px
padding: 20px
@include popup
h4
margin-top: 0
font-size: 18px
font-weight: bold
color: $color-text
p
font-size: $font-size-normal
pre
background-color: $color-bg-pre
margin: 0
padding: 10px 20px
@include border-radius(4px)

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all.sass"
body#home, body#home,
body#profile body#profile
@ -12,17 +12,17 @@ body#profile
#search_box #search_box
height: 90px height: 90px
padding: 30px 20px 0 20px padding: 30px 20px 0 20px
background-color: #e5e8ee background-color: $color-bg-dark
input[type=text] input[type=text]
height: 28px height: 28px
width: 97% width: 97%
padding: 0 0 0 10px padding: 0 0 0 10px
font-size: 10pt color: $color-text
color: #666 font-size: $font-size-small
border: 1px solid #ddd border: 1px solid $color-border-light
@include border-radius(4px) @include border-radius(4px)
background: #fff inline-image('icons/search.png') no-repeat 335px 8px background: $color-bg-input inline-image('icons/search.png') no-repeat 335px 8px
.tabs .tabs
#tab_owned #tab_owned

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
#accounts, #accounts,
#repositories #repositories
@ -7,25 +7,25 @@
li li
position: relative position: relative
font-size: 16px font-size: $font-size-big
padding: 15px 25px 15px 45px padding: 15px 25px 15px 45px
border-bottom: 1px solid #ccc border-bottom: 1px solid $color-border-light
background-position: 24px 16px background-position: 24px 16px
background-repeat: no-repeat background-repeat: no-repeat
&:nth-child(odd) &:nth-child(odd)
background-color: #fff background-color: $color-bg-list-odd
.indicator .indicator
background-image: inline-image('ui/current-repository-indicator-odd.png') background-image: inline-image('ui/current-repository-indicator-odd.png')
&:nth-child(even) &:nth-child(even)
background-color: #f6f6f6 background-color: $color-bg-list-even
.indicator .indicator
background-image: inline-image('ui/current-repository-indicator-even.png') background-image: inline-image('ui/current-repository-indicator-even.png')
&.green a &.green a
color: green color: $color-text-status-passed
&.red a &.red a
color: #c00 color: $color-text-status-failed
.current .current
display: inline-block display: inline-block
@ -39,20 +39,20 @@
.summary .summary
margin: 5px -5px 0 0 margin: 5px -5px 0 0
font-size: 13px color: $color-text-light
color: #666 font-size: $font-size-small
.info .info
overflow: hidden overflow: hidden
margin: 12px -25px -15px -45px margin: 12px -25px -15px -45px
font-size: 13px font-size: $font-size-small
background-color: #fffcf4 background-color: $color-bg-list-info
color: #7f7f75 color: $color-text-list-info
display: none display: none
p p
margin: 0 -10px 0 -10px margin: 0 -10px 0 -10px
padding: 12px 35px 12px 55px padding: 12px 35px 12px 55px
@include box-shadow(#bab9a7 0 1px 8px 0 inset) @include box-shadow($color-shadow-list-info 0 1px 8px 0 inset)
.indicator .indicator
display: none display: none
@ -69,7 +69,7 @@
.loading .loading
padding: 15px 25px 15px 30px padding: 15px 25px 15px 30px
background-color: #fff background-color: $color-bg-list-odd
background-image: none background-image: none
#accounts #accounts

View File

@ -1,17 +1,20 @@
@import "_common" @import "_mixins/all"
#main #main
position: relative position: relative
h3
margin: 15px 60px 0 0
font-size: $font-size-huge
a
text-decoration: underline
#home, #home,
#profile #profile
#main #main
min-height: 1000px min-height: 1000px
padding: 20px 280px 30px 450px padding: 20px 280px 30px 450px
&.loading
opacity: .1
&.maximized &.maximized
padding: 60px 100px 30px 440px padding: 60px 100px 30px 440px

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
table.list table.list
width: 100% width: 100%
@ -11,13 +11,23 @@ table.list
caption caption
margin-left: 12px margin-left: 12px
margin-bottom: 8px margin-bottom: 8px
text-align: left
color: $color-text
font-size: $font-size-big
font-weight: bold
td, th
text-align: left
font-size: $font-size-small
padding: 5px 10px
vertical-align: top
tr tr
max-height: 20px max-height: 20px
th th
font-size: 13px font-size: 13px
color: #666 color: $color-text
white-space: nowrap white-space: nowrap
border-bottom: 2px solid white border-bottom: 2px solid white

View File

@ -1,36 +1,32 @@
@import "_common" @import "_mixins/all"
#main
.sponsor
float: left
margin-top: 1px
font-size: 13px
color: #999
pre#log pre#log
position: relative position: relative
clear: left clear: left
min-height: 12px min-height: 12px
margin-top: 25px
margin-top: 1em
padding: 15px 0
color: $color-text-log
font-family: monospace
font-size: $font-size-log
line-height: $line-height-log
white-space: pre-wrap white-space: pre-wrap
word-wrap: break-word word-wrap: break-word
line-height: 140% background-color: $color-bg-log
font-size: 90% border: 1px solid $color-border-log
margin-top: 25px
padding: 15px 0
color: white
background-color: #333
@include border-radius(4px) @include border-radius(4px)
overflow-x: scroll
// deansi styles, see javascripts/lib/deansi.js
p p
position: relative position: relative
padding: 0 15px 0 50px padding: 0 15px 0 50px
margin: 0 margin: 0
min-height: 16px min-height: 16px
&:hover &:hover
background-color: rgba(255, 255, 255, 0.05) background-color: $color-bg-log-highlight
&.highlight &.highlight
background-color: rgba(255, 255, 255, 0.5) background-color: $color-bg-log-highlight
a a
position: absolute position: absolute
margin-left: -40px margin-left: -40px
@ -39,70 +35,44 @@ pre#log
.fold .fold
height: 16px height: 16px
overflow: hidden overflow: hidden
background: #444 inline-image('icons/log.fold.closed.2.png') no-repeat 99.5% 2px background: $color-bg-log-fold inline-image('icons/log.fold.closed.2.png') no-repeat 99.5% 2px
cursor: pointer cursor: pointer
&.open &.open
height: auto height: auto
background-image: inline-image('icons/log.fold.open.2.png') background-image: inline-image('icons/log.fold.open.2.png')
.bold
font-weight: bold
.italic
font-style: italic
.underscore
/* monochrome displays only according to http://ascii-table.com/ansi-escape-sequences.php
.black
color: black
.red
color: red
.green
color: lime
.yellow
color: yellow
.blue
color: blue
.magenta
color: magenta
.cyan
color: cyan
.white
color: white
.black.bright
color: #999
.bg-black
background-color: black
.bg-red
background-color: red
.bg-green
background-color: lime
.bg-yellow
background-color: yellow
.bg-blue
background-color: blue
.bg-magenta
background-color: magenta
.bg-cyan
background-color: cyan
.bg-white
background-color: white
#log.loading #log.loading
padding: 25px 0 0 10px padding: 25px 0 0 10px
#log::-webkit-scrollbar
height: 10px
width: 10px
#log::-webkit-scrollbar-button:start:decrement,
#log::-webkit-scrollbar-button:end:increment
display: none
#log::-webkit-scrollbar-track-piece
background: #444
-webkit-border-radius: 4px
#log::-webkit-scrollbar-thumb:horizontal
background: -webkit-gradient(linear, left top, left bottom, from(#85888E), to(#55585E))
-webkit-border-radius: 4px
width: 25px
#log #tail #log #tail
z-index: 99 z-index: 99
position: absolute position: absolute
display: block display: block
top: 0 top: 0
right: 0 right: 2px
margin: 10px 10px 0 0 margin: 13px 10px 0 0
padding: 0 2px 0 3px padding: 0 2px 0 3px
color: #666 color: #666
text-shadow: 1px 1px 0px #fff text-shadow: 1px 1px 0px #fff
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
font-size: 11px font-size: $font-size-tiny
line-height: 14px line-height: 14px
text-decoration: none text-decoration: none
white-space: nowrap white-space: nowrap
@ -133,3 +103,9 @@ pre#log
&.active .status &.active .status
background-color: #6b0 background-color: #6b0
#main
.sponsor
float: left
margin-top: 1px
color: #999

View File

@ -1,22 +1,11 @@
@import "_common" @import "_mixins/all"
#repository #repository
position: relative position: relative
h3
margin: 15px 60px 0 0
a
font-size: 24px
line-height: 24px
a
color: #666
text-decoration: underline
.description, .language .description, .language
font-weight: normal font-weight: normal
font-size: 13px color: $color-text-light
color: #999
.language .language
padding-right: 5px padding-right: 5px
@ -30,13 +19,13 @@
a a
height: 16px height: 16px
display: block display: block
font-size: 12px font-size: $font-size-smaller
font-weight: bold font-weight: bold
text-decoration: none text-decoration: none
margin-left: 10px margin-left: 10px
padding-left: 20px padding-left: 20px
background: no-repeat 0px 2px background: no-repeat 0px 2px
color: #999 color: $color-text-light
&.watchers &.watchers
background-image: inline-image('icons/github-watchers.png') background-image: inline-image('icons/github-watchers.png')
&.forks &.forks

View File

@ -1,9 +1,7 @@
@import "_common" @import "_mixins/all"
#summary #summary
margin: 0 0 0 12px margin: 0 0 0 12px
color: #666
font-size: 80%
@include clearfix @include clearfix
.left, .left,

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
#tools #tools
position: relative position: relative
@ -19,10 +19,8 @@
right: 0 right: 0
width: 600px width: 600px
padding: 10px 20px padding: 10px 20px
border: 1px solid #CCC border: 1px solid $color-border-light
background-color: #F2F4F9 background-color: $color-bg-tools-pane
font-size: 80%
color: #666
@include border-bottom-radius(4px) @include border-bottom-radius(4px)
@include single-box-shadow(rgba(black, 0.1), 1px, 3px, 5px) @include single-box-shadow(rgba(black, 0.1), 1px, 3px, 5px)
@ -32,7 +30,7 @@
width: 80px width: 80px
display: inline-block display: inline-block
input input
border: 1px solid #DDD border: 1px solid $color-border-light
width: 505px width: 505px
padding: 4px padding: 4px
@include border-radius(3px) @include border-radius(3px)

View File

@ -1,28 +1,17 @@
@import "_common" @import "_mixins/all"
#profile #profile
#main #main
h3
margin: 15px 60px 0 0
font-size: 24px
line-height: 24px
color: #666
h4
font-size: 15px
color: #666
img img
float: left float: left
width: 48px width: 48px
height: 48px height: 48px
margin: 3px 15px 0 0 margin: 3px 15px 0 0
@include border-radius(4px) @include border-radius(4px)
background-color: $color-bg-light
dl dl
margin: 0 0 20px 18px margin: 0 0 20px 18px
color: #666
font-size: 13px
dt dt
display: block display: block
@ -34,21 +23,14 @@
.tip .tip
margin-top: -5px margin-top: -5px
font-size: 13px color: $color-text-light
color: #999
.message .message
margin-top: 20px margin-top: 20px
padding: 13px 20px padding: 13px 20px
color: #999 color: $color-text-light
font-weight: normal
font-size: 13px
border: 1px solid #DDD border: 1px solid #DDD
@include border-radius(4px) @include border-radius(4px)
button.sync_now button.sync_now
float: right float: right
.highlight
color: #C7371A

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
#hooks #hooks
// @include list-base // @include list-base
@ -10,38 +10,40 @@
padding: 10px padding: 10px
white-space: nowrap white-space: nowrap
overflow: hidden overflow: hidden
border-bottom: 1px solid #DDD border-bottom: 1px solid $color-border-light
&:nth-child(3) &:nth-child(3)
border-top: 1px solid #DDD border-top: 1px solid $color-border-light
&:nth-child(odd) &:nth-child(odd)
background-color: #FAFBFC background-color: $color-bg-hooks-odd
.controls
background: $color-bg-hooks-odd
&:nth-child(odd) .controls &:nth-child(even)
background: #fafbfc background-color: $color-bg-hooks-even
.controls
background: $color-bg-hooks-even
> a > a
float: left float: left
font-size: 16px font-size: $font-size-big
color: #666
text-decoration: none text-decoration: none
.description .description
display: none display: none
margin-left: 10px margin-left: 10px
font-size: 12px font-size: $font-size-smaller
white-space: nowrap white-space: nowrap
overflow: hidden overflow: hidden
text-overflow: ellipsis text-overflow: ellipsis
color: #999 color: $color-text-light
.controls .controls
position: absolute position: absolute
top: 10px top: 10px
right: 0 right: 0
white-space: nowrap white-space: nowrap
background: #fff
a a
float: left float: left
display: block display: block
@ -66,7 +68,7 @@
&:hover &:hover
> a > a
color: #c7371a color: $color-link-highlight
.description .description
display: inline display: inline

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
#right #right
position: absolute position: absolute
@ -8,9 +8,8 @@
min-height: 100% min-height: 100%
width: 205px width: 205px
padding: 20px 20px 20px 10px padding: 20px 20px 20px 10px
background-color: #f2f4f9 background-color: $color-bg-sidebar
border-bottom: 1px solid #ccc border-bottom: 1px solid $color-border-light
font-size: 13px
// @include transition(width .1s ease-out) // @include transition(width .1s ease-out)
h4 h4
@ -22,8 +21,8 @@
.box .box
margin-top: 25px margin-top: 25px
padding: 15px padding: 15px
border: 1px solid #ccc border: 1px solid $color-border-normal
background-color: #fff background-color: $color-bg-sidebar-box
@include border-radius(4px) @include border-radius(4px)
h4 h4
@ -33,16 +32,3 @@
li li
list-style-type: square list-style-type: square
margin-left: 15px margin-left: 15px
#alpha_warning
background-color: #ffffda
#alpha_warning h4
padding-left: 20px
background: inline-image('icons/construction.png') no-repeat top left
#alpha_warning p
margin-bottom: 0
color: #666

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
#github #github
display: block display: block

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
#right #right
#queues #queues
@ -23,10 +23,9 @@
white-space: nowrap white-space: nowrap
margin: 0 margin: 0
list-style-type: none list-style-type: none
color: #666
h5 h5
font-size: 13px font-size: $font-size-small
font-weight: normal font-weight: normal
margin: 0px margin: 0px
cursor: pointer cursor: pointer

View File

@ -1,8 +1,4 @@
@import "_common" @import "_mixins/all"
$slider-border-normal: #f2f4f9
$slider-border-light: #999
$slider-border-hover: #e1e2e6
#slider #slider
position: absolute position: absolute
@ -10,9 +6,9 @@ $slider-border-hover: #e1e2e6
top: 0 top: 0
left: -10px left: -10px
width: 10px width: 10px
border-left: 1px solid #ccc border-left: 1px solid $color-border-normal
border-bottom: 1px solid #ccc border-bottom: 1px solid $color-border-normal
background-color: #f2f4f9 background-color: $color-bg-slider
cursor: pointer cursor: pointer
.icon .icon
@ -20,16 +16,16 @@ $slider-border-hover: #e1e2e6
height: 0 height: 0
position: absolute position: absolute
top: 15px top: 15px
border-color: $slider-border-normal $slider-border-normal $slider-border-normal $slider-border-light border-color: $color-border-slider-normal $color-border-slider-normal $color-border-slider-normal $color-border-slider-light
border-width: 5px 0 5px 5px border-width: 5px 0 5px 5px
border-style: solid border-style: solid
margin-top: -5px margin-top: -5px
margin-left: 3px margin-left: 3px
&:hover &:hover
background: $slider-border-hover background: $color-border-slider-hover
.icon .icon
border-color: $slider-border-hover $slider-border-hover $slider-border-hover $slider-border-light border-color: $color-border-slider-hover $color-border-slider-hover $color-border-slider-hover $color-border-slider-light
#home, #home,
#profile #profile
@ -48,9 +44,9 @@ $slider-border-hover: #e1e2e6
width: 20px width: 20px
z-index: 50 z-index: 50
.icon .icon
border-color: $slider-border-normal $slider-border-light $slider-border-normal $slider-border-normal border-color: $color-border-slider-normal $color-border-slider-light $color-border-slider-normal $color-border-slider-normal
border-width: 5px 5px 5px 0 border-width: 5px 5px 5px 0
&:hover &:hover
.icon .icon
border-color: $slider-border-hover $slider-border-light $slider-border-hover $slider-border-hover border-color: $color-border-slider-hover $color-border-slider-light $color-border-slider-hover $color-border-slider-hover

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
#right #right
.sponsors .sponsors
@ -9,7 +9,7 @@
overflow: hidden overflow: hidden
width: 205px width: 205px
margin: 0 0 8px 0 margin: 0 0 8px 0
border: 1px solid #ddd border: 1px solid $color-border-light
@include border-radius(8px) @include border-radius(8px)
list-style-type: none list-style-type: none
@ -35,7 +35,6 @@
.silver .silver
h5 h5
margin: 0 margin: 0
font-size: 13px
p p
margin: 0 margin: 0
@ -45,13 +44,13 @@
margin-left: 0 margin-left: 0
padding-bottom: 12px padding-bottom: 12px
a a
color: #575c7c color: $color-link-sponsor
font-weight: bold font-weight: bold
text-decoration: none text-decoration: none
.hint .hint
margin: 0 0 0 2px margin: 0 0 0 2px
font-size: 10px font-size: $font-size-tiniest
text-align: left text-align: left

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
#repo_count_container, #repo_count_container,
#build_count_container #build_count_container

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
#repositories li, #repositories li,
#summary .number a, #summary .number a,
@ -10,14 +10,14 @@ table.list .number a
.green #summary .number a, .green #summary .number a,
table.list .green .number a table.list .green .number a
background-image: inline-image('icons/status.green.png') background-image: inline-image('icons/status.green.png')
color: green color: $color-text-status-passed
background-repeat: no-repeat background-repeat: no-repeat
#repositories li.red, #repositories li.red,
.red #summary .number a, .red #summary .number a,
table.list .red .number a table.list .red .number a
background-image: inline-image('icons/status.red.png') background-image: inline-image('icons/status.red.png')
color: #c00 color: $color-text-status-failed
background-repeat: no-repeat background-repeat: no-repeat
#summary .number a, #summary .number a,
@ -26,28 +26,26 @@ table.list .number a
table.list table.list
tbody tbody
tr.allow-failure
background-color: #BDBDBD
td td
cursor: pointer cursor: pointer
background-color: #fffffa background-color: $color-bg-job
tr:hover td tr:hover td
background-color: #ffffe1 background-color: $color-bg-job-highlight
.green .green
td td
background-color: #fafffa background-color: $color-bg-job-passed
&:hover td &:hover td
background-color: #dcffdc background-color: $color-bg-job-passed-highlight
.number a .number a
color: green color: $color-text-status-passed
.red .red
td td
background-color: #fffafa background-color: $color-bg-job-failed
&:hover td &:hover td
background-color: #ffdcdc background-color: $color-bg-job-failed-highlight
.number a .number a
color: #C00 color: $color-text-status-failed

View File

@ -1,4 +1,4 @@
@import "_common" @import "_mixins/all"
.tabs .tabs
height: 29px height: 29px
@ -8,28 +8,28 @@
display: inline-block display: inline-block
height: 28px height: 28px
margin-right: 10px margin-right: 10px
background-color: #f6f6f6 background-color: $color-bg-tab
border: 1px solid #ccc border: 1px solid $color-border-light
white-space: nowrap white-space: nowrap
cursor: pointer cursor: pointer
@include border-top-radius(4px) @include border-top-radius(4px)
&:hover &:hover
background-color: white background-color: $color-bg-tab-hover
.active .active
background-color: #fff background-color: $color-bg-tab-active
border-bottom-color: #fff border-bottom-color: $color-bg-tab-active
h5 h5
margin: 0 margin: 0
font-size: $font-size-small
h5 a
display: block
padding: 0 10px
line-height: 30px
font-size: 13px
font-weight: normal font-weight: normal
line-height: 30px
a
display: block
padding: 0 10px
#left #left
.tabs .tabs

View File

@ -1,9 +1,7 @@
@import "_common" @import "_mixins/all"
#top #top
color: #ccc
line-height: 40px line-height: 40px
font-size: 13px
padding-right: 30px padding-right: 30px
@include background(linear-gradient(#444, #111)) @include background(linear-gradient(#444, #111))
@ -19,67 +17,66 @@
list-style-type: none list-style-type: none
a a
color: #ccc color: $color-link-top
text-decoration: none text-decoration: none
#home:not(.maximized)
#top
padding-right: 140px
#navigation
li li
display: inline-block display: inline-block
&.active &.active
background-color: black background-color: $color-bg-link-top
a a
color: white color: $color-link-top-highlight
a a
display: block display: block
padding: 0 15px padding: 0 15px
&:hover &:hover
color: white color: $color-link-top-highlight
li.profile &.profile
position: relative position: relative
float: right float: right
img img
position: absolute position: absolute
top: 7px top: 7px
left: 15px left: 15px
width: 24px width: 24px
height: 24px height: 24px
@include border-radius(3px) @include border-radius(3px)
& > a & > a
padding: 0 15px 0 54px padding: 0 15px 0 54px
&:hover > ul &:hover > ul
display: block
ul
display: none
position: absolute
z-index: 300
top: 40px
width: 100%
background-color: #444
@include border-bottom-radius(6px)
@include single-box-shadow(rgba(black, 0.3), 2px, 2px, 10px)
li
display: block display: block
li:last-child a:hover ul
@include border-bottom-radius(4px) display: none
position: absolute
z-index: 300
top: 40px
width: 100%
background-color: $color-bg-dropdown
@include border-bottom-radius(6px)
@include single-box-shadow(rgba(black, 0.3), 2px, 2px, 10px)
a li
display: block display: block
padding: 5px 0 5px 54px
line-height: 24px li:last-child a:hover
white-space: nowrap @include border-bottom-radius(4px)
&:hover
background-color: #555 a
display: block
padding: 5px 0 5px 54px
line-height: 24px
white-space: nowrap
&:hover
background-color: $color-bg-dropdown-highlight
#home:not(.maximized)
#top
padding-right: 140px

View File

@ -1,81 +0,0 @@
#facebox {
position: absolute;
top: 0;
left: 0;
z-index: 100;
text-align: left;
}
#facebox .popup{
position:relative;
border:3px solid rgba(0,0,0,0);
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
-webkit-box-shadow:0 0 18px rgba(0,0,0,0.4);
-moz-box-shadow:0 0 18px rgba(0,0,0,0.4);
box-shadow:0 0 18px rgba(0,0,0,0.4);
}
#facebox .content {
display:table;
width: 370px;
padding: 10px;
background: #fff;
-webkit-border-radius:4px;
-moz-border-radius:4px;
border-radius:4px;
}
#facebox .content > p:first-child{
margin-top:0;
}
#facebox .content > p:last-child{
margin-bottom:0;
}
#facebox .close{
position:absolute;
top:5px;
right:5px;
padding:2px;
background:#fff;
}
#facebox .close img{
opacity:0.3;
}
#facebox .close:hover img{
opacity:1.0;
}
#facebox .loading {
text-align: center;
}
#facebox .image {
text-align: center;
}
#facebox img {
border: 0;
margin: 0;
}
#facebox_overlay {
position: fixed;
top: 0px;
left: 0px;
height:100%;
width:100%;
}
.facebox_hide {
z-index:-100;
}
.facebox_overlayBG {
background-color: #000;
z-index: 99;
}

File diff suppressed because one or more lines are too long

View File

@ -27533,316 +27533,6 @@ I18n.t = I18n.translate;
I18n.l = I18n.localize; I18n.l = I18n.localize;
I18n.p = I18n.pluralize; I18n.p = I18n.pluralize;
/*
* Facebox (for jQuery)
* version: 1.2 (05/05/2008)
* @requires jQuery v1.2 or later
*
* Examples at http://famspam.com/facebox/
*
* Licensed under the MIT:
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2007, 2008 Chris Wanstrath [ chris@ozmm.org ]
*
* Usage:
*
* jQuery(document).ready(function() {
* jQuery('a[rel*=facebox]').facebox()
* })
*
* <a href="#terms" rel="facebox">Terms</a>
* Loads the #terms div in the box
*
* <a href="terms.html" rel="facebox">Terms</a>
* Loads the terms.html page in the box
*
* <a href="terms.png" rel="facebox">Terms</a>
* Loads the terms.png image in the box
*
*
* You can also use it programmatically:
*
* jQuery.facebox('some html')
* jQuery.facebox('some html', 'my-groovy-style')
*
* The above will open a facebox with "some html" as the content.
*
* jQuery.facebox(function($) {
* $.get('blah.html', function(data) { $.facebox(data) })
* })
*
* The above will show a loading screen before the passed function is called,
* allowing for a better ajaxy experience.
*
* The facebox function can also display an ajax page, an image, or the contents of a div:
*
* jQuery.facebox({ ajax: 'remote.html' })
* jQuery.facebox({ ajax: 'remote.html' }, 'my-groovy-style')
* jQuery.facebox({ image: 'stairs.jpg' })
* jQuery.facebox({ image: 'stairs.jpg' }, 'my-groovy-style')
* jQuery.facebox({ div: '#box' })
* jQuery.facebox({ div: '#box' }, 'my-groovy-style')
*
* Want to close the facebox? Trigger the 'close.facebox' document event:
*
* jQuery(document).trigger('close.facebox')
*
* Facebox also has a bunch of other hooks:
*
* loading.facebox
* beforeReveal.facebox
* reveal.facebox (aliased as 'afterReveal.facebox')
* init.facebox
* afterClose.facebox
*
* Simply bind a function to any of these hooks:
*
* $(document).bind('reveal.facebox', function() { ...stuff to do after the facebox and contents are revealed... })
*
*/
(function($) {
$.facebox = function(data, klass) {
$.facebox.loading()
if (data.ajax) fillFaceboxFromAjax(data.ajax, klass)
else if (data.image) fillFaceboxFromImage(data.image, klass)
else if (data.div) fillFaceboxFromHref(data.div, klass)
else if ($.isFunction(data)) data.call($)
else $.facebox.reveal(data, klass)
}
/*
* Public, $.facebox methods
*/
$.extend($.facebox, {
settings: {
opacity : 0.2,
overlay : true,
loadingImage : '/facebox/loading.gif',
closeImage : '/facebox/closelabel.png',
imageTypes : [ 'png', 'jpg', 'jpeg', 'gif' ],
faceboxHtml : '\
<div id="facebox" style="display:none;"> \
<div class="popup"> \
<div class="content"> \
</div> \
<a href="#" class="close"><img src="/facebox/closelabel.png" title="close" class="close_image" /></a> \
</div> \
</div>'
},
loading: function() {
init()
if ($('#facebox .loading').length == 1) return true
showOverlay()
$('#facebox .content').empty()
$('#facebox .body').children().hide().end().
append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>')
$('#facebox').css({
top: getPageScroll()[1] + (getPageHeight() / 10),
left: $(window).width() / 2 - 205
}).show()
$(document).bind('keydown.facebox', function(e) {
if (e.keyCode == 27) $.facebox.close()
return true
})
$(document).trigger('loading.facebox')
},
reveal: function(data, klass) {
$(document).trigger('beforeReveal.facebox')
if (klass) $('#facebox .content').addClass(klass)
$('#facebox .content').append(data)
$('#facebox .loading').remove()
$('#facebox .body').children().fadeIn('normal')
$('#facebox').css('left', $(window).width() / 2 - ($('#facebox .popup').width() / 2))
$(document).trigger('reveal.facebox').trigger('afterReveal.facebox')
},
close: function() {
$(document).trigger('close.facebox')
return false
}
})
/*
* Public, $.fn methods
*/
$.fn.facebox = function(settings) {
if ($(this).length == 0) return
init(settings)
function clickHandler() {
$.facebox.loading(true)
// support for rel="facebox.inline_popup" syntax, to add a class
// also supports deprecated "facebox[.inline_popup]" syntax
var klass = this.rel.match(/facebox\[?\.(\w+)\]?/)
if (klass) klass = klass[1]
fillFaceboxFromHref(this.href, klass)
return false
}
return this.bind('click.facebox', clickHandler)
}
/*
* Private methods
*/
// called one time to setup facebox on this page
function init(settings) {
if ($.facebox.settings.inited) return true
else $.facebox.settings.inited = true
$(document).trigger('init.facebox')
makeCompatible()
var imageTypes = $.facebox.settings.imageTypes.join('|')
$.facebox.settings.imageTypesRegexp = new RegExp('\.(' + imageTypes + ')$', 'i')
if (settings) $.extend($.facebox.settings, settings)
$('body').append($.facebox.settings.faceboxHtml)
var preload = [ new Image(), new Image() ]
preload[0].src = $.facebox.settings.closeImage
preload[1].src = $.facebox.settings.loadingImage
$('#facebox').find('.b:first, .bl').each(function() {
preload.push(new Image())
preload.slice(-1).src = $(this).css('background-image').replace(/url\((.+)\)/, '$1')
})
$('#facebox .close').click($.facebox.close)
$('#facebox .close_image').attr('src', $.facebox.settings.closeImage)
}
// getPageScroll() by quirksmode.com
function getPageScroll() {
var xScroll, yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
yScroll = document.documentElement.scrollTop;
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
xScroll = document.body.scrollLeft;
}
return new Array(xScroll,yScroll)
}
// Adapted from getPageSize() by quirksmode.com
function getPageHeight() {
var windowHeight
if (self.innerHeight) { // all except Explorer
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowHeight = document.body.clientHeight;
}
return windowHeight
}
// Backwards compatibility
function makeCompatible() {
var $s = $.facebox.settings
$s.loadingImage = $s.loading_image || $s.loadingImage
$s.closeImage = $s.close_image || $s.closeImage
$s.imageTypes = $s.image_types || $s.imageTypes
$s.faceboxHtml = $s.facebox_html || $s.faceboxHtml
}
// Figures out what you want to display and displays it
// formats are:
// div: #id
// image: blah.extension
// ajax: anything else
function fillFaceboxFromHref(href, klass) {
// div
if (href.match(/#/)) {
var url = window.location.href.split('#')[0]
var target = href.replace(url,'')
if (target == '#') return
$.facebox.reveal($(target).html(), klass)
// image
} else if (href.match($.facebox.settings.imageTypesRegexp)) {
fillFaceboxFromImage(href, klass)
// ajax
} else {
fillFaceboxFromAjax(href, klass)
}
}
function fillFaceboxFromImage(href, klass) {
var image = new Image()
image.onload = function() {
$.facebox.reveal('<div class="image"><img src="' + image.src + '" /></div>', klass)
}
image.src = href
}
function fillFaceboxFromAjax(href, klass) {
$.get(href, function(data) { $.facebox.reveal(data, klass) })
}
function skipOverlay() {
return $.facebox.settings.overlay == false || $.facebox.settings.opacity === null
}
function showOverlay() {
if (skipOverlay()) return
if ($('#facebox_overlay').length == 0)
$("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')
$('#facebox_overlay').hide().addClass("facebox_overlayBG")
.css('opacity', $.facebox.settings.opacity)
.click(function() { $(document).trigger('close.facebox') })
.fadeIn(200)
return false
}
function hideOverlay() {
if (skipOverlay()) return
$('#facebox_overlay').fadeOut(200, function(){
$("#facebox_overlay").removeClass("facebox_overlayBG")
$("#facebox_overlay").addClass("facebox_hide")
$("#facebox_overlay").remove()
})
return false
}
/*
* Bindings
*/
$(document).bind('close.facebox', function() {
$(document).unbind('keydown.facebox')
$('#facebox').fadeOut(function() {
$('#facebox .content').removeClass().addClass('content')
$('#facebox .loading').remove()
$(document).trigger('afterClose.facebox')
})
hideOverlay()
})
})(jQuery);
/*! /*!
* Pusher JavaScript Library v1.6.4 * Pusher JavaScript Library v1.6.4
* http://pusherapp.com/ * http://pusherapp.com/

File diff suppressed because it is too large Load Diff