Init spinner
This commit is contained in:
@@ -44,8 +44,6 @@ class BeatHaven
|
||||
_pages = new Pages()
|
||||
|
||||
_settings = new Settings()
|
||||
|
||||
_ajax.detectPage()
|
||||
|
||||
adjustSizes: ->
|
||||
$('.data-container').height $(window).height() - $('.header-container').height()
|
||||
|
||||
@@ -80,7 +80,7 @@ class Pages
|
||||
false
|
||||
|
||||
renderSettings: (data) ->
|
||||
unless _session.getUser().name?
|
||||
unless _session.getUser().id?
|
||||
_ajax.go('/search/')
|
||||
return false
|
||||
$('.data-container').css background: 'none'
|
||||
|
||||
@@ -37,12 +37,18 @@ class Vkontakte
|
||||
_session.setUser ar2.user
|
||||
$('.header-container .hello .greating')
|
||||
.html 'Tēnā koe, <span class="settings">' +(if _session.getUser().name then _session.getUser().name else '%username%')+ '</span>!'
|
||||
window._session = _session
|
||||
_ajax.detectPage()
|
||||
$('.fullscreen').hide();
|
||||
else
|
||||
_session.setUser ar.user
|
||||
|
||||
$('.header-container .hello').show()
|
||||
$('.header-container .hello .greating')
|
||||
.html 'Tēnā koe, <span class="settings">' +(if _session.getUser().name then _session.getUser().name else '%username%')+ '</span>!'
|
||||
window._session = _session
|
||||
_ajax.detectPage()
|
||||
$('.fullscreen').hide();
|
||||
|
||||
if response.session.expire?
|
||||
setTimeout ->
|
||||
@@ -54,10 +60,12 @@ class Vkontakte
|
||||
_session.setUser {}
|
||||
$('#vk_login, .auth_notice').css display: 'block'
|
||||
$('.header-container .hello').hide()
|
||||
window._session = _session
|
||||
window._session = _session
|
||||
_ajax.detectPage()
|
||||
$('.fullscreen').hide();
|
||||
|
||||
auth: ->
|
||||
VK.Auth.login (response) ->
|
||||
VK.Auth.getLoginStatus (response) ->
|
||||
_vkontakte.authInfo(response)
|
||||
false
|
||||
, 8
|
||||
@@ -121,7 +129,10 @@ class Vkontakte
|
||||
false
|
||||
|
||||
$('#vk_login').live 'click', ->
|
||||
_vkontakte.auth()
|
||||
VK.Auth.login (response) ->
|
||||
_vkontakte.authInfo(response)
|
||||
false
|
||||
, 8
|
||||
false
|
||||
$('#vk_logout').live 'click', ->
|
||||
_ajax.go '/search/';
|
||||
|
||||
Reference in New Issue
Block a user