after reset password remove resetPassword from url

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1409346 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-11-14 20:03:53 +00:00
parent 8021d4e5c8
commit f8247c1758
2 changed files with 16 additions and 2 deletions

View 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",

View 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;
}
});