From 82808355c4b116c030449746755d7d08f1a17369 Mon Sep 17 00:00:00 2001 From: Keivan Date: Mon, 28 Mar 2011 17:12:48 -0700 Subject: [PATCH] added sub menu for add series --- NzbDrone.Core/Instrumentation/NlogWriter.cs | 2 +- NzbDrone.Web/Content/style.css | 1 + NzbDrone.Web/Controllers/SeriesController.cs | 5 ----- NzbDrone.Web/NzbDrone.Web.csproj | 2 +- NzbDrone.Web/Views/Series/Add.aspx | 17 ----------------- NzbDrone.Web/Views/Series/AddNew.aspx | 4 +++- NzbDrone.Web/Views/Series/SubMenu.ascx | 7 ++++--- NzbDrone.Web/log.config | 2 +- 8 files changed, 11 insertions(+), 29 deletions(-) delete mode 100644 NzbDrone.Web/Views/Series/Add.aspx diff --git a/NzbDrone.Core/Instrumentation/NlogWriter.cs b/NzbDrone.Core/Instrumentation/NlogWriter.cs index 03240e7b1..9fe0733e4 100644 --- a/NzbDrone.Core/Instrumentation/NlogWriter.cs +++ b/NzbDrone.Core/Instrumentation/NlogWriter.cs @@ -6,7 +6,7 @@ namespace NzbDrone.Core.Instrumentation { public class NlogWriter : TextWriter { - private static readonly Logger Logger = LogManager.GetLogger("DB"); + private static readonly Logger Logger = LogManager.GetLogger("NzbDrone.SubSonic"); public override void Write(char[] buffer, int index, int count) diff --git a/NzbDrone.Web/Content/style.css b/NzbDrone.Web/Content/style.css index bd306bee2..1daf9fc95 100644 --- a/NzbDrone.Web/Content/style.css +++ b/NzbDrone.Web/Content/style.css @@ -122,6 +122,7 @@ hr overflow: hidden; background-color: White; padding: 10px 20px 20px 20px; + min-height: 300px; } diff --git a/NzbDrone.Web/Controllers/SeriesController.cs b/NzbDrone.Web/Controllers/SeriesController.cs index f544bc45c..f618af061 100644 --- a/NzbDrone.Web/Controllers/SeriesController.cs +++ b/NzbDrone.Web/Controllers/SeriesController.cs @@ -60,11 +60,6 @@ public ActionResult Index() return View(); } - public ActionResult Add() - { - return View(new AddNewSeriesModel()); - } - public ActionResult AddExisting() { var defaultQuality = Convert.ToInt32(_configProvider.GetValue("DefaultQualityProfile", "1", true)); diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index 16745310b..d4a904e9a 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -15,6 +15,7 @@ v4.0 true + false true @@ -293,7 +294,6 @@ - diff --git a/NzbDrone.Web/Views/Series/Add.aspx b/NzbDrone.Web/Views/Series/Add.aspx deleted file mode 100644 index 97bf2b5c7..000000000 --- a/NzbDrone.Web/Views/Series/Add.aspx +++ /dev/null @@ -1,17 +0,0 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> - - - Add Series - - - <% - Html.RenderPartial("SubMenu"); - %> - - - - <%: Html.ActionLink("Add New Series", "AddNew", "Series") %> -
- <%: Html.ActionLink("Add Existing Series", "AddExisting", "Series") %> - -
\ No newline at end of file diff --git a/NzbDrone.Web/Views/Series/AddNew.aspx b/NzbDrone.Web/Views/Series/AddNew.aspx index 57451b209..82ca63d0c 100644 --- a/NzbDrone.Web/Views/Series/AddNew.aspx +++ b/NzbDrone.Web/Views/Series/AddNew.aspx @@ -60,10 +60,12 @@ var seriesSearch = $('#new_series_id'); $("#result").text("Searching..."); - document.getElementById('RootDirectories').style.display = 'inline'; + $("#result").load('<%=Url.Action("SearchForSeries", "Series") %>', { seriesName: seriesSearch.val() }); + + document.getElementById('RootDirectories').style.display = 'inline'; } function addSeries() { diff --git a/NzbDrone.Web/Views/Series/SubMenu.ascx b/NzbDrone.Web/Views/Series/SubMenu.ascx index 7fbb7852e..a0cb233a9 100644 --- a/NzbDrone.Web/Views/Series/SubMenu.ascx +++ b/NzbDrone.Web/Views/Series/SubMenu.ascx @@ -1,10 +1,11 @@ <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> - <%@ Import Namespace="Telerik.Web.Mvc.UI" %> - <% Html.Telerik().Menu().Name("telerikGrid").Items(items => { - items.Add().Text("Add Series").Action("Add", "Series"); + items.Add().Text("Add Series") + .Items(subItem => subItem.Add().Text("New Series").Action("AddNew", "Series")) + .Items(subItem => subItem.Add().Text("Existing Series").Action("AddExisting", "Series")); + items.Add().Text("Start RSS Sync").Action("RssSync", "Series"); items.Add().Text("Rename All").Action("RenameAll", "Series"); }).Render(); diff --git a/NzbDrone.Web/log.config b/NzbDrone.Web/log.config index 4780ba7e7..d3b34e5d0 100644 --- a/NzbDrone.Web/log.config +++ b/NzbDrone.Web/log.config @@ -2,7 +2,7 @@ -