mirror of https://github.com/apache/archiva.git
add a default 403 http error handling with jquery
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1383090 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fb43b1972e
commit
8ef6cb3fa0
|
@ -28,7 +28,15 @@ function() {
|
|||
// no cache for ajax queries as we get datas from servers so preventing caching !!
|
||||
jQuery.ajaxSetup( {
|
||||
cache: false,//!window.archivaDevMode
|
||||
dataType: 'json'
|
||||
dataType: 'json',
|
||||
statusCode: {
|
||||
403: function() {
|
||||
removeSmallSpinnerImg();
|
||||
removeMediumSpinnerImg("#main-content");
|
||||
clearUserMessages();
|
||||
displayErrorMessage($.i18n.prop('authz.karma.needed'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
|
@ -196,18 +196,18 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) {
|
|||
$("#small-spinner").remove();
|
||||
}
|
||||
|
||||
mediumSpinnerImg=function(){
|
||||
return "<img id=\"medium-spinner\" src=\"images/medium-spinner.gif\"/>";
|
||||
};
|
||||
|
||||
removeMediumSpinnerImg=function(){
|
||||
$("#medium-spinner").remove();
|
||||
}
|
||||
|
||||
removeMediumSpinnerImg=function(selector){
|
||||
$(selector+" #medium-spinner").remove();
|
||||
$(selector ).find("#medium-spinner").remove();
|
||||
}
|
||||
|
||||
mediumSpinnerImg=function(){
|
||||
return "<img id=\"medium-spinner\" src=\"images/medium-spinner.gif\"/>";
|
||||
};
|
||||
|
||||
closeDialogConfirm=function(){
|
||||
window.modalConfirmDialog.modal('hide');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue