From 153e013afbd9081be519b9c80fb881ff825d13a2 Mon Sep 17 00:00:00 2001 From: Keivan Date: Sat, 6 Nov 2010 08:43:13 +0800 Subject: [PATCH 1/2] cleaned up css --- NzbDrone.Core/CentralDispatch.cs | 2 +- .../Providers/NotificationProvider.cs | 5 +- NzbDrone.Web/Content/notibar.css | 5 +- NzbDrone.Web/Content/style.css | 164 +++--------------- NzbDrone.Web/Views/Shared/Site.Master | 33 ++-- 5 files changed, 42 insertions(+), 167 deletions(-) diff --git a/NzbDrone.Core/CentralDispatch.cs b/NzbDrone.Core/CentralDispatch.cs index 2a6bd44a7..288539101 100644 --- a/NzbDrone.Core/CentralDispatch.cs +++ b/NzbDrone.Core/CentralDispatch.cs @@ -32,7 +32,7 @@ namespace NzbDrone.Core string connectionString = String.Format("Data Source={0};Version=3;", Path.Combine(AppPath, "nzbdrone.db")); var dbProvider = ProviderFactory.GetProvider(connectionString, "System.Data.SQLite"); - + string logConnectionString = String.Format("Data Source={0};Version=3;", Path.Combine(AppPath, "log.db")); var logDbProvider = ProviderFactory.GetProvider(logConnectionString, "System.Data.SQLite"); var logRepository = new SimpleRepository(logDbProvider, SimpleRepositoryOptions.RunMigrations); diff --git a/NzbDrone.Core/Providers/NotificationProvider.cs b/NzbDrone.Core/Providers/NotificationProvider.cs index 631430db3..97b23c8a5 100644 --- a/NzbDrone.Core/Providers/NotificationProvider.cs +++ b/NzbDrone.Core/Providers/NotificationProvider.cs @@ -28,7 +28,10 @@ namespace NzbDrone.Core.Providers public List GetProgressNotifications { - get { return new List(_progressNotification.Values.Where(p => p.Status == ProgressNotificationStatus.InProgress)); } + get + { + return new List(_progressNotification.Values.Where(p => p.Status == ProgressNotificationStatus.InProgress)); + } } public void Dismiss(Guid notificationId) diff --git a/NzbDrone.Web/Content/notibar.css b/NzbDrone.Web/Content/notibar.css index c9585758c..532a7a95b 100644 --- a/NzbDrone.Web/Content/notibar.css +++ b/NzbDrone.Web/Content/notibar.css @@ -8,14 +8,13 @@ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85); padding: 10px; - position: fixed; text-align: left; + position: fixed; z-index: 99; - margin: 0px auto; bottom: 0; - width: 930px; font-size: 20px; color: White; + width:890px; } #msgCloseButton { diff --git a/NzbDrone.Web/Content/style.css b/NzbDrone.Web/Content/style.css index bb626824d..8aa87cc9f 100644 --- a/NzbDrone.Web/Content/style.css +++ b/NzbDrone.Web/Content/style.css @@ -1,26 +1,20 @@ -/* -Design by Free CSS Templates -http://www.freecsstemplates.org -Released for free under a Creative Commons Attribution 2.5 License -*/ -body -{ - padding: 0; - background: #191919 url(images/img07.jpg) no-repeat right top; - font-family: Segoe UI, Tahoma, Geneva, sans-serif; - font-size: 13px; - color: #3C3C3C; - background-attachment: fixed; -} - h1, h2, h3 { margin: 0; color: #549900; - font-family: Segoe UI Light,Tahoma, Geneva, sans-serif; text-transform: lowercase; } +body +{ + padding: 0; + background: #191919 url(images/img07.jpg) no-repeat right top; + font-family: "Segoe UI" , Tahoma, Geneva, sans-serif; + font-size: 13px; + color: #3C3C3C; + background-attachment: fixed; +} + h1 { font-size: 52px; @@ -47,10 +41,6 @@ ul, ol { } -blockquote -{ -} - a { color: #065EFE; @@ -66,60 +56,17 @@ a img border: none; } -img.left -{ - float: left; - margin: 7px 30px 0 0; -} - -img.right -{ - float: right; - margin: 7px 0 0 30px; -} hr { display: none; } -.list1 -{ -} - -.list1 li -{ - float: left; - line-height: normal; -} - -.list1 li img -{ - margin: 0 30px 30px 0; -} - -.list1 li.alt img -{ - margin-right: 0; -} - -#wrapper -{ -} - -/* Header */ - -#header -{ - width: 950px; - height: 70px; - margin: 0px auto; -} - /* Menu */ #menu { + height: 60px; } #menu ul @@ -167,10 +114,6 @@ hr color: #FFFFFF; } -#menu .first -{ -} - /* Page */ @@ -180,94 +123,29 @@ hr overflow: hidden; background-color: White; padding: 10px 20px 20px 20px; - width: 910px; } +#centered +{ + margin-right: auto; + width: 910px; + margin-left: auto; +} /** LOGO */ #logo { - width: 950px; + font-family: Segoe UI Light, Tahoma, Geneva, sans-serif; height: 135px; - margin: 0 auto; background: url(images/img03.jpg) no-repeat left top; -} - -#logo h1, #logo p -{ - margin: 0px; - line-height: normal; - text-transform: lowercase; - font-weight: lighter; - color: #FFFFFF; -} - -#logo p -{ - margin-top: -4px; - padding: 0px 0px 0px 120px; - text-transform: lowercase; - font-size: 13px; - color: #3E81FB; -} - -#logo h1 -{ - padding: 0px 0px 0px 120px; - letter-spacing: -1px; font-size: 90px; -} - -#logo h1 a -{ - text-decoration: none; color: #FFFFFF; -} - -#logo a -{ - text-decoration: none; - color: #3E81FB; -} - -#banner -{ - padding-bottom: 20px; -} - -/* Content */ - -#content -{ - background: #FFFFFF no-repeat; - float: left; - width: 100%; - padding: 0px 30px 20px 30px; -} - -/* Footer */ - -#footer -{ - width: 920px; - height: 100px; - margin: 0 auto; - padding: 0; -} - -#footer p -{ - margin: 0; - padding: 30px 0px 0px 0px; - text-align: center; + text-transform: lowercase; + letter-spacing: -1px; line-height: normal; - font-size: 11px; -} - -#footer a -{ + padding-left: 120px; } .stackframe diff --git a/NzbDrone.Web/Views/Shared/Site.Master b/NzbDrone.Web/Views/Shared/Site.Master index 0076a0ec0..ad4a22d5a 100644 --- a/NzbDrone.Web/Views/Shared/Site.Master +++ b/NzbDrone.Web/Views/Shared/Site.Master @@ -1,7 +1,7 @@ <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> + <%@ Import Namespace="Helpers" %> <%@ Import Namespace="Telerik.Web.Mvc.UI" %> - @@ -19,29 +19,24 @@ - - From d5a869ac54812a5a0dfbf8d9f771926815462ce0 Mon Sep 17 00:00:00 2001 From: Scott Schlesier Date: Sat, 6 Nov 2010 09:01:46 -0700 Subject: [PATCH 2/2] Parse UNC paths --- NzbDrone.Core.Test/ParserTest.cs | 1 + NzbDrone.Core/Parser.cs | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NzbDrone.Core.Test/ParserTest.cs b/NzbDrone.Core.Test/ParserTest.cs index dad7b1a87..3d1c3f19a 100644 --- a/NzbDrone.Core.Test/ParserTest.cs +++ b/NzbDrone.Core.Test/ParserTest.cs @@ -58,6 +58,7 @@ namespace NzbDrone.Core.Test [Row(@"c:\\test\\", @"c:\test")] [Row(@"C:\\Test\\", @"c:\test")] [Row(@"C:\\Test\\Test\", @"c:\test\test")] + [Row(@"\\Testserver\Test\", @"\\testserver\test")] public void Normalize_Path(string dirty, string clean) { var result = Parser.NormalizePath(dirty); diff --git a/NzbDrone.Core/Parser.cs b/NzbDrone.Core/Parser.cs index df2d18618..661898e36 100644 --- a/NzbDrone.Core/Parser.cs +++ b/NzbDrone.Core/Parser.cs @@ -130,11 +130,20 @@ namespace NzbDrone.Core return NormalizeRegex.Replace(title, String.Empty).ToLower(); } + //Note: changing case on path is a problem for running on mono/*nix public static string NormalizePath(string path) { if (String.IsNullOrEmpty(path)) throw new ArgumentException("Path can not be null or empty"); - return new FileInfo(path).FullName.ToLower().Trim('/', '\\', ' '); + + var info = new FileInfo(path); + + if( info.FullName.StartsWith(@"\\")) //UNC + { + return info.FullName.ToLower().TrimEnd('/', '\\', ' '); + } + + return info.FullName.ToLower().Trim('/', '\\', ' '); } } }