Hook up CMS.ServerError to new alerting system

This commit is contained in:
David Baumgold
2013-05-08 17:30:16 -04:00
parent 40000a3ac5
commit 56a92bff51

View File

@@ -1,4 +1,9 @@
CMS.ServerError = function(model, error) {
// this handler is for the client:server communication not the validation errors which handleValidationError catches
window.alert("Server Error: " + error.responseText);
var m = new CMS.Models.Alert({
"type": "error",
"title": "Server Error",
"message": error.responseText,
"close": true
});
new CMS.Views.Alert({model: m}).render();
};