This commit is contained in:
Hannes Mannerheim 2013-08-25 23:06:06 +02:00
parent d6c2ee383c
commit 8f47c3b4f9
2 changed files with 31 additions and 33 deletions

View File

@ -169,7 +169,7 @@ function postQueetToAPI(queetText_txt, actionOnSuccess) {
· · · · · · · · · · · · · */ · · · · · · · · · · · · · */
function postNewLinkColor(newLinkColor) { function postNewLinkColor(newLinkColor) {
$.ajax({ url: 'API.php', $.ajax({ url: window.fullUrlToThisQvitterApp + 'API.php',
type: "POST", type: "POST",
data: { data: {
postRequest: 'account/update_link_color.json', postRequest: 'account/update_link_color.json',
@ -196,7 +196,7 @@ function postNewLinkColor(newLinkColor) {
· · · · · · · · · · · · · */ · · · · · · · · · · · · · */
function postNewBackgroundColor(newBackgroundColor) { function postNewBackgroundColor(newBackgroundColor) {
$.ajax({ url: 'API.php', $.ajax({ url: window.fullUrlToThisQvitterApp + 'API.php',
type: "POST", type: "POST",
data: { data: {
postRequest: 'account/update_background_color.json', postRequest: 'account/update_background_color.json',

View File

@ -263,40 +263,38 @@ $('#settings').click(function(){
function logoutWithoutReload(doShake) { function logoutWithoutReload(doShake) {
// preload default background if(window.currentStream == 'statuses/public_timeline.json') {
$('<img/>').attr('src', window.fullUrlToThisQvitterApp + 'img/ekan4.jpg').load(function() {
$('body').css('background-image', 'url(' + window.fullUrlToThisQvitterApp + 'img/ekan4.jpg)'); $('body').css('background-image', 'url(' + window.fullUrlToThisQvitterApp + 'img/ekan4.jpg)');
}
$('#submit-login').removeAttr('disabled');
$('#submit-login').removeAttr('disabled');
// delete any locally stored credentials
if(localStorageIsEnabled()) { // delete any locally stored credentials
delete localStorage.autologinUsername; if(localStorageIsEnabled()) {
delete localStorage.autologinPassword; delete localStorage.autologinUsername;
} delete localStorage.autologinPassword;
}
$('#user-header').animate({opacity:'0'},200);
$('#user-body').animate({opacity:'0'},200); $('#user-header').animate({opacity:'0'},200);
$('#user-footer').animate({opacity:'0'},200); $('#user-body').animate({opacity:'0'},200);
$('.menu-container').animate({opacity:'0'},200); $('#user-footer').animate({opacity:'0'},200);
$('#settingslink').fadeOut('slow'); $('.menu-container').animate({opacity:'0'},200);
$('#search').fadeOut('slow'); $('#settingslink').fadeOut('slow');
$('input#username').focus(); $('#search').fadeOut('slow');
$('input#username').focus();
if(doShake) {
$('input#username').css('background-color','pink');
$('input#password').css('background-color','pink');
}
$('#login-content').animate({opacity:'1'},200, function(){
if(doShake) { if(doShake) {
$('input#username').css('background-color','pink'); $('#login-content').effect('shake',{distance:5,times:2},function(){
$('input#password').css('background-color','pink'); $('input#username').animate({backgroundColor:'#fff'},1000);
$('input#password').animate({backgroundColor:'#fff'},1000);
});
} }
$('#login-content').animate({opacity:'1'},200, function(){ });
if(doShake) { $('#page-container').animate({opacity:'1'},200);
$('#login-content').effect('shake',{distance:5,times:2},function(){
$('input#username').animate({backgroundColor:'#fff'},1000);
$('input#password').animate({backgroundColor:'#fff'},1000);
});
}
});
$('#page-container').animate({opacity:'1'},200);
});
} }