From f8247c175811a2982b07aa8f1220818724d6bb53 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 14 Nov 2012 20:03:53 +0000 Subject: [PATCH] after reset password remove resetPassword from url git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1409346 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/archiva.js | 1 + .../src/main/webapp/js/redback/user.js | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/archiva.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/archiva.js index 2e6bc44c1..aeb3765c6 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/archiva.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/archiva.js @@ -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", diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js index 83f966eb9..8f386401f 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js @@ -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; } }); -- 2.39.5