X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fcore%2Fxoslib%2Fstatic%2Fjs%2Fxoslib%2FxosHelper.js;h=8fa27a671e98d10236ac425e7412b7ac8852d3e7;hb=8778feefd0ca9e36e6ad9b1144bedf8abd135b7e;hp=dc11670bf12c93cc335de98335af115f6515ddb6;hpb=4e0f6cf095e559a5ac49f56e5124eda19e7e18c7;p=plstackapi.git diff --git a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js index dc11670..8fa27a6 100644 --- a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js +++ b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js @@ -67,11 +67,23 @@ XOSApplication = Marionette.Application.extend({ } }, + popupErrorDialog: function(responseText) { + $("#xos-error-dialog").html(templateFromId("#xos-error-response")($.parseJSON(responseText))); + $("#xos-error-dialog").dialog({ + modal: true, + buttons: { + Ok: function() { $(this).dialog("close"); } + } + }); + }, + showError: function(result) { result["statusclass"] = "failure"; if (this.logTableId) { this.appendLogWindow(result); + this.popupErrorDialog(result.responseText); } else { + // this is really old stuff $(this.errorBoxId).show(); $(this.errorBoxId).html(_.template($(this.errorTemplate).html())(result)); var that=this;