correctly go to welcome on logout

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1449110 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-02-22 16:35:34 +00:00
parent 7c6999162c
commit 4e4d09901f
1 changed files with 13 additions and 12 deletions

View File

@ -77,7 +77,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
logout=function(doScreenChange){
logout=function(){
var user = getUserFromLoginCookie();
if(user){
user.logged=false;
@ -94,14 +94,15 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
$("#user-messages" ).empty();
$("#login-welcome" ).hide();
$.ajax({
url: 'restServices/redbackServices/loginService/logout',
complete: function(){
url: 'restServices/redbackServices/loginService/logout'
} ).always(
function(){
// go to welcome on logout
//window.sammyArchivaApplication.setLocation("#welcome");
$.log("displayWelcome");
displayWelcome();
}
});
);
};
@ -745,9 +746,9 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
displayWelcome=function(){
$.log("#welcome hash");
checkCreateAdminLink(function(){
//window.sammyArchivaApplication.setLocation("#search")
$("#main-content" ).html($("#welcome" ).tmpl({runtimeInfo: window.archivaRuntimeInfo}));
drawQuickSearchAutocomplete("#quick-search-autocomplete-welcome");
window.sammyArchivaApplication.setLocation("#welcome");
//$("#main-content" ).html($("#welcome" ).tmpl({runtimeInfo: window.archivaRuntimeInfo}));
//drawQuickSearchAutocomplete("#quick-search-autocomplete-welcome");
});
}