]> source.dussan.org Git - archiva.git/commitdiff
after reset password remove resetPassword from url
authorOlivier Lamy <olamy@apache.org>
Wed, 14 Nov 2012 20:03:53 +0000 (20:03 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 14 Nov 2012 20:03:53 +0000 (20:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1409346 13f79535-47bb-0310-9956-ffa450edef68

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

index 2e6bc44c101b881478cb47e567195c97f7492844..aeb3765c6aeb09962340e9e6b8f8ae4383444170 100644 (file)
@@ -77,6 +77,7 @@ $.ajax({
                     "jquery.fileupload.ip":"jquery.fileupload-ip-1.0.6",
                     "jquery.fileupload.ui":"jquery.fileupload-ui-6.6.3",
                     "tmpl": "tmpl.min",
+                    "purl": "purl-2.2.1",
                     "prettify": "prettify",
                     "sammy": "sammy.0.7.1",
                     "jqueryFileTree": "jqueryFileTree-1.0.1",
index 83f966eb9edc35815c1eed6e50e0982e0da365f1..8f386401fd00e013d267230deb72382220d854ec 100644 (file)
@@ -16,8 +16,8 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","knockout.simpleGrid"],
-function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid) {
+define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","knockout.simpleGrid","purl"],
+function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) {
 
   /**
    * object model for user with some function to create/update/delete users
@@ -482,6 +482,19 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid) {
               displayErrorMessage("issue appended");
             }
             window.modalChangePasswordBox.modal('hide');
+            var curHash = getUrlHash();
+            var url = $.url(window.location);
+            var newLocation=url.attr("path");
+            var requestLang=url.param("request_lang");
+            if(requestLang){
+              newLocation+="?request_lang="+requestLang;
+            }
+            if(curHash){
+              newLocation+="#"+curHash;
+            }else{
+              newLocation+="#search";
+            }
+            window.location=newLocation;
           }
         });