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 !!
|
// no cache for ajax queries as we get datas from servers so preventing caching !!
|
||||||
jQuery.ajaxSetup( {
|
jQuery.ajaxSetup( {
|
||||||
cache: false,//!window.archivaDevMode
|
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();
|
$("#small-spinner").remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
mediumSpinnerImg=function(){
|
|
||||||
return "<img id=\"medium-spinner\" src=\"images/medium-spinner.gif\"/>";
|
|
||||||
};
|
|
||||||
|
|
||||||
removeMediumSpinnerImg=function(){
|
removeMediumSpinnerImg=function(){
|
||||||
$("#medium-spinner").remove();
|
$("#medium-spinner").remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
removeMediumSpinnerImg=function(selector){
|
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(){
|
closeDialogConfirm=function(){
|
||||||
window.modalConfirmDialog.modal('hide');
|
window.modalConfirmDialog.modal('hide');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue