Locale switch, greetings page

This commit is contained in:
magnolia-fan
2011-09-17 14:20:07 +04:00
parent 95c0b9fc12
commit 67e79acf23
6 changed files with 31 additions and 4 deletions
+6 -2
View File
@@ -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\//
+3
View File
@@ -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) ->