From 2fc561f19519e89b22d361b6c863f81d950c3a22 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 2 Feb 2012 23:08:50 -0800 Subject: [PATCH] After adding all existing series, show no series message to user. --- NzbDrone.Web/Scripts/NzbDrone/addSeries.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/NzbDrone.Web/Scripts/NzbDrone/addSeries.js b/NzbDrone.Web/Scripts/NzbDrone/addSeries.js index bce9c753a..a96f6b421 100644 --- a/NzbDrone.Web/Scripts/NzbDrone/addSeries.js +++ b/NzbDrone.Web/Scripts/NzbDrone/addSeries.js @@ -19,7 +19,7 @@ $(".masterQualitySelector").live('change', function () { }); }); -$(".addExistingButton").live('click', function () { +$(".addExistingButton").live('click', function() { var root = $(this).parents(".existingSeries"); var title = $(this).siblings(".seriesLookup").val(); var seriesId = $(this).siblings(".seriesId").val(); @@ -42,11 +42,13 @@ $(".addExistingButton").live('click', function () { type: "POST", url: addSeriesUrl, data: jQuery.param({ path: path, seriesName: title, seriesId: seriesId, qualityProfileId: qualityId }), - error: function (req, status, error) { + error: function(req, status, error) { alert("Sorry! We could not add " + path + " at this time. " + error); }, - success: function () { + success: function() { root.hide('highlight', 'fast'); + if ($('.existingSeries').filter(":visible").length === 1) + reloadExistingSeries(); } });