diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index cecff258d..711a65f64 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -380,6 +380,7 @@ + diff --git a/NzbDrone.Web/Scripts/NzbDrone/Notification.js b/NzbDrone.Web/Scripts/NzbDrone/Notification.js index d5697be6e..1a6d7acee 100644 --- a/NzbDrone.Web/Scripts/NzbDrone/Notification.js +++ b/NzbDrone.Web/Scripts/NzbDrone/Notification.js @@ -32,9 +32,10 @@ }); - jqXHR.error(function (xhr, ajaxOptions, thrownError) { + jqXHR.error(function (xhr, textStatus, thrownError) { //ignore notification errors. if (this.url.indexOf("/notification/Comet") !== 0) { + alert("Status: " + textStatus + ", Error: " + thrownError); $.gritter.add({ title: 'Request failed', text: this.url, diff --git a/NzbDrone.Web/Scripts/NzbDrone/grid.js b/NzbDrone.Web/Scripts/NzbDrone/grid.js new file mode 100644 index 000000000..9dfb5a307 --- /dev/null +++ b/NzbDrone.Web/Scripts/NzbDrone/grid.js @@ -0,0 +1,4 @@ +function grid_onError(e) { + //Suppress the alert + e.preventDefault(); +} \ No newline at end of file diff --git a/NzbDrone.Web/Views/History/Index.cshtml b/NzbDrone.Web/Views/History/Index.cshtml index 497acf2de..d82974c37 100644 --- a/NzbDrone.Web/Views/History/Index.cshtml +++ b/NzbDrone.Web/Views/History/Index.cshtml @@ -1,4 +1,5 @@ @model List +@using NzbDrone.Common @using NzbDrone.Web.Models @using NzbDrone.Web.Helpers @{ViewBag.Title = "History";} @@ -49,6 +50,11 @@ .Pageable( c => c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) + .ClientEvents(clientEvents => + { + if (EnviromentProvider.IsProduction) + clientEvents.OnError("grid_onError"); + }) .Render();}