From: Scott Baker Date: Tue, 25 Nov 2014 07:26:12 +0000 (-0800) Subject: popup error message X-Git-Url: http://git.onelab.eu/?p=plstackapi.git;a=commitdiff_plain;h=8778feefd0ca9e36e6ad9b1144bedf8abd135b7e popup error message --- diff --git a/planetstack/core/xoslib/dashboards/xosAdminDashboard.html b/planetstack/core/xoslib/dashboards/xosAdminDashboard.html index b41ac9f..8011884 100644 --- a/planetstack/core/xoslib/dashboards/xosAdminDashboard.html +++ b/planetstack/core/xoslib/dashboards/xosAdminDashboard.html @@ -27,6 +27,9 @@ Are you sure about this? +
+
+
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; diff --git a/planetstack/core/xoslib/templates/xosAdmin.html b/planetstack/core/xoslib/templates/xosAdmin.html index bc6ac02..daccf88 100644 --- a/planetstack/core/xoslib/templates/xosAdmin.html +++ b/planetstack/core/xoslib/templates/xosAdmin.html @@ -1,5 +1,21 @@ + +