aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js10
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js10
2 files changed, 14 insertions, 6 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js
index 57a08c023..79dc190bc 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js
@@ -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'));
+ }
+ }
});
}); \ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
index 40700c80c..9581a24bb 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
@@ -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');
}