]> source.dussan.org Git - archiva.git/commitdiff
after login redisplay current screen to consider new user karmas
authorOlivier Lamy <olamy@apache.org>
Thu, 6 Sep 2012 14:21:08 +0000 (14:21 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 6 Sep 2012 14:21:08 +0000 (14:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1381616 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js

index eb5454634c920c6fc98ee7f2b342ac08b0667131..dca92888c01aa42377cc2f677579a8d6cc640861 100644 (file)
@@ -339,8 +339,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
    */
   loginBox=function(){
 
-
-
     if (window.modalLoginWindow!=null){
       window.modalLoginWindow=null;
     }
@@ -388,6 +386,7 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
    * @param result
    */
   var successLoginCallbackFn=function(result){
+
     var logged = false;
     if (result == null) {
       logged = false;
@@ -419,6 +418,7 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
       }
       clearForm("#user-login-form");
       decorateMenuWithKarma(user);
+
       return;
     }
     var modalLoginErrMsg=$("#modal-login-err-message");
@@ -443,6 +443,8 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
   var completeLoginCallbackFn=function(){
     $("#modal-login-ok").removeAttr("disabled");
     $("#small-spinner").remove();
+    // force current screen reload to consider user karma
+    window.sammyArchivaApplication.refresh();
   }
 
   resetPasswordForm=function(key){
@@ -535,7 +537,7 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
   login=function(){
     $.log("user.js#login");
     $("#modal-login-err-message").html("");
-    screenChange();
+
     var valid = $("#user-login-form").valid();
     if (!valid) {
         return;