extract auth into separate class

This commit is contained in:
Konstantin Haase 2012-07-23 17:44:22 +02:00
parent e7d0426493
commit 5a077d3646
4 changed files with 240 additions and 225 deletions

View File

@ -1,3 +1,5 @@
require 'travis/auth'
@Travis.reopen
TopView: Travis.View.extend
templateName: 'layouts/top'
@ -32,3 +34,6 @@
hideProfile: ->
$('#top .profile ul').hide()
signIn: ->
Travis.Auth.signIn()

View File

@ -0,0 +1,10 @@
class @Travis.Auth
constructor: ->
@iframe = $('<iframe />')
@iframe.hide()
signIn: ->
alert 'sign in not implemented'
@instance: new @
@signIn: -> @instance.signIn()

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff