Locale switch, greetings page
This commit is contained in:
@@ -7,6 +7,10 @@ class window.Ajax
|
||||
$('.data-container .inner').html data
|
||||
false
|
||||
|
||||
loadIndexPage: ->
|
||||
$('#content').load '/greetings/'
|
||||
false
|
||||
|
||||
loadAboutPage: ->
|
||||
$.get '/templates/about.html', (data) ->
|
||||
_page.renderTextpage data
|
||||
@@ -30,8 +34,8 @@ class window.Ajax
|
||||
detectPage: () ->
|
||||
if m = _ajax.getAnchor().match /\/artist\/(.+)\//
|
||||
_search.loadArtistData m[1]
|
||||
else if _ajax.getAnchor() == '' or _ajax.getAnchor().match /\/search\//
|
||||
#_ajax.loadSearchPage();
|
||||
else if _ajax.getAnchor() == ''
|
||||
_ajax.loadIndexPage();
|
||||
else if _ajax.getAnchor().match /\/settings\//
|
||||
_settings.loadSettingsPage()
|
||||
else if _ajax.getAnchor().match /\/about\//
|
||||
|
||||
@@ -25,6 +25,9 @@ class window.Vkontakte
|
||||
if typeof response isnt 'undefined' and response.session
|
||||
_session = new Session(response.session)
|
||||
_session.query '/user/auth', {}, (ar) ->
|
||||
if ar.ok_reload
|
||||
window.location.reload()
|
||||
false
|
||||
if ar.newbie
|
||||
VK.Api.call 'getVariable', key: 1281, (r) ->
|
||||
_session.query '/user/update', name: r.response, (ar2) ->
|
||||
|
||||
Reference in New Issue
Block a user