Merge branch 'sf-auth-iframe' of github.com:travis-ci/travis-ember into sf-auth-iframe

Conflicts:
	public/javascripts/application.js
	public/stylesheets/application.css
This commit is contained in:
Sven Fuchs 2012-09-19 16:23:58 +02:00
commit cbe13f0bb7
5 changed files with 1300 additions and 3015 deletions

View File

@ -15,6 +15,7 @@ $.extend Travis.Auth,
$.extend Travis.Auth.prototype,
iframe: $('<iframe id="auth-frame" />').hide()
timeout: 10000
expectedOrigin: ->
if Travis.config.api_endpoint[0] == '/'
@ -33,6 +34,12 @@ $.extend Travis.Auth.prototype,
trySignIn: ->
@iframe.attr('src', "#{Travis.config.api_endpoint}/auth/post_message")
# TODO: use views
link = $("#navigation .profile")
html = link.html()
link.html("Signing in with GitHub...")
window.setTimeout((-> link.html(html)), @timeout)
newUser: ->
localStorage?.setItem("travisTrySignIn", "true")
url = "#{Travis.config.api_endpoint}/auth/handshake?redirect_uri=#{window.location}"
@ -43,4 +50,4 @@ $.extend Travis.Auth.prototype,
signIn: ->
@trySignIn()
window.setTimeout((=> @checkUser()), 10000)
window.setTimeout((=> @checkUser()), @timeout)

View File

@ -20,6 +20,7 @@ require 'ext/ember/namespace'
':owner/:name/branches': ['home', 'branches']
':owner/:name': ['home', 'current']
'': ['home', 'index']
'#': ['home', 'index']
QUEUES: [
{ name: 'common', display: 'Common' }

0
config/.gitkeep Normal file
View File

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff