From 8778feefd0ca9e36e6ad9b1144bedf8abd135b7e Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Mon, 24 Nov 2014 23:26:12 -0800 Subject: [PATCH] popup error message --- .../xoslib/dashboards/xosAdminDashboard.html | 3 +++ .../core/xoslib/static/js/xoslib/xosHelper.js | 12 ++++++++++++ planetstack/core/xoslib/templates/xosAdmin.html | 16 ++++++++++++++++ 3 files changed, 31 insertions(+) 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 @@ + +