Merge branch 'kay.one' of github.com:NzbDrone/NzbDrone into markus

This commit is contained in:
Mark McDowall 2011-11-26 11:10:36 -08:00
commit 02f6af4750
67 changed files with 29123 additions and 4068 deletions

View File

@ -12,7 +12,7 @@ namespace NzbDrone.Common
{
public const string NZBDRONE_SERVICE_NAME = "NzbDrone";
private static readonly Logger Logger = LogManager.GetLogger("Host.ServiceManager");
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
public virtual bool ServiceExist(string name)
{
@ -90,7 +90,7 @@ namespace NzbDrone.Common
public virtual void Stop(string serviceName)
{
Logger.Info("Stopping {0} Service...");
Logger.Info("Stopping {0} Service...", serviceName);
var service = GetService(serviceName);
if (service == null)
{
@ -108,7 +108,7 @@ namespace NzbDrone.Common
service.Refresh();
if (service.Status == ServiceControllerStatus.Stopped)
{
Logger.Info("{0} has stopped successfully.");
Logger.Info("{0} has stopped successfully.", serviceName);
}
else
{

View File

@ -1,4 +1,5 @@
using System.IO;
using System;
using System.IO;
using NUnit.Framework;
using Ninject;
using NzbDrone.Common;
@ -35,24 +36,17 @@ namespace NzbDrone.Core.Test.Framework
TestDbHelper.CreateDataBaseTemplate();
}
protected StandardKernel LiveKernel = null;
protected IDatabase Db = null;
[SetUp]
public virtual void CoreTestSetup()
private IDatabase _db;
protected IDatabase Db
{
LiveKernel = new StandardKernel();
}
protected override void WithStrictMocker()
{
base.WithStrictMocker();
if (Db != null)
get
{
Mocker.SetConstant(Db);
if (_db == null)
throw new InvalidOperationException("Test db doesn't exists. Make sure you call WithRealDb() if you intend to use an actual database.");
return _db;
}
private set { _db = value; }
}
protected void WithRealDb()

View File

@ -61,5 +61,19 @@ namespace NzbDrone.Core.Test.JobTests
mocker.GetMock<SeasonSearchJob>().Verify(c => c.Start(notification, 1, It.IsAny<int>()),
Times.Never());
}
[Test]
public void SeriesSearch_should_not_search_for_season_0()
{
Mocker.GetMock<EpisodeProvider>()
.Setup(c => c.GetSeasons(It.IsAny<int>()))
.Returns(new List<int> { 0, 1, 2 });
Mocker.Resolve<SeriesSearchJob>().Start(MockNotification, 12, 0);
Mocker.GetMock<SeasonSearchJob>()
.Verify(c => c.Start(It.IsAny<ProgressNotification>(), It.IsAny<int>(), 0), Times.Never());
}
}
}

View File

@ -46,6 +46,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\FluentAssertions.1.6.0\Lib\net40\FluentAssertions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
@ -89,8 +93,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libraries\TvdbLib.dll</HintPath>
</Reference>
<Reference Include="WebActivator, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\WebActivator.1.0.0.0\lib\WebActivator.dll</HintPath>
<Reference Include="WebActivator, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\WebActivator.1.5\lib\net40\WebActivator.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>

View File

@ -168,7 +168,6 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests
//Assert
mocker.VerifyAllMocks();
mocker.GetMock<DiskProvider>().Verify(c => c.MoveDirectory(It.IsAny<string>(), It.IsAny<string>()), Times.Never());
ExceptionVerification.ExcpectedWarns(1);
}
[Test]

View File

@ -22,7 +22,7 @@ namespace NzbDrone.Core.Test.ProviderTests
[SetUp]
public void Setup()
{
tvDbProvider = LiveKernel.Get<TvDbProvider>();
tvDbProvider = new StandardKernel().Get<TvDbProvider>();
}
[TestCase("The Simpsons")]

View File

@ -4,11 +4,12 @@
<package id="EntityFramework" version="4.2.0.0" />
<package id="EntityFramework.SqlServerCompact" version="4.1.8482.2" />
<package id="FluentAssertions" version="1.6.0" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
<package id="Moq" version="4.0.10827" />
<package id="NBuilder" version="3.0.1.1" />
<package id="Ninject" version="2.2.1.4" />
<package id="NLog" version="2.0.0.2000" />
<package id="NUnit" version="2.5.10.11092" />
<package id="SqlServerCompact" version="4.0.8482.1" />
<package id="WebActivator" version="1.0.0.0" />
<package id="WebActivator" version="1.5" />
</packages>

View File

@ -133,6 +133,10 @@
<Reference Include="Ionic.Zip">
<HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Migrator, Version=0.9.1.26254, Culture=neutral, PublicKeyToken=3b3586e9632ecfce, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libraries\Migrator.NET\Migrator.dll</HintPath>
@ -186,8 +190,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\twitterizer.2.4.0.26532\lib\net40\Twitterizer2.dll</HintPath>
</Reference>
<Reference Include="WebActivator">
<HintPath>..\packages\WebActivator.1.0.0.0\lib\WebActivator.dll</HintPath>
<Reference Include="WebActivator, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\WebActivator.1.5\lib\net40\WebActivator.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>

View File

@ -15,7 +15,7 @@ namespace NzbDrone.Core.Providers
public class DiskScanProvider
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private static readonly string[] MediaExtentions = new[] { ".mkv", ".avi", ".wmv", ".mp4", ".mpg", ".mpeg", ".xvid", ".flv", ".mov", ".vob", ".ts", ".rm", ".rmvb", ".xvid", ".dvr-ms" };
private static readonly string[] MediaExtentions = new[] { ".mkv", ".avi", ".wmv", ".mp4", ".mpg", ".mpeg", ".xvid", ".flv", ".mov", ".rm", ".rmvb", ".xvid", ".dvr-ms" };
private readonly DiskProvider _diskProvider;
private readonly EpisodeProvider _episodeProvider;
private readonly MediaFileProvider _mediaFileProvider;
@ -235,7 +235,7 @@ namespace NzbDrone.Core.Providers
private List<string> GetVideoFiles(string path)
{
Logger.Debug("Scanning '{0}' for episodes", path);
Logger.Debug("Scanning '{0}' for video files", path);
var filesOnDisk = _diskProvider.GetFiles(path, SearchOption.AllDirectories);

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NLog;
using NzbDrone.Core.Model;
using NzbDrone.Core.Model.Notification;
@ -36,7 +37,7 @@ namespace NzbDrone.Core.Providers.Jobs
throw new ArgumentOutOfRangeException("targetId");
Logger.Debug("Getting seasons from database for series: {0}", targetId);
var seasons = _episodeProvider.GetSeasons(targetId);
var seasons = _episodeProvider.GetSeasons(targetId).Where(s => s > 0);
foreach (var season in seasons)
{

View File

@ -5,7 +5,6 @@ using NLog;
using Ninject;
using NzbDrone.Common;
using NzbDrone.Core.Model;
using NzbDrone.Core.Providers.Core;
namespace NzbDrone.Core.Providers
{
@ -59,8 +58,6 @@ namespace NzbDrone.Core.Providers
if (series == null)
{
Logger.Warn("Unable to Import new download [{0}], Can't find matching series in database.",
subfolderInfo.Name);
TagFolder(subfolderInfo, PostDownloadStatusType.UnknownSeries);
return;
}
@ -77,14 +74,11 @@ namespace NzbDrone.Core.Providers
{
if (importedFiles.Count == 0)
{
Logger.Warn("Unable to Import new download [{0}], no importable files were found.",
subfolderInfo.Name);
TagFolder(subfolderInfo, PostDownloadStatusType.ParseError);
}
else
{
//Unknown Error Importing (Possibly a lesser quality than episode currently on disk)
Logger.Warn("Unable to Import new download [{0}].", subfolderInfo.Name);
TagFolder(subfolderInfo, PostDownloadStatusType.Unknown);
}
}
@ -96,8 +90,13 @@ namespace NzbDrone.Core.Providers
if (!String.Equals(target.NormalizePath(), directory.FullName.NormalizePath(), StringComparison.InvariantCultureIgnoreCase))
{
Logger.Warn("Unable to download [{0}]. Status: {1}",directory.Name, status);
_diskProvider.MoveDirectory(directory.FullName, target);
}
else
{
Logger.Debug("Unable to download [{0}], {1}", directory.Name, status);
}
}
public static string GetTaggedFolderName(DirectoryInfo directoryInfo, PostDownloadStatusType status)

View File

@ -22,10 +22,10 @@ namespace NzbDrone.Core
_jobProvider = jobProvider;
}
//TODO: Make timer doesn't keep running during unit tests.
//TODO: Fix this so the timer doesn't keep running during unit tests.
public void StartTimer(int secondInterval)
{
_onCacheRemove = new CacheItemRemovedCallback(DoWork);
_onCacheRemove = DoWork;
HttpRuntime.Cache.Insert(GetType().ToString(), secondInterval, null,
DateTime.Now.AddSeconds(secondInterval), Cache.NoSlidingExpiration,

View File

@ -4,11 +4,12 @@
<package id="EntityFramework" version="4.2.0.0" />
<package id="EntityFramework.SqlServerCompact" version="4.1.8482.2" />
<package id="Growl" version="0.6" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
<package id="MiniProfiler" version="1.9" />
<package id="Newtonsoft.Json" version="4.0.4" />
<package id="Ninject" version="2.2.1.4" />
<package id="NLog" version="2.0.0.2000" />
<package id="SqlServerCompact" version="4.0.8482.1" />
<package id="twitterizer" version="2.4.0.26532" />
<package id="WebActivator" version="1.0.0.0" />
<package id="WebActivator" version="1.5" />
</packages>

View File

@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
@ -14,6 +15,7 @@ using NzbDrone.Test.Common.AutoMoq.Unity;
namespace NzbDrone.Test.Common.AutoMoq
{
[DebuggerStepThrough]
public class AutoMoqer
{
internal readonly MockBehavior DefaultBehavior = MockBehavior.Default;

View File

@ -60,6 +60,8 @@ namespace NzbDrone.Update.Providers
_serviceProvider.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME);
}
//TODO:Should be able to restart service if anything beyond this point fails
logger.Info("Killing all running processes");
var processes = _processProvider.GetProcessByName(ProcessProvider.NzbDroneProccessName);
foreach (var processInfo in processes)
@ -102,6 +104,7 @@ namespace NzbDrone.Update.Providers
private void RollBack(string targetFolder)
{
//TODO:this should ignore single file failures.
logger.Info("Attempting to rollback upgrade");
_diskProvider.CopyDirectory(_enviromentProvider.GetUpdateBackUpFolder(), targetFolder);
}

View File

@ -10,11 +10,8 @@ using Microsoft.Web.Infrastructure.DynamicModuleHelper;
//using MvcMiniProfiler.Data.Linq2Sql;
[assembly: WebActivator.PreApplicationStartMethod(
typeof(NzbDrone.Web.App_Start.MiniProfilerPackage), "PreStart")]
[assembly: WebActivator.PostApplicationStartMethod(
typeof(NzbDrone.Web.App_Start.MiniProfilerPackage), "PostStart")]
[assembly: WebActivator.PreApplicationStartMethod(typeof(NzbDrone.Web.App_Start.MiniProfilerPackage), "PreStart")]
[assembly: WebActivator.PostApplicationStartMethod(typeof(NzbDrone.Web.App_Start.MiniProfilerPackage), "PostStart")]
namespace NzbDrone.Web.App_Start
@ -65,10 +62,11 @@ namespace NzbDrone.Web.App_Start
{
context.BeginRequest += (sender, e) =>
{
var request = ((HttpApplication)sender).Request;
//var request = ((HttpApplication)sender).Request;
//TODO: By default only local requests are profiled, optionally you can set it up
// so authenticated users are always profiled
if (request.IsLocal) { MiniProfiler.Start(); }
//if (request.IsLocal) { MiniProfiler.Start(); }
MiniProfiler.Start();
};

View File

@ -1,36 +0,0 @@
/* -----------------------------------------------------------------------
Blueprint CSS Framework 1.0
http://blueprintcss.org
* Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */
/* ie.css */
body {text-align:center;}
.container {text-align:left;}
* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {display:inline;overflow-x:hidden;}
* html legend {margin:0px -8px 16px 0;padding:0;}
sup {vertical-align:text-top;}
sub {vertical-align:text-bottom;}
html>body p code {*white-space:normal;}
hr {margin:-8px auto 11px;}
img {-ms-interpolation-mode:bicubic;}
.clearfix, .container {display:inline-block;}
* html .clearfix, * html .container {height:1%;}
fieldset {padding-top:0;}
legend {margin-top:-0.2em;margin-bottom:1em;margin-left:-0.5em;}
textarea {overflow:auto;}
label {vertical-align:middle;position:relative;top:-0.25em;}
input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;}
input.text:focus, input.title:focus {border-color:#666;}
input.text, input.title, textarea, select {margin:0.5em 0;}
input.checkbox, input.radio {position:relative;top:.25em;}
form.inline div, form.inline p {vertical-align:middle;}
form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;}
button, input.button {position:relative;top:0.25em;}

View File

@ -1,197 +0,0 @@
/* --------------------------------------------------------------
liquid.css
* Sets up an easy-to-use grid of 24 columns that stretch
to the window width or can also be fixed width.
Liquid grid work by:
* Ben Listwon
* David Bedingfield
* Andrei Michael Herasimchuk
Involution Studios, http://www.involutionstudios.com
-----
grid.css
* Sets up an easy-to-use grid of 24 columns.
Based on work by:
* Nathan Borror [playgroundblues.com]
* Jeff Croft [jeffcroft.com]
* Christian Metts [mintchaos.com]
* Khoi Vinh [subtraction.com]
-----
By default, the grid is 80% of window width, with 24 columns.
To make the grid fixed, simply change the .container width
property to a pixel value. e.g., 960px.
-------------------------------------------------------------- */
/* A container should group your entire grid. */
.container {
min-width: 950px;
width: 80%;
margin: 0 auto;
overflow: hidden;
}
/* A block should group all your columns per row stack. */
.block {overflow: hidden;}
/* Columns
-------------------------------------------------------------- */
/* Use this class together with the .span-x classes
to create any composition of columns in a layout. */
.column {float: left;}
/* The last column in a row needs this class. */
.last { margin-right: 0; }
/* Use these classes to set the width of a column. */
.span-1 { width: 4%; }
.span-2 { width: 8%; }
.span-3 { width: 12%; }
.span-4 { width: 16%; }
.span-5 { width: 20%; }
.span-6 { width: 25%; }
.span-7 { width: 29%; }
.span-8 { width: 33%; }
.span-9 { width: 37%; }
.span-10 { width: 41%; }
.span-11 { width: 45%; }
.span-12 { width: 50%; }
.span-13 { width: 54%; }
.span-14 { width: 58%; }
.span-15 { width: 62%; }
.span-16 { width: 66%; }
.span-17 { width: 70%; }
.span-18 { width: 75%; }
.span-19 { width: 79%; }
.span-20 { width: 83%; }
.span-21 { width: 87%; }
.span-22 { width: 91%; }
.span-23 { width: 95%; }
.span-24 { width: 100%; margin-right: 0; }
.span-1>div, .span-2>div, .span-3>div, .span-4>div,
.span-5>div, .span-6>div, .span-7>div, .span-8>div,
.span-9>div, .span-10>div, .span-11>div, .span-12>div,
.span-13>div, .span-14>div, .span-15>div, .span-16>div,
.span-17>div, .span-18>div, .span-19>div, .span-20>div,
.span-21>div, .span-22>div, .span-23>div, .span-24>div {
margin: 0 0.833em 0 0;
overflow: hidden;
}
/* Add these to a column to append empty cols. */
.append-1 { padding-right: 4%; }
.append-2 { padding-right: 8%; }
.append-3 { padding-right: 12%; }
.append-4 { padding-right: 16%; }
.append-5 { padding-right: 20%; }
.append-6 { padding-right: 25%; }
.append-7 { padding-right: 29%; }
.append-8 { padding-right: 33%; }
.append-9 { padding-right: 37%; }
.append-10 { padding-right: 41%; }
.append-11 { padding-right: 45%; }
.append-12 { padding-right: 50%; }
.append-13 { padding-right: 54%; }
.append-14 { padding-right: 58%; }
.append-15 { padding-right: 62%; }
.append-16 { padding-right: 66%; }
.append-17 { padding-right: 70%; }
.append-18 { padding-right: 75%; }
.append-19 { padding-right: 79%; }
.append-20 { padding-right: 83%; }
.append-21 { padding-right: 87%; }
.append-22 { padding-right: 91%; }
.append-23 { padding-right: 95%; }
/* Add these to a column to prepend empty cols. */
.prepend-1 { padding-left: 4%; }
.prepend-2 { padding-left: 8%; }
.prepend-3 { padding-left: 12%; }
.prepend-4 { padding-left: 16%; }
.prepend-5 { padding-left: 20%; }
.prepend-6 { padding-left: 25%; }
.prepend-7 { padding-left: 29%; }
.prepend-8 { padding-left: 33%; }
.prepend-9 { padding-left: 37%; }
.prepend-10 { padding-left: 41%; }
.prepend-11 { padding-left: 45%; }
.prepend-12 { padding-left: 50%; }
.prepend-13 { padding-left: 54%; }
.prepend-14 { padding-left: 58%; }
.prepend-15 { padding-left: 62%; }
.prepend-16 { padding-left: 66%; }
.prepend-17 { padding-left: 70%; }
.prepend-18 { padding-left: 75%; }
.prepend-19 { padding-left: 79%; }
.prepend-20 { padding-left: 83%; }
.prepend-21 { padding-left: 87%; }
.prepend-22 { padding-left: 91%; }
.prepend-23 { padding-left: 95%; }
/* Border on right hand side of a column. */
.border {
border-right: 1px solid #eee;
}
/* Border with more whitespace, spans one column. */
.colborder {
padding-right: 2%;
margin-right: 2%;
border-right: 1px solid #eee;
}
.colborder>div {
margin: 0;
}
/* Use these classes on an element to push it into the
next column, or to pull it into the previous column. */
.pull-1 { margin-left: -3.333em; }
.pull-2 { margin-left: -6.666em; }
.pull-3 { margin-left: -10em; }
.pull-4 { margin-left: -13.333em; }
.push-0 { margin: 0 0 0 1.5em; }
.push-1 { margin: 0 -3.333em 0 1.5em; }
.push-2 { margin: 0 -6.666em 0 1.5em; }
.push-3 { margin: 0 -10em 0 1.5em; }
.push-4 { margin: 0 -13.333em 0 1.5em; }
.push-0, .push-1, .push-2, .push-3, .push-4 { float: right; }
/* Misc classes and elements
-------------------------------------------------------------- */
/* Use a .box to create a padded box inside a column. */
.box {
padding: 1.5em;
margin-bottom: 1.5em;
background: #eee;
}
/* Use this to create a horizontal ruler across a column. */
hr {
background: #ddd;
color: #ddd;
width: 100%;
height: 0.083em;
margin: 0 0 1.583em;
border: none;
}
hr.space {
background: #fff;
color: #fff;
}

File diff suppressed because it is too large Load Diff

View File

@ -4,9 +4,6 @@
height: 18px;
padding: 1px;
margin: 2px;
border-width: 1px;
border-style: dashed;
border-color: lightgray;
}
.searchImage:hover, .renameImage:hover, .ignoreEpisode:hover, .ignoreEpisodesMaster:hover

View File

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,55 @@
/*Pinned messages*/
.infoBox, .successBox, .warningBox, .errorBox, .validationBox
{
border: 0px solid;
margin: 10px 0px;
padding: 10px 10px 10px 50px;
background-repeat: no-repeat;
background-position: 10px center;
}
.infoBox
{
color: #00529B;
background-color: #f4f7f9;
background-image: url(images/blue.png);
}
.successBox
{
color: #4F8A10;
background-color: #DFF2BF;
background-image: url(images/green.png);
}
.warningBox
{
color: #9F6000;
background-color: #FEEFB3;
background-image: url(images/yellow.png);
}
.errorBox
{
color: #D8000C;
background-color: #FFBABA;
background-image: url(images/red.png);
}
/*Progress Notification*/
#msgBox
{
display: none;
height: 30px;
background-color: #272525;
opacity: .9;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);
padding: 10px;
text-align: left;
position: fixed;
z-index: 99;
bottom: 0;
right: 0;
font-size: 20px;
color: White;
text-align: center;
white-space:nowrap;
}

View File

@ -1,4 +1,3 @@
*
{
font-family: "Segoe UI" , "Segoe UI Light" , Tahoma, Geneva, sans-serif;
@ -12,6 +11,15 @@ body
background-attachment: fixed;
}
#centered
{
margin-right: auto;
width: 85%;
margin-left: auto;
min-width: 800px;
max-width: 1400px;
}
h1, h2, h3, h4, h5, h6
{
font-family: "Segoe UI Light" , "Segoe UI" , Tahoma, Geneva, sans-serif;
@ -44,12 +52,17 @@ hr
/* Menu */
#menu
{
height: 60px;
}
#menu ul
{
padding: 0px 0px 0px 0px;
margin: 0;
padding: 8px 0px 0px 0px;
list-style: none;
line-height: normal;
}
#menu li
@ -62,14 +75,15 @@ hr
{
display: block;
float: left;
padding: 9px 30px 0px 35px;
height: 28px;
padding: 7px 30px 0px 35px;
letter-spacing: -1px;
text-decoration: none;
text-align: center;
text-transform: lowercase;
font-size: 17px;
font-weight: normal;
vertical-align: middle;
height: 28px;
}
#menu a:hover
@ -130,11 +144,14 @@ hr
/* Footer */
.footer
#footer
{
margin-top: 5px;
margin-bottom: 30px;
padding: 1px 1px 1px 1px;
color: #065EFE;
text-align: center;
text-decoration: none;
}
@ -238,3 +255,16 @@ select, button, input[type="button"], input[type="submit"], input[type="reset"]
top: 30px;
right: 15px;
}
#localSeriesLookup
{
width: 220px;
float: right;
margin-top: 7px;
margin-bottom: 0px;
border: 0px;
background: rgb(68, 67, 67);
color: rgb(169, 169, 169);
padding: 4px;
}

View File

@ -21,3 +21,11 @@
{
line-height: 25px;
}
/*MiniProfiler*/
.profiler-button
{
opacity: 0.4;
}

View File

@ -16,8 +16,8 @@ p, h1, form, button{border:0; margin:0; padding:0;}
#stylized
{
border:solid 2px #b7ddf2;
/*background:#ebf4fb;*/
/*border:solid 2px #b7ddf2;
background:#ebf4fb;*/
}
#stylized h1

View File

@ -1,62 +0,0 @@
.top-slider {
position: absolute;
opacity: 0.85;
width: 300px;
}
.sliderButton {
border: 0;
}
.sliderContent {
background-color:#333333;
text-align:center;
width: 100%;
color:#FFFFFF;
font-weight:bold;
margin: 0px;
display: none;
border:1px solid #444444;
-moz-border-radius-bottomright: 8px;
-webkit-border-bottom-right-radius: 8px;
-moz-border-radius-bottomleft: 8px;
-webkit-border-bottom-left-radius: 8px;
}
.sliderButton {
width: 70px;
margin-left:auto;
margin-right:auto;
background-color:#333333;
cursor:pointer;
font-size:12px;
font-weight:bold;
text-align: center;
color:#FFFFFF;
border: 1px solid #444444;
border-top: 0px;
-moz-border-radius-bottomright: 10px;
-webkit-border-bottom-right-radius: 10px;
-moz-border-radius-bottomleft: 10px;
-webkit-border-bottom-left-radius: 10px;
}
.sliderImage {
width: 16px;
height: 16px;
display: inline-block;
margin-bottom: -3px;
margin-right: -5px;
margin-left: 2px;
}
.sliderClosed {
background:url('../Content/Images/ui-icons_2e83ff_256x240.png') -64px -16px no-repeat;
}
.sliderOpened {
background:url('../Content/Images/ui-icons_2e83ff_256x240.png') 0px -16px no-repeat;
}

View File

@ -1,23 +0,0 @@
#msgBox
{
display: none;
height: 30px;
background-color: #272525;
opacity: .9;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);
padding: 10px;
text-align: left;
position: fixed;
z-index: 99;
bottom: 0;
right: 0;
font-size: 20px;
color: White;
text-align: center;
white-space:nowrap;
}
#msgCloseButton
{
float: right;
}

View File

@ -41,7 +41,7 @@ namespace NzbDrone.Web.Controllers
return new JsonResult { Data = "ok", JsonRequestBehavior = JsonRequestBehavior.AllowGet };
}
public JsonResult SyncEpisodesOnDisk(int seriesId)
public JsonResult ScanDisk(int seriesId)
{
//Syncs the episodes on disk for the specified series
_jobProvider.QueueJob(typeof(DiskScanJob), seriesId);

View File

@ -33,7 +33,7 @@ namespace NzbDrone.Web.Controllers
return new JsonResult { Data = "ok" };
}
public JsonResult SearchSeries(int seriesId)
public JsonResult BacklogSeries(int seriesId)
{
//Syncs the episodes on disk for the specified series
_jobProvider.QueueJob(typeof(SeriesSearchJob), seriesId);
@ -55,7 +55,7 @@ namespace NzbDrone.Web.Controllers
return new JsonResult { Data = "ok" };
}
public JsonResult RenameSeries(int seriesId)
public JsonResult RenameEpisodes(int seriesId)
{
//Syncs the episodes on disk for the specified series
_jobProvider.QueueJob(typeof(RenameSeriesJob), seriesId);

View File

@ -9,12 +9,10 @@ namespace NzbDrone.Web.Controllers
{
public class SharedController : Controller
{
private readonly JobProvider _jobProvider;
private readonly EnviromentProvider _enviromentProvider;
public SharedController(JobProvider jobProvider, EnviromentProvider enviromentProvider)
{
_jobProvider = jobProvider;
_enviromentProvider = enviromentProvider;
}

View File

@ -140,8 +140,14 @@
<Content Include="Content\2011.3.1115\telerik.common.min.css" />
<Content Include="Content\2011.3.1115\telerik.metro.min.css" />
<Content Include="Content\2011.3.1115\telerik.sitefinity.min.css" />
<Content Include="Content\Images\blue.png" />
<Content Include="Content\Images\green.png" />
<Content Include="Content\Images\Indexers\Newznab.png" />
<Content Include="Content\Images\Indexers\Nzbsorg.png" />
<Content Include="Content\Images\red.png" />
<Content Include="Content\Images\yellow.png" />
<Content Include="Content\IndexerSettings.css" />
<Content Include="Content\Slider.css" />
<Content Include="Content\Messages.css" />
<Content Include="Content\Grid.css" />
<Content Include="Content\Images\close.png" />
<Content Include="Content\Images\Downloading.png" />
@ -231,9 +237,6 @@
</ItemGroup>
<ItemGroup>
<Content Include="Content\ActionButton.css" />
<Content Include="Content\Blueprint\ie.css" />
<Content Include="Content\Blueprint\screen.css" />
<Content Include="Content\Blueprint\liquid.css" />
<Content Include="Content\Images\ignored.png" />
<Content Include="Content\Images\ignoredNeutral.png" />
<Content Include="Content\Images\notIgnored.png" />
@ -266,9 +269,6 @@
<Content Include="Content\Images\Indexers\NzbMatrix.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Content\Images\Indexers\Nzbs.org.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Content\Images\Indexers\NzbsRus.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
@ -296,7 +296,6 @@
<Content Include="Content\Images\ui-icons_ffffff_256x240.png" />
<Content Include="Content\Images\VideoFolder.png" />
<Content Include="Content\Images\X.png" />
<Content Include="Content\notibar.css" />
<Content Include="Content\Settings.css" />
<Content Include="Content\NzbDrone.css" />
<Content Include="Content\Images\XbmcNotification.png" />
@ -387,6 +386,9 @@
<Content Include="Scripts\2011.3.1115\telerik.treeview.min.js" />
<Content Include="Scripts\2011.3.1115\telerik.upload.min.js" />
<Content Include="Scripts\2011.3.1115\telerik.window.min.js" />
<Content Include="Scripts\jquery-1.7.1-vsdoc.js" />
<Content Include="Scripts\jquery-1.7.1.js" />
<Content Include="Scripts\jquery-1.7.1.min.js" />
<Content Include="Scripts\jquery.hotkeys.js" />
<Content Include="Scripts\jquery.validate-vsdoc.js" />
<Content Include="Scripts\jquery.validate.js" />
@ -399,10 +401,6 @@
<Content Include="Scripts\NzbDrone\Notification.js" />
<Content Include="Scripts\NzbDrone\seriesDetails.js" />
<Content Include="Scripts\NzbDrone\settingsForm.js" />
<Content Include="Scripts\NzbDrone\slider.js" />
<Content Include="Scripts\jquery-1.6.3-vsdoc.js" />
<Content Include="Scripts\jquery-1.6.3.js" />
<Content Include="Scripts\jquery-1.6.3.min.js" />
<Content Include="Scripts\jquery-ui-1.8.16.js" />
<Content Include="Scripts\jquery-ui-1.8.16.min.js" />
<Content Include="Scripts\jquery.gritter.js" />
@ -495,9 +493,6 @@
<ItemGroup>
<Content Include="Views\Shared\QuickAdd.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Shared\LocalSearch.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Settings\Xbmc.cshtml" />
</ItemGroup>

View File

@ -4,6 +4,13 @@
});
bindAutoCompletes();
$(document).bind('keydown', 'ctrl+shift+f', function () {
$('#localSeriesLookup').focus();
});
$(document).bind('keyup', 's', function () {
$('#localSeriesLookup').focus();
});
});
//
@ -14,11 +21,10 @@ $('.folderLookup:not(.ui-autocomplete-input), .seriesLookup:not(.ui-autocomplete
function bindAutoCompletes() {
bindFolderAutoComplete(".folderLookup");
bindSeriesAutoComplete(".seriesLookup");
bindLocalSeriesAutoComplete(".localSeriesLookup");
bindLocalSeriesAutoComplete("#localSeriesLookup");
}
function bindFolderAutoComplete(selector) {
$(selector).each(function (index, element) {
$(element).autocomplete({
//source: "/Directory/GetDirectories",
@ -66,10 +72,12 @@ function bindSeriesAutoComplete(selector) {
function bindLocalSeriesAutoComplete(selector) {
$(selector).each(function (index, element) {
$(element).watermark('Search...');
$(element).autocomplete({
source: "/Series/LocalSearch",
minLength: 3,
delay: 500,
minLength: 1,
delay: 100,
autoFocus:true,
select: function (event, ui) {
window.location = "../Series/Details?seriesId=" + ui.item.Id;
}

View File

@ -1,46 +0,0 @@
$(document).ready(function () {
$(".sliderButton").live('click', function () {
sliderToggle(this);
});
});
function sliderToggle(sliderButton) {
//Get sliderContent
var sliderContent = $(sliderButton).siblings('.sliderContent');
//Open the slider
sliderContent.slideToggle('slow');
//Change the slider Image
$(sliderButton).children('.sliderImage').toggleClass('sliderOpened sliderClosed');
//Clear the search box
$(sliderContent).children('.localSeriesLookup').val('');
//Focus in the search box
$(sliderContent).children('.localSeriesLookup').focus();
//Hide the sliders
hideSliders(sliderContent);
//Prevent the Address Bar from changing
return false;
}
function hideSliders(newlyOpenedSlider) {
$('.sliderContent').each(function (index, value) {
var newlyOpenedSliderId = $(newlyOpenedSlider).parent('.top-slider').attr('id');
var id = $(this).parent('.top-slider').attr('id');
//If the ID's of the top-sliders don't match then hide it
if (id != newlyOpenedSliderId)
$(this).slideUp();
});
}
//Hide slider when text box loses focus
$('.localSeriesLookup').live('blur', function () {
$('.sliderContent').each(function (index, value) {
$(this).slideUp();
});
});

File diff suppressed because one or more lines are too long

7153
NzbDrone.Web/Scripts/jquery-1.7.1-vsdoc.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -31,6 +31,8 @@ Logs
</div>
}
@section MainContent{
<div class="infoBox">
Log entries older than 30 days are automatically deleted.</div>
@{Html.Telerik().Grid<Log>().Name("logsGrid")
.TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns =>

View File

@ -11,7 +11,6 @@
.seasonToggleTopGroup
{
overflow: hidden;
width: 50%;
}
.seasonToggleTop
@ -45,9 +44,6 @@
height: 18px;
padding: 1px;
margin: 2px;
border-width: 1px;
border-style: dashed;
border-color: lightgray;
}
.searchImage:hover, .renameImage:hover, .ignoreEpisode:hover, .ignoreEpisodesMaster:hover
@ -69,11 +65,10 @@
@section ActionMenu{
<ul class="sub-menu">
<li>@Html.ActionLink("Back to Series List", "Index", "Series")</li>
<li>@Ajax.ActionLink("Scan For Episodes on Disk", "SyncEpisodesOnDisk", "Command", new { seriesId = Model.SeriesId }, null)</li>
<li>@Ajax.ActionLink("Scan Disk", "ScanDisk", "Command", new { seriesId = Model.SeriesId }, null)</li>
<li>@Ajax.ActionLink("Update Info", "UpdateInfo", "Command", new { seriesId = Model.SeriesId }, null)</li>
<li>@Ajax.ActionLink("Search for Series", "SearchSeries", "Episode", new { seriesId = Model.SeriesId }, null)</li>
<li>@Ajax.ActionLink("Rename Series", "RenameSeries", "Episode", new { seriesId = Model.SeriesId }, null)</li>
<li>@Ajax.ActionLink("Search for missing episodes", "BacklogSeries", "Episode", new { seriesId = Model.SeriesId }, null)</li>
<li>@Ajax.ActionLink("Rename Episodes", "RenameEpisodes", "Episode", new { seriesId = Model.SeriesId }, null)</li>
</ul>
}
@section MainContent{
@ -105,9 +100,9 @@
var seriesId = @Model.SeriesId;
var season = s;
<h3>
<h2>
@(season == 0 ? "Specials" : "Season " + season)
</h3>
</h2>
<div class="grid-container">
@{

View File

@ -1,10 +1,7 @@
@using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.IndexerSettingsModel
@section HeaderContent{
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
<link rel="stylesheet" type="text/css" href="../../Content/IndexerSettings.css" />
<style>
.indexerPanel
{
@ -21,155 +18,118 @@
}
</style>
}
@section TitleContent{
Settings
Settings
}
@section ActionMenu{
@{Html.RenderPartial("SubMenu");}
}
@section MainContent{
<div class="infoBox">
RSS feeds are checked every 15 minutes for new episodes.</div>
<div id="stylized">
<div class="additionalInfo">
NzbDrone checks all Indexers every 15 minutes
</div>
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" }))
{
<h1>Indexers</h1>
<p></p>
<h1>
Indexers</h1>
<p>
</p>
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<div>
@{ Html.Telerik().PanelBar()
.Name("PanelBar")
//.HtmlAttributes(new { style = "width: 500px; margin: 10px;" })
.ExpandMode(PanelBarExpandMode.Single)
.SelectedIndex(0)
.Items(indexerItem =>
{
indexerItem.Add()
.Text("NZBs.org")
.ImageUrl("~/Content/Images/Indexers/Nzbs.org.png")
.Content(@<text>
<div class="indexerPanel clearfix">
<label class="labelClass">Enable
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbsOrgEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsOrgUId)
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgUId)</span>
</label>
@Html.TextBoxFor(m => m.NzbsOrgUId, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsOrgHash)
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgHash)</span>
</label>
@Html.TextBoxFor(m => m.NzbsOrgHash, new { @class = "inputClass" })
</div>
</text>);
indexerItem.Add()
.Text("NZB Matrix")
.ImageUrl("~/Content/Images/Indexers/NzbMatrix.png")
.Content(@<text>
<div class="indexerPanel clearfix">
<label class="labelClass">Enable
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbMatrixEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbMatrixUsername)
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixUsername)</span>
</label>
@Html.TextBoxFor(m => m.NzbMatrixUsername, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbMatrixApiKey)
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixApiKey)</span>
</label>
@Html.TextBoxFor(m => m.NzbMatrixApiKey, new { @class = "inputClass" })
</div>
</text>);
indexerItem.Add()
.Text("NZBsRus")
.ImageUrl("~/Content/Images/Indexers/NzbsRus.png")
.Content(@<text>
<div class="indexerPanel clearfix">
<label class="labelClass">Enable
<span class="small">@Html.DescriptionFor(m => m.NzbsRUsEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbsRUsEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsrusUId)
<span class="small">@Html.DescriptionFor(m => m.NzbsrusUId)</span>
</label>
@Html.TextBoxFor(m => m.NzbsrusUId, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsrusHash)
<span class="small">@Html.DescriptionFor(m => m.NzbsrusHash)</span>
</label>
@Html.TextBoxFor(m => m.NzbsrusHash, new { @class = "inputClass" })
</div>
</text>);
indexerItem.Add()
.Text("Newzbin")
.ImageUrl("~/Content/Images/Indexers/Newzbin.png")
.Content(@<text>
<div class="indexerPanel clearfix">
<label class="labelClass">Enable
<span class="small">@Html.DescriptionFor(m => m.NewzbinEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NewzbinEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NewzbinUsername)
<span class="small">@Html.DescriptionFor(m => m.NewzbinUsername)</span>
</label>
@Html.TextBoxFor(m => m.NewzbinUsername, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NewzbinPassword)
<span class="small">@Html.DescriptionFor(m => m.NewzbinPassword)</span>
</label>
@Html.TextBoxFor(m => m.NewzbinPassword, new { @class = "inputClass" })
</div>
</text>);
indexerItem.Add()
.Text("Newznzb")
.ImageUrl("~/Content/Images/Indexers/Newznab.png")
.Content(@<text>
<div class="indexerPanel clearfix">
<label class="labelClass">Enable
<span class="small">@Html.DescriptionFor(m => m.NewznabEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NewznabEnabled, new { @class = "inputClass checkClass" })
</div>
<p></p>
<a id="addItem" href="@Url.Action("AddNewznabProvider", "Settings")">
<img src="../../Content/Images/Plus.png" alt="Add Newznab Provider" width="20px" height="20px" />
Add Newznab Provider</a>
<div id="newznabProviders">
@foreach (var provider in Model.NewznabDefinitions)
{
Html.RenderAction("GetNewznabProviderView", provider);
}
</div>
</text>);
}).Render();
<div id="accordion">
<h3>
<a href="#">NZBs.org</a></h3>
<div class="indexerPanel clearfix">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsOrgEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbsOrgEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsOrgUId)
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgUId)</span>
</label>
@Html.TextBoxFor(m => m.NzbsOrgUId, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsOrgHash)
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgHash)</span>
</label>
@Html.TextBoxFor(m => m.NzbsOrgHash, new { @class = "inputClass" })
</div>
<h3>
<a href="#">NZBMatrix</a></h3>
<div class="indexerPanel clearfix">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbMatrixEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbMatrixEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbMatrixUsername)
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixUsername)</span>
</label>
@Html.TextBoxFor(m => m.NzbMatrixUsername, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbMatrixApiKey)
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixApiKey)</span>
</label>
@Html.TextBoxFor(m => m.NzbMatrixApiKey, new { @class = "inputClass" })
</div>
<h3>
<a href="#">NZBsRus</a></h3>
<div class="indexerPanel clearfix">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsRUsEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbsRUsEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsrusUId)
<span class="small">@Html.DescriptionFor(m => m.NzbsrusUId)</span>
</label>
@Html.TextBoxFor(m => m.NzbsrusUId, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsrusHash)
<span class="small">@Html.DescriptionFor(m => m.NzbsrusHash)</span>
</label>
@Html.TextBoxFor(m => m.NzbsrusHash, new { @class = "inputClass" })
</div>
<h3>
<a href="#">Newsbin</a></h3>
<div class="indexerPanel clearfix">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NewzbinEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NewzbinEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NewzbinUsername)
<span class="small">@Html.DescriptionFor(m => m.NewzbinUsername)</span>
</label>
@Html.TextBoxFor(m => m.NewzbinUsername, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NewzbinPassword)
<span class="small">@Html.DescriptionFor(m => m.NewzbinPassword)</span>
</label>
@Html.TextBoxFor(m => m.NewzbinPassword, new { @class = "inputClass" })
</div>
<h3>
<a href="#">Newznab</a></h3>
<div class="indexerPanel clearfix">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NewznabEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NewznabEnabled, new { @class = "inputClass checkClass" })
<p>
</p>
<a id="addItem" href="@Url.Action("AddNewznabProvider", "Settings")">
<img src="../../Content/Images/Plus.png" alt="Add Newznab Provider" width="20px"
height="20px" />
Add Newznab Provider</a>
<div id="newznabProviders">
@foreach (var provider in Model.NewznabDefinitions)
{
Html.RenderAction("GetNewznabProviderView", provider);
}
</div>
</div>
</div>
<br />
<button type="submit" id="save_button" disabled="disabled">
Save</button>
}
</div>
<br/>
<button type="submit" id="save_button" disabled="disabled">Save</button>
}
</div>
}
@section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript">
$("#addItem").live('click', function () {
$.ajax({
@ -182,6 +142,14 @@
return false;
});
$(function () {
$("#accordion").accordion({
autoHeight: false
});
});
var deleteNewznabProviderUrl = '@Url.Action("DeleteNewznabProvider", "Settings")';
function deleteProvider(id) {
@ -216,4 +184,4 @@
}).keyup();
</script>
}
}

View File

@ -85,7 +85,7 @@
@section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script>
<script type="text/javascript">
$(function () {
$("#tabs").tabs();
});

View File

@ -1,5 +1,4 @@
@using NzbDrone.Web.Models
@model FooterModel
<div>
NzbDrone @Model.Version (@Model.BuildTime.ToString("MMM d, yyyy"))
</div>
@Html.ActionLink(String.Format("NzbDrone {0} {1:MMM d, yyyy}", Model.Version, Model.BuildTime), "Index", "Update")

View File

@ -1,39 +0,0 @@
@{
Layout = null;
}
<style>
#localSeriesSlider {
right: 150px;
}
.sliderContent .localSeriesLookup {
width: 94%;
}
.sliderContent {
height: 53px;
}
</style>
<div id="localSeriesSlider" class="top-slider">
<div class="sliderContent">
Local Series Search
<input class="localSeriesLookup" type="text" />
</div>
<div class="sliderButton">
Search<div class="sliderImage sliderClosed"></div>
</div>
</div>
<script type="text/javascript">
//Ctrl+Shift+F to open the slider
$(document).bind('keydown', 'ctrl+shift+f', function () {
$('#localSeriesSlider').children('.sliderButton').click();
});
//Use ESC to close the slider
$('.localSeriesLookup').bind('keydown', 'esc', function () {
$(this).parent('.sliderContent').slideUp();
});
</script>

View File

@ -9,16 +9,46 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link type="text/css" rel="stylesheet" href="../../Content/2011.3.1115/telerik.common.min.css" />
<link type="text/css" rel="stylesheet" href="../../Content/2011.3.1115/telerik.sitefinity.min.css" />
<link type="text/css" rel="stylesheet" href="../../Content/Blueprint/screen.css" />
<link type="text/css" rel="stylesheet" href="../../Content/jQueryUI/jquery-ui-1.8.14.nzbdrone.css" />
<link type="text/css" rel="stylesheet" href="../../Content/jquery.gritter.css" />
<link type="text/css" rel="stylesheet" href="../../Content/NzbDrone.css" />
<link type="text/css" rel="stylesheet" href="../../Content/Notibar.css" />
<link type="text/css" rel="stylesheet" href="../../Content/ActionButton.css" />
<link type="text/css" rel="stylesheet" href="../../Content/overrides.css" />
<link type="text/css" rel="stylesheet" href="../../Content/Menu.css" />
<link type="text/css" rel="stylesheet" href="../../Content/Slider.css" />
<script type="text/javascript" src="../../Scripts/jquery-1.6.3.min.js"></script>
<link type="text/css" rel="stylesheet" href="../../Content/Messages.css" />
@MvcMiniProfiler.MiniProfiler.RenderIncludes()
@RenderSection("HeaderContent", required: false)
</head>
<body>
<div id="centered">
<div id="menu">
<ul>
@MvcHtmlString.Create(Html.CurrentActionLink("Series", "Index", "Series"))
@MvcHtmlString.Create(Html.CurrentActionLink("Upcoming", "Index", "Upcoming"))
@MvcHtmlString.Create(Html.CurrentActionLink("History", "Index", "History"))
@MvcHtmlString.Create(Html.CurrentActionLink("Missing", "Index", "Missing"))
@MvcHtmlString.Create(Html.CurrentActionLink("Settings", "Index", "Settings"))
@MvcHtmlString.Create(Html.CurrentActionLink("Logs", "Index", "Log"))
</ul>
<input id="localSeriesLookup" type="text"/>
</div>
<div id="logo">
@RenderSection("TitleContent", required: false)
</div>
<div id="page">
@RenderSection("ActionMenu", required: false)
@RenderSection("MainContent", required: false)
@RenderBody()
</div>
<div id="footer">
@{Html.RenderAction("Footer", "Shared");}
</div>
</div>
<div id="msgBox">
<span id="msgText">background notification</span>
</div>
@(Html.Telerik().ScriptRegistrar().jQuery(true))
@* <script type="text/javascript" src="../../Scripts/jquery-1.7.1.min.js"></script>*@
<script type="text/javascript" src="../../Scripts/jquery-ui-1.8.16.min.js"></script>
<script type="text/javascript" src="../../Scripts/MicrosoftAjax.js"></script>
<script type="text/javascript" src="../../Scripts/MicrosoftMvcAjax.js"></script>
@ -31,48 +61,8 @@
<script type="text/javascript" src="../../Scripts/NzbDrone/episodeSearch.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/AutoComplete.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/addSeries.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/slider.js"></script>
@MvcMiniProfiler.MiniProfiler.RenderIncludes()
@RenderSection("HeaderContent", required: false)
</head>
<body>
<div class="container">
@{Html.RenderAction("LocalSearch", "Shared");}
<div id="menu" class="span-24 last prepend-top append-bottom">
<ul>
@MvcHtmlString.Create(Html.CurrentActionLink("Series", "Index", "Series"))
@MvcHtmlString.Create(Html.CurrentActionLink("Upcoming", "Index", "Upcoming"))
@MvcHtmlString.Create(Html.CurrentActionLink("History", "Index", "History"))
@MvcHtmlString.Create(Html.CurrentActionLink("Missing", "Index", "Missing"))
@MvcHtmlString.Create(Html.CurrentActionLink("Settings", "Index", "Settings"))
@MvcHtmlString.Create(Html.CurrentActionLink("Logs", "Index", "Log"))
</ul>
</div>
<hr />
<div class="span-24 last">
<div id="logo">
@RenderSection("TitleContent", required: false)
</div>
</div>
<hr />
<div class="span-24 last">
<div id="page">
@RenderSection("ActionMenu", required: false)
@RenderSection("MainContent", required: false)
@RenderBody()
</div>
</div>
<hr />
<div class="span-24 last footer">
@{Html.RenderAction("Footer", "Shared");}
</div>
</div>
<div id="msgBox">
<span id="msgText">background notification</span>
</div>
@(Html.Telerik().ScriptRegistrar().jQuery(false))
@RenderSection("Scripts", required: false)
<script type="text/javascript" src="../../Scripts/NzbDrone/Notification.js"></script>
@RenderSection("Scripts", required: false)
@if (EnviromentProvider.IsProduction)
{
<script type="text/javascript">

View File

@ -3,10 +3,10 @@
<package id="EntityFramework" version="4.2.0.0" />
<package id="EntityFramework.SqlServerCompact" version="4.1.8482.2" />
<package id="jQuery" version="1.6.1" />
<package id="jQuery" version="1.6.3" />
<package id="jQuery" version="1.7.1" />
<package id="jQuery.UI.Combined" version="1.8.16" />
<package id="jQuery.Validation" version="1.8.0.1" />
<package id="jQuery.Validation" version="1.8.1" />
<package id="jQuery.Validation" version="1.9" />
<package id="jQuery.Validation.Unobtrusive" version="1.0" />
<package id="jQuery.vsdoc" version="1.6" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />

View File

@ -7,13 +7,15 @@
#if DEBUG
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using EnvDTE;
using EnvDTE80;
using Process = EnvDTE.Process;
using Thread = System.Threading.Thread;
namespace NzbDrone
{
[DebuggerStepThrough]
public class ProcessAttacher
{
public static void Attach()

View File

@ -5,6 +5,7 @@ using NLog;
namespace NzbDrone.Providers
{
[DebuggerStepThroughAttribute]
public class DebuggerProvider
{
private static readonly Logger Logger = LogManager.GetLogger("Host.DebuggerProvider");

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -14,7 +14,7 @@ if ($copyOverParaFile) {
#Copy the -vsdoc-para file over the -vsdoc file
#$projectFolder = Split-Path -Parent $project.FileName
$projectFolder = $project.Properties.Item("FullPath").Value
$paraVsDocPath = Join-Path $toolsPath jquery-1.6.3-vsdoc-para.js
$vsDocPath = Join-Path $projectFolder Scripts\jquery-1.6.3-vsdoc.js
$paraVsDocPath = Join-Path $toolsPath jquery-1.7.1-vsdoc-para.js
$vsDocPath = Join-Path $projectFolder Scripts\jquery-1.7.1-vsdoc.js
Copy-Item $paraVsDocPath $vsDocPath -Force
}

View File

@ -3,9 +3,9 @@ param($installPath, $toolsPath, $package, $project)
#Forcibly delete the -vsdoc file
#$projectFolder = Split-Path -Parent $project.FileName
$projectFolder = $project.Properties.Item("FullPath").Value
$projVsDocPath = Join-Path $projectFolder Scripts\jquery-1.6.3-vsdoc.js
$origVsDocPath = Join-Path $installPath Content\Scripts\jquery-1.6.3-vsdoc.js
$origVsDocParaPath = Join-Path $toolsPath jquery-1.6.3-vsdoc-para.js
$projVsDocPath = Join-Path $projectFolder Scripts\jquery-1.7.1-vsdoc.js
$origVsDocPath = Join-Path $installPath Content\Scripts\jquery-1.7.1-vsdoc.js
$origVsDocParaPath = Join-Path $toolsPath jquery-1.7.1-vsdoc-para.js
function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"

BIN
packages/jQuery.1.7.1/jQuery.1.7.1.nupkg vendored Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
/**
* jQuery Validation Plugin 1.9.0
*
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
* http://docs.jquery.com/Plugins/Validation
*
* Copyright (c) 2006 - 2011 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;this.attr("novalidate","novalidate");b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){a=this.find("input, button");a.filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&a.filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("<input type='hidden'/>").attr("name",
b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form();
else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name];
return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a,
b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)},
onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults,
a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."),
minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator"),g="on"+e.type.replace(/^validate/,
"");f.settings[g]&&f.settings[g].call(f,this[0],e)}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=
this.settings.rules;c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",a).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",
a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement=
a=this.validationTargetFor(this.clean(a));this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors?
this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==
0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.validationTargetFor(this.clean(a));var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+
a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==undefined)return arguments[a]},defaultMessage:function(a,
b){return this.findDefined(this.customMessage(a.name,b),this.customMetaMessage(a,b),!this.settings.ignoreTitle&&a.title||undefined,c.validator.messages[b],"<strong>Warning: No message defined for "+a.name+"</strong>")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]=
d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);
if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass(this.settings.validClass).addClass(this.settings.errorClass);
d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=
this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];return a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,
e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,
c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=
false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,
a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b={};a=c(a);for(var d in c.validator.methods){var e;if(e=d==="required"&&typeof c.fn.prop==="function"?a.prop(d):a.attr(d))b[d]=e;else if(a[0].getAttribute("type")===d)b[d]=true}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};
var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?
e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&&a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;
return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,
b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,
mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,
b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)},
url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 -]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>=
0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery);
(function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery);
(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a,
b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery);

Binary file not shown.