summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-09-06 14:21:22 +0000
committerOlivier Lamy <olamy@apache.org>2012-09-06 14:21:22 +0000
commitdcc5f9b11fd2dacc19688b606d8189cceb9bc0ee (patch)
treecb9428ddb3582386c625a63e59bf5e3afa0dc493 /archiva-modules
parent56533b964bcba2957dc76f50a455a87c0252d9d2 (diff)
downloadarchiva-dcc5f9b11fd2dacc19688b606d8189cceb9bc0ee.tar.gz
archiva-dcc5f9b11fd2dacc19688b606d8189cceb9bc0ee.zip
logout must reload screen to take care of no more karma
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1381617 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js15
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/menu.html2
2 files changed, 14 insertions, 3 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
index c0db5b811..74840a944 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
@@ -44,11 +44,22 @@ function(jquery,ui,sammy,tmpl) {
$("#register-link").show();
$("#logout-link").hide();
$("#change-password-link").hide();
+ // cleanup karmas
+ window.redbackModel.operatioNames=[];
hideElementWithKarma();
- if (doScreenChange) screenChange();
+ if (doScreenChange) {
+ screenChange();
+ }
$("#main-content").html("");
$.ajax({
- url: 'restServices/redbackServices/loginService/logout'
+ url: 'restServices/redbackServices/loginService/logout',
+ complete: function(){
+ if(!doScreenChange){
+ // refresh the screen as no more karmas now
+ window.sammyArchivaApplication.refresh();
+ }
+ }
+
});
};
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/menu.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/menu.html
index f0ee15a67..35e44a890 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/menu.html
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/menu.html
@@ -79,7 +79,7 @@
</a>
</li>
<li id="logout-link" style="display: none">
- <a onclick="logout(true);" id="logout-link-a">
+ <a onclick="logout(false);" id="logout-link-a">
<span class="btn btn-danger label force-upper-case">${$.i18n.prop('logout')}</span>
</a>
</li>