Init spinner

This commit is contained in:
magnolia-fan
2011-06-30 06:05:57 +04:00
parent 4a2f793635
commit 124e9e481e
9 changed files with 71 additions and 18 deletions
+1 -2
View File
@@ -35,8 +35,7 @@ BeatHaven = (function() {
_player.initJplayer();
_search = new Search();
_pages = new Pages();
_settings = new Settings();
return _ajax.detectPage();
return _settings = new Settings();
};
BeatHaven.prototype.adjustSizes = function() {
$('.data-container').height($(window).height() - $('.header-container').height());
+1 -1
View File
@@ -81,7 +81,7 @@ Pages = (function() {
return false;
};
Pages.prototype.renderSettings = function(data) {
if (_session.getUser().name == null) {
if (_session.getUser().id == null) {
_ajax.go('/search/');
return false;
}
+17 -6
View File
@@ -42,17 +42,23 @@ Vkontakte = (function() {
name: r.response
}, function(ar2) {
_session.setUser(ar2.user);
return $('.header-container .hello .greating').html('Tēnā koe, <span class="settings">' + (_session.getUser().name ? _session.getUser().name : '%username%') + '</span>!');
$('.header-container .hello .greating').html('Tēnā koe, <span class="settings">' + (_session.getUser().name ? _session.getUser().name : '%username%') + '</span>!');
window._session = _session;
_ajax.detectPage();
return $('.fullscreen').hide();
});
});
} else {
_session.setUser(ar.user);
}
$('.header-container .hello').show();
return $('.header-container .hello .greating').html('Tēnā koe, <span class="settings">' + (_session.getUser().name ? _session.getUser().name : '%username%') + '</span>!');
$('.header-container .hello .greating').html('Tēnā koe, <span class="settings">' + (_session.getUser().name ? _session.getUser().name : '%username%') + '</span>!');
window._session = _session;
_ajax.detectPage();
return $('.fullscreen').hide();
});
if (response.session.expire != null) {
setTimeout(function() {
return setTimeout(function() {
_vkontakte.auth();
return false;
}, response.session.expire * 1000 - new Date().getTime() + 1000);
@@ -64,11 +70,13 @@ Vkontakte = (function() {
display: 'block'
});
$('.header-container .hello').hide();
window._session = _session;
_ajax.detectPage();
return $('.fullscreen').hide();
}
return window._session = _session;
};
Vkontakte.prototype.auth = function() {
VK.Auth.login(function(response) {
VK.Auth.getLoginStatus(function(response) {
_vkontakte.authInfo(response);
return false;
}, 8);
@@ -145,7 +153,10 @@ Vkontakte = (function() {
return Vkontakte;
})();
$('#vk_login').live('click', function() {
_vkontakte.auth();
VK.Auth.login(function(response) {
_vkontakte.authInfo(response);
return false;
}, 8);
return false;
});
$('#vk_logout').live('click', function() {
+17 -1
View File
@@ -1,9 +1,25 @@
@import "rounded";
.fullscreen {
position: absolute;
z-index: 9999;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ffffff;
text-align: center;
background: rgba(255, 255, 255, 0.9);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#e5ffffff, endColorstr=#e5ffffff);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#e5ffffff, endColorstr=#e5ffffff)";
.inner {
position: relative;
top: 50%;
margin-top: -50px;
height: 100px;
}
}
.button {
@@ -119,7 +135,7 @@
background-color: #07F;
color: #FFF;
top: 32px;
left: 230px;
left: 280px;
padding: 8px;
border: #05D 1px solid;
@include rounded(3);
+15 -2
View File
@@ -1,7 +1,20 @@
.fullscreen {
position: absolute;
z-index: 9999;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: center; }
background-color: #ffffff;
text-align: center;
background: rgba(255, 255, 255, 0.9);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e5ffffff, endColorstr=#e5ffffff);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#e5ffffff, endColorstr=#e5ffffff)"; }
.fullscreen .inner {
position: relative;
top: 50%;
margin-top: -50px;
height: 100px; }
.button {
display: inline;
@@ -79,7 +92,7 @@
background-color: #07F;
color: #FFF;
top: 32px;
left: 230px;
left: 280px;
padding: 8px;
border: #05D 1px solid;
border-radius: 3px;