cleanup main content when 403 error

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1384929 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-09-14 21:33:06 +00:00
parent 4da10176c8
commit 619541066a
2 changed files with 6 additions and 4 deletions

View File

@ -41,6 +41,7 @@ function() {
removeMediumSpinnerImg("#main-content");
clearUserMessages();
displayRestError($.parseJSON(data.responseText));
$("#main-content" ).html("");
//displayErrorMessage($.i18n.prop('error.500'));
}
}

View File

@ -151,14 +151,15 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) {
/**
* open a confirm dialog based on bootstrap modal
* @param okFn callback function to call on ok confirm
* @param okMessage
* @param cancelMessage
* @param title
* @param okMessage message in the ok button
* @param cancelMessage message in the cancel button
* @param title title of the modal box
* @param bodyText html content of the modal box
*/
openDialogConfirm=function(okFn, okMessage, cancelMessage, title,bodyText){
var dialogCancel=$("#dialog-confirm-modal-cancel");
if (window.modalConfirmDialog==null) {
window.modalConfirmDialog = $("#dialog-confirm-modal").modal();//{backdrop:'static',show:false}
window.modalConfirmDialog = $("#dialog-confirm-modal").modal();
window.modalConfirmDialog.bind('hidden', function () {
$("#dialog-confirm-modal-header-title").html("");
$("#dialog-confirm-modal-body-text").html("");