default screen to search

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1360440 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-07-11 22:03:41 +00:00
parent f2fa9085d0
commit 75998ea77d
1 changed files with 29 additions and 20 deletions

View File

@ -52,26 +52,7 @@ function() {
});
}
// handle url with registration link
checkUrlParams=function(){
var validateMeId = $.urlParam('validateMe');
if (validateMeId) {
validateKey(validateMeId);
return;
}
var resetPassword= $.urlParam('resetPassword');
if (resetPassword){
resetPasswordForm(resetPassword);
return;
}
// by default display search screen
$.log("location:"+window.sammyArchivaApplication.getLocation());
//window.sammyArchivaApplication.setLocation("#search");
}
hasKarma=function(karmaName){
return $.inArray(karmaName,window.redbackModel.operatioNames)>=0;
}
decorateMenuWithKarma=function(user) {
var username = user.username;
@ -247,7 +228,6 @@ function() {
});
//this.get('', function () { this.app.runRoute('get', '#search') });
});
sammyArchivaApplication.run();
}
userLoggedCallbackFn=function(user){
@ -292,6 +272,33 @@ function() {
});
}
// handle url with registration link
checkUrlParams=function(){
var validateMeId = $.urlParam('validateMe');
if (validateMeId) {
validateKey(validateMeId);
return;
}
var resetPassword= $.urlParam('resetPassword');
if (resetPassword){
resetPasswordForm(resetPassword);
return;
}
var matches = window.location.toString().match(/^[^#]*(#.+)$/);
var hash = matches ? matches[1] : '';
$.log("location:"+window.sammyArchivaApplication.getLocation()+",hash:"+hash);
// by default display search screen
if(!hash){
window.sammyArchivaApplication.setLocation("#search");
}
}
hasKarma=function(karmaName){
return $.inArray(karmaName,window.redbackModel.operatioNames)>=0;
}
startArchivaApplication=function(){
$.log("startArchivaApplication");
@ -349,6 +356,8 @@ function() {
};
updateAppearanceToolBar();
window.sammyArchivaApplication.run();
}