Update: Error UI Updated

This commit is contained in:
Gary Sharp
2013-11-14 13:34:53 +11:00
parent b1048588e7
commit fe00963cb0
19 changed files with 514 additions and 160 deletions
+15 -70
View File
@@ -45,91 +45,36 @@ namespace Disco.Web.Views.Shared
#line 2 "..\..\Views\Shared\Error.cshtml"
ViewBag.Title = "Server Error";
ViewBag.Title = "An Error Occurred";
var ex = Model.Exception;
while (ex != null)
{
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral("\r\n<div");
WriteLiteral(" class=\"form\"");
WriteLiteral(" id=\"layout_Error\"");
WriteLiteral(" style=\"width: 650px\"");
WriteLiteral(">\r\n");
WriteLiteral(">\r\n <h2");
WriteLiteral(" style=\"white-space: pre;\"");
WriteLiteral(">");
WriteLiteral(" ");
#line 12 "..\..\Views\Shared\Error.cshtml"
Write(ex.Message);
#line default
#line hidden
WriteLiteral("</h2>\r\n <table");
WriteLiteral(" style=\"background-color: #fff;\"");
WriteLiteral(">\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 40px;\"");
WriteLiteral(">Type:</th>\r\n <td>\r\n");
WriteLiteral(" ");
#line 17 "..\..\Views\Shared\Error.cshtml"
Write(ex.GetType().Name);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
">Stack:\r\n </th>\r\n <td>\r\n <div");
WriteLiteral(" class=\"code\"");
WriteLiteral(" style=\"width: 560px; white-space: pre; overflow: auto;\"");
WriteLiteral(">");
#line 24 "..\..\Views\Shared\Error.cshtml"
Write(ex.StackTrace);
#line default
#line hidden
WriteLiteral("</div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
#line 29 "..\..\Views\Shared\Error.cshtml"
ex = ex.InnerException;
}
#line 8 "..\..\Views\Shared\Error.cshtml"
Write(Html.DisplayFor(m => m.Exception));
#line default
#line hidden
WriteLiteral(@"
<script>
$(function () {
$('#layout_PageHeading').css({ 'background': '#C80000', 'color': '#fff' });
$('#layout_Page').css({ 'background': 'linear-gradient(to top, #F2B0B0, #C80000 200px)' }).find('h2').css({ 'color': '#fff' });
});
</script>
");
<script>
$(function () {
$('#layout_PageHeading').css({ 'background': '#C80000', 'color': '#fff' });
$('#layout_Page').css({ 'background': 'linear-gradient(to top, #F2B0B0, #C80000 200px)' });
});
</script>
</div>");
}
}