});
}
- // 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;
});
//this.get('', function () { this.app.runRoute('get', '#search') });
});
- sammyArchivaApplication.run();
}
userLoggedCallbackFn=function(user){
});
}
+ // 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");
};
updateAppearanceToolBar();
+ window.sammyArchivaApplication.run();
+
}