extract auth into separate class
This commit is contained in:
parent
e7d0426493
commit
5a077d3646
|
@ -1,3 +1,5 @@
|
||||||
|
require 'travis/auth'
|
||||||
|
|
||||||
@Travis.reopen
|
@Travis.reopen
|
||||||
TopView: Travis.View.extend
|
TopView: Travis.View.extend
|
||||||
templateName: 'layouts/top'
|
templateName: 'layouts/top'
|
||||||
|
@ -32,3 +34,6 @@
|
||||||
hideProfile: ->
|
hideProfile: ->
|
||||||
$('#top .profile ul').hide()
|
$('#top .profile ul').hide()
|
||||||
|
|
||||||
|
signIn: ->
|
||||||
|
Travis.Auth.signIn()
|
||||||
|
|
||||||
|
|
10
assets/javascripts/lib/travis/auth.coffee
Normal file
10
assets/javascripts/lib/travis/auth.coffee
Normal 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
Loading…
Reference in New Issue
Block a user