diff --git a/NzbDrone.Core.Test/Files/Feed.nzbmatrix.com.xml b/NzbDrone.Core.Test/Files/Feed.nzbmatrix.com.xml new file mode 100644 index 000000000..4a13c31cc --- /dev/null +++ b/NzbDrone.Core.Test/Files/Feed.nzbmatrix.com.xml @@ -0,0 +1,112 @@ + + + + NZBMatrix.com RSS 2.0 + en + NZBMatrix + NZBMatrix.com RSS Feed - Usenet + http://nzbmatrix.com + Copyright 2010 NZBMatrix + Fri, 23 Apr 2010 01:28:23 -0400 + + 24.S08E19.HDTV.XviD-LOL + http://nzbmatrix.com/api-nzb-download.php?id=625437 + http://nzbmatrix.com/api-nzb-download.php?id=625437 + Name: Craig Ferguson 2010 04 22 Jeffrey Dean Morgan HDTV XviD LMAO
Category: TV: Divx/Xvid
Size: 424.85MB
Added: 2010-04-23 06:22:45]]>
+ TV: Divx/Xvid + tv.divx/xvid + 6 + +
+ + CSI.S10E20.HDTV.XviD-LOL + http://nzbmatrix.com/api-nzb-download.php?id=625436 + http://nzbmatrix.com/api-nzb-download.php?id=625436 + Name: Little People Big World S08E24 Brothers in Bavaria REPACK HDTV XviD MOMENTUM
Category: TV: Divx/Xvid
Size: 208.22MB
Added: 2010-04-23 06:21:44]]>
+ TV: Divx/Xvid + tv.divx/xvid + 6 + +
+ + The.Daily.Show.2010.04.29.Michael.Caine.HDTV.XviD-FQM.nzb + http://nzbmatrix.com/api-nzb-download.php?id=625435 + http://nzbmatrix.com/api-nzb-download.php?id=625435 + Name: Lopez Tonight 2010 04 21 Zoe Saldana HDTV XviD MOMENTUM
Category: TV: Divx/Xvid
Size: 424.31MB
Added: 2010-04-23 06:04:48]]>
+ TV: Divx/Xvid + tv.divx/xvid + 6 + +
+ + The Mentalist S02E20 720p HDTV x264 CTU + http://nzbmatrix.com/api-nzb-download.php?id=625434 + http://nzbmatrix.com/api-nzb-download.php?id=625434 + Name: The Mentalist S02E20 720p HDTV x264 CTU
Category: TV: HD
Size: 219.79MB
Added: 2010-04-23 05:57:50]]>
+ TV: HD + tv.hd + 41 + +
+ + 24.S06E01.HDTV.XviD-LOL + http://nzbmatrix.com/api-nzb-download.php?id=625433 + http://nzbmatrix.com/api-nzb-download.php?id=625433 + Name: Jimmy Kimmel 2010 04 22 Chace Crawford HDTV XviD 2HD
Category: TV: Divx/Xvid
Size: 433.32MB
Added: 2010-04-23 05:46:31]]>
+ TV: Divx/Xvid + tv.divx/xvid + 6 + +
+ + Bones.S05E19.HDTV.XviD-LOL + http://nzbmatrix.com/api-nzb-download.php?id=625430 + http://nzbmatrix.com/api-nzb-download.php?id=625430 + Name: Project Runway S07E14 WS DSR XviD MOMENTUM
Category: TV: Divx/Xvid
Size: 430.59MB
Added: 2010-04-23 05:34:44]]>
+ TV: Divx/Xvid + tv.divx/xvid + 6 + +
+ + David Letterman 2010 04 22 David Spade HDTV XviD LMAO + http://nzbmatrix.com/api-nzb-download.php?id=625402 + http://nzbmatrix.com/api-nzb-download.php?id=625402 + Name: David Letterman 2010 04 22 David Spade HDTV XviD LMAO
Category: TV: Divx/Xvid
Size: 416.25MB
Added: 2010-04-23 05:20:07]]>
+ TV: Divx/Xvid + tv.divx/xvid + 6 + +
+ + Jay Leno 2010 04 22 Jeff Corwin HDTV XviD LMAO + http://nzbmatrix.com/api-nzb-download.php?id=625389 + http://nzbmatrix.com/api-nzb-download.php?id=625389 + Name: Jay Leno 2010 04 22 Jeff Corwin HDTV XviD LMAO
Category: TV: Divx/Xvid
Size: 417.51MB
Added: 2010-04-23 05:06:07]]>
+ TV: Divx/Xvid + tv.divx/xvid + 6 + +
+ + The Colbert Report 2010 04 22 Gorillaz HDTV XviD FQM + http://nzbmatrix.com/api-nzb-download.php?id=625387 + http://nzbmatrix.com/api-nzb-download.php?id=625387 + Name: The Colbert Report 2010 04 22 Gorillaz HDTV XviD FQM
Category: TV: Divx/Xvid
Size: 216.94MB
Added: 2010-04-23 04:13:02]]>
+ TV: Divx/Xvid + tv.divx/xvid + 6 + +
+ + The Marriage Ref S01E08 HDTV XviD 2HD + http://nzbmatrix.com/api-nzb-download.php?id=625386 + http://nzbmatrix.com/api-nzb-download.php?id=625386 + Name: The Marriage Ref S01E08 HDTV XviD 2HD
Category: TV: Divx/Xvid
Size: 431.06MB
Added: 2010-04-23 04:11:08]]>
+ TV: Divx/Xvid + tv.divx/xvid + 6 + +
+
+
\ No newline at end of file diff --git a/NzbDrone.Core.Test/HistoryProviderTest.cs b/NzbDrone.Core.Test/HistoryProviderTest.cs new file mode 100644 index 000000000..3ba755152 --- /dev/null +++ b/NzbDrone.Core.Test/HistoryProviderTest.cs @@ -0,0 +1,182 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Gallio.Framework; +using MbUnit.Framework; +using MbUnit.Framework.ContractVerifiers; +using Moq; +using NzbDrone.Core.Providers; +using NzbDrone.Core.Repository; +using SubSonic.Repository; + +namespace NzbDrone.Core.Test +{ + [TestFixture] + public class HistoryProviderTest + { + [Test] + public void AllItems() + { + //Setup + var indexer = new Indexer {Enabled = true, Name = "NzbMatrix", Order = 1, RssUrl = "http://www.nzbmatrix.com"}; + var series = new Series + { + SeriesId = 5656, + CleanTitle = "rock", + Monitored = true, + Overview = "Series Overview", + Quality = 1, + Title = "30 Rock", + Path = @"C:\Test\TV\30 Rock" + }; + var season = new Season{SeasonId = 4321, SeasonNumber = 1, SeriesId = 5656, Monitored = true}; + var episode = new Episode + { + AirDate = DateTime.Today.AddDays(-1), + EpisodeId = 1234, + EpisodeNumber = 5, + Language = "English", + Overview = "This is an Overview", + SeasonNumber = 1, + SeasonId = 4321, + Season = season, + SeriesId = 5656 + }; + + var list = new List(); + list.Add(new History + { + Id = new int(), + Date = DateTime.Now, + IsProper = false, + Quality = 1, + Indexer = indexer, + Episode = episode, + EpisodeId = 1234 + }); + + var repo = new Mock(); + repo.Setup(r => r.All()).Returns(list.AsQueryable()); + + var target = new HistoryProvider(repo.Object); + + //Act + var result = target.AllItems(); + + //Assert + Assert.AreEqual(result.Count(), 1); + } + + [Test] + public void Exists_True() + { + //Todo: This test fails... Moq Setup doesn't return the expected value + //Setup + var indexer = new Indexer { Enabled = true, Name = "NzbMatrix", Order = 1, RssUrl = "http://www.nzbmatrix.com" }; + var series = new Series + { + SeriesId = 5656, + CleanTitle = "rock", + Monitored = true, + Overview = "Series Overview", + Quality = 1, + Title = "30 Rock", + Path = @"C:\Test\TV\30 Rock" + }; + var season = new Season { SeasonId = 4321, SeasonNumber = 1, SeriesId = 5656, Monitored = true }; + var episode = new Episode + { + AirDate = DateTime.Today.AddDays(-1), + EpisodeId = 1234, + EpisodeNumber = 5, + Language = "English", + Overview = "This is an Overview", + SeasonNumber = 1, + SeasonId = 4321, + Season = season, + SeriesId = 5656 + }; + + var list = new List(); + list.Add(new History + { + Id = new int(), + Date = DateTime.Now, + IsProper = false, + Quality = 1, + Indexer = indexer, + Episode = episode, + EpisodeId = 1234 + }); + + var proper = false; + + var repo = new Mock(); + repo.Setup(r => r.Exists(h => h.EpisodeId == episode.EpisodeId && h.IsProper == proper)).Returns(true); + + var target = new HistoryProvider(repo.Object); + + //Act + var result = target.Exists(episode, false); + + //Assert + Assert.AreEqual(result, true); + } + + [Test] + public void Exists_False() + { + //Todo: This test fails... Moq Setup doesn't return the expected value + + //Setup + var indexer = new Indexer { Enabled = true, Name = "NzbMatrix", Order = 1, RssUrl = "http://www.nzbmatrix.com" }; + var series = new Series + { + SeriesId = 5656, + CleanTitle = "rock", + Monitored = true, + Overview = "Series Overview", + Quality = 1, + Title = "30 Rock", + Path = @"C:\Test\TV\30 Rock" + }; + var season = new Season { SeasonId = 4321, SeasonNumber = 1, SeriesId = 5656, Monitored = true }; + var episode = new Episode + { + AirDate = DateTime.Today.AddDays(-1), + EpisodeId = 1234, + EpisodeNumber = 5, + Language = "English", + Overview = "This is an Overview", + SeasonNumber = 1, + SeasonId = 4321, + Season = season, + SeriesId = 5656 + }; + + var list = new List(); + list.Add(new History + { + Id = new int(), + Date = DateTime.Now, + IsProper = false, + Quality = 1, + Indexer = indexer, + Episode = episode, + EpisodeId = 1234 + }); + + var repo = new Mock(); + repo.Setup(r => r.Exists(h => h.Episode == episode && h.IsProper == list[0].IsProper)).Returns(false); + + var target = new HistoryProvider(repo.Object); + + //Act + var result = target.Exists(episode, true); + + //Assert + Assert.AreEqual(result, false); + } + } +} diff --git a/NzbDrone.Core.Test/IndexerProviderTest.cs b/NzbDrone.Core.Test/IndexerProviderTest.cs new file mode 100644 index 000000000..6b4640e45 --- /dev/null +++ b/NzbDrone.Core.Test/IndexerProviderTest.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Gallio.Framework; +using MbUnit.Framework; +using MbUnit.Framework.ContractVerifiers; +using Moq; +using NzbDrone.Core.Providers; +using NzbDrone.Core.Repository; +using SubSonic.Repository; + +namespace NzbDrone.Core.Test +{ + [TestFixture] + public class IndexerProviderTest + { + [Test] + public void AllIndexers() + { + // + // TODO: Add test logic here + // + + //Setup + var list = new List(); + list.Add(new Indexer{Name = "Test1", RssUrl = "http://www.test1.com/rss.php", Enabled = true, Order = 1}); + list.Add(new Indexer{Name = "Test2", RssUrl = "http://www.test2.com/rss.php", Enabled = false, Order = 4}); + list.Add(new Indexer{Name = "Test3", RssUrl = "http://www.test3.com/rss.php", Enabled = true, Order = 3}); + list.Add(new Indexer{Name = "Test4", RssUrl = "http://www.test4.com/rss.php", Enabled = false, Order = 2}); + + var repo = new Mock(); + repo.Setup(r => r.All()).Returns(list.AsQueryable()); + + var target = new IndexerProvider(repo.Object); + + //Act + var result = target.AllIndexers(); + + //Assert + + Assert.AreEqual(result.Last().Name, "Test2"); + } + + [Test] + public void EnabledIndexers() + { + // + // TODO: Add test logic here + // + + //Setup + var list = new List(); + list.Add(new Indexer { Name = "Test1", RssUrl = "http://www.test1.com/rss.php", Enabled = true, Order = 1 }); + list.Add(new Indexer { Name = "Test2", RssUrl = "http://www.test2.com/rss.php", Enabled = false, Order = 4 }); + list.Add(new Indexer { Name = "Test3", RssUrl = "http://www.test3.com/rss.php", Enabled = true, Order = 3 }); + list.Add(new Indexer { Name = "Test4", RssUrl = "http://www.test4.com/rss.php", Enabled = false, Order = 2 }); + + var repo = new Mock(); + repo.Setup(r => r.All()).Returns(list.AsQueryable()); + + var target = new IndexerProvider(repo.Object); + + //Act + var result = target.EnabledIndexers(); + + //Assert + Assert.AreEqual(result.First().Name, "Test1"); + Assert.AreEqual(result.Last().Name, "Test3"); + } + } +} diff --git a/NzbDrone.Core.Test/Libs/Moq.pdb b/NzbDrone.Core.Test/Libs/Moq.pdb deleted file mode 100644 index 8ec9d72f8..000000000 Binary files a/NzbDrone.Core.Test/Libs/Moq.pdb and /dev/null differ diff --git a/NzbDrone.Core.Test/Libs/RSS.NET.XML b/NzbDrone.Core.Test/Libs/RSS.NET.XML new file mode 100644 index 000000000..e60b7797a --- /dev/null +++ b/NzbDrone.Core.Test/Libs/RSS.NET.XML @@ -0,0 +1,1388 @@ + + + + RSS.NET + + + + The contents of a RssFeed + + + Initialize a new instance of the RssFeed class. + + + Initialize a new instance of the RssFeed class with a specified encoding. + + + Returns a string representation of the current Object. + The Url of the feed + + + Reads the specified RSS feed + The url or filename of the RSS feed + The contents of the feed + + + Reads the specified RSS feed + The specified way to connect to the web server + The contents of the feed + + + Reads the specified RSS feed + The cached version of the feed + The current contents of the feed + Will not download the feed if it has not been modified + + + Reads the specified RSS feed + The specified way to connect to the web server + The cached version of the feed + The current contents of the feed + Will not download the feed if it has not been modified + + + Writes the RSS feed to the specified stream. + specified Stream + The Stream cannot be written to. + Feed must contain at least one channel. + Channel must contain at least one item. + + + Writes the RSS feed to the specified file. + The encoding is ISO-8859-1. + The filename is empty, contains only white space, or contains one or more invalid characters. + Access is denied. + The filename is a (null c#, Nothing vb) reference. + The directory to write to is not found. + The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax. + The caller does not have the required permission. + specified file (including path) If the file exists, it will be truncated with the new content. + Feed must contain at least one channel. + Channel must contain at least one item. + + + The channels that are contained in the feed. + + + The modules that the feed adhears to. + + + A collection of all exceptions encountered during the reading of the feed. + + + The Version of the feed. + + + The server generated hash of the feed. + + + The server generated last modfified date and time of the feed. + + + Indicates this feed has not been changed on the server, and the local copy was returned. + + + Location of the feed + + + Encoding of the feed + + + Provide information regarding the location of the subject matter of the channel in a taxonomy + + + Base class for all RSS elements + + + Initialize a new instance of the RssElement class + + + Initialize a new instance of the RssCategory class + + + Actual categorization given for this item, within the chosen taxonomy + + + URL of external taxonomy + + + A strongly typed collection of objects + + + Adds a specified channel to this collection. + The channel to add. + The zero-based index of the added channel. + + + Determines whether the RssChannelCollection contains a specific element. + The RssChannel to locate in the RssChannelCollection. + true if the RssChannelCollection contains the specified value; otherwise, false. + + + Copies the entire RssChannelCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssChannel Array that is the destination of the elements copied from RssChannelCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssChannelCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssChannel and returns the zero-based index of the first occurrence within the entire RssChannelCollection. + The RssChannel to locate in the RssChannelCollection. + The zero-based index of the first occurrence of RssChannel within the entire RssChannelCollection, if found; otherwise, -1. + + + Inserts a channel into this collection at a specified index. + The zero-based index of the collection at which to insert the channel. + The channel to insert into this collection. + + + Removes a specified channel from this collection. + The channel to remove. + + + Gets or sets the channel at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + A channel at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + A reference to an attachment to the item + + + Initialize a new instance of the RssEnclosure class. + + + Where the enclosure is located + + + The size of the enclosure, in bytes + -1 represents a null. + + + A standard Multipurpose Internet Mail Extensions (MIME) type + + + Grouping of related content items on a site + + + Initialize a new instance of the RssChannel class. + + + Returns a string representation of the current Object. + The channel's title, description, or "RssChannel" if the title and description are blank. + + + The name of the channel + Maximum length is 100 characters (For RSS 0.91) + + + URL of the website named in the title + Maximum length is 500 characters (For RSS 0.91) + + + Description of the channel + Maximum length is 500 characters (For RSS 0.91) + + + Language the channel is written in + + + A link and description for a graphic icon that represent a channel + + + Copyright notice for content in the channel + Maximum length is 100 (For RSS 0.91) + + + The email address of the managing editor of the channel, the person to contact for editorial inquiries + + Maximum length is 100 (For RSS 0.91) + The suggested format for email addresses in RSS elements is + bull@mancuso.com (Bull Mancuso) + + + + The email address of the webmaster for the channel + + Person to contact if there are technical problems + Maximum length is 100 (For RSS 0.91) + The suggested format for email addresses in RSS elements is + bull@mancuso.com (Bull Mancuso) + + + + The PICS rating for the channel + Maximum length is 500 (For RSS 0.91) + + + The publication date for the content in the channel, expressed as the coordinated universal time (UTC) + + + The date-time the last time the content of the channel changed, expressed as the coordinated universal time (UTC) + + + One or more categories the channel belongs to. + + + A string indicating the program used to generate the channel + + + A URL, points to the documentation for the format used in the RSS file + Maximum length is 500 (For RSS 0.91). + + + Provides information about an HTTP GET feature, typically for a search or subscription + + + Readers should not read the channel during days listed. (UTC) + Days are listed in the array in the following order: + Monday + Tuesday + Wednesday + Thursday + Friday + Saturday + Sunday + Monday + + + + Readers should not read the channel during hours listed (UTC) + Represents a time in UTC - 1. + + + Allow processes to register with a cloud to be notified of updates to the channel + + + The number of minutes that a channel can be cached. + + + All items within the channel + + + People in a photo + + + A strongly typed collection of objects + + + Adds a specified item to this collection. + The item to add. + The zero-based index of the added item. + + + Determines whether the RssModuleItemCollection contains a specific element. + The RssModuleItem to locate in the RssModuleItemCollection. + true if the RssModuleItemCollection contains the specified value; otherwise, false. + + + Copies the entire RssModuleItemCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssModuleItem Array that is the destination of the elements copied from RssModuleItemCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssModuleItemCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssModuleItem and returns the zero-based index of the first occurrence within the entire RssModuleItemCollection. + The RssModuleItem to locate in the RssModuleItemCollection. + The zero-based index of the first occurrence of RssModuleItem within the entire RssModuleItemCollection, if found; otherwise, -1. + + + Inserts an item into this collection at a specified index. + The zero-based index of the collection at which to insert the item. + The item to insert into this collection. + + + Removes a specified item from this collection. + The item to remove. + + + Bind a particular item to this module + Hash code of the item + + + Check if a particular item is bound to this module + Hash code of the item + true if this item is bound to this module, otherwise false + + + Gets or sets the item at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + An item at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + Initialize a new instance of the RssPhotoAlbumItemPhotoPeople class + + + Initialize a new instance of the RssPhotoAlbumItemPhotoPeople class + Name of person + + + Add a person to the photo + Name of person + The zero-based index of the added item + + + A collection of photos in a category + + + A strongly typed collection of objects + + + Adds a specified item to this collection. + The item to add. + The zero-based index of the added item. + + + Determines whether the RssModuleItemCollectionCollection contains a specific element. + The RssModuleItemCollection to locate in the RssModuleItemCollectionCollection. + true if the RssModuleItemCollectionCollection contains the specified value; otherwise, false. + + + Copies the entire RssModuleItemCollectionCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssModuleItemCollection Array that is the destination of the elements copied from RssModuleItemCollectionCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssModuleItemCollectionCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssModuleItemCollection and returns the zero-based index of the first occurrence within the entire RssModuleItemCollectionCollection. + The RssModuleItemCollection to locate in the RssModuleItemCollectionCollection. + The zero-based index of the first occurrence of RssModuleItemCollection within the entire RssModuleItemCollectionCollection, if found; otherwise, -1. + + + Inserts an item into this collection at a specified index. + The zero-based index of the collection at which to insert the item. + The item to insert into this collection. + + + Removes a specified item from this collection. + The item to remove. + + + Gets or sets the item at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + An item at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + + + Adds a sepecified photo to this collection. + The photo to add. + The zero-based index of the added item. + + + A photo in the category + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + Date of the Photo + Description of the photo. + Direct link of the photo. + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + Date of the Photo + Description of the photo. + People to add to the photo. + Direct link of the photo. + + + Adds a specified item to this collection. + Date of the Photo + Description of the photo. + People to add to the photo. + Direct link of the photo. + The zero-based index of the added item. + + + Adds a specified item to this collection. + Date of the Photo + Description of the photo. + Direct link of the photo. + The zero-based index of the added item. + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + Date of the Photo + Description of the photo. + Direct link of the photo. + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + Date of the Photo + Description of the photo. + People to add to the photo. + Direct link of the photo. + + + Adds a specified item to this collection. + Date of the Photo + Description of the photo. + People to add to the photo. + Direct link of the photo. + The zero-based index of the added item. + + + Adds a specified item to this collection. + Date of the Photo + Description of the photo. + Direct link of the photo. + The zero-based index of the added item. + + + A collection of categories in a photo album + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + + + Adds a sepecified category to this collection. + The category to add. + The zero-based index of the added item. + + + A Photo Album category + + + Initialize a new instance of the RssPhotoAlbumItem class + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + + + Adds a specified category to this collection. + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + The zero-based index of the added item. + + + Initialize a new instance of the RssPhotoAlbumItem class + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + + + Adds a specified category to this collection. + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + The zero-based index of the added item. + + + Initialize a new instance of the RssPhotoAlbumItem class + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + + + Adds a specified category to this collection. + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + The zero-based index of the added item. + + + Initialize a new instance of the RssPhotoAlbumItem class + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + + + Adds a specified category to this collection. + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + The zero-based index of the added item. + + + RSS syndication for Robert A. Wlodarczyk's Photo Album application (to be sold by Inno Thinx LLC) + + + Base class for all RSS modules + + + Initialize a new instance of the RssModule class + + + Bind a particular channel to this module + Hash code of the channel + + + Check if a particular channel is bound to this module + Hash code of the channel + true if this channel is bound to this module, otherwise false + + + Collection of RSSModuleItem that are to be placed in the channel + + + Collection of RSSModuleItemCollection that are to be placed in the channel item + + + Prefix for the given module namespace + + + URL for the given module namespace + + + Initialize a new instance of the RssPhotoAlbum class + Link to the Photo Album + The category of the Photo Album to add + + + Initialize a new instance of the RssPhotoAlbum class + Link to the Photo Album + A collection of categories in the Photo Album to add + + + Link element for channel + + + Contains default values and methods for maintaining data consistency + + + Default value for a string in all RSS classes + empty string + If an element in the RSS class library has the value of RssDefault.String, consider the element as "not entered", "null", or empty. + + + Default value for an int in all RSS classes + -1 + If an element in the RSS class library has the value of RssDefault.Int, consider the element as "not entered", "null", or empty. + + + Default value for a DateTime in all RSS classes + DateTime.MinValue + If an element in the RSS class library has the value of RssDefault.DateTime, consider the element as "not entered", "null", or empty. + + + Default value for a Uri in all RSS classes + gopher://rss-net.sf.net + If an element in the RSS class library has the value of RssDefault.Uri, consider the element as "not entered", "null", or empty. + + + Verifies the string passed is not null + string to verify + RssDefault.String if input is null, otherwise input + Method is used in properties to prevent a null value + + + Verifies the int passed is greater than or equal to -1 + int to verify + RssDefault.Int if int is less than -1, else input + Method is used in properties to prevent values less than -1 + + + Verifies the Uri passed is not null + Uri to verify + RssDefault.Uri if input is null, otherwise input + Method is used in all properties to prevent a null value + + + Represents Null, False, and True + Source: Microsoft c# example + + + A DBBool containing 'Null'. + One of three possible DBBool values. + + + A DBBool containing 'False'. + One of three possible DBBool values. + + + A DBBool containing 'True'. + One of three possible DBBool values. + + + Private field that stores –1, 0, 1 for False, Null, True. + + + Private instance constructor. The value parameter must be –1, 0, or 1. + + + Implicit conversion from bool to DBBool. Maps true to DBBool.True and false to DBBool.False. + a DBBool + + + Explicit conversion from DBBool to bool. + The given DBBool is Null + a DBBool + true or false + + + Equality operator. + a DBBool + a DBBool + Returns Null if either operand is Null, otherwise returns True or False. + + + Inequality operator. + a DBBool + a DBBool + Returns Null if either operand is Null, otherwise returns True or False. + + + Logical negation operator. + a DBBool + Returns True if the operand is False, Null if the operand is Null, or False if the operand is True. + + + Logical AND operator. + a DBBool + a DBBool + Returns False if either operand is False, otherwise Null if either operand is Null, otherwise True. + + + Logical OR operator. + a DBBool + a DBBool + Returns True if either operand is True, otherwise Null if either operand is Null, otherwise False. + + + Definitely true operator. + a DBBool + Returns true if the operand is True, false otherwise. + + + Definitely false operator. + a DBBool + Returns true if the operand is False, false otherwise. + + + Determines whether two DBBool instances are equal. + The object to check. + True if the two DBBools are equal. + + + Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. + A hash code for the current DBBool. + + + Returns a string representation of the current Object. + Object has not been initialized. + A string containing DBBool.False, DBBool.Null, or DBBool.True + + + Properties to examine the value of a DBBool. + Return true if this DBBool has the given value, false otherwise. + + + Properties to examine the value of a DBBool. + Return true if this DBBool has the given value, false otherwise. + + + Properties to examine the value of a DBBool. + Return true if this DBBool has the given value, false otherwise. + + + A strongly typed collection of objects + + + Adds a specified item to this collection. + The item to add. + The zero-based index of the added item. + + + Determines whether the RssModuleCollection contains a specific element. + The RssModule to locate in the RssModuleCollection. + true if the RssModuleCollection contains the specified value; otherwise, false. + + + Copies the entire RssModuleCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssModule Array that is the destination of the elements copied from RssModuleCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssModuleCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssModule and returns the zero-based index of the first occurrence within the entire RssModuleCollection. + The RssModule to locate in the RssModuleCollection. + The zero-based index of the first occurrence of RssModule within the entire RssModuleCollection, if found; otherwise, -1. + + + Inserts an item into this collection at a specified index. + The zero-based index of the collection at which to insert the item. + The item to insert into this collection. + + + Removes a specified item from this collection. + The item to remove. + + + Gets or sets the item at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + An item at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + A strongly typed collection of objects + + + Adds a specified item to this collection. + The item to add. + The zero-based index of the added item. + + + Determines whether the RssItemCollection contains a specific element. + The RssItem to locate in the RssItemCollection. + true if the RssItemCollection contains the specified value; otherwise, false. + + + Copies the entire RssItemCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssItem Array that is the destination of the elements copied from RssItemCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssItemCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssItem and returns the zero-based index of the first occurrence within the entire RssItemCollection. + The RssItem to locate in the RssItemCollection. + The zero-based index of the first occurrence of RssItem within the entire RssItemCollection, if found; otherwise, -1. + + + Inserts an item into this collection at a specified index. + The zero-based index of the collection at which to insert the item. + The item to insert into this collection. + + + Removes a specified item from this collection. + The item to remove. + + + The latest pubDate in the items collection + The latest pubDate -or- RssDefault.DateTime if all item pubDates are not defined + + + The oldest pubDate in the items collection + The oldest pubDate -or- RssDefault.DateTime if all item pubDates are not defined + + + Calculates the oldest and latest pubdates + + + Gets or sets the item at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + An item at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + Allow processes to register with a cloud to be notified of updates to the channel. + + + Initialize a new instance of the RssCloud class. + + + Domain name or IP address of the cloud + + + TCP port that the cloud is running on + + + Location of its responder + + + Name of the procedure to call to request notification + + + Protocol used + + + A strongly typed collection of objects + + + Adds a specified feed to this collection. + The feed to add. + The zero-based index of the added feed. + + + Determines whether the RssFeedCollection contains a specific element. + The RssFeed to locate in the RssFeedCollection. + true if the RssFeedCollection contains the specified value; otherwise, false. + + + Copies the entire RssFeedCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssFeed Array that is the destination of the elements copied from RssFeedCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssFeedCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssFeed and returns the zero-based index of the first occurrence within the entire RssFeedCollection. + The RssFeed to locate in the RssFeedCollection. + The zero-based index of the first occurrence of RssFeed within the entire RssFeedCollection, if found; otherwise, -1. + + + Inserts a feed into this collection at a specified index. + The zero-based index of the collection at which to insert the feed. + The feed to insert into this collection. + + + Removes a specified category from this collection. + The category to remove. + + + Gets or sets the feed at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + A feed at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + Gets or sets the feed with the given name.In C#, this property is the indexer for the class. + The url of the feed to access. + A feed at each valid url. If the feed does not exist, null. + This method is an indexer that can be used to access the collection. + + + A RSS module that adds elements at the channel level that are common to weblogs. + + + Initialize a new instance of the + The URL of an OPML file containing the blogroll for the site. + The URL of an OPML file containing the author's RSS subscriptions. + + The URL of a weblog that the author of the weblog is promoting per Mark Pilgrim's description. + "http://diveintomark.org/archives/2002/09/17.html#blink_and_youll_miss_it" + + + The URL of a changes.xml file. When the feed that contains this element updates, it pings a server that updates this file. The presence of this element says to aggregators that they only have to read the changes file to see if this feed has updated. If several feeds point to the same changes file, the aggregator has to do less polling, resulting in better use of server bandwidth, and the Internet as a whole; and resulting in faster scans. Everyone wins. For more technical information, see the howto on the XML-RPC site. + "http://www.xmlrpc.com/weblogsComForRss" + + + + All valid Rss Cloud protocols, including Null + + + Not defined + + + Protocol is not supported + + + xml-rpc + + + soap + + + http-post + + + All RSS versions + + + Not defined + + + Version is not directly supported + + + RDF Site Summary (RSS) 0.9 + + + Rich Site Summary (RSS) 0.91 + + + Rich Site Summary (RSS) 0.92 + + + RDF Site Summary (RSS) 1.0 + + + Really Simple Syndication (RSS) 2.0 + + + Writes an RSS XML file. + Represents a writer that provides a fast, non-cached, forward-only way of generating streams or files containing RSS XML data that conforms to the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML recommendations. + + + Creates an instance of the RssWriter class using the specified TextWriter. + specified TextWriter + + + Creates an instance of the RssWriter class using the specified Stream and Encoding. + The encoding is not supported or the stream cannot be written to. + Stream to output to + The encoding to use. If encoding is (null c#, Nothing vb) it writes out the stream as UTF-8. + + + Creates an instance of the RssWriter class using the specified Stream. + The encoding is ISO-8859-1. + The Stream cannot be written to. + specified Stream + + + Creates an instance of the RssWriter class using the specified file and Encoding. + The encoding is not supported; the filename is empty, contains only white space, or contains one or more invalid characters. + Access is denied. + The filename is a (null c#, Nothing vb) reference. + The directory to write to is not found. + The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax. + The caller does not have the required permission. + specified file (including path) If the file exists, it will be truncated with the new content. + specified Encoding + + + Creates an instance of the RssWriter class using the specified file. + The encoding is ISO-8859-1. + The filename is empty, contains only white space, or contains one or more invalid characters. + Access is denied. + The filename is a (null c#, Nothing vb) reference. + The directory to write to is not found. + The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax. + The caller does not have the required permission. + specified file (including path) If the file exists, it will be truncated with the new content. + + + Writes the begining data to the RSS file + This routine is called from the WriteChannel and WriteItem subs + RDF Site Summary (RSS) 1.0 is not currently supported. + + + Closes instance of RssWriter. + Writes end elements, and releases connections + Occurs if the RssWriter is already closed or the caller is attempting to close before writing a channel. + + + Writes an RSS channel + RssWriter has been closed, and can not be written to. + Channel must be instanciated with data, before calling Write. + RSS channel to write + + + Writes an RSS item + Either the RssWriter has already been closed, or the caller is attempting to write an RSS item before an RSS channel. + Item must be instanciated with data, before calling Write. + RSS item to write + + + Writes an element with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an element with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an element with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an element with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an element with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an attribute with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an attribute with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an attribute with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an attribute with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an attribute with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Gets or sets the RSS version to write. + Can't change version number after data has been written. + + + Gets or sets the of the XML output. + Can't change XML formatting after data has been written. + + + Gets or sets how indentation to write for each level in the hierarchy when XmlFormat is set to + Can't change XML formatting after data has been written. + Setting this property to a negative value. + + + RSS modules + + + Reads an RSS file. + Provides fast, non-cached, forward-only access to RSS data. + + + Initializes a new instance of the RssReader class with the specified URL or filename. + The URL or filename for the file containing the RSS data. + Occures when unable to retrieve file containing the RSS data. + + + Creates an instance of the RssReader class using the specified TextReader. + specified TextReader + Occures when unable to retrieve file containing the RSS data. + + + Creates an instance of the RssReader class using the specified Stream. + Occures when unable to retrieve file containing the RSS data. + Stream to read from + + + Reads the next RssElement from the stream. + An RSS Element + RssReader has been closed, and can not be read. + RSS file not found. + Invalid XML syntax in RSS file. + Unable to read an RssElement. Reached the end of the stream. + + + Closes connection to file. + This method also releases any resources held while reading. + + + A collection of all exceptions the RssReader class has encountered. + + + Gets the RSS version of the stream. + One of the values. + + + Globally unique identifier + + + Initialize a new instance of the RssGuid class. + + + If true, a url that can be opened in a web browser that points to the item + + + Globally unique identifier value + + + A link and description for a graphic that represent a channel + + + Initialize a new instance of the RssImage class. + + + The URL of a GIF, JPEG or PNG image that represents the channel. + Maximum length is 500 (For RSS 0.91). + + + Describes the image, it's used in the ALT attribute of the HTML img tag when the channel is rendered in HTML. + Maximum length is 100 (For RSS 0.91). + + + The URL of the site, when the channel is rendered, the image is a link to the site. + Maximum length is 500 (For RSS 0.91). + + + Contains text that is included in the TITLE attribute of the link formed around the image in the HTML rendering. + + + Width of image in pixels + Maximum value for height is 400 (For RSS 0.91) + + + Height of image in pixels + Maximum value for width is 144 (For RSS 0.91) + + + A module may contain any number of items (either channel-based or item-based). + + + Initialize a new instance of the RssModuleItem class + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + Is text required for this RssModuleItem? + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + The text contained within this RssModuleItem. + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + Is text required for this RssModuleItem? + The text contained within this RssModuleItem. + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + The text contained within this RssModuleItem. + The sub-elements of this RssModuleItem (if any exist). + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + Is text required for this RssModuleItem? + The text contained within this RssModuleItem. + The sub-elements of this RssModuleItem (if any exist). + + + Returns a string representation of the current Object. + The item's title, description, or "RssModuleItem" if the title and description are blank. + + + + The name of this RssModuleItem. + + + + + The text contained within this RssModuleItem. + + + + + The sub-elements of this RssModuleItem (if any exist). + + + + + Is text for this element required? + + + + Describes an items source + + + Initialize a new instance of the RssSource class + + + Name of the RSS channel that the item came from + + + URL of the original RSS feed from which the item was republished + + + A strongly typed collection of objects + + + Adds a specified exception to this collection. + The exception to add. + The zero-based index of the added exception -or- -1 if the exception already exists. + + + Determines whether the ExceptionCollection contains a specific element. + The Exception to locate in the ExceptionCollection. + true if the ExceptionCollection contains the specified value; otherwise, false. + + + Copies the entire ExceptionCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional Exception Array that is the destination of the elements copied from ExceptionCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source ExceptionCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified Exception and returns the zero-based index of the first occurrence within the entire ExceptionCollection. + The Exception to locate in the ExceptionCollection. + The zero-based index of the first occurrence of RssChannel within the entire ExceptionCollection, if found; otherwise, -1. + + + Inserts an Exception into this collection at a specified index. + The zero-based index of the collection at which to insert the Exception. + The Exception to insert into this collection. + + + Removes a specified Exception from this collection. + The Exception to remove. + + + Gets or sets the exception at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + A exception at each valid index. + This method is an indexer that can be used to access the collection. + + + Returns the last exception added through the Add method. + The last exception -or- null if no exceptions exist + + + A strongly typed collection of objects + + + Adds a specified category to this collection. + The category to add. + The zero-based index of the added category. + + + Determines whether the RssCategoryCollection contains a specific element. + The RssCategory to locate in the RssCategoryCollection. + true if the RssCategoryCollection contains the specified value; otherwise, false. + + + Copies the entire RssCategoryCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssCategory Array that is the destination of the elements copied from RssCategoryCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssCategoryCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssCategory and returns the zero-based index of the first occurrence within the entire RssCategoryCollection. + The RssCategory to locate in the RssCategoryCollection. + The zero-based index of the first occurrence of RssCategory within the entire RssCategoryCollection, if found; otherwise, -1. + + + Inserts an category into this collection at a specified index. + The zero-based index of the collection at which to insert the category. + The category to insert into this collection. + + + Removes a specified category from this collection. + The category to remove. + + + Gets or sets the category at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + A category at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + A RSS module that adds elements at the channel or item level that specifies which Creative Commons license applies. + + + Initialize a new instance of the + + If present as a sub-element of channel, indicates that the content of the RSS file is available under a license, indicated by a URL, which is the value of the license element. A list of some licenses that may be used in this context is on the Creative Commons website on this page, however the license element may point to licenses not authored by Creative Commons. + You may also use the license element as a sub-element of item. When used this way it applies only to the content of that item. If an item has a license, and the channel does too, the license on the item applies, i.e. the inner license overrides the outer one. + Multiple license elements are allowed, in either context, indicating that the content is available under multiple licenses. + "http://www.creativecommons.org/licenses/" + + If present as a sub-element of channel then true, otherwise false + + + A channel may contain any number of items, each of which links to more information about the item, with an optional description + + + Initialize a new instance of the RssItem class + + + Returns a string representation of the current Object. + The item's title, description, or "RssItem" if the title and description are blank. + + + Title of the item + Maximum length is 100 (For RSS 0.91) + + + URL of the item + Maximum length is 500 (For RSS 0.91) + + + Item synopsis + Maximum length is 500 (For RSS 0.91) + + + Email address of the author of the item + + + Provide information regarding the location of the subject matter of the channel in a taxonomy + + + URL of a page for comments relating to the item + + + Describes an items source + + + A reference to an attachment to the item + + + A string that uniquely identifies the item + + + Indicates when the item was published + + + Multi-purpose channel element for the purpose of allowing users to submit queries back to the publisher's site + Typically for a search or subscription + + + Initialize a new instance of the RssTextInput class + + + The label of the submit button in the text input area + Maximum length is 100 (For RSS 0.91) + + + Explains the text input area + Maximum length is 500 (For RSS 0.91) + + + The name of the text object in the text input area + Maximum length is 20 (For RSS 0.91). + + + The URL of the script that processes text input requests + Maximum length is 500 (For RSS 0.91) + + + diff --git a/NzbDrone.Core.Test/Libs/RSS.NET.dll b/NzbDrone.Core.Test/Libs/RSS.NET.dll new file mode 100644 index 000000000..10dd1f774 Binary files /dev/null and b/NzbDrone.Core.Test/Libs/RSS.NET.dll differ diff --git a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 4eb6565e2..8f6aa0b11 100644 --- a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -21,6 +21,7 @@ DEBUG;TRACE prompt 4 + AnyCPU pdbonly @@ -52,6 +53,10 @@ ..\NzbDrone.Core\Libraries\NLog.dll + + False + Libs\RSS.NET.dll + False ..\NzbDrone.Core\Libraries\SubSonic.Core.dll @@ -68,6 +73,7 @@ + @@ -80,8 +86,10 @@ + + @@ -91,6 +99,9 @@ + + Always + PreserveNewest @@ -102,8 +113,9 @@ PreserveNewest - + + Always diff --git a/NzbDrone.Core.Test/RssProviderTest.cs b/NzbDrone.Core.Test/RssProviderTest.cs new file mode 100644 index 000000000..bf95ed775 --- /dev/null +++ b/NzbDrone.Core.Test/RssProviderTest.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Security.Policy; +using System.Text; +using Gallio.Framework; +using MbUnit.Framework; +using MbUnit.Framework.ContractVerifiers; +using Moq; +using NzbDrone.Core.Model; +using NzbDrone.Core.Providers; +using Rss; + +namespace NzbDrone.Core.Test +{ + [TestFixture] + public class RssProviderTest + { + [Test] + public void GetFeed() + { + //Setup + var feedInfo = new FeedInfoModel("NzbMatrix", @"Files\Feed.nzbmatrix.com.xml"); + var target = new RssProvider(); + + //Act + var enumerable = target.GetFeed(feedInfo); + var result = new List(); + result.AddRange(enumerable); + + //Assert + Assert.GreaterThan(result.Count, 1); //Assert that the number of Items in the feed is greater than 1 + } + } +} diff --git a/NzbDrone.Core/CentralDispatch.cs b/NzbDrone.Core/CentralDispatch.cs index 288539101..a19096bef 100644 --- a/NzbDrone.Core/CentralDispatch.cs +++ b/NzbDrone.Core/CentralDispatch.cs @@ -30,11 +30,21 @@ namespace NzbDrone.Core Logger.Debug("Binding Ninject's Kernel"); _kernel = new StandardKernel(); + //Sqlite string connectionString = String.Format("Data Source={0};Version=3;", Path.Combine(AppPath, "nzbdrone.db")); var dbProvider = ProviderFactory.GetProvider(connectionString, "System.Data.SQLite"); + //SQLExpress + //string connectionString = String.Format(@"server=.\SQLExpress; database=NzbDrone; Trusted_Connection=True;"); + //var dbProvider = ProviderFactory.GetProvider(connectionString, "System.Data.SqlClient"); + + //Sqlite string logConnectionString = String.Format("Data Source={0};Version=3;", Path.Combine(AppPath, "log.db")); var logDbProvider = ProviderFactory.GetProvider(logConnectionString, "System.Data.SQLite"); + + //SQLExpress + //string logConnectionString = String.Format(@"server=.\SQLExpress; database=NzbDroneLogs; Trusted_Connection=True;"); + //var logDbProvider = ProviderFactory.GetProvider(logConnectionString, "System.Data.SqlClient"); var logRepository = new SimpleRepository(logDbProvider, SimpleRepositoryOptions.RunMigrations); //dbProvider.ExecuteQuery(new QueryCommand("VACUUM", dbProvider)); @@ -46,8 +56,12 @@ namespace NzbDrone.Core _kernel.Bind().To(); _kernel.Bind().To(); _kernel.Bind().To(); + _kernel.Bind().To(); _kernel.Bind().To().InSingletonScope(); _kernel.Bind().To().InSingletonScope(); + _kernel.Bind().To().InSingletonScope(); + _kernel.Bind().To().InSingletonScope(); + _kernel.Bind().To().InSingletonScope();; _kernel.Bind().To().InSingletonScope(); _kernel.Bind().To().InSingletonScope(); _kernel.Bind().To().InSingletonScope(); @@ -58,6 +72,7 @@ namespace NzbDrone.Core ForceMigration(_kernel.Get()); + SetupIndexers(_kernel.Get()); //Setup the default set of indexers on start-up } } @@ -73,6 +88,16 @@ namespace NzbDrone.Core } } + public static string ExecutablePath + { + get + { + //var uri = new Uri(Assembly.EscapedCodeBase); + //return Path.GetDirectoryName(uri.LocalPath); + return Directory.GetCurrentDirectory(); + } + } + public static IKernel NinjectKernel { get @@ -90,9 +115,9 @@ namespace NzbDrone.Core repository.GetPaged(0, 1); repository.GetPaged(0, 1); repository.GetPaged(0, 1); + repository.GetPaged(0, 1); } - /// /// This method forces IISExpress process to exit with the host application /// @@ -125,5 +150,83 @@ namespace NzbDrone.Core Logger.Info("Shutting down application."); Process.GetCurrentProcess().Kill(); } + + private static void SetupIndexers(IRepository repository) + { + //Setup the default providers in the Providers table + + string nzbMatrixRss = "http://rss.nzbmatrix.com/rss.php?page=download&username=USERNAME&apikey=APIKEY&subcat=6&english=1"; + string nzbsOrgRss = "http://nzbs.org/rss.php?type=1&dl=1&num=100&i=UID&h=HASH"; + string nzbsrusRss = "http://www.nzbsrus.com/rssfeed.php?cat=91,75&i=UID&h=HASH"; + + var nzbMatrixIndexer = new Indexer + { + IndexerName = "NzbMatrix", + RssUrl = nzbMatrixRss, + ApiUrl = String.Empty, + Enabled = false, + Order = 1 + }; + + var nzbsOrgIndexer = new Indexer + { + IndexerName = "NzbsOrg", + RssUrl = nzbsOrgRss, + ApiUrl = String.Empty, + Enabled = false, + Order = 2 + }; + + var nzbsrusIndexer = new Indexer + { + IndexerName = "Nzbsrus", + RssUrl = nzbsrusRss, + ApiUrl = String.Empty, + Enabled = false, + Order = 3 + }; + + //NzbMatrix + Logger.Debug("Checking for NzbMatrix Indexer"); + if (!repository.Exists(i => i.IndexerName == "NzbMatrix")) + { + Logger.Debug("Adding new Indexer: NzbMatrix"); + repository.Add(nzbMatrixIndexer); + } + + else + { + Logger.Debug("Updating Indexer: NzbMatrix"); + repository.Update(nzbMatrixIndexer); + } + + //Nzbs.org + Logger.Debug("Checking for Nzbs.org"); + if (!repository.Exists(i => i.IndexerName == "NzbsOrg")) + { + Logger.Debug("Adding new Indexer: Nzbs.org"); + repository.Add(nzbsOrgIndexer); + } + + else + { + Logger.Debug("Updating Indexer: Nzbs.org"); + repository.Update(nzbsOrgIndexer); + } + + //Nzbsrus + Logger.Debug("Checking for Nzbsrus"); + if (!repository.Exists(i => i.IndexerName == "Nzbsrus")) + { + Logger.Debug("Adding new Indexer: Nzbsrus"); + repository.Add(nzbsrusIndexer); + } + + else + { + Logger.Debug("Updating Indexer: Nzbsrus"); + repository.Update(nzbsrusIndexer); + } + } } } \ No newline at end of file diff --git a/NzbDrone.Core/Instrumentation/Log.cs b/NzbDrone.Core/Instrumentation/Log.cs index 95883a59c..c6341dc00 100644 --- a/NzbDrone.Core/Instrumentation/Log.cs +++ b/NzbDrone.Core/Instrumentation/Log.cs @@ -6,6 +6,7 @@ namespace NzbDrone.Core.Instrumentation public class Log { public int LogId { get; set; } + [SubSonicLongString] public string Message { get; set; } public DateTime Time { get; set; } public string Logger { get; set; } @@ -13,8 +14,10 @@ namespace NzbDrone.Core.Instrumentation [SubSonicNullString] public string Stack { get; set; } [SubSonicNullString] + [SubSonicLongString] public string ExceptionMessage { get; set; } [SubSonicNullString] + [SubSonicLongString] public string ExceptionString { get; set; } [SubSonicNullString] public string ExceptionType { get; set; } diff --git a/NzbDrone.Core/Libraries/Castle.Core.pdb b/NzbDrone.Core/Libraries/Castle.Core.pdb deleted file mode 100644 index 1f8f1d471..000000000 Binary files a/NzbDrone.Core/Libraries/Castle.Core.pdb and /dev/null differ diff --git a/NzbDrone.Core/Libraries/NLog.pdb b/NzbDrone.Core/Libraries/NLog.pdb deleted file mode 100644 index a9996beef..000000000 Binary files a/NzbDrone.Core/Libraries/NLog.pdb and /dev/null differ diff --git a/NzbDrone.Core/Libraries/RSS.NET.XML b/NzbDrone.Core/Libraries/RSS.NET.XML new file mode 100644 index 000000000..e60b7797a --- /dev/null +++ b/NzbDrone.Core/Libraries/RSS.NET.XML @@ -0,0 +1,1388 @@ + + + + RSS.NET + + + + The contents of a RssFeed + + + Initialize a new instance of the RssFeed class. + + + Initialize a new instance of the RssFeed class with a specified encoding. + + + Returns a string representation of the current Object. + The Url of the feed + + + Reads the specified RSS feed + The url or filename of the RSS feed + The contents of the feed + + + Reads the specified RSS feed + The specified way to connect to the web server + The contents of the feed + + + Reads the specified RSS feed + The cached version of the feed + The current contents of the feed + Will not download the feed if it has not been modified + + + Reads the specified RSS feed + The specified way to connect to the web server + The cached version of the feed + The current contents of the feed + Will not download the feed if it has not been modified + + + Writes the RSS feed to the specified stream. + specified Stream + The Stream cannot be written to. + Feed must contain at least one channel. + Channel must contain at least one item. + + + Writes the RSS feed to the specified file. + The encoding is ISO-8859-1. + The filename is empty, contains only white space, or contains one or more invalid characters. + Access is denied. + The filename is a (null c#, Nothing vb) reference. + The directory to write to is not found. + The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax. + The caller does not have the required permission. + specified file (including path) If the file exists, it will be truncated with the new content. + Feed must contain at least one channel. + Channel must contain at least one item. + + + The channels that are contained in the feed. + + + The modules that the feed adhears to. + + + A collection of all exceptions encountered during the reading of the feed. + + + The Version of the feed. + + + The server generated hash of the feed. + + + The server generated last modfified date and time of the feed. + + + Indicates this feed has not been changed on the server, and the local copy was returned. + + + Location of the feed + + + Encoding of the feed + + + Provide information regarding the location of the subject matter of the channel in a taxonomy + + + Base class for all RSS elements + + + Initialize a new instance of the RssElement class + + + Initialize a new instance of the RssCategory class + + + Actual categorization given for this item, within the chosen taxonomy + + + URL of external taxonomy + + + A strongly typed collection of objects + + + Adds a specified channel to this collection. + The channel to add. + The zero-based index of the added channel. + + + Determines whether the RssChannelCollection contains a specific element. + The RssChannel to locate in the RssChannelCollection. + true if the RssChannelCollection contains the specified value; otherwise, false. + + + Copies the entire RssChannelCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssChannel Array that is the destination of the elements copied from RssChannelCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssChannelCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssChannel and returns the zero-based index of the first occurrence within the entire RssChannelCollection. + The RssChannel to locate in the RssChannelCollection. + The zero-based index of the first occurrence of RssChannel within the entire RssChannelCollection, if found; otherwise, -1. + + + Inserts a channel into this collection at a specified index. + The zero-based index of the collection at which to insert the channel. + The channel to insert into this collection. + + + Removes a specified channel from this collection. + The channel to remove. + + + Gets or sets the channel at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + A channel at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + A reference to an attachment to the item + + + Initialize a new instance of the RssEnclosure class. + + + Where the enclosure is located + + + The size of the enclosure, in bytes + -1 represents a null. + + + A standard Multipurpose Internet Mail Extensions (MIME) type + + + Grouping of related content items on a site + + + Initialize a new instance of the RssChannel class. + + + Returns a string representation of the current Object. + The channel's title, description, or "RssChannel" if the title and description are blank. + + + The name of the channel + Maximum length is 100 characters (For RSS 0.91) + + + URL of the website named in the title + Maximum length is 500 characters (For RSS 0.91) + + + Description of the channel + Maximum length is 500 characters (For RSS 0.91) + + + Language the channel is written in + + + A link and description for a graphic icon that represent a channel + + + Copyright notice for content in the channel + Maximum length is 100 (For RSS 0.91) + + + The email address of the managing editor of the channel, the person to contact for editorial inquiries + + Maximum length is 100 (For RSS 0.91) + The suggested format for email addresses in RSS elements is + bull@mancuso.com (Bull Mancuso) + + + + The email address of the webmaster for the channel + + Person to contact if there are technical problems + Maximum length is 100 (For RSS 0.91) + The suggested format for email addresses in RSS elements is + bull@mancuso.com (Bull Mancuso) + + + + The PICS rating for the channel + Maximum length is 500 (For RSS 0.91) + + + The publication date for the content in the channel, expressed as the coordinated universal time (UTC) + + + The date-time the last time the content of the channel changed, expressed as the coordinated universal time (UTC) + + + One or more categories the channel belongs to. + + + A string indicating the program used to generate the channel + + + A URL, points to the documentation for the format used in the RSS file + Maximum length is 500 (For RSS 0.91). + + + Provides information about an HTTP GET feature, typically for a search or subscription + + + Readers should not read the channel during days listed. (UTC) + Days are listed in the array in the following order: + Monday + Tuesday + Wednesday + Thursday + Friday + Saturday + Sunday + Monday + + + + Readers should not read the channel during hours listed (UTC) + Represents a time in UTC - 1. + + + Allow processes to register with a cloud to be notified of updates to the channel + + + The number of minutes that a channel can be cached. + + + All items within the channel + + + People in a photo + + + A strongly typed collection of objects + + + Adds a specified item to this collection. + The item to add. + The zero-based index of the added item. + + + Determines whether the RssModuleItemCollection contains a specific element. + The RssModuleItem to locate in the RssModuleItemCollection. + true if the RssModuleItemCollection contains the specified value; otherwise, false. + + + Copies the entire RssModuleItemCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssModuleItem Array that is the destination of the elements copied from RssModuleItemCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssModuleItemCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssModuleItem and returns the zero-based index of the first occurrence within the entire RssModuleItemCollection. + The RssModuleItem to locate in the RssModuleItemCollection. + The zero-based index of the first occurrence of RssModuleItem within the entire RssModuleItemCollection, if found; otherwise, -1. + + + Inserts an item into this collection at a specified index. + The zero-based index of the collection at which to insert the item. + The item to insert into this collection. + + + Removes a specified item from this collection. + The item to remove. + + + Bind a particular item to this module + Hash code of the item + + + Check if a particular item is bound to this module + Hash code of the item + true if this item is bound to this module, otherwise false + + + Gets or sets the item at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + An item at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + Initialize a new instance of the RssPhotoAlbumItemPhotoPeople class + + + Initialize a new instance of the RssPhotoAlbumItemPhotoPeople class + Name of person + + + Add a person to the photo + Name of person + The zero-based index of the added item + + + A collection of photos in a category + + + A strongly typed collection of objects + + + Adds a specified item to this collection. + The item to add. + The zero-based index of the added item. + + + Determines whether the RssModuleItemCollectionCollection contains a specific element. + The RssModuleItemCollection to locate in the RssModuleItemCollectionCollection. + true if the RssModuleItemCollectionCollection contains the specified value; otherwise, false. + + + Copies the entire RssModuleItemCollectionCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssModuleItemCollection Array that is the destination of the elements copied from RssModuleItemCollectionCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssModuleItemCollectionCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssModuleItemCollection and returns the zero-based index of the first occurrence within the entire RssModuleItemCollectionCollection. + The RssModuleItemCollection to locate in the RssModuleItemCollectionCollection. + The zero-based index of the first occurrence of RssModuleItemCollection within the entire RssModuleItemCollectionCollection, if found; otherwise, -1. + + + Inserts an item into this collection at a specified index. + The zero-based index of the collection at which to insert the item. + The item to insert into this collection. + + + Removes a specified item from this collection. + The item to remove. + + + Gets or sets the item at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + An item at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + + + Adds a sepecified photo to this collection. + The photo to add. + The zero-based index of the added item. + + + A photo in the category + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + Date of the Photo + Description of the photo. + Direct link of the photo. + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + Date of the Photo + Description of the photo. + People to add to the photo. + Direct link of the photo. + + + Adds a specified item to this collection. + Date of the Photo + Description of the photo. + People to add to the photo. + Direct link of the photo. + The zero-based index of the added item. + + + Adds a specified item to this collection. + Date of the Photo + Description of the photo. + Direct link of the photo. + The zero-based index of the added item. + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + Date of the Photo + Description of the photo. + Direct link of the photo. + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + Date of the Photo + Description of the photo. + People to add to the photo. + Direct link of the photo. + + + Adds a specified item to this collection. + Date of the Photo + Description of the photo. + People to add to the photo. + Direct link of the photo. + The zero-based index of the added item. + + + Adds a specified item to this collection. + Date of the Photo + Description of the photo. + Direct link of the photo. + The zero-based index of the added item. + + + A collection of categories in a photo album + + + Initialize a new instance of the RssPhotoAlbumItemPhoto class + + + Adds a sepecified category to this collection. + The category to add. + The zero-based index of the added item. + + + A Photo Album category + + + Initialize a new instance of the RssPhotoAlbumItem class + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + + + Adds a specified category to this collection. + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + The zero-based index of the added item. + + + Initialize a new instance of the RssPhotoAlbumItem class + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + + + Adds a specified category to this collection. + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + The zero-based index of the added item. + + + Initialize a new instance of the RssPhotoAlbumItem class + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + + + Adds a specified category to this collection. + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + The zero-based index of the added item. + + + Initialize a new instance of the RssPhotoAlbumItem class + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + + + Adds a specified category to this collection. + Name of the category. + Description of the category. + From date of the category. + To date of the category. + Photos of the category. + The zero-based index of the added item. + + + RSS syndication for Robert A. Wlodarczyk's Photo Album application (to be sold by Inno Thinx LLC) + + + Base class for all RSS modules + + + Initialize a new instance of the RssModule class + + + Bind a particular channel to this module + Hash code of the channel + + + Check if a particular channel is bound to this module + Hash code of the channel + true if this channel is bound to this module, otherwise false + + + Collection of RSSModuleItem that are to be placed in the channel + + + Collection of RSSModuleItemCollection that are to be placed in the channel item + + + Prefix for the given module namespace + + + URL for the given module namespace + + + Initialize a new instance of the RssPhotoAlbum class + Link to the Photo Album + The category of the Photo Album to add + + + Initialize a new instance of the RssPhotoAlbum class + Link to the Photo Album + A collection of categories in the Photo Album to add + + + Link element for channel + + + Contains default values and methods for maintaining data consistency + + + Default value for a string in all RSS classes + empty string + If an element in the RSS class library has the value of RssDefault.String, consider the element as "not entered", "null", or empty. + + + Default value for an int in all RSS classes + -1 + If an element in the RSS class library has the value of RssDefault.Int, consider the element as "not entered", "null", or empty. + + + Default value for a DateTime in all RSS classes + DateTime.MinValue + If an element in the RSS class library has the value of RssDefault.DateTime, consider the element as "not entered", "null", or empty. + + + Default value for a Uri in all RSS classes + gopher://rss-net.sf.net + If an element in the RSS class library has the value of RssDefault.Uri, consider the element as "not entered", "null", or empty. + + + Verifies the string passed is not null + string to verify + RssDefault.String if input is null, otherwise input + Method is used in properties to prevent a null value + + + Verifies the int passed is greater than or equal to -1 + int to verify + RssDefault.Int if int is less than -1, else input + Method is used in properties to prevent values less than -1 + + + Verifies the Uri passed is not null + Uri to verify + RssDefault.Uri if input is null, otherwise input + Method is used in all properties to prevent a null value + + + Represents Null, False, and True + Source: Microsoft c# example + + + A DBBool containing 'Null'. + One of three possible DBBool values. + + + A DBBool containing 'False'. + One of three possible DBBool values. + + + A DBBool containing 'True'. + One of three possible DBBool values. + + + Private field that stores –1, 0, 1 for False, Null, True. + + + Private instance constructor. The value parameter must be –1, 0, or 1. + + + Implicit conversion from bool to DBBool. Maps true to DBBool.True and false to DBBool.False. + a DBBool + + + Explicit conversion from DBBool to bool. + The given DBBool is Null + a DBBool + true or false + + + Equality operator. + a DBBool + a DBBool + Returns Null if either operand is Null, otherwise returns True or False. + + + Inequality operator. + a DBBool + a DBBool + Returns Null if either operand is Null, otherwise returns True or False. + + + Logical negation operator. + a DBBool + Returns True if the operand is False, Null if the operand is Null, or False if the operand is True. + + + Logical AND operator. + a DBBool + a DBBool + Returns False if either operand is False, otherwise Null if either operand is Null, otherwise True. + + + Logical OR operator. + a DBBool + a DBBool + Returns True if either operand is True, otherwise Null if either operand is Null, otherwise False. + + + Definitely true operator. + a DBBool + Returns true if the operand is True, false otherwise. + + + Definitely false operator. + a DBBool + Returns true if the operand is False, false otherwise. + + + Determines whether two DBBool instances are equal. + The object to check. + True if the two DBBools are equal. + + + Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. + A hash code for the current DBBool. + + + Returns a string representation of the current Object. + Object has not been initialized. + A string containing DBBool.False, DBBool.Null, or DBBool.True + + + Properties to examine the value of a DBBool. + Return true if this DBBool has the given value, false otherwise. + + + Properties to examine the value of a DBBool. + Return true if this DBBool has the given value, false otherwise. + + + Properties to examine the value of a DBBool. + Return true if this DBBool has the given value, false otherwise. + + + A strongly typed collection of objects + + + Adds a specified item to this collection. + The item to add. + The zero-based index of the added item. + + + Determines whether the RssModuleCollection contains a specific element. + The RssModule to locate in the RssModuleCollection. + true if the RssModuleCollection contains the specified value; otherwise, false. + + + Copies the entire RssModuleCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssModule Array that is the destination of the elements copied from RssModuleCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssModuleCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssModule and returns the zero-based index of the first occurrence within the entire RssModuleCollection. + The RssModule to locate in the RssModuleCollection. + The zero-based index of the first occurrence of RssModule within the entire RssModuleCollection, if found; otherwise, -1. + + + Inserts an item into this collection at a specified index. + The zero-based index of the collection at which to insert the item. + The item to insert into this collection. + + + Removes a specified item from this collection. + The item to remove. + + + Gets or sets the item at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + An item at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + A strongly typed collection of objects + + + Adds a specified item to this collection. + The item to add. + The zero-based index of the added item. + + + Determines whether the RssItemCollection contains a specific element. + The RssItem to locate in the RssItemCollection. + true if the RssItemCollection contains the specified value; otherwise, false. + + + Copies the entire RssItemCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssItem Array that is the destination of the elements copied from RssItemCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssItemCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssItem and returns the zero-based index of the first occurrence within the entire RssItemCollection. + The RssItem to locate in the RssItemCollection. + The zero-based index of the first occurrence of RssItem within the entire RssItemCollection, if found; otherwise, -1. + + + Inserts an item into this collection at a specified index. + The zero-based index of the collection at which to insert the item. + The item to insert into this collection. + + + Removes a specified item from this collection. + The item to remove. + + + The latest pubDate in the items collection + The latest pubDate -or- RssDefault.DateTime if all item pubDates are not defined + + + The oldest pubDate in the items collection + The oldest pubDate -or- RssDefault.DateTime if all item pubDates are not defined + + + Calculates the oldest and latest pubdates + + + Gets or sets the item at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + An item at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + Allow processes to register with a cloud to be notified of updates to the channel. + + + Initialize a new instance of the RssCloud class. + + + Domain name or IP address of the cloud + + + TCP port that the cloud is running on + + + Location of its responder + + + Name of the procedure to call to request notification + + + Protocol used + + + A strongly typed collection of objects + + + Adds a specified feed to this collection. + The feed to add. + The zero-based index of the added feed. + + + Determines whether the RssFeedCollection contains a specific element. + The RssFeed to locate in the RssFeedCollection. + true if the RssFeedCollection contains the specified value; otherwise, false. + + + Copies the entire RssFeedCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssFeed Array that is the destination of the elements copied from RssFeedCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssFeedCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssFeed and returns the zero-based index of the first occurrence within the entire RssFeedCollection. + The RssFeed to locate in the RssFeedCollection. + The zero-based index of the first occurrence of RssFeed within the entire RssFeedCollection, if found; otherwise, -1. + + + Inserts a feed into this collection at a specified index. + The zero-based index of the collection at which to insert the feed. + The feed to insert into this collection. + + + Removes a specified category from this collection. + The category to remove. + + + Gets or sets the feed at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + A feed at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + Gets or sets the feed with the given name.In C#, this property is the indexer for the class. + The url of the feed to access. + A feed at each valid url. If the feed does not exist, null. + This method is an indexer that can be used to access the collection. + + + A RSS module that adds elements at the channel level that are common to weblogs. + + + Initialize a new instance of the + The URL of an OPML file containing the blogroll for the site. + The URL of an OPML file containing the author's RSS subscriptions. + + The URL of a weblog that the author of the weblog is promoting per Mark Pilgrim's description. + "http://diveintomark.org/archives/2002/09/17.html#blink_and_youll_miss_it" + + + The URL of a changes.xml file. When the feed that contains this element updates, it pings a server that updates this file. The presence of this element says to aggregators that they only have to read the changes file to see if this feed has updated. If several feeds point to the same changes file, the aggregator has to do less polling, resulting in better use of server bandwidth, and the Internet as a whole; and resulting in faster scans. Everyone wins. For more technical information, see the howto on the XML-RPC site. + "http://www.xmlrpc.com/weblogsComForRss" + + + + All valid Rss Cloud protocols, including Null + + + Not defined + + + Protocol is not supported + + + xml-rpc + + + soap + + + http-post + + + All RSS versions + + + Not defined + + + Version is not directly supported + + + RDF Site Summary (RSS) 0.9 + + + Rich Site Summary (RSS) 0.91 + + + Rich Site Summary (RSS) 0.92 + + + RDF Site Summary (RSS) 1.0 + + + Really Simple Syndication (RSS) 2.0 + + + Writes an RSS XML file. + Represents a writer that provides a fast, non-cached, forward-only way of generating streams or files containing RSS XML data that conforms to the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML recommendations. + + + Creates an instance of the RssWriter class using the specified TextWriter. + specified TextWriter + + + Creates an instance of the RssWriter class using the specified Stream and Encoding. + The encoding is not supported or the stream cannot be written to. + Stream to output to + The encoding to use. If encoding is (null c#, Nothing vb) it writes out the stream as UTF-8. + + + Creates an instance of the RssWriter class using the specified Stream. + The encoding is ISO-8859-1. + The Stream cannot be written to. + specified Stream + + + Creates an instance of the RssWriter class using the specified file and Encoding. + The encoding is not supported; the filename is empty, contains only white space, or contains one or more invalid characters. + Access is denied. + The filename is a (null c#, Nothing vb) reference. + The directory to write to is not found. + The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax. + The caller does not have the required permission. + specified file (including path) If the file exists, it will be truncated with the new content. + specified Encoding + + + Creates an instance of the RssWriter class using the specified file. + The encoding is ISO-8859-1. + The filename is empty, contains only white space, or contains one or more invalid characters. + Access is denied. + The filename is a (null c#, Nothing vb) reference. + The directory to write to is not found. + The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax. + The caller does not have the required permission. + specified file (including path) If the file exists, it will be truncated with the new content. + + + Writes the begining data to the RSS file + This routine is called from the WriteChannel and WriteItem subs + RDF Site Summary (RSS) 1.0 is not currently supported. + + + Closes instance of RssWriter. + Writes end elements, and releases connections + Occurs if the RssWriter is already closed or the caller is attempting to close before writing a channel. + + + Writes an RSS channel + RssWriter has been closed, and can not be written to. + Channel must be instanciated with data, before calling Write. + RSS channel to write + + + Writes an RSS item + Either the RssWriter has already been closed, or the caller is attempting to write an RSS item before an RSS channel. + Item must be instanciated with data, before calling Write. + RSS item to write + + + Writes an element with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an element with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an element with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an element with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an element with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an attribute with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an attribute with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an attribute with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an attribute with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Writes an attribute with the specified local name and value + the localname of the element + the value of the element + boolean that determines if input cannot be null + + + Gets or sets the RSS version to write. + Can't change version number after data has been written. + + + Gets or sets the of the XML output. + Can't change XML formatting after data has been written. + + + Gets or sets how indentation to write for each level in the hierarchy when XmlFormat is set to + Can't change XML formatting after data has been written. + Setting this property to a negative value. + + + RSS modules + + + Reads an RSS file. + Provides fast, non-cached, forward-only access to RSS data. + + + Initializes a new instance of the RssReader class with the specified URL or filename. + The URL or filename for the file containing the RSS data. + Occures when unable to retrieve file containing the RSS data. + + + Creates an instance of the RssReader class using the specified TextReader. + specified TextReader + Occures when unable to retrieve file containing the RSS data. + + + Creates an instance of the RssReader class using the specified Stream. + Occures when unable to retrieve file containing the RSS data. + Stream to read from + + + Reads the next RssElement from the stream. + An RSS Element + RssReader has been closed, and can not be read. + RSS file not found. + Invalid XML syntax in RSS file. + Unable to read an RssElement. Reached the end of the stream. + + + Closes connection to file. + This method also releases any resources held while reading. + + + A collection of all exceptions the RssReader class has encountered. + + + Gets the RSS version of the stream. + One of the values. + + + Globally unique identifier + + + Initialize a new instance of the RssGuid class. + + + If true, a url that can be opened in a web browser that points to the item + + + Globally unique identifier value + + + A link and description for a graphic that represent a channel + + + Initialize a new instance of the RssImage class. + + + The URL of a GIF, JPEG or PNG image that represents the channel. + Maximum length is 500 (For RSS 0.91). + + + Describes the image, it's used in the ALT attribute of the HTML img tag when the channel is rendered in HTML. + Maximum length is 100 (For RSS 0.91). + + + The URL of the site, when the channel is rendered, the image is a link to the site. + Maximum length is 500 (For RSS 0.91). + + + Contains text that is included in the TITLE attribute of the link formed around the image in the HTML rendering. + + + Width of image in pixels + Maximum value for height is 400 (For RSS 0.91) + + + Height of image in pixels + Maximum value for width is 144 (For RSS 0.91) + + + A module may contain any number of items (either channel-based or item-based). + + + Initialize a new instance of the RssModuleItem class + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + Is text required for this RssModuleItem? + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + The text contained within this RssModuleItem. + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + Is text required for this RssModuleItem? + The text contained within this RssModuleItem. + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + The text contained within this RssModuleItem. + The sub-elements of this RssModuleItem (if any exist). + + + Initialize a new instance of the RssModuleItem class + The name of this RssModuleItem. + Is text required for this RssModuleItem? + The text contained within this RssModuleItem. + The sub-elements of this RssModuleItem (if any exist). + + + Returns a string representation of the current Object. + The item's title, description, or "RssModuleItem" if the title and description are blank. + + + + The name of this RssModuleItem. + + + + + The text contained within this RssModuleItem. + + + + + The sub-elements of this RssModuleItem (if any exist). + + + + + Is text for this element required? + + + + Describes an items source + + + Initialize a new instance of the RssSource class + + + Name of the RSS channel that the item came from + + + URL of the original RSS feed from which the item was republished + + + A strongly typed collection of objects + + + Adds a specified exception to this collection. + The exception to add. + The zero-based index of the added exception -or- -1 if the exception already exists. + + + Determines whether the ExceptionCollection contains a specific element. + The Exception to locate in the ExceptionCollection. + true if the ExceptionCollection contains the specified value; otherwise, false. + + + Copies the entire ExceptionCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional Exception Array that is the destination of the elements copied from ExceptionCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source ExceptionCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified Exception and returns the zero-based index of the first occurrence within the entire ExceptionCollection. + The Exception to locate in the ExceptionCollection. + The zero-based index of the first occurrence of RssChannel within the entire ExceptionCollection, if found; otherwise, -1. + + + Inserts an Exception into this collection at a specified index. + The zero-based index of the collection at which to insert the Exception. + The Exception to insert into this collection. + + + Removes a specified Exception from this collection. + The Exception to remove. + + + Gets or sets the exception at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + A exception at each valid index. + This method is an indexer that can be used to access the collection. + + + Returns the last exception added through the Add method. + The last exception -or- null if no exceptions exist + + + A strongly typed collection of objects + + + Adds a specified category to this collection. + The category to add. + The zero-based index of the added category. + + + Determines whether the RssCategoryCollection contains a specific element. + The RssCategory to locate in the RssCategoryCollection. + true if the RssCategoryCollection contains the specified value; otherwise, false. + + + Copies the entire RssCategoryCollection to a compatible one-dimensional , starting at the specified index of the target array. + The one-dimensional RssCategory Array that is the destination of the elements copied from RssCategoryCollection. The Array must have zero-based indexing. + The zero-based index in array at which copying begins. + array is a null reference (Nothing in Visual Basic). + index is less than zero. + array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssCategoryCollection is greater than the available space from index to the end of the destination array. + + + Searches for the specified RssCategory and returns the zero-based index of the first occurrence within the entire RssCategoryCollection. + The RssCategory to locate in the RssCategoryCollection. + The zero-based index of the first occurrence of RssCategory within the entire RssCategoryCollection, if found; otherwise, -1. + + + Inserts an category into this collection at a specified index. + The zero-based index of the collection at which to insert the category. + The category to insert into this collection. + + + Removes a specified category from this collection. + The category to remove. + + + Gets or sets the category at a specified index.In C#, this property is the indexer for the class. + The index of the collection to access. + A category at each valid index. + This method is an indexer that can be used to access the collection. + index is not a valid index. + + + A RSS module that adds elements at the channel or item level that specifies which Creative Commons license applies. + + + Initialize a new instance of the + + If present as a sub-element of channel, indicates that the content of the RSS file is available under a license, indicated by a URL, which is the value of the license element. A list of some licenses that may be used in this context is on the Creative Commons website on this page, however the license element may point to licenses not authored by Creative Commons. + You may also use the license element as a sub-element of item. When used this way it applies only to the content of that item. If an item has a license, and the channel does too, the license on the item applies, i.e. the inner license overrides the outer one. + Multiple license elements are allowed, in either context, indicating that the content is available under multiple licenses. + "http://www.creativecommons.org/licenses/" + + If present as a sub-element of channel then true, otherwise false + + + A channel may contain any number of items, each of which links to more information about the item, with an optional description + + + Initialize a new instance of the RssItem class + + + Returns a string representation of the current Object. + The item's title, description, or "RssItem" if the title and description are blank. + + + Title of the item + Maximum length is 100 (For RSS 0.91) + + + URL of the item + Maximum length is 500 (For RSS 0.91) + + + Item synopsis + Maximum length is 500 (For RSS 0.91) + + + Email address of the author of the item + + + Provide information regarding the location of the subject matter of the channel in a taxonomy + + + URL of a page for comments relating to the item + + + Describes an items source + + + A reference to an attachment to the item + + + A string that uniquely identifies the item + + + Indicates when the item was published + + + Multi-purpose channel element for the purpose of allowing users to submit queries back to the publisher's site + Typically for a search or subscription + + + Initialize a new instance of the RssTextInput class + + + The label of the submit button in the text input area + Maximum length is 100 (For RSS 0.91) + + + Explains the text input area + Maximum length is 500 (For RSS 0.91) + + + The name of the text object in the text input area + Maximum length is 20 (For RSS 0.91). + + + The URL of the script that processes text input requests + Maximum length is 500 (For RSS 0.91) + + + diff --git a/NzbDrone.Core/Libraries/RSS.NET.dll b/NzbDrone.Core/Libraries/RSS.NET.dll new file mode 100644 index 000000000..10dd1f774 Binary files /dev/null and b/NzbDrone.Core/Libraries/RSS.NET.dll differ diff --git a/NzbDrone.Core/Libraries/SubSonic.Core.pdb b/NzbDrone.Core/Libraries/SubSonic.Core.pdb deleted file mode 100644 index 14f65566b..000000000 Binary files a/NzbDrone.Core/Libraries/SubSonic.Core.pdb and /dev/null differ diff --git a/NzbDrone.Core/Libraries/TvdbLib.pdb b/NzbDrone.Core/Libraries/TvdbLib.pdb deleted file mode 100644 index 2d006a5a1..000000000 Binary files a/NzbDrone.Core/Libraries/TvdbLib.pdb and /dev/null differ diff --git a/NzbDrone.Core/Model/EpisodeModel.cs b/NzbDrone.Core/Model/EpisodeModel.cs index caa4ed596..2d0d16826 100644 --- a/NzbDrone.Core/Model/EpisodeModel.cs +++ b/NzbDrone.Core/Model/EpisodeModel.cs @@ -6,7 +6,9 @@ namespace NzbDrone.Core.Model public class EpisodeModel { public string SeriesTitle { get; set; } + public int SeriesId { get; set; } public string EpisodeTitle { get; set; } + public int EpisodeId { get; set; } public int SeasonNumber { get; set; } public int EpisodeNumber { get; set; } public QualityTypes Quality { get; set; } diff --git a/NzbDrone.Core/Model/FeedInfoModel.cs b/NzbDrone.Core/Model/FeedInfoModel.cs new file mode 100644 index 000000000..98c979b6d --- /dev/null +++ b/NzbDrone.Core/Model/FeedInfoModel.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace NzbDrone.Core.Model +{ + public class FeedInfoModel + { + public FeedInfoModel(string name, string url) + { + Name = name ?? "UN-NAMED"; + Url = ParseUrl(url); + } + + public string Name { get; private set; } + public string Url { get; private set; } + + private static string ParseUrl(string url) + { + Uri uri; + if (!Uri.TryCreate(url, UriKind.Absolute, out uri)) + { + uri = new Uri(new Uri(CentralDispatch.ExecutablePath + Path.DirectorySeparatorChar), url); + } + return uri.IsFile ? uri.AbsolutePath.Replace("%20", " ") : uri.AbsoluteUri; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != typeof(FeedInfoModel)) return false; + return Equals((FeedInfoModel) obj); + } + + public bool Equals(FeedInfoModel other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return Equals(other.Name, Name) && Equals(other.Url, Url); + } + + public override int GetHashCode() + { + unchecked + { + return ((Name != null ? Name.GetHashCode() : 0)*397) ^ (Url != null ? Url.GetHashCode() : 0); + } + } + } +} diff --git a/NzbDrone.Core/Model/NzbInfoModel.cs b/NzbDrone.Core/Model/NzbInfoModel.cs new file mode 100644 index 000000000..0ed6d31ec --- /dev/null +++ b/NzbDrone.Core/Model/NzbInfoModel.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NzbDrone.Core.Repository; + +namespace NzbDrone.Core.Model +{ + public class NzbInfoModel + { + public string Id { get; set; } + public string Title { get; set; } + public string TitleFix { get; set; } + public NzbSiteModel Site { get; set; } + public Uri Link { get; set; } + public string Description { get; set; } + public bool Proper { get; set; } + + public bool IsPassworded() + { + return Title.EndsWith("(Passworded)", StringComparison.InvariantCultureIgnoreCase); + } + } +} diff --git a/NzbDrone.Core/Model/NzbSiteModel.cs b/NzbDrone.Core/Model/NzbSiteModel.cs new file mode 100644 index 000000000..c7b70b6ce --- /dev/null +++ b/NzbDrone.Core/Model/NzbSiteModel.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; + +namespace NzbDrone.Core.Model +{ + public class NzbSiteModel + { + private static readonly IList Sites = new List + { + new NzbSiteModel {Name = "nzbmatrix", Url = "nzbmatrix.com", Pattern = @"\d{6,10}"}, + new NzbSiteModel {Name = "nzbsDotOrg", Url = "nzbs.org", Pattern = @"\d{5,10}"}, + new NzbSiteModel {Name = "nzbsrus", Url = "nzbsrus.com", Pattern = @"\d{6,10}"}, + new NzbSiteModel {Name = "lilx", Url = "lilx.net", Pattern = @"\d{6,10}"}, + }; + + public string Name { get; set; } + public string Pattern { get; set; } + public string Url { get; set; } + + // TODO: use HttpUtility.ParseQueryString(); + // https://nzbmatrix.com/api-nzb-download.php?id=626526 + public string ParseId(string url) + { + return Regex.Match(url, Pattern).Value; + } + + public static NzbSiteModel Parse(string url) + { + return Sites.Where(site => url.Contains(site.Url)).SingleOrDefault() ?? + new NzbSiteModel { Name = "unknown", Pattern = @"\d{6,10}" }; + } + } +} diff --git a/NzbDrone.Core/Model/SabnzbdPriorityType.cs b/NzbDrone.Core/Model/SabnzbdPriorityType.cs new file mode 100644 index 000000000..bd6ea272c --- /dev/null +++ b/NzbDrone.Core/Model/SabnzbdPriorityType.cs @@ -0,0 +1,9 @@ +namespace NzbDrone.Core.Model +{ + public enum SabnzbdPriorityType + { + Low = -1, + Normal = 0, + High = 1 + } +} diff --git a/NzbDrone.Core/Model/Season.cs b/NzbDrone.Core/Model/Season.cs new file mode 100644 index 000000000..42e5ad1fd --- /dev/null +++ b/NzbDrone.Core/Model/Season.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using SubSonic.SqlGeneration.Schema; + +namespace NzbDrone.Core.Repository +{ + public class Season + { + [SubSonicPrimaryKey(false)] + public virtual long SeasonId { get; set; } + public long SeriesId { get; set; } + public int SeasonNumber { get; set; } + public bool Monitored { get; set; } + public string Folder { get; set; } + + [SubSonicToManyRelation] + public virtual List Episodes { get; private set; } + + [SubSonicToOneRelation(ThisClassContainsJoinKey = true)] + public virtual Series Series { get; private set; } + } +} \ No newline at end of file diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index 8a3dca65d..fcd5a170e 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -31,7 +31,7 @@ true - x86 + AnyCPU true full false @@ -91,7 +91,7 @@ bin\Debug\ DEBUG;TRACE full - x86 + AnyCPU bin\Debug\SABSync.exe.CodeAnalysisLog.xml true GlobalSuppressions.cs @@ -134,6 +134,10 @@ False Libraries\NLog.Extended.dll + + False + Libraries\RSS.NET.dll + D:\OpenSource\sabscripts\SABSync\References\SubSonic.Core.dll @@ -159,6 +163,18 @@ + + + + + + + + + + + + @@ -190,6 +206,8 @@ + + @@ -228,7 +246,6 @@ - @@ -236,14 +253,14 @@ - + + - diff --git a/NzbDrone.Core/Parser.cs b/NzbDrone.Core/Parser.cs index 661898e36..d55506e60 100644 --- a/NzbDrone.Core/Parser.cs +++ b/NzbDrone.Core/Parser.cs @@ -8,6 +8,7 @@ using NLog; using NzbDrone.Core.Model; using NzbDrone.Core.Providers; using NzbDrone.Core.Repository.Quality; +using Rss; namespace NzbDrone.Core { @@ -145,5 +146,18 @@ namespace NzbDrone.Core return info.FullName.ToLower().Trim('/', '\\', ' '); } + + public static NzbInfoModel ParseNzbInfo(FeedInfoModel feed, RssItem item) + { + NzbSiteModel site = NzbSiteModel.Parse(feed.Url.ToLower()); + return new NzbInfoModel + { + Id = site.ParseId(item.Link.ToString()), + Title = item.Title, + Site = site, + Link = item.Link, + Description = item.Description + }; + } } } diff --git a/NzbDrone.Core/Providers/EpisodeProvider.cs b/NzbDrone.Core/Providers/EpisodeProvider.cs index 7bbd808d3..e33400335 100644 --- a/NzbDrone.Core/Providers/EpisodeProvider.cs +++ b/NzbDrone.Core/Providers/EpisodeProvider.cs @@ -17,15 +17,17 @@ namespace NzbDrone.Core.Providers private readonly ISeriesProvider _series; private readonly ISeasonProvider _seasons; private readonly ITvDbProvider _tvDb; + private readonly IHistoryProvider _history; private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); - public EpisodeProvider(IRepository sonicRepo, ISeriesProvider seriesProvider, ISeasonProvider seasonProvider, ITvDbProvider tvDbProvider) + public EpisodeProvider(IRepository sonicRepo, ISeriesProvider seriesProvider, ISeasonProvider seasonProvider, ITvDbProvider tvDbProvider, IHistoryProvider history) { _sonicRepo = sonicRepo; _series = seriesProvider; _tvDb = tvDbProvider; _seasons = seasonProvider; + _history = history; } public Episode GetEpisode(long id) @@ -64,6 +66,44 @@ namespace NzbDrone.Core.Providers /// public bool IsNeeded(EpisodeModel episode) { + //IsSeasonIgnored + //IsQualityWanted + //EpisodeFileExists + //IsInHistory + //IsOnDisk? (How to handle episodes that are downloaded manually?) + + if (IsSeasonIgnored(episode)) + return false; + + if (!_series.QualityWanted(episode.SeriesId, episode.Quality)) + { + Logger.Debug("Quality [{0}] is not wanted for: {1}", episode.Quality, episode.SeriesTitle); + return false; + } + + //Check to see if there is an episode file for this episode + var dbEpisode = GetEpisode(episode.SeriesId, episode.SeasonNumber, episode.EpisodeNumber); + episode.EpisodeId = dbEpisode.EpisodeId; + + var epWithFiles = _sonicRepo.Single(c => c.EpisodeId == episode.EpisodeId && c.Files.Count > 0); + + if (epWithFiles != null) + { + //If not null we need to see if this episode has the quality as the download (or if it is better) + foreach (var file in epWithFiles.Files) + { + if (file.Quality == episode.Quality) + return false; + } + } + + //IsInHistory? (NZBDrone) + if (_history.Exists(dbEpisode.EpisodeId, episode.Quality, episode.Proper)) + { + Logger.Debug("Episode in history: {0}", episode.ToString()); + return false; + } + throw new NotImplementedException(); } @@ -86,6 +126,13 @@ namespace NzbDrone.Core.Providers { try { + //DateTime throws an error in SQLServer per message below: + //SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. + //So lets hack it so it works for SQLServer (as well as SQLite), perhaps we can find a better solution + //Todo: Fix this hack + if (episode.FirstAired < new DateTime(1753, 1, 1)) + episode.FirstAired = new DateTime(1753, 1, 1); + Logger.Trace("Updating info for series:{0} - episode:{1}", targetSeries.SeriesName, episode.EpisodeNumber); var newEpisode = new Episode() { @@ -123,5 +170,18 @@ namespace NzbDrone.Core.Providers Logger.Debug("Finished episode refresh for series:{0}. Successful:{1} - Failed:{2} ", targetSeries.SeriesName, successCount, failCount); } + + private bool IsSeasonIgnored(EpisodeModel episode) + { + //Check if this Season is ignored + if (_seasons.IsIgnored(episode.SeriesId, episode.SeasonNumber)) + { + Logger.Debug("Season {0} is ignored for: {1}", episode.SeasonNumber, episode.SeriesTitle); + return true; + } + + Logger.Debug("Season {0} is wanted for: {1}", episode.SeasonNumber, episode.SeriesTitle); + return false; + } } } \ No newline at end of file diff --git a/NzbDrone.Core/Providers/HistoryProvider.cs b/NzbDrone.Core/Providers/HistoryProvider.cs new file mode 100644 index 000000000..3ff35aaf1 --- /dev/null +++ b/NzbDrone.Core/Providers/HistoryProvider.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NLog; +using NzbDrone.Core.Repository; +using NzbDrone.Core.Repository.Quality; +using SubSonic.Repository; + +namespace NzbDrone.Core.Providers +{ + public class HistoryProvider : IHistoryProvider + { + private readonly IRepository _sonicRepo; + + private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); + + public HistoryProvider(IRepository sonicRepo) + { + _sonicRepo = sonicRepo; + } + + #region IHistoryProvider Members + + public List AllItems() + { + return _sonicRepo.All().ToList(); + } + + public void Purge() + { + var all = _sonicRepo.All(); + _sonicRepo.DeleteMany(all); + Logger.Info("History has been Purged"); + } + + public void Trim() + { + var old = _sonicRepo.All().Where(h => h.Date < DateTime.Now.AddDays(-30)); + _sonicRepo.DeleteMany(old); + Logger.Info("History has been trimmed, items older than 30 days have been removed"); + } + + public void Insert(History item) + { + _sonicRepo.Add(item); + Logger.Info("Item added to history: {0} - {1}x{2:00}", item.Episode.Series.Title, item.Episode.SeasonNumber, item.Episode.EpisodeNumber); + } + + public bool Exists(int episodeId, QualityTypes quality, bool proper) + { + //Looks for the existance of this episode in History + if (_sonicRepo.Exists(h => h.EpisodeId == episodeId && (QualityTypes)h.Quality == quality && h.IsProper == proper)) + return true; + + Logger.Debug("Episode not in History: {0}", episodeId); + return false; + } + + #endregion + } +} diff --git a/NzbDrone.Core/Providers/IHistoryProvider.cs b/NzbDrone.Core/Providers/IHistoryProvider.cs new file mode 100644 index 000000000..6eb9aed3d --- /dev/null +++ b/NzbDrone.Core/Providers/IHistoryProvider.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NzbDrone.Core.Model; +using NzbDrone.Core.Repository; +using NzbDrone.Core.Repository.Quality; + +namespace NzbDrone.Core.Providers +{ + public interface IHistoryProvider + { + List AllItems(); + void Purge(); + void Trim(); + void Insert(History item); + bool Exists(int episodeId, QualityTypes quality, bool proper); + } +} diff --git a/NzbDrone.Core/Providers/IIndexerProvider.cs b/NzbDrone.Core/Providers/IIndexerProvider.cs new file mode 100644 index 000000000..8c7c5e971 --- /dev/null +++ b/NzbDrone.Core/Providers/IIndexerProvider.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NzbDrone.Core.Model; +using NzbDrone.Core.Repository; + +namespace NzbDrone.Core.Providers +{ + public interface IIndexerProvider + { + List AllIndexers(); + List EnabledIndexers(); + void Update(Indexer indexer); + } +} diff --git a/NzbDrone.Core/Providers/IRssProvider.cs b/NzbDrone.Core/Providers/IRssProvider.cs new file mode 100644 index 000000000..85e52f952 --- /dev/null +++ b/NzbDrone.Core/Providers/IRssProvider.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NzbDrone.Core.Model; +using Rss; + +namespace NzbDrone.Core.Providers +{ + public interface IRssProvider + { + IEnumerable GetFeed(FeedInfoModel feedInfo); + } +} diff --git a/NzbDrone.Core/Providers/IRssSyncProvider.cs b/NzbDrone.Core/Providers/IRssSyncProvider.cs new file mode 100644 index 000000000..aa033924f --- /dev/null +++ b/NzbDrone.Core/Providers/IRssSyncProvider.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NzbDrone.Core.Providers +{ + public interface IRssSyncProvider + { + void Begin(); + } +} diff --git a/NzbDrone.Core/Providers/ISeasonProvider.cs b/NzbDrone.Core/Providers/ISeasonProvider.cs index 3a8f79854..d43104749 100644 --- a/NzbDrone.Core/Providers/ISeasonProvider.cs +++ b/NzbDrone.Core/Providers/ISeasonProvider.cs @@ -9,5 +9,7 @@ namespace NzbDrone.Core.Providers List GetSeasons(int seriesId); void EnsureSeason(int seriesId, int seasonId, int seasonNumber); int SaveSeason(Season season); + bool IsIgnored(int seasonId); + bool IsIgnored(int seriesId, int seasonNumber); } } \ No newline at end of file diff --git a/NzbDrone.Core/Providers/ISeriesProvider.cs b/NzbDrone.Core/Providers/ISeriesProvider.cs index 53310ff75..c7568e33a 100644 --- a/NzbDrone.Core/Providers/ISeriesProvider.cs +++ b/NzbDrone.Core/Providers/ISeriesProvider.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using NzbDrone.Core.Repository; -using NzbDrone.Core.Repository; +using NzbDrone.Core.Repository.Quality; using TvdbLib.Data; namespace NzbDrone.Core.Providers @@ -22,5 +22,7 @@ namespace NzbDrone.Core.Providers TvdbSeries MapPathToSeries(string path); void AddSeries(string path, TvdbSeries series); List GetUnmappedFolders(); + Series FindSeries(string cleanTitle); + bool QualityWanted(int seriesId, QualityTypes quality); } } \ No newline at end of file diff --git a/NzbDrone.Core/Providers/IndexerProvider.cs b/NzbDrone.Core/Providers/IndexerProvider.cs new file mode 100644 index 000000000..1af472693 --- /dev/null +++ b/NzbDrone.Core/Providers/IndexerProvider.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NLog; +using NzbDrone.Core.Model; +using SubSonic.Repository; +using NzbDrone.Core.Repository; + +namespace NzbDrone.Core.Providers +{ + public class IndexerProvider : IIndexerProvider + { + private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); + private readonly IRepository _sonicRepo; + + public IndexerProvider(IRepository sonicRepo) + { + _sonicRepo = sonicRepo; + } + + #region IIndexerProvider + + public List AllIndexers() + { + return _sonicRepo.All().OrderBy(i => i.Order).ToList(); + } + + public List EnabledIndexers() + { + return _sonicRepo.All().Where(i => i.Enabled).OrderBy(i => i.Order).ToList(); + } + + public void Update(Indexer indexer) + { + _sonicRepo.Update(indexer); + } + + #endregion + } +} diff --git a/NzbDrone.Core/Providers/RssProvider.cs b/NzbDrone.Core/Providers/RssProvider.cs new file mode 100644 index 000000000..495ccf109 --- /dev/null +++ b/NzbDrone.Core/Providers/RssProvider.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NLog; +using NzbDrone.Core.Model; +using Rss; + +namespace NzbDrone.Core.Providers +{ + public class RssProvider : IRssProvider + { + private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); + + #region IRssProvider Members + public IEnumerable GetFeed(FeedInfoModel feedInfo) + { + RssFeed feed = null; + try + { + Logger.Info("INFO: Downloading feed {0} from {1}", feedInfo.Name, feedInfo.Url); + feed = RssFeed.Read(feedInfo.Url); + } + catch (Exception e) + { + Logger.ErrorException(String.Format("ERROR: Could not download feed {0} from {1}", feedInfo.Name, feedInfo.Url), e); + } + if (feed == null || feed.Channels == null || feed.Channels.Count == 0) + return Enumerable.Empty(); + return feed.Channels[0].Items.Cast(); + } + #endregion + } +} diff --git a/NzbDrone.Core/Providers/RssSyncProvider.cs b/NzbDrone.Core/Providers/RssSyncProvider.cs new file mode 100644 index 000000000..df9c3bd3f --- /dev/null +++ b/NzbDrone.Core/Providers/RssSyncProvider.cs @@ -0,0 +1,166 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using NLog; +using NzbDrone.Core.Model; +using NzbDrone.Core.Repository.Quality; +using Rss; + +namespace NzbDrone.Core.Providers +{ + public class RssSyncProvider : IRssSyncProvider + { + //Sync with RSS feeds to download files as needed + + private Thread _rssSyncThread; + private IIndexerProvider _indexerProvider; + private IRssProvider _rss; + private ISeriesProvider _series; + private ISeasonProvider _season; + private IEpisodeProvider _episode; + private IHistoryProvider _history; + private IDownloadProvider _sab; + + private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); + + public RssSyncProvider(IIndexerProvider indexerProvider, IRssProvider rss, ISeriesProvider series, + ISeasonProvider season, IEpisodeProvider episode, IHistoryProvider history, IDownloadProvider sab) + { + _indexerProvider = indexerProvider; + _rss = rss; + _series = series; + _season = season; + _episode = episode; + _history = history; + _sab = sab; + } + + #region IRssSyncProvider Members + + public void Begin() + { + Logger.Debug("RSS Sync Starting"); + if (_rssSyncThread == null || !_rssSyncThread.IsAlive) + { + Logger.Debug("Initializing background sync of RSS Feeds."); + _rssSyncThread = new Thread(SyncWithRss) + { + Name = "SyncUnmappedFolders", + Priority = ThreadPriority.Lowest + }; + + _rssSyncThread.Start(); + } + else + { + Logger.Warn("RSS Sync already in progress. Ignoring request."); + } + + } + + #endregion + + private void SyncWithRss() + { + //Get all enabled RSS providers + //Download Feeds + + var indexers = _indexerProvider.EnabledIndexers(); + + foreach (var i in indexers) + { + var indexer = new FeedInfoModel(i.IndexerName, i.RssUrl); + + foreach(RssItem item in _rss.GetFeed(indexer)) + { + NzbInfoModel nzb = Parser.ParseNzbInfo(indexer, item); + QueueIfWanted(nzb); + } + } + } + + private void QueueIfWanted(NzbInfoModel nzb) + { + //Do we want this item? + + try + { + if (nzb.IsPassworded()) + { + Logger.Debug("Skipping Passworded Report {0}", nzb.Title); + return; + } + + var episodeParseResults = Parser.ParseEpisodeInfo(nzb.Title); + + if (episodeParseResults.Count() < 1) + { + Logger.Debug("Unsupported Title: {0}", nzb.Title); + return; + } + + if (episodeParseResults.Count() > 0) + { + //Todo: How to determine if we want the show if the FeedTitle is drastically different from the TitleOnDisk (CSI is one that comes to mind) + var series = _series.FindSeries(episodeParseResults[0].SeriesTitle); + + if (series == null) + { + Logger.Debug("Show is not being watched: {0}", episodeParseResults[0].SeriesTitle); + return; + } + + Logger.Debug("Show is being watched: {0}", series.Title); + + nzb.TitleFix = GetTitleFix(episodeParseResults, series.SeriesId); //Get the TitleFix so we can use it later + nzb.Proper = Parser.ParseProper(nzb.Title); + + //Loop through the list of the episodeParseResults to ensure that all the episodes are needed) + foreach (var episode in episodeParseResults) + { + //IsEpisodeWanted? + var episodeModel = new EpisodeModel(); + episodeModel.Proper = nzb.Proper; + episodeModel.SeriesId = series.SeriesId; + episodeModel.SeriesTitle = series.Title; + episodeModel.Quality = Parser.ParseQuality(nzb.Title); + episodeModel.SeasonNumber = episode.SeasonNumber; + episodeModel.EpisodeNumber = episode.EpisodeNumber; + + if (!_episode.IsNeeded(episodeModel)) + return; + + var titleFix = GetTitleFix(new List { episode }, episodeModel.SeriesId); + _sab.IsInQueue(titleFix); + } + } + } + + catch (Exception ex) + { + Logger.ErrorException("Error Parsing NZB: " + ex.Message, ex); + } + } + + private string GetTitleFix(List episodes, int seriesId) + { + var series = _series.GetSeries(seriesId); + + int seasonNumber = 0; + string episodeNumbers = String.Empty; + string episodeTitles = String.Empty; + + foreach (var episode in episodes) + { + var episodeInDb = _episode.GetEpisode(seriesId, episode.SeasonNumber, episode.EpisodeNumber); + seasonNumber = episodeInDb.SeasonNumber; + episodeNumbers = String.Format("{0}x{1:00}", episodeNumbers, episodeInDb.EpisodeNumber); + episodeTitles = String.Format("{0} + {1}", episodeTitles, episodeInDb.Title); + } + + return String.Format("{0} - {1}{2} - {3}", series.Title, seasonNumber, episodeNumbers, episodeTitles); + } + } +} diff --git a/NzbDrone.Core/Providers/SeasonProvider.cs b/NzbDrone.Core/Providers/SeasonProvider.cs index 85a22d85e..686ba0050 100644 --- a/NzbDrone.Core/Providers/SeasonProvider.cs +++ b/NzbDrone.Core/Providers/SeasonProvider.cs @@ -3,13 +3,14 @@ using System.Collections.Generic; using NLog; using NzbDrone.Core.Repository; using SubSonic.Repository; +using System.Linq; namespace NzbDrone.Core.Providers { class SeasonProvider : ISeasonProvider { private readonly IRepository _sonicRepo; - private static readonly Logger Logger = NLog.LogManager.GetCurrentClassLogger(); + private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); public SeasonProvider(IRepository dataRepository) { @@ -18,12 +19,12 @@ namespace NzbDrone.Core.Providers public Season GetSeason(int seasonId) { - throw new NotImplementedException(); + return _sonicRepo.Single(seasonId); } public List GetSeasons(int seriesId) { - throw new NotImplementedException(); + return _sonicRepo.All().Where(s => s.SeriesId == seriesId).ToList(); } public void EnsureSeason(int seriesId, int seasonId, int seasonNumber) @@ -43,11 +44,27 @@ namespace NzbDrone.Core.Providers _sonicRepo.Add(newSeason); } - - public int SaveSeason(Season season) { throw new NotImplementedException(); } + + public bool IsIgnored(int seasonId) + { + if (_sonicRepo.Single(seasonId).Monitored) + return true; + + Logger.Debug("Season {0} is not wanted."); + return false; + } + + public bool IsIgnored(int seriesId, int seasonNumber) + { + if (_sonicRepo.Single(s => s.SeriesId == seriesId && s.SeasonNumber == seasonNumber).Monitored) + return true; + + Logger.Debug("Season: {0} is not wanted for Series: {1}", seasonNumber, seriesId); + return false; + } } } \ No newline at end of file diff --git a/NzbDrone.Core/Providers/SeriesProvider.cs b/NzbDrone.Core/Providers/SeriesProvider.cs index 4a393cd5d..361d0723b 100644 --- a/NzbDrone.Core/Providers/SeriesProvider.cs +++ b/NzbDrone.Core/Providers/SeriesProvider.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text.RegularExpressions; using NLog; using NzbDrone.Core.Repository; +using NzbDrone.Core.Repository.Quality; using SubSonic.Repository; using TvdbLib.Data; @@ -52,6 +53,11 @@ namespace NzbDrone.Core.Providers return _sonioRepo.Exists(c => c.SeriesId == id && c.Monitored); } + public bool QualityWanted(int seriesId, QualityTypes quality) + { + return _sonioRepo.Exists(s => s.SeriesId == seriesId && (QualityTypes)s.Quality == quality); + } + public List GetUnmappedFolders() { Logger.Debug("Generating list of unmapped folders"); @@ -83,7 +89,6 @@ namespace NzbDrone.Core.Providers return _tvDb.GetSeries(searchResults.Id, false); } - public void AddSeries(string path, TvdbSeries series) { Logger.Info("Adding Series [{0}]:{1} Path: {2}", series.Id, series.SeriesName, path); @@ -100,6 +105,11 @@ namespace NzbDrone.Core.Providers _sonioRepo.Add(repoSeries); } + public Series FindSeries(string cleanTitle) + { + return _sonioRepo.Single(s => s.CleanTitle == cleanTitle); + } + #endregion #region Static Helpers diff --git a/NzbDrone.Core/Providers/TvDbProvider.cs b/NzbDrone.Core/Providers/TvDbProvider.cs index a9a1c079e..84ebfd98d 100644 --- a/NzbDrone.Core/Providers/TvDbProvider.cs +++ b/NzbDrone.Core/Providers/TvDbProvider.cs @@ -11,7 +11,7 @@ namespace NzbDrone.Core.Providers { public class TvDbProvider : ITvDbProvider { - private static readonly Logger Logger = NLog.LogManager.GetCurrentClassLogger(); + private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Regex CleanUpRegex = new Regex(@"((\s|^)the(\s|$))|((\s|^)and(\s|$))|[^a-z]", RegexOptions.IgnoreCase | RegexOptions.Compiled); private const string TVDB_APIKEY = "5D2D188E86E07F4F"; diff --git a/NzbDrone.Core/Repository/Episode.cs b/NzbDrone.Core/Repository/Episode.cs index 27a58e713..6e20c4098 100644 --- a/NzbDrone.Core/Repository/Episode.cs +++ b/NzbDrone.Core/Repository/Episode.cs @@ -15,6 +15,7 @@ namespace NzbDrone.Core.Repository public int SeasonId { get; set; } public string Title { get; set; } public DateTime AirDate { get; set; } + [SubSonicLongString] public string Overview { get; set; } public string Language { get; set; } @@ -26,5 +27,8 @@ namespace NzbDrone.Core.Repository [SubSonicToManyRelation] public virtual List Files { get; private set; } + + [SubSonicToManyRelation] + public virtual List Histories { get; private set; } } } diff --git a/NzbDrone.Core/Repository/History.cs b/NzbDrone.Core/Repository/History.cs new file mode 100644 index 000000000..b6a4b6b04 --- /dev/null +++ b/NzbDrone.Core/Repository/History.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using SubSonic.SqlGeneration.Schema; + +namespace NzbDrone.Core.Repository +{ + public class History + { + public int HistoryId { get; set; } + public virtual int EpisodeId { get; set; } + public virtual string IndexerName { get; set; } + public int Quality { get; set; } + public DateTime Date { get; set; } + public bool IsProper { get; set; } + + [SubSonicToOneRelation(ThisClassContainsJoinKey = true)] + public virtual Episode Episode { get; set; } + + [SubSonicToOneRelation(ThisClassContainsJoinKey = true)] + public virtual Indexer Indexer { get; set; } + } +} diff --git a/NzbDrone.Core/Repository/Indexer.cs b/NzbDrone.Core/Repository/Indexer.cs new file mode 100644 index 000000000..b8730ce07 --- /dev/null +++ b/NzbDrone.Core/Repository/Indexer.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using SubSonic.SqlGeneration.Schema; + +namespace NzbDrone.Core.Repository +{ + public class Indexer + { + [SubSonicPrimaryKey (true)] + public string IndexerName { get; set; } + public string RssUrl { get; set; } + + [SubSonicNullStringAttribute] + public string ApiUrl { get; set; } + public bool Enabled { get; set; } + public int Order { get; set; } + + [SubSonicToManyRelation] + public virtual List Histories { get; private set; } + } +} diff --git a/NzbDrone.Core/Repository/Season.cs b/NzbDrone.Core/Repository/Season.cs index aaeb11a90..b0f5a5a3a 100644 --- a/NzbDrone.Core/Repository/Season.cs +++ b/NzbDrone.Core/Repository/Season.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using SubSonic.SqlGeneration.Schema; namespace NzbDrone.Core.Repository @@ -6,8 +7,8 @@ namespace NzbDrone.Core.Repository public class Season { [SubSonicPrimaryKey(false)] - public virtual long SeasonId { get; set; } - public long SeriesId { get; set; } + public virtual int SeasonId { get; set; } + public int SeriesId { get; set; } public int SeasonNumber { get; set; } public bool Monitored { get; set; } diff --git a/NzbDrone.Core/Repository/Series.cs b/NzbDrone.Core/Repository/Series.cs index e9c03b929..78c6ae624 100644 --- a/NzbDrone.Core/Repository/Series.cs +++ b/NzbDrone.Core/Repository/Series.cs @@ -29,6 +29,8 @@ namespace NzbDrone.Core.Repository public bool Monitored { get; set; } + public int Quality { get; set; } + [SubSonicToManyRelation] public virtual List Seasons { get; private set; } diff --git a/NzbDrone.Web.Test/App.config b/NzbDrone.Web.Test/App.config index f00e873ec..64ee57c34 100644 --- a/NzbDrone.Web.Test/App.config +++ b/NzbDrone.Web.Test/App.config @@ -1,14 +1,24 @@ - + - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NzbDrone.Web.Test/NzbDrone.Web.Tests.csproj b/NzbDrone.Web.Test/NzbDrone.Web.Tests.csproj index 52baaa9f2..4315eadbe 100644 --- a/NzbDrone.Web.Test/NzbDrone.Web.Tests.csproj +++ b/NzbDrone.Web.Test/NzbDrone.Web.Tests.csproj @@ -23,6 +23,7 @@ DEBUG;TRACE prompt 4 + x86 pdbonly diff --git a/NzbDrone.Web/Content/Images/.svn/all-wcprops b/NzbDrone.Web/Content/Images/.svn/all-wcprops new file mode 100644 index 000000000..805301755 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/all-wcprops @@ -0,0 +1,101 @@ +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images +END +ui-icons_ffffff_256x240.png +K 25 +svn:wc:ra_dav:version-url +V 98 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-icons_ffffff_256x240.png +END +ui-icons_cd0a0a_256x240.png +K 25 +svn:wc:ra_dav:version-url +V 98 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-icons_cd0a0a_256x240.png +END +ui-icons_72a7cf_256x240.png +K 25 +svn:wc:ra_dav:version-url +V 98 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-icons_72a7cf_256x240.png +END +ui-bg_glass_100_f0f0f0_1x400.png +K 25 +svn:wc:ra_dav:version-url +V 103 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-bg_glass_100_f0f0f0_1x400.png +END +ui-bg_highlight-soft_100_e7eef3_1x100.png +K 25 +svn:wc:ra_dav:version-url +V 112 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-bg_highlight-soft_100_e7eef3_1x100.png +END +ui-icons_222222_256x240.png +K 25 +svn:wc:ra_dav:version-url +V 98 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-icons_222222_256x240.png +END +ui-bg_highlight-hard_100_f9f9f9_1x100.png +K 25 +svn:wc:ra_dav:version-url +V 112 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png +END +ui-icons_2e83ff_256x240.png +K 25 +svn:wc:ra_dav:version-url +V 98 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-icons_2e83ff_256x240.png +END +ui-bg_diagonals-small_0_aaaaaa_40x40.png +K 25 +svn:wc:ra_dav:version-url +V 111 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png +END +ui-bg_glass_95_fef1ec_1x400.png +K 25 +svn:wc:ra_dav:version-url +V 102 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-bg_glass_95_fef1ec_1x400.png +END +ui-bg_glass_50_99c2ff_1x400.png +K 25 +svn:wc:ra_dav:version-url +V 102 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-bg_glass_50_99c2ff_1x400.png +END +ui-icons_888888_256x240.png +K 25 +svn:wc:ra_dav:version-url +V 98 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-icons_888888_256x240.png +END +ui-bg_glass_80_e6e6e6_1x400.png +K 25 +svn:wc:ra_dav:version-url +V 102 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-bg_glass_80_e6e6e6_1x400.png +END +ui-bg_diagonals-thick_15_444444_40x40.png +K 25 +svn:wc:ra_dav:version-url +V 112 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-bg_diagonals-thick_15_444444_40x40.png +END +ui-icons_2694e8_256x240.png +K 25 +svn:wc:ra_dav:version-url +V 98 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-icons_2694e8_256x240.png +END +ui-bg_glass_55_fbf5d0_1x400.png +K 25 +svn:wc:ra_dav:version-url +V 102 +/svn/WebWinkel/!svn/ver/21/trunk/Bestel/Content/Theme_Cupertino/images/ui-bg_glass_55_fbf5d0_1x400.png +END diff --git a/NzbDrone.Web/Content/Images/.svn/entries b/NzbDrone.Web/Content/Images/.svn/entries new file mode 100644 index 000000000..4fcc4e9df --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/entries @@ -0,0 +1,579 @@ +9 + +dir +21 +https://server2003:8443/svn/WebWinkel/trunk/Bestel/Content/Theme_Cupertino/images +https://server2003:8443/svn/WebWinkel + + + +2009-03-06T14:15:55.199272Z +21 +ers + + +svn:special svn:externals svn:needs-lock + + + + + + + + + + + +3df9b5ea-419e-9541-a5e1-220ca4e478c2 + + + + + + +0 + +ui-icons_ffffff_256x240.png +file + + + + +2009-03-06T03:20:14.000000Z +4de00da1c8312a0402eb34ef1a727227 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +4379 + +ui-icons_cd0a0a_256x240.png +file + + + + +2009-03-06T03:20:14.000000Z +85eb7d511838b9bc089b7d6efd4ded92 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +4379 + +ui-icons_72a7cf_256x240.png +file + + + + +2009-03-06T03:20:14.000000Z +80f2c70881fca0c579f48b792d97e904 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +5399 + +ui-bg_glass_100_f0f0f0_1x400.png +file + + + + +2009-03-06T03:20:14.000000Z +e9d6692a317729586e10e9c9ebbe0efe +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +106 + +ui-bg_highlight-soft_100_e7eef3_1x100.png +file + + + + +2009-03-06T03:20:14.000000Z +9b5c95a4d5c087377add1f43621ced45 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +149 + +ui-icons_222222_256x240.png +file + + + + +2009-03-06T03:20:14.000000Z +89a6553a4bba879b4944ba11cf061e04 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +4379 + +ui-bg_highlight-hard_100_f9f9f9_1x100.png +file + + + + +2009-03-06T03:20:14.000000Z +0df7f895481fe8e47e7114399f644583 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +117 + +ui-icons_2e83ff_256x240.png +file + + + + +2009-03-06T03:20:14.000000Z +a4127cef04012ee8681adef24d8e2a0f +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +4379 + +ui-bg_diagonals-small_0_aaaaaa_40x40.png +file + + + + +2009-03-06T03:20:14.000000Z +1fa4d379c6be86d335082c92b767cd23 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +128 + +ui-bg_glass_95_fef1ec_1x400.png +file + + + + +2009-03-06T03:20:14.000000Z +5a3be2d8fff8324d59aec3df7b0a0c83 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +119 + +ui-bg_glass_50_99c2ff_1x400.png +file + + + + +2009-03-06T03:20:14.000000Z +343a57f7e2ce3eec88824047180db85c +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +159 + +ui-icons_888888_256x240.png +file + + + + +2009-03-06T03:20:14.000000Z +4ec07344d71ee10034427088ec6f3ca3 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +4379 + +ui-bg_glass_80_e6e6e6_1x400.png +file + + + + +2009-03-06T03:20:14.000000Z +4835b082c0a5bccfe84c671ec559d805 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +113 + +ui-bg_diagonals-thick_15_444444_40x40.png +file + + + + +2009-03-06T03:20:14.000000Z +8d91ecb66ca58a9a787b7cf567fe317c +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +373 + +ui-icons_2694e8_256x240.png +file + + + + +2009-03-06T03:20:14.000000Z +fa3a8f67fa343d6afc810e061c522b72 +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +4379 + +ui-bg_glass_55_fbf5d0_1x400.png +file + + + + +2009-03-06T03:20:14.000000Z +9871dd318a7253034b93f19f87a9ed5b +2009-03-06T14:15:55.199272Z +21 +ers +has-props + + + + + + + + + + + + + + + + + + + + +123 + diff --git a/NzbDrone.Web/Content/Images/.svn/format b/NzbDrone.Web/Content/Images/.svn/format new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/format @@ -0,0 +1 @@ +9 diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_diagonals-small_0_aaaaaa_40x40.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_diagonals-small_0_aaaaaa_40x40.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_diagonals-small_0_aaaaaa_40x40.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_diagonals-thick_15_444444_40x40.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_diagonals-thick_15_444444_40x40.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_diagonals-thick_15_444444_40x40.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_100_f0f0f0_1x400.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_100_f0f0f0_1x400.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_100_f0f0f0_1x400.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_50_99c2ff_1x400.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_50_99c2ff_1x400.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_50_99c2ff_1x400.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_55_fbf5d0_1x400.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_55_fbf5d0_1x400.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_55_fbf5d0_1x400.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_80_e6e6e6_1x400.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_80_e6e6e6_1x400.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_80_e6e6e6_1x400.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_95_fef1ec_1x400.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_95_fef1ec_1x400.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_glass_95_fef1ec_1x400.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_highlight-hard_100_f9f9f9_1x100.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_highlight-hard_100_f9f9f9_1x100.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_highlight-hard_100_f9f9f9_1x100.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_highlight-soft_100_e7eef3_1x100.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_highlight-soft_100_e7eef3_1x100.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-bg_highlight-soft_100_e7eef3_1x100.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_222222_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_222222_256x240.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_222222_256x240.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_2694e8_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_2694e8_256x240.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_2694e8_256x240.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_2e83ff_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_2e83ff_256x240.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_2e83ff_256x240.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_72a7cf_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_72a7cf_256x240.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_72a7cf_256x240.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_888888_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_888888_256x240.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_888888_256x240.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_cd0a0a_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_cd0a0a_256x240.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_cd0a0a_256x240.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_ffffff_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_ffffff_256x240.png.svn-base new file mode 100644 index 000000000..5e9587e65 --- /dev/null +++ b/NzbDrone.Web/Content/Images/.svn/prop-base/ui-icons_ffffff_256x240.png.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_diagonals-small_0_aaaaaa_40x40.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_diagonals-small_0_aaaaaa_40x40.png.svn-base new file mode 100644 index 000000000..d5359734a Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_diagonals-small_0_aaaaaa_40x40.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_diagonals-thick_15_444444_40x40.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_diagonals-thick_15_444444_40x40.png.svn-base new file mode 100644 index 000000000..a24c5aab6 Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_diagonals-thick_15_444444_40x40.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_100_f0f0f0_1x400.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_100_f0f0f0_1x400.png.svn-base new file mode 100644 index 000000000..33896e710 Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_100_f0f0f0_1x400.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_50_99c2ff_1x400.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_50_99c2ff_1x400.png.svn-base new file mode 100644 index 000000000..a717a043d Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_50_99c2ff_1x400.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_55_fbf5d0_1x400.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_55_fbf5d0_1x400.png.svn-base new file mode 100644 index 000000000..0f45be78c Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_55_fbf5d0_1x400.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_80_e6e6e6_1x400.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_80_e6e6e6_1x400.png.svn-base new file mode 100644 index 000000000..abaa23f00 Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_80_e6e6e6_1x400.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_95_fef1ec_1x400.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_95_fef1ec_1x400.png.svn-base new file mode 100644 index 000000000..4443fdc1a Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_glass_95_fef1ec_1x400.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_highlight-hard_100_f9f9f9_1x100.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_highlight-hard_100_f9f9f9_1x100.png.svn-base new file mode 100644 index 000000000..4812b8676 Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_highlight-hard_100_f9f9f9_1x100.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_highlight-soft_100_e7eef3_1x100.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_highlight-soft_100_e7eef3_1x100.png.svn-base new file mode 100644 index 000000000..d39c18227 Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-bg_highlight-soft_100_e7eef3_1x100.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_222222_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_222222_256x240.png.svn-base new file mode 100644 index 000000000..67560da9b Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_222222_256x240.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_2694e8_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_2694e8_256x240.png.svn-base new file mode 100644 index 000000000..dbd78b68a Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_2694e8_256x240.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_2e83ff_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_2e83ff_256x240.png.svn-base new file mode 100644 index 000000000..b425c446d Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_2e83ff_256x240.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_72a7cf_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_72a7cf_256x240.png.svn-base new file mode 100644 index 000000000..6183ac205 Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_72a7cf_256x240.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_888888_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_888888_256x240.png.svn-base new file mode 100644 index 000000000..2e5180e47 Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_888888_256x240.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_cd0a0a_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_cd0a0a_256x240.png.svn-base new file mode 100644 index 000000000..2db88b796 Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_cd0a0a_256x240.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_ffffff_256x240.png.svn-base b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_ffffff_256x240.png.svn-base new file mode 100644 index 000000000..746e6fa25 Binary files /dev/null and b/NzbDrone.Web/Content/Images/.svn/text-base/ui-icons_ffffff_256x240.png.svn-base differ diff --git a/NzbDrone.Web/Content/Images/ui-bg_diagonals-small_0_aaaaaa_40x40.png b/NzbDrone.Web/Content/Images/ui-bg_diagonals-small_0_aaaaaa_40x40.png new file mode 100644 index 000000000..d5359734a Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-bg_diagonals-small_0_aaaaaa_40x40.png differ diff --git a/NzbDrone.Web/Content/Images/ui-bg_diagonals-thick_15_444444_40x40.png b/NzbDrone.Web/Content/Images/ui-bg_diagonals-thick_15_444444_40x40.png new file mode 100644 index 000000000..a24c5aab6 Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-bg_diagonals-thick_15_444444_40x40.png differ diff --git a/NzbDrone.Web/Content/Images/ui-bg_glass_100_f0f0f0_1x400.png b/NzbDrone.Web/Content/Images/ui-bg_glass_100_f0f0f0_1x400.png new file mode 100644 index 000000000..33896e710 Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-bg_glass_100_f0f0f0_1x400.png differ diff --git a/NzbDrone.Web/Content/Images/ui-bg_glass_50_99c2ff_1x400.png b/NzbDrone.Web/Content/Images/ui-bg_glass_50_99c2ff_1x400.png new file mode 100644 index 000000000..a717a043d Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-bg_glass_50_99c2ff_1x400.png differ diff --git a/NzbDrone.Web/Content/Images/ui-bg_glass_55_fbf5d0_1x400.png b/NzbDrone.Web/Content/Images/ui-bg_glass_55_fbf5d0_1x400.png new file mode 100644 index 000000000..0f45be78c Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-bg_glass_55_fbf5d0_1x400.png differ diff --git a/NzbDrone.Web/Content/Images/ui-bg_glass_80_e6e6e6_1x400.png b/NzbDrone.Web/Content/Images/ui-bg_glass_80_e6e6e6_1x400.png new file mode 100644 index 000000000..abaa23f00 Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-bg_glass_80_e6e6e6_1x400.png differ diff --git a/NzbDrone.Web/Content/Images/ui-bg_glass_95_fef1ec_1x400.png b/NzbDrone.Web/Content/Images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 000000000..4443fdc1a Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/NzbDrone.Web/Content/Images/ui-bg_highlight-hard_100_f9f9f9_1x100.png b/NzbDrone.Web/Content/Images/ui-bg_highlight-hard_100_f9f9f9_1x100.png new file mode 100644 index 000000000..4812b8676 Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-bg_highlight-hard_100_f9f9f9_1x100.png differ diff --git a/NzbDrone.Web/Content/Images/ui-bg_highlight-soft_100_e7eef3_1x100.png b/NzbDrone.Web/Content/Images/ui-bg_highlight-soft_100_e7eef3_1x100.png new file mode 100644 index 000000000..d39c18227 Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-bg_highlight-soft_100_e7eef3_1x100.png differ diff --git a/NzbDrone.Web/Content/Images/ui-icons_222222_256x240.png b/NzbDrone.Web/Content/Images/ui-icons_222222_256x240.png new file mode 100644 index 000000000..67560da9b Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-icons_222222_256x240.png differ diff --git a/NzbDrone.Web/Content/Images/ui-icons_2694e8_256x240.png b/NzbDrone.Web/Content/Images/ui-icons_2694e8_256x240.png new file mode 100644 index 000000000..dbd78b68a Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-icons_2694e8_256x240.png differ diff --git a/NzbDrone.Web/Content/Images/ui-icons_2e83ff_256x240.png b/NzbDrone.Web/Content/Images/ui-icons_2e83ff_256x240.png new file mode 100644 index 000000000..b425c446d Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-icons_2e83ff_256x240.png differ diff --git a/NzbDrone.Web/Content/Images/ui-icons_72a7cf_256x240.png b/NzbDrone.Web/Content/Images/ui-icons_72a7cf_256x240.png new file mode 100644 index 000000000..6183ac205 Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-icons_72a7cf_256x240.png differ diff --git a/NzbDrone.Web/Content/Images/ui-icons_888888_256x240.png b/NzbDrone.Web/Content/Images/ui-icons_888888_256x240.png new file mode 100644 index 000000000..2e5180e47 Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-icons_888888_256x240.png differ diff --git a/NzbDrone.Web/Content/Images/ui-icons_cd0a0a_256x240.png b/NzbDrone.Web/Content/Images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 000000000..2db88b796 Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-icons_cd0a0a_256x240.png differ diff --git a/NzbDrone.Web/Content/Images/ui-icons_ffffff_256x240.png b/NzbDrone.Web/Content/Images/ui-icons_ffffff_256x240.png new file mode 100644 index 000000000..746e6fa25 Binary files /dev/null and b/NzbDrone.Web/Content/Images/ui-icons_ffffff_256x240.png differ diff --git a/NzbDrone.Web/Content/ajax-loader.gif b/NzbDrone.Web/Content/ajax-loader.gif new file mode 100644 index 000000000..2e9d85eed Binary files /dev/null and b/NzbDrone.Web/Content/ajax-loader.gif differ diff --git a/NzbDrone.Web/Content/jquery-ui-1.8.8.custom.css b/NzbDrone.Web/Content/jquery-ui-1.8.8.custom.css new file mode 100644 index 000000000..ef0d93dbc --- /dev/null +++ b/NzbDrone.Web/Content/jquery-ui-1.8.8.custom.css @@ -0,0 +1,572 @@ +/* + * jQuery UI CSS Framework 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } +.ui-widget-content a { color: #333333; } +.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } +.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } +.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* + * jQuery UI Resizable 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* + * jQuery UI Selectable 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +/* + * jQuery UI Accordion 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; }/* + * jQuery UI Autocomplete 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} +/* + * jQuery UI Button 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ +/* + * jQuery UI Dialog 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* + * jQuery UI Slider 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* + * jQuery UI Tabs 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } +/* + * jQuery UI Datepicker 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* + * jQuery UI Progressbar 1.8.8 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/NzbDrone.Web/Content/jquery-ui.css b/NzbDrone.Web/Content/jquery-ui.css new file mode 100644 index 000000000..ccbf186f0 --- /dev/null +++ b/NzbDrone.Web/Content/jquery-ui.css @@ -0,0 +1,405 @@ +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +*/ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=3px&bgColorHeader=e7eef3&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=b2c7d7&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f9f9f9&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=80&borderColorDefault=cccccc&fcDefault=444444&iconColorDefault=888888&bgColorHover=f0f0f0&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=b2c7d7&fcHover=0b5b98&iconColorHover=2694e8&bgColorActive=99c2ff&bgTextureActive=02_glass.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=000000&iconColorActive=ffffff&bgColorHighlight=fbf5d0&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=444444&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=15&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=07_diagonals_small.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=0px&offsetTopShadow=4px&offsetLeftShadow=4px&cornerRadiusShadow=4px +*/ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #f9f9f9 url(images/ui-bg_highlight-hard_100_f9f9f9_1x100.png) 50% top repeat-x; color: #362b36; } +.ui-widget-content a { color: #362b36; } +.ui-widget-header { border: 1px solid #b2c7d7; background: #e7eef3 url(images/ui-bg_highlight-soft_100_e7eef3_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } +.ui-widget-header a { color: #222222; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #cccccc; background: #e6e6e6 url(images/ui-bg_glass_80_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #444444; outline: none; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #444444; text-decoration: none; outline: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #b2c7d7; background: #f0f0f0 url(images/ui-bg_glass_100_f0f0f0_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #0b5b98; outline: none; } +.ui-state-hover a, .ui-state-hover a:hover { color: #0b5b98; text-decoration: none; outline: none; } +.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #2694e8; background: #99c2ff url(images/ui-bg_glass_50_99c2ff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #000000; outline: none; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #000000; outline: none; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #f9dd34; background: #fbf5d0 url(images/ui-bg_glass_55_fbf5d0_1x400.png) 50% 50% repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } +.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; } +.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; } +.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; } +.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; } +.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; } +.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; } +.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; } + +/* Overlays */ +.ui-widget-overlay { background: #444444 url(images/ui-bg_diagonals-thick_15_444444_40x40.png) 50% 50% repeat; opacity: .30;filter:Alpha(Opacity=30); } +.ui-widget-shadow { margin: 4px 0 0 4px; padding: 0px; background: #aaaaaa url(images/ui-bg_diagonals-small_0_aaaaaa_40x40.png) 50% 50% repeat; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 4px; -webkit-border-radius: 4px; }/* Resizable +----------------------------------*/ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Accordion +----------------------------------*/ +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } +.ui-accordion .ui-accordion-content-active { display: block; }/* Dialog +----------------------------------*/ +.ui-dialog { position: relative; padding: .2em; width: 300px; } +.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* Slider +----------------------------------*/ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs +----------------------------------*/ +.ui-tabs { padding: .2em; zoom: 1; } +.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } +.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } +/* Datepicker +----------------------------------*/ +.ui-datepicker { width: 17em; padding: .2em .2em 0; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* Progressbar +----------------------------------*/ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/NzbDrone.Web/Content/jquery-ui.custom.css b/NzbDrone.Web/Content/jquery-ui.custom.css new file mode 100644 index 000000000..ab1742531 --- /dev/null +++ b/NzbDrone.Web/Content/jquery-ui.custom.css @@ -0,0 +1,17 @@ +/* Customisation of jQuery-ui classes */ + +.ui-state-error +{ + padding: 3px; + padding-left : 10px; +} + +.ui-state-highlight { + padding: 3px; + padding-left : 10px; +} + +.ui-icon +{ + margin-top: 2px; +} diff --git a/NzbDrone.Web/Content/style.css b/NzbDrone.Web/Content/style.css index 8aa87cc9f..58f4bb84d 100644 --- a/NzbDrone.Web/Content/style.css +++ b/NzbDrone.Web/Content/style.css @@ -119,7 +119,7 @@ hr #page { - margin: 0 auto 60px; + margin: 0 auto 10px; overflow: hidden; background-color: White; padding: 10px 20px 20px 20px; @@ -153,9 +153,22 @@ hr font-family: Consolas, Monospace; } -/*fix telerik grid missing boarder*/ +/*fix telerik grid missing border*/ .t-grid .t-last { border-bottom: 1px solid #EEEEEE; border-color: #EEEEEE; } + +/* Footer */ +.timer +{ + text-align: center; + color: #065EFE; +} + +#footer +{ + padding: 1px, 1px, 1px, 1px; + text-align: center; +} \ No newline at end of file diff --git a/NzbDrone.Web/Controllers/Copy of SettingsController.cs b/NzbDrone.Web/Controllers/Copy of SettingsController.cs new file mode 100644 index 000000000..8f8f229ba --- /dev/null +++ b/NzbDrone.Web/Controllers/Copy of SettingsController.cs @@ -0,0 +1,41 @@ +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Threading; +//using System.Web; +//using System.Web.Mvc; +//using NzbDrone.Core.Providers; +//using NzbDrone.Web.Models; + +//namespace NzbDrone.Web.Controllers +//{ +// [HandleError] +// public class SettingsController : Controller +// { +// // +// // GET: /Settings/ +// private IConfigProvider _configProvider; + +// public SettingsController(IConfigProvider configProvider) +// { +// _configProvider = configProvider; +// } + +// public ActionResult Index() +// { +// return View(new SettingsModel() { TvFolder = _configProvider.SeriesRoot }); +// } + +// [HttpPost] +// public ActionResult Index(SettingsModel model) +// { +// if (ModelState.IsValid) +// { +// _configProvider.SeriesRoot = model.TvFolder; +// //return RedirectToAction("index"); +// } +// return RedirectToAction("index", "series"); +// } + +// } +//} diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 2add481f3..9aeb4c78d 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -4,7 +4,8 @@ using System.Linq; using System.Threading; using System.Web; using System.Web.Mvc; -using NzbDrone.Core.Providers; +using NLog; +using NzbDrone.Core.Providers; using NzbDrone.Web.Models; namespace NzbDrone.Web.Controllers @@ -12,30 +13,222 @@ namespace NzbDrone.Web.Controllers [HandleError] public class SettingsController : Controller { - // - // GET: /Settings/ private IConfigProvider _configProvider; + private IIndexerProvider _indexerProvider; + private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); - public SettingsController(IConfigProvider configProvider) + public SettingsController(IConfigProvider configProvider, IIndexerProvider indexerProvider) { _configProvider = configProvider; + _indexerProvider = indexerProvider; } - public ActionResult Index() + public ActionResult Index(string viewName) { - return View(new SettingsModel() { TvFolder = _configProvider.SeriesRoot }); + if (viewName != null) + ViewData["viewName"] = viewName; + + else + ViewData["viewName"] = "General"; + + return View("Index", new SettingsModel + { + TvFolder = _configProvider.SeriesRoot + }); + } + + public ActionResult General() + { + ViewData["viewName"] = "General"; + return View("Index", new SettingsModel + { + TvFolder = _configProvider.SeriesRoot + }); + } + + public ActionResult Indexers() + { + ViewData["viewName"] = "Indexers"; + return View("Index", new SettingsModel + { + NzbMatrixUsername = _configProvider.GetValue("NzbMatrixUsername", String.Empty, false), + NzbMatrixApiKey = _configProvider.GetValue("NzbMatrixApiKey", String.Empty, false), + NzbsOrgUId = _configProvider.GetValue("NzbsOrgUId", String.Empty, false), + NzbsOrgHash = _configProvider.GetValue("NzbsOrgHash", String.Empty, false), + NzbsrusUId = _configProvider.GetValue("NzbsrusUId", String.Empty, false), + NzbsrusHash = _configProvider.GetValue("NzbsrusHash", String.Empty, false), + Indexers = _indexerProvider.AllIndexers() + }); + } + + public ActionResult Downloads() + { + ViewData["viewName"] = "Downloads"; + return View("Index", new SettingsModel + { + //Sync Frequency + //Download Propers? + //Retention + //SAB Host/IP + //SAB Port + //SAB APIKey + //SAB Username + //SAB Password + //SAB Category + //SAB Priority + + SyncFrequency = Convert.ToInt32(_configProvider.GetValue("SyncFrequency", "15", true)), + DownloadPropers = Convert.ToBoolean(_configProvider.GetValue("DownloadPropers", "false", true)), + Rentention = Convert.ToInt32(_configProvider.GetValue("Rentention", "500", true)), + SabHost = _configProvider.GetValue("SabHost", "localhost", false), + SabPort = Convert.ToInt32(_configProvider.GetValue("SabPort", "8080", true)), + SabApiKey = _configProvider.GetValue("SabApiKey", String.Empty, false), + SabUsername = _configProvider.GetValue("SabUsername", String.Empty, false), + SabPassword = _configProvider.GetValue("SabPassword", String.Empty, false), + SabCategory = _configProvider.GetValue("SabCategory", String.Empty, false), + //SabPriority = _configProvider.GetValue("SabPriority", String.Empty, false) + }); + } + + public ActionResult SubMenu() + { + return PartialView(); + } + + [HttpPost] + public ActionResult Index(SettingsModel data) + { + try + { + _configProvider.SeriesRoot = data.TvFolder; + _configProvider.SetValue("NzbMatrixUsername", data.NzbMatrixUsername); + _configProvider.SetValue("NzbMatrixApiKey", data.NzbMatrixApiKey); + _configProvider.SetValue("NzbsOrgUId", data.NzbsOrgUId); + _configProvider.SetValue("NzbsOrgHash", data.NzbsOrgHash); + } + catch (Exception) + { + if (Request.IsAjaxRequest()) + return Content("Settings Saved."); + + return Content("Settings Saved."); + Logger.Error(""); + } + + + if (Request.IsAjaxRequest()) + return Content("Settings Saved."); + + return Content("Settings Saved."); + } + + [HttpPost] + public ActionResult SaveGeneral(SettingsModel data) + { + try + { + _configProvider.SeriesRoot = data.TvFolder; + } + catch (Exception e) + { + Logger.ErrorException(e.Message, e); + if (Request.IsAjaxRequest()) + return Content("Error Saving Settings, please fix any errors"); + + return Content("Error Saving Settings, please fix any errors"); + } + + if (Request.IsAjaxRequest()) + return Content("Settings Saved."); + + return Content("Settings Saved."); } [HttpPost] - public ActionResult Index(SettingsModel model) + public ActionResult SaveIndexers(SettingsModel data) { - if (ModelState.IsValid) + try { - _configProvider.SeriesRoot = model.TvFolder; - //return RedirectToAction("index"); + foreach (var indexer in data.Indexers) + { + _indexerProvider.Update(indexer); + } + + _configProvider.SetValue("NzbMatrixUsername", data.NzbMatrixUsername); + _configProvider.SetValue("NzbMatrixApiKey", data.NzbMatrixApiKey); + _configProvider.SetValue("NzbsOrgUId", data.NzbsOrgUId); + _configProvider.SetValue("NzbsOrgHash", data.NzbsOrgHash); + _configProvider.SetValue("NzbsrusUId", data.NzbsrusUId); + _configProvider.SetValue("NzbsrusHash", data.NzbsrusHash); + } + catch (Exception e) + { + Logger.ErrorException(e.Message, e); + if (Request.IsAjaxRequest()) + return Content("Error Saving Settings, please fix any errors"); + + return Content("Error Saving Settings, please fix any errors"); } - return RedirectToAction("index", "series"); + + if (Request.IsAjaxRequest()) + return Content("Settings Saved."); + + return Content("Settings Saved."); } + [HttpPost] + public ActionResult SaveDownloads(SettingsModel data) + { + try + { + if (data.SyncFrequency > 15) + _configProvider.SetValue("SyncFrequency", data.SyncFrequency.ToString()); + + _configProvider.SetValue("DownloadPropers", data.DownloadPropers.ToString()); + + if (data.Rentention > 0) + _configProvider.SetValue("Retention", data.Rentention.ToString()); + + if (data.SabHost != null) + _configProvider.SetValue("SabHost", data.SabHost); + + if (data.SabPort > 0) + _configProvider.SetValue("SabPort", data.SabPort.ToString()); + + if (data.SabApiKey != null) + _configProvider.SetValue("SabApiKey", data.SabApiKey); + + if (data.SabUsername != null) + _configProvider.SetValue("SabUsername", data.SabUsername); + + if (data.SabPassword != null) + _configProvider.SetValue("SabPassword", data.SabPassword); + + if (data.SabCategory != null) + _configProvider.SetValue("SabCategory", data.SabCategory); + + //if (data.SabPriority != null) + // _configProvider.SetValue("SabPriority", data.SabPriority.ToString()); + } + catch (Exception e) + { + Logger.ErrorException(e.Message, e); + if (Request.IsAjaxRequest()) + return Content("Error Saving Settings, please fix any errors"); + + return Content("Error Saving Settings, please fix any errors"); + } + + if (Request.IsAjaxRequest()) + return Content("Settings Saved."); + + return Content("Settings Saved."); + } + + [HttpPost] + public ActionResult SortedList(List items) + { + return Content("Settings Saved."); + } } } diff --git a/NzbDrone.Web/Controllers/SharedController.cs b/NzbDrone.Web/Controllers/SharedController.cs new file mode 100644 index 000000000..d3fccd0c9 --- /dev/null +++ b/NzbDrone.Web/Controllers/SharedController.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; + +namespace NzbDrone.Web.Controllers +{ + public class SharedController : Controller + { + // + // GET: /Shared/ + + public ActionResult Index() + { + return RedirectToAction("Index", "Series"); + } + + [ChildActionOnly] + public ActionResult Footer() + { + ViewData["RssTimer"] = DateTime.Now.AddMinutes(61).AddSeconds(10).ToString("yyyyMMddHHmmss"); + return PartialView(); + } + } +} diff --git a/NzbDrone.Web/Models/SettingsModels.cs b/NzbDrone.Web/Models/SettingsModels.cs index f85439b4a..6b76ab268 100644 --- a/NzbDrone.Web/Models/SettingsModels.cs +++ b/NzbDrone.Web/Models/SettingsModels.cs @@ -7,14 +7,16 @@ using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Security; +using NzbDrone.Core.Model; +using NzbDrone.Core.Repository; namespace NzbDrone.Web.Models { public class SettingsModel { - - [Required] + + #region General Settings [DataType(DataType.Text)] [DisplayName("TV Folder")] public String TvFolder @@ -22,6 +24,158 @@ namespace NzbDrone.Web.Models get; set; } + #endregion + + #region Indexer Settings + + [DataType(DataType.Text)] + [DisplayName("NZBMatrix Username")] + public String NzbMatrixUsername + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("NZBMatrix API Key")] + public String NzbMatrixApiKey + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("NZBs.Org UID")] + public String NzbsOrgUId + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("NZBs.Org Hash")] + public String NzbsOrgHash + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("NZBsRus UID")] + public String NzbsrusUId + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("NZBsRus Hash")] + public String NzbsrusHash + { + get; + set; + } + + public List Indexers + { + get; + set; + } + #endregion + + #region Download Settings + + //Sync Frequency + //Download Propers? + //Retention + //SAB Host/IP + //SAB Port + //SAB APIKey + //SAB Username + //SAB Password + //SAB Category + //SAB Priority + + [DataType(DataType.Text)] + [DisplayName("Sync Frequency")] + public int SyncFrequency + { + get; + set; + } + + [DisplayName("Download Propers")] + public bool DownloadPropers + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("Retentions")] + public int Rentention + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("SABnzbd Host")] + public String SabHost + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("SABnzbd Port")] + public int SabPort + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("SABnzbd API Key")] + public String SabApiKey + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("SABnzbd Username")] + public String SabUsername + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("SABnzbd Password")] + public String SabPassword + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("SABnzbd Category")] + public String SabCategory + { + get; + set; + } + + [DataType(DataType.Text)] + [DisplayName("SABnzbd Priority")] + public SabnzbdPriorityType SabPriority + { + get; + set; + } + + #endregion } } diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index f9ec2b48b..bf3a2cbf3 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -76,11 +76,13 @@ + + Global.asax @@ -98,6 +100,7 @@ + @@ -123,6 +126,25 @@ + + + + + + + + + + + + + + + + + + + @@ -211,15 +233,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer @@ -283,7 +341,7 @@ / http://localhost/NzbDrone False - True + False http://localhost:8989 False diff --git a/NzbDrone.Web/Scripts/2010.3.1110/jquery-1.4.3.min.js b/NzbDrone.Web/Scripts/2010.3.1110/jquery-1.4.3.min.js new file mode 100644 index 000000000..c941a5f7a --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/jquery-1.4.3.min.js @@ -0,0 +1,166 @@ +/*! + * jQuery JavaScript Library v1.4.3 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Oct 14 23:10:06 2010 -0400 + */ +(function(E,A){function U(){return false}function ba(){return true}function ja(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ga(a){var b,d,e=[],f=[],h,k,l,n,s,v,B,D;k=c.data(this,this.nodeType?"events":"__events__");if(typeof k==="function")k=k.events;if(!(a.liveFired===this||!k||!k.live||a.button&&a.type==="click")){if(a.namespace)D=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var H=k.live.slice(0);for(n=0;nd)break;a.currentTarget=f.elem;a.data=f.handleObj.data; +a.handleObj=f.handleObj;D=f.handleObj.origHandler.apply(f.elem,arguments);if(D===false||a.isPropagationStopped()){d=f.level;if(D===false)b=false}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(Ha,"`").replace(Ia,"&")}function ka(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Ja.test(b))return c.filter(b, +e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function la(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var k in e[h])c.event.add(this,h,e[h][k],e[h][k].data)}}})}function Ka(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)} +function ma(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?La:Ma,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function ca(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Na.test(a)?e(a,h):ca(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)? +e(a,""):c.each(b,function(f,h){ca(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(na.concat.apply([],na.slice(0,b)),function(){d[this]=a});return d}function oa(a){if(!da[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";da[a]=d}return da[a]}function ea(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var u=E.document,c=function(){function a(){if(!b.isReady){try{u.documentElement.doScroll("left")}catch(i){setTimeout(a, +1);return}b.ready()}}var b=function(i,r){return new b.fn.init(i,r)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,k=/\S/,l=/^\s+/,n=/\s+$/,s=/\W/,v=/\d/,B=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,D=/^[\],:{}\s]*$/,H=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,G=/(?:^|:|,)(?:\s*\[)+/g,M=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,j=/(msie) ([\w.]+)/,o=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false, +q=[],t,x=Object.prototype.toString,C=Object.prototype.hasOwnProperty,P=Array.prototype.push,N=Array.prototype.slice,R=String.prototype.trim,Q=Array.prototype.indexOf,L={};b.fn=b.prototype={init:function(i,r){var y,z,F;if(!i)return this;if(i.nodeType){this.context=this[0]=i;this.length=1;return this}if(i==="body"&&!r&&u.body){this.context=u;this[0]=u.body;this.selector="body";this.length=1;return this}if(typeof i==="string")if((y=h.exec(i))&&(y[1]||!r))if(y[1]){F=r?r.ownerDocument||r:u;if(z=B.exec(i))if(b.isPlainObject(r)){i= +[u.createElement(z[1])];b.fn.attr.call(i,r,true)}else i=[F.createElement(z[1])];else{z=b.buildFragment([y[1]],[F]);i=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,i)}else{if((z=u.getElementById(y[2]))&&z.parentNode){if(z.id!==y[2])return f.find(i);this.length=1;this[0]=z}this.context=u;this.selector=i;return this}else if(!r&&!s.test(i)){this.selector=i;this.context=u;i=u.getElementsByTagName(i);return b.merge(this,i)}else return!r||r.jquery?(r||f).find(i):b(r).find(i); +else if(b.isFunction(i))return f.ready(i);if(i.selector!==A){this.selector=i.selector;this.context=i.context}return b.makeArray(i,this)},selector:"",jquery:"1.4.3",length:0,size:function(){return this.length},toArray:function(){return N.call(this,0)},get:function(i){return i==null?this.toArray():i<0?this.slice(i)[0]:this[i]},pushStack:function(i,r,y){var z=b();b.isArray(i)?P.apply(z,i):b.merge(z,i);z.prevObject=this;z.context=this.context;if(r==="find")z.selector=this.selector+(this.selector?" ": +"")+y;else if(r)z.selector=this.selector+"."+r+"("+y+")";return z},each:function(i,r){return b.each(this,i,r)},ready:function(i){b.bindReady();if(b.isReady)i.call(u,b);else q&&q.push(i);return this},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(i){return this.pushStack(b.map(this,function(r,y){return i.call(r, +y,r)}))},end:function(){return this.prevObject||b(null)},push:P,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var i=arguments[0]||{},r=1,y=arguments.length,z=false,F,I,K,J,fa;if(typeof i==="boolean"){z=i;i=arguments[1]||{};r=2}if(typeof i!=="object"&&!b.isFunction(i))i={};if(y===r){i=this;--r}for(;r0)){if(q){for(var r=0;i=q[r++];)i.call(u,b);q=null}b.fn.triggerHandler&&b(u).triggerHandler("ready")}}},bindReady:function(){if(!p){p=true;if(u.readyState==="complete")return setTimeout(b.ready, +1);if(u.addEventListener){u.addEventListener("DOMContentLoaded",t,false);E.addEventListener("load",b.ready,false)}else if(u.attachEvent){u.attachEvent("onreadystatechange",t);E.attachEvent("onload",b.ready);var i=false;try{i=E.frameElement==null}catch(r){}u.documentElement.doScroll&&i&&a()}}},isFunction:function(i){return b.type(i)==="function"},isArray:Array.isArray||function(i){return b.type(i)==="array"},isWindow:function(i){return i&&typeof i==="object"&&"setInterval"in i},isNaN:function(i){return i== +null||!v.test(i)||isNaN(i)},type:function(i){return i==null?String(i):L[x.call(i)]||"object"},isPlainObject:function(i){if(!i||b.type(i)!=="object"||i.nodeType||b.isWindow(i))return false;if(i.constructor&&!C.call(i,"constructor")&&!C.call(i.constructor.prototype,"isPrototypeOf"))return false;for(var r in i);return r===A||C.call(i,r)},isEmptyObject:function(i){for(var r in i)return false;return true},error:function(i){throw i;},parseJSON:function(i){if(typeof i!=="string"||!i)return null;i=b.trim(i); +if(D.test(i.replace(H,"@").replace(w,"]").replace(G,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(i):(new Function("return "+i))();else b.error("Invalid JSON: "+i)},noop:function(){},globalEval:function(i){if(i&&k.test(i)){var r=u.getElementsByTagName("head")[0]||u.documentElement,y=u.createElement("script");y.type="text/javascript";if(b.support.scriptEval)y.appendChild(u.createTextNode(i));else y.text=i;r.insertBefore(y,r.firstChild);r.removeChild(y)}},nodeName:function(i,r){return i.nodeName&&i.nodeName.toUpperCase()=== +r.toUpperCase()},each:function(i,r,y){var z,F=0,I=i.length,K=I===A||b.isFunction(i);if(y)if(K)for(z in i){if(r.apply(i[z],y)===false)break}else for(;F";a=u.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var s=u.createElement("div"); +s.style.width=s.style.paddingLeft="1px";u.body.appendChild(s);c.boxModel=c.support.boxModel=s.offsetWidth===2;if("zoom"in s.style){s.style.display="inline";s.style.zoom=1;c.support.inlineBlockNeedsLayout=s.offsetWidth===2;s.style.display="";s.innerHTML="
";c.support.shrinkWrapBlocks=s.offsetWidth!==2}s.innerHTML="
t
";var v=s.getElementsByTagName("td");c.support.reliableHiddenOffsets=v[0].offsetHeight=== +0;v[0].style.display="";v[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&v[0].offsetHeight===0;s.innerHTML="";u.body.removeChild(s).style.display="none"});a=function(s){var v=u.createElement("div");s="on"+s;var B=s in v;if(!B){v.setAttribute(s,"return;");B=typeof v[s]==="function"}return B};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength", +cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var pa={},Oa=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?pa:a;var e=a.nodeType,f=e?a[c.expando]:null,h=c.cache;if(!(e&&!f&&typeof b==="string"&&d===A)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]= +c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==A)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?pa:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);else if(d)delete f[e];else for(var k in a)delete a[k]}},acceptData:function(a){if(a.nodeName){var b= +c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){if(typeof a==="undefined")return this.length?c.data(this[0]):null;else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===A){var e=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(e===A&&this.length){e=c.data(this[0],a);if(e===A&&this[0].nodeType===1){e=this[0].getAttribute("data-"+a);if(typeof e=== +"string")try{e=e==="true"?true:e==="false"?false:e==="null"?null:!c.isNaN(e)?parseFloat(e):Oa.test(e)?c.parseJSON(e):e}catch(f){}else e=A}}return e===A&&d[1]?this.data(d[0]):e}else return this.each(function(){var h=c(this),k=[d[0],b];h.triggerHandler("setData"+d[1]+"!",k);c.data(this,a,b);h.triggerHandler("changeData"+d[1]+"!",k)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=c.data(a,b);if(!d)return e|| +[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===A)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this, +a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var qa=/[\n\t]/g,ga=/\s+/,Pa=/\r/g,Qa=/^(?:href|src|style)$/,Ra=/^(?:button|input)$/i,Sa=/^(?:button|input|object|select|textarea)$/i,Ta=/^a(?:rea)?$/i,ra=/^(?:radio|checkbox)$/i;c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this, +a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(s){var v=c(this);v.addClass(a.call(this,s,v.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ga),d=0,e=this.length;d-1)return true;return false}, +val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Sa.test(a.nodeName)||Ta.test(a.nodeName)&&a.href?0:A;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return A;a=!c.support.hrefNormalized&&e&& +h?a.getAttribute(b,2):a.getAttribute(b);return a===null?A:a}}});var X=/\.(.*)$/,ha=/^(?:textarea|input|select)$/i,Ha=/\./g,Ia=/ /g,Ua=/[^\w\s.|`]/g,Va=function(a){return a.replace(Ua,"\\$&")},sa={focusin:0,focusout:0};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var k=a.nodeType?"events":"__events__",l=h[k],n=h.handle;if(typeof l=== +"function"){n=l.handle;l=l.events}else if(!l){a.nodeType||(h[k]=h=function(){});h.events=l={}}if(!n)h.handle=n=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(n.elem,arguments):A};n.elem=a;b=b.split(" ");for(var s=0,v;k=b[s++];){h=f?c.extend({},f):{handler:d,data:e};if(k.indexOf(".")>-1){v=k.split(".");k=v.shift();h.namespace=v.slice(0).sort().join(".")}else{v=[];h.namespace=""}h.type=k;if(!h.guid)h.guid=d.guid;var B=l[k],D=c.event.special[k]||{};if(!B){B=l[k]=[]; +if(!D.setup||D.setup.call(a,e,v,n)===false)if(a.addEventListener)a.addEventListener(k,n,false);else a.attachEvent&&a.attachEvent("on"+k,n)}if(D.add){D.add.call(a,h);if(!h.handler.guid)h.handler.guid=d.guid}B.push(h);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,k=0,l,n,s,v,B,D,H=a.nodeType?"events":"__events__",w=c.data(a),G=w&&w[H];if(w&&G){if(typeof G==="function"){w=G;G=G.events}if(b&&b.type){d=b.handler;b=b.type}if(!b|| +typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in G)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[k++];){v=f;l=f.indexOf(".")<0;n=[];if(!l){n=f.split(".");f=n.shift();s=RegExp("(^|\\.)"+c.map(n.slice(0).sort(),Va).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(B=G[f])if(d){v=c.event.special[f]||{};for(h=e||0;h=0){a.type= +f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return A;a.result=A;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)=== +false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){e=a.target;var k,l=f.replace(X,""),n=c.nodeName(e,"a")&&l==="click",s=c.event.special[l]||{};if((!s._default||s._default.call(d,a)===false)&&!n&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[l]){if(k=e["on"+l])e["on"+l]=null;c.event.triggered=true;e[l]()}}catch(v){}if(k)e["on"+l]=k;c.event.triggered=false}}},handle:function(a){var b,d,e; +d=[];var f,h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var k=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired= +A;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",va(a))}},setup:function(){if(this.type=== +"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ha.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ha.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}u.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){sa[b]++===0&&u.addEventListener(a,d,true)},teardown:function(){--sa[b]=== +0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); +(function(){function a(g,j,o,m,p,q){p=0;for(var t=m.length;p0){C=x;break}}x=x[g]}m[p]=C}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,k=true;[0,0].sort(function(){k=false;return 0});var l=function(g,j,o,m){o=o||[];var p=j=j||u;if(j.nodeType!==1&&j.nodeType!==9)return[];if(!g||typeof g!=="string")return o;var q=[],t,x,C,P,N=true,R=l.isXML(j),Q=g,L;do{d.exec("");if(t=d.exec(Q)){Q=t[3];q.push(t[1]);if(t[2]){P=t[3]; +break}}}while(t);if(q.length>1&&s.exec(g))if(q.length===2&&n.relative[q[0]])x=M(q[0]+q[1],j);else for(x=n.relative[q[0]]?[j]:l(q.shift(),j);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();x=M(g,x)}else{if(!m&&q.length>1&&j.nodeType===9&&!R&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){t=l.find(q.shift(),j,R);j=t.expr?l.filter(t.expr,t.set)[0]:t.set[0]}if(j){t=m?{expr:q.pop(),set:D(m)}:l.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&j.parentNode?j.parentNode:j,R);x=t.expr?l.filter(t.expr, +t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h= +k;g.sort(w);if(h)for(var j=1;j0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p":function(g,j){var o=typeof j==="string",m,p=0,q=g.length;if(o&&!/\W/.test(j))for(j=j.toLowerCase();p=0))o||m.push(t);else if(o)j[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var j=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=j[1]+(j[2]||1)-0;g[3]=j[3]-0}g[0]=e++;return g},ATTR:function(g,j,o, +m,p,q){j=g[1].replace(/\\/g,"");if(!q&&n.attrMap[j])g[1]=n.attrMap[j];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,j,o,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=l(g[3],null,null,j);else{g=l.filter(g[3],j,o,true^p);o||m.push.apply(m,g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled=== +true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,j,o){return!!l(o[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"=== +g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,j){return j===0},last:function(g,j,o,m){return j===m.length-1},even:function(g,j){return j%2===0},odd:function(g,j){return j%2===1},lt:function(g,j,o){return jo[3]-0},nth:function(g,j,o){return o[3]- +0===j},eq:function(g,j,o){return o[3]-0===j}},filter:{PSEUDO:function(g,j,o,m){var p=j[1],q=n.filters[p];if(q)return q(g,o,j,m);else if(p==="contains")return(g.textContent||g.innerText||l.getText([g])||"").indexOf(j[3])>=0;else if(p==="not"){j=j[3];o=0;for(m=j.length;o=0}},ID:function(g,j){return g.nodeType===1&&g.getAttribute("id")===j},TAG:function(g,j){return j==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== +j},CLASS:function(g,j){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(j)>-1},ATTR:function(g,j){var o=j[1];o=n.attrHandle[o]?n.attrHandle[o](g):g[o]!=null?g[o]:g.getAttribute(o);var m=o+"",p=j[2],q=j[4];return o==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&o!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,j,o,m){var p=n.setFilters[j[2]]; +if(p)return p(g,o,j,m)}}},s=n.match.POS,v=function(g,j){return"\\"+(j-0+1)},B;for(B in n.match){n.match[B]=RegExp(n.match[B].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[B]=RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[B].source.replace(/\\(\d+)/g,v))}var D=function(g,j){g=Array.prototype.slice.call(g,0);if(j){j.push.apply(j,g);return j}return g};try{Array.prototype.slice.call(u.documentElement.childNodes,0)}catch(H){D=function(g,j){var o=j||[],m=0;if(f.call(g)==="[object Array]")Array.prototype.push.apply(o, +g);else if(typeof g.length==="number")for(var p=g.length;m";var o=u.documentElement;o.insertBefore(g,o.firstChild);if(u.getElementById(j)){n.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:A:[]};n.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}o.removeChild(g); +o=g=null})();(function(){var g=u.createElement("div");g.appendChild(u.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(j,o){var m=o.getElementsByTagName(j[1]);if(j[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(j){return j.getAttribute("href",2)};g=null})();u.querySelectorAll&& +function(){var g=l,j=u.createElement("div");j.innerHTML="

";if(!(j.querySelectorAll&&j.querySelectorAll(".TEST").length===0)){l=function(m,p,q,t){p=p||u;if(!t&&!l.isXML(p))if(p.nodeType===9)try{return D(p.querySelectorAll(m),q)}catch(x){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var C=p.id,P=p.id="__sizzle__";try{return D(p.querySelectorAll("#"+P+" "+m),q)}catch(N){}finally{if(C)p.id=C;else p.removeAttribute("id")}}return g(m,p,q,t)};for(var o in g)l[o]=g[o]; +j=null}}();(function(){var g=u.documentElement,j=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,o=false;try{j.call(u.documentElement,":sizzle")}catch(m){o=true}if(j)l.matchesSelector=function(p,q){try{if(o||!n.match.PSEUDO.test(q))return j.call(p,q)}catch(t){}return l(q,null,null,[p]).length>0}})();(function(){var g=u.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length=== +0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(j,o,m){if(typeof o.getElementsByClassName!=="undefined"&&!m)return o.getElementsByClassName(j[1])};g=null}}})();l.contains=u.documentElement.contains?function(g,j){return g!==j&&(g.contains?g.contains(j):true)}:function(g,j){return!!(g.compareDocumentPosition(j)&16)};l.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var M=function(g, +j){for(var o=[],m="",p,q=j.nodeType?[j]:j;p=n.match.PSEUDO.exec(g);){m+=p[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;p=0;for(var t=q.length;p0)for(var h=d;h0},closest:function(a, +b){var d=[],e,f,h=this[0];if(c.isArray(a)){var k={},l,n=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:n})}h=h.parentNode;n++}}return d}k=$a.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h|| +!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}}); +c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling", +d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Wa.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||Ya.test(e))&&Xa.test(a))f=f.reverse();return this.pushStack(f,a,Za.call(arguments).join(","))}}); +c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===A||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var xa=/ jQuery\d+="(?:\d+|null)"/g, +$=/^\s+/,ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,za=/<([\w:]+)/,ab=/\s]+\/)>/g,O={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"], +area:[1,"",""],_default:[0,"",""]};O.optgroup=O.option;O.tbody=O.tfoot=O.colgroup=O.caption=O.thead;O.th=O.td;if(!c.support.htmlSerialize)O._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==A)return this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this, +d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})}, +unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a= +c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*")); +c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(xa,"").replace(cb,'="$1">').replace($, +"")],e)[0]}else return this.cloneNode(true)});if(a===true){la(this,b);la(this.find("*"),b.find("*"))}return b},html:function(a){if(a===A)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(xa,""):null;else if(typeof a==="string"&&!Aa.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!O[(za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ya,"<$1>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?l.cloneNode(true):l)}k.length&&c.each(k,Ka)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:u;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===u&&!Aa.test(a[0])&&(c.support.checkClone|| +!Ba.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h= +d.length;f0?this.clone(true):this).get();c(d[f])[b](k);e=e.concat(k)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||u;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||u;for(var f=[],h=0,k;(k=a[h])!=null;h++){if(typeof k==="number")k+="";if(k){if(typeof k==="string"&&!bb.test(k))k=b.createTextNode(k);else if(typeof k==="string"){k=k.replace(ya,"<$1>");var l=(za.exec(k)||["",""])[1].toLowerCase(),n=O[l]||O._default, +s=n[0],v=b.createElement("div");for(v.innerHTML=n[1]+k+n[2];s--;)v=v.lastChild;if(!c.support.tbody){s=ab.test(k);l=l==="table"&&!s?v.firstChild&&v.firstChild.childNodes:n[1]===""&&!s?v.childNodes:[];for(n=l.length-1;n>=0;--n)c.nodeName(l[n],"tbody")&&!l[n].childNodes.length&&l[n].parentNode.removeChild(l[n])}!c.support.leadingWhitespace&&$.test(k)&&v.insertBefore(b.createTextNode($.exec(k)[0]),v.firstChild);k=v.childNodes}if(k.nodeType)f.push(k);else f=c.merge(f,k)}}if(d)for(h=0;f[h];h++)if(e&& +c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,k=0,l;(l=a[k])!=null;k++)if(!(l.nodeName&&c.noData[l.nodeName.toLowerCase()]))if(d=l[c.expando]){if((b=e[d])&&b.events)for(var n in b.events)f[n]? +c.event.remove(l,n):c.removeEvent(l,n,b.handle);if(h)delete l[c.expando];else l.removeAttribute&&l.removeAttribute(c.expando);delete e[d]}}});var Ca=/alpha\([^)]*\)/i,db=/opacity=([^)]*)/,eb=/-([a-z])/ig,fb=/([A-Z])/g,Da=/^-?\d+(?:px)?$/i,gb=/^-?\d/,hb={position:"absolute",visibility:"hidden",display:"block"},La=["Left","Right"],Ma=["Top","Bottom"],W,ib=u.defaultView&&u.defaultView.getComputedStyle,jb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===A)return this; +return c.access(this,a,b,true,function(d,e,f){return f!==A?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),k=a.style,l=c.cssHooks[h];b=c.cssProps[h]|| +h;if(d!==A){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!l||!("set"in l)||(d=l.set(a,d))!==A)try{k[b]=d}catch(n){}}}else{if(l&&"get"in l&&(f=l.get(a,false,e))!==A)return f;return k[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==A)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]= +e[f]},camelCase:function(a){return a.replace(eb,jb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=ma(d,b,f);else c.swap(d,hb,function(){h=ma(d,b,f)});return h+"px"}},set:function(d,e){if(Da.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return db.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"": +b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=d.filter||"";d.filter=Ca.test(f)?f.replace(Ca,e):d.filter+" "+e}};if(ib)W=function(a,b,d){var e;d=d.replace(fb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return A;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};else if(u.documentElement.currentStyle)W=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b], +h=a.style;if(!Da.test(f)&&gb.test(f)){d=h.left;e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f};if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var kb=c.now(),lb=/)<[^<]*)*<\/script>/gi, +mb=/^(?:select|textarea)/i,nb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ob=/^(?:GET|HEAD|DELETE)$/,Na=/\[\]$/,T=/\=\?(&|$)/,ia=/\?/,pb=/([?&])_=[^&]*/,qb=/^(\w+:)?\/\/([^\/?#]+)/,rb=/%20/g,sb=/#.*$/,Ea=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ea)return Ea.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d= +b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(k,l){if(l==="success"||l==="notmodified")h.html(f?c("
").append(k.responseText.replace(lb,"")).find(f):k.responseText);d&&h.each(d,[k.responseText,l,k])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&& +!this.disabled&&(this.checked||mb.test(this.nodeName)||nb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, +getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", +script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),k=ob.test(h);b.url=b.url.replace(sb,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ia.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| +!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+kb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var l=E[d];E[d]=function(m){f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);if(c.isFunction(l))l(m);else{E[d]=A;try{delete E[d]}catch(p){}}v&&v.removeChild(B)}}if(b.dataType==="script"&&b.cache===null)b.cache= +false;if(b.cache===false&&h==="GET"){var n=c.now(),s=b.url.replace(pb,"$1_="+n);b.url=s+(s===b.url?(ia.test(b.url)?"&":"?")+"_="+n:"")}if(b.data&&h==="GET")b.url+=(ia.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");n=(n=qb.exec(b.url))&&(n[1]&&n[1]!==location.protocol||n[2]!==location.host);if(b.dataType==="script"&&h==="GET"&&n){var v=u.getElementsByTagName("head")[0]||u.documentElement,B=u.createElement("script");if(b.scriptCharset)B.charset=b.scriptCharset;B.src= +b.url;if(!d){var D=false;B.onload=B.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);B.onload=B.onreadystatechange=null;v&&B.parentNode&&v.removeChild(B)}}}v.insertBefore(B,v.firstChild);return A}var H=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!k||a&&a.contentType)w.setRequestHeader("Content-Type", +b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}n||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(G){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& +c.triggerGlobal(b,"ajaxSend",[w,b]);var M=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){H||c.handleComplete(b,w,e,f);H=true;if(w)w.onreadystatechange=c.noop}else if(!H&&w&&(w.readyState===4||m==="timeout")){H=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| +c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&g.call&&g.call(w);M("abort")}}catch(j){}b.async&&b.timeout>0&&setTimeout(function(){w&&!H&&M("timeout")},b.timeout);try{w.send(k||b.data==null?null:b.data)}catch(o){c.handleError(b,w,null,o);c.handleComplete(b,w,e,f)}b.async||M();return w}},param:function(a,b){var d=[],e=function(h,k){k=c.isFunction(k)?k():k;d[d.length]=encodeURIComponent(h)+ +"="+encodeURIComponent(k)};if(b===A)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)ca(f,a[f],b,e);return d.join("&").replace(rb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",[b,a])},handleComplete:function(a, +b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),e=a.getResponseHeader("Etag"); +if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});if(E.ActiveXObject)c.ajaxSettings.xhr= +function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var da={},tb=/^(?:toggle|show|hide)$/,ub=/^([+\-]=)?([\d+.\-]+)(.*)$/,aa,na=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",3),a,b,d);else{a= +0;for(b=this.length;a=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, +d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* +Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(h){return f.step(h)} +this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var f=this;a=c.fx;e.elem=this.elem;if(e()&&c.timers.push(e)&&!aa)aa=setInterval(a.tick,a.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true; +this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(l,n){f.style["overflow"+n]=h.overflow[l]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| +this.options.show)for(var k in this.options.curAnim)c.style(this.elem,k,this.options.orig[k]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a= +c.timers,b=0;b-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a, +e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.test(a.nodeName)&& +c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==A)return this.each(function(){if(h=ea(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=ea(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase(); +c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(h){var k=c(this);k[d](e.call(this,h,k[d]()))});return c.isWindow(f)?f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b]:f.nodeType===9?Math.max(f.documentElement["client"+ +b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]):e===A?parseFloat(c.css(f,d)):this.css(d,typeof e==="string"?e:e+"px")}})})(window); diff --git a/NzbDrone.Web/Scripts/2010.3.1110/jquery.validate.min.js b/NzbDrone.Web/Scripts/2010.3.1110/jquery.validate.min.js new file mode 100644 index 000000000..6264866fc --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/jquery.validate.min.js @@ -0,0 +1,16 @@ +/* + * jQuery validation plug-in 1.7 + * + * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ + * http://docs.jquery.com/Plugins/Validation + * + * Copyright (c) 2006 - 2008 Jörn Zaefferer + * + * $Id: jquery.validate.js 6403 2009-06-17 14:27:16Z joern.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($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}var validator=$.data(this[0],'validator');if(validator){return validator;}validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true;});if(validator.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){validator.submitButton=this;});}this.submit(function(event){if(validator.settings.debug)event.preventDefault();function handle(){if(validator.settings.submitHandler){if(validator.submitButton){var hidden=$("").attr("name",validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);}validator.settings.submitHandler.call(validator,validator.currentForm);if(validator.submitButton){hidden.remove();}return false;}return true;}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}return handle();}else{validator.focusInvalid();return false;}});}return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid&=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages)settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(""+a.value);},filled:function(a){return!!$.trim(""+a.value);},unchecked:function(a){return!a.checked;}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init();};$.validator.format=function(source,params){if(arguments.length==1)return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};if(arguments.length>2&¶ms.constructor!=Array){params=$.makeArray(arguments).slice(1);}if(params.constructor!=Array){params=[params];}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)this.element(element);else if(element.parentNode.name in this.submitted)this.element(element.parentNode);},highlight:function(element,errorClass,validClass){$(element).addClass(errorClass).removeClass(validClass);},unhighlight:function(element,errorClass,validClass){$(element).removeClass(errorClass).addClass(validClass);}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},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:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,"");validator.settings[eventType]&&validator.settings[eventType].call(validator,this[0]);}$(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",delegate).validateDelegate(":radio, :checkbox, select, option","click",delegate);if(this.settings.invalidHandler)$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid())$(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if($.fn.resetForm)$(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass);},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj)count++;return count;},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{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin");}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0];}var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue;}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id ++", check the '"+rule.method+"' method",e);throw e;}}if(dependencyMismatch)return;if(this.objectLength(rules))this.successList.push(element);return true;},customMetaMessage:function(element,method){if(!$.metadata)return;var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;iWarning: No message defined for "+element.name+"");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message=="function"){message=message.call(this,rule.parameters,element);}else if(theregex.test(message)){message=jQuery.format(message.replace(theregex,'{$1}'),rule.parameters);}this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);this.showLabel(error.element,error.message);}if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],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 $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}if(!this.labelContainer.append(label).length)this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element);}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}this.toShow=this.toShow.add(label);},errorsFor:function(element){var name=this.idOrName(element);return this.errors().filter(function(){return $(this).attr('for')==name;});},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return/radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element))return this.findByName(element.name).filter(':checked').length;}return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false;}else if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false;}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"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(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=$(element).attr('class');classes&&$.each(classes.split(' '),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}return rules;},metadataRules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}if(rules.messages){delete rules.messages;}return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!=undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))return"dependency-mismatch";switch(element.nodeName.toLowerCase()){case'select':var val=$(element).val();return val&&val.length>0;case'input':if(this.checkable(element))return this.getLength(value,element)>0;default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element))return"dependency-mismatch";var previous=this.previousValue(element);if(!this.settings.messages[element.name])this.settings.messages[element.name]={};previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){validator.settings.messages[element.name].remote=previous.originalMessage;var valid=response===true;if(valid){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}else{var errors={};var message=(previous.message=response||validator.defaultMessage(element,"remote"));errors[element.name]=$.isFunction(message)?message(value):message;validator.showErrors(errors);}previous.valid=valid;validator.stopRequest(element,valid);}},param));return"pending";}else if(this.pending[element.name]){return"pending";}return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param;},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([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(value);},url:function(value,element){return this.optional(element)||/^(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(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))return"dependency-mismatch";if(/[^0-9-]+/.test(value))return false;var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(var n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)nDigit-=9;}nCheck+=nDigit;bEven=!bEven;}return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param.replace(/,/g,'|'):"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){var target=$(param).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid();});return value==target.val();}}});$.format=$.validator.format;})(jQuery);;(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}return(pendingRequests[port]=ajax.apply(this,arguments));}return ajax.apply(this,arguments);};})(jQuery);;(function($){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){this.addEventListener(original,handler,true);},teardown:function(){this.removeEventListener(original,handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};function handler(e){e=$.event.fix(e);e.type=fix;return $.event.handle.call(this,e);}});};$.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});}});})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.autocomplete.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.autocomplete.min.js new file mode 100644 index 000000000..3813d778d --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.autocomplete.min.js @@ -0,0 +1 @@ +(function(a){var b=a.telerik;b.autocomplete=function(c,d){a.extend(this,d);var e=a(c).attr("autocomplete","off");this.$text=e;this.element=c;this.$element=e;this.trigger=new b.list.trigger(this);this.trigger.change=function(){var j=this.component.text();var i=this.component.previousValue;if(i==undefined||j!=i){b.trigger(this.component.element,"valueChange",{value:j})}this.component.previousValue=j};this.loader=new b.list.loader(this);this.loader.showBusy=function(){this.busyTimeout=setTimeout(a.proxy(function(){this.component.$element.addClass("t-loading")},this),100)};this.loader.hideBusy=function(){clearTimeout(this.busyTimeout);this.component.$element.removeClass("t-loading")};this.filtering=new b.list.filtering(this);this.filtering.autoFill=function(r,n){if(r.autoFill&&(r.lastKeyCode!=8&&r.lastKeyCode!=46)){var u=r.$text[0];var i=u.value;var s=r.separator;var o=b.caretPos(u);var k=s?b.lastIndexOf(i.substring(0,o),s):-1;var p=k!=-1?k+s.length:0;var l=i.substring(p,o);var t=n.toLowerCase().indexOf(l.toLowerCase());if(t!=-1){var q=n.substring(t+l.length);var j=f(u,s);var m=i.split(s);m[j]=l+q;u.value=m.join(s)+(r.multiple&&j!=0&&j==m.length-1?s:"");b.list.selection(u,o,o+q.length)}}};this.enable=function(){e.removeClass("t-state-disabled").removeAttr("disabled")};this.disable=function(){e.addClass("t-state-disabled").attr("disabled","disabled")};this.filtering.multiple=a.proxy(function(i){if(this.multiple){i=i.split(this.separator);i=i[f(this.$text[0],this.separator)]}return i},this);this.dropDown=new b.dropDown({attr:this.dropDownAttr,effects:this.effects,onClick:a.proxy(function(i){this.select(i.item);this.trigger.change();this.trigger.close()},this)});this.dropDown.$element.css("direction",e.closest(".t-rtl").length?"rtl":"");this.fill=function(j){function i(r){var q=r.highlightFirst?n.$items.first():null;if(q){q.addClass("t-state-selected")}}var o=this.loader;var n=this.dropDown;var k=this.minChars;var m=this.text();var p=m.length;if(!n.$items&&!o.ajaxError){if(o.isAjax()&&p>=k){var l={};l[this.queryString.text]=m;o.ajaxRequest(function(q){this.data=q;this.dataBind(q,true);i(this);b.trigger(this.element,"dataBound");this.trigger.change();if(j){j()}},{data:l})}else{this.dataBind(this.data,true);i(this);if(j){j()}}}};this.text=function(){return this.$text.val.apply(this.$text,arguments)};this.value=function(){return this.text.apply(this,arguments)};this.select=function(q){var p=this.highlight(q);if(p==-1){return p}var j=this.filteredDataIndexes;var l=(j&&j.length)>0?j[p]:p;var q=this.data[l];var n=q.Text?q.Text:q;var i=n;if(this.multiple){var k=this.$element;var o=this.separator;var m=f(k[0],o);i=k.val().split(o);i[m]=n;i=i.join(o)+(m==i.length-1?o:"")}this.text(i)};b.list.common.call(this);b.list.filters.call(this);b.list.initialize.call(this);this.dataBind=function(i,j){i=i||[];this.data=i;this.dropDown.dataBind(this.data);if(!j){this.text("")}};e.bind({focus:a.proxy(function(i){i.stopPropagation()},this),keydown:a.proxy(h,this),keypress:a.proxy(function(j){var i=j.keyCode||j.charCode;if(i==0||a.inArray(i,b.list.keycodes)!=-1){return true}g(this)},this)});a(document.documentElement).bind("mousedown",a.proxy(function(k){var j=this.dropDown.$element.parent();var i=j.length;if((!i&&c!==k.target)||(i&&!a.contains(c,k.target)&&!a.contains(j[0],k.target))){this.trigger.change();this.trigger.close()}},this));function f(i,j){return i.value.substring(0,b.caretPos(i)).split(j).length-1}function g(i){clearTimeout(i.timeout);i.timeout=setTimeout(function(){i.filtering.filter(i)},i.delay)}function h(r){var m=this.trigger;var j=this.dropDown;var n=r.keyCode||r.which;this.lastKeyCode=n;if(!r.shiftKey&&n>36&&n<41&&n!=37&&n!=39){r.preventDefault();if(j.isOpened()){if(!j.$items){this.fill()}var k=j.$items;var o=k.filter(".t-state-selected:first");var i=[];if(n==38){var s=o.prev();i=s.length?s:k.last()}else{if(n==40){var p=o.next();i=p.length?p:k.first()}}if(i.length){var t=i[0];this.highlight(t);j.scrollTo(t);this.filtering.autoFill(this,i.text())}}}if(n==8||n==46){var l=this.$element;if(l.val()!=""){g(this)}setTimeout(a.proxy(function(){if(l.val()==""){m.close()}},this),0)}if(n==13){if(j.isOpened()){r.preventDefault()}if(j.$items){var q=j.$items.filter(".t-state-selected:first");if(q.length>0){this.select(q[0])}}m.change();m.close();b.list.moveToEnd(this.element)}if(n==27||n==9){m.change();m.close()}}};a.fn.tAutoComplete=function(c){return b.create(this,{name:"tAutoComplete",init:function(d,e){return new b.autocomplete(d,e)},options:c})};a.fn.tAutoComplete.defaults={effects:b.fx.slide.defaults(),filter:1,delay:200,minChars:1,cache:true,autoFill:false,highlightFirst:false,queryString:{text:"text"},multiple:false,separator:", "}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.calendar.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.calendar.min.js new file mode 100644 index 000000000..78dcb44ac --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.calendar.min.js @@ -0,0 +1 @@ +(function(a){var b=a.telerik;a.extend(b,{calendar:function(d,e){this.element=d;a.extend(this,e);this.currentView=b.calendar.views[0];var c=new b.datetime();this.viewedMonth=b.datetime.firstDayOfMonth(this.selectedDate||(b.calendar.isInRange(c,this.minDate,this.maxDate)?c:this.minDate));var f=new b.stringBuilder().cat('').cat('').cat(b.calendar.views[0].title(this.viewedMonth)).cat("").cat('=0).cat('">');a(".t-header",this.element).html(f.string());a(".t-nav-next:not(.t-state-disabled)",d).live("click",a.proxy(this.navigateToFuture,this));a(".t-nav-prev:not(.t-state-disabled)",d).live("click",a.proxy(this.navigateToPast,this));a(".t-nav-fast:not(.t-state-disabled)",d).live("click",a.proxy(this.navigateUp,this));a(".t-link.t-state-disabled",d).live("click",b.preventDefault);a("td:not(.t-state-disabled):has(.t-link)",d).live("mouseenter",b.hover).live("mouseleave",b.leave).live("click",a.proxy(this.navigateDown,this));b.bind(this,{change:this.onChange,load:this.onLoad})}});b.calendar.prototype={stopAnimation:false,updateSelection:function(){var g=new b.datetime();var e=b.datetime.firstDayOfMonth(this.viewedMonth);var d=new b.datetime(e.value).date(32).date(0);if(this.selectedDate===null||!b.calendar.isInRange(this.selectedDate,e,d)){var f=b.datetime.firstDayOfMonth(this.selectedDate||(b.calendar.isInRange(g,this.minDate,this.maxDate)?g:this.minDate));this.goToView(0,f)}var h=this;var c=a(".t-content td:not(.t-other-month)",this.element).removeClass("t-state-selected");if(this.selectedDate!==null){c.filter(function(){return(parseInt(a(this).text(),10)==h.selectedDate.date())}).addClass("t-state-selected")}},value:function(){if(arguments.length==0){return this.selectedDate===null?null:this.selectedDate.toDate()}if(arguments.length==1){this.selectedDate=arguments[0]===null?null:arguments[0].value?arguments[0]:new b.datetime(arguments[0])}else{if(arguments.length>1){this.selectedDate=new b.datetime(arguments[0],arguments[1],arguments[2])}}this.updateSelection();return this},overlay:function(c){if(!c){return a(".t-overlay",this.element).remove()}a("
").addClass("t-overlay").css({opacity:0,width:this.element.offsetWidth,height:this.element.offsetHeight,position:"absolute",top:0,left:0,zIndex:3,backgroundColor:"#fff"}).appendTo(this.element)},goToView:function(c,d){if(c<0||b.calendar.views.length<=c){return}if(typeof d!="undefined"){this.viewedMonth=b.datetime.firstDayOfMonth(d)}this.currentView=b.calendar.views[c];a(".t-nav-prev",this.element).toggleClass("t-state-disabled",this.currentView.compare(d,this.minDate,false)<=0);a(".t-nav-next",this.element).toggleClass("t-state-disabled",this.currentView.compare(d,this.maxDate,true)>=0);a(".t-nav-fast",this.element).html(this.currentView.title(this.viewedMonth)).toggleClass("t-state-disabled",c==b.calendar.views.length-1);a(".t-content",this.element).html(this.currentView.body(this.viewedMonth,this.minDate,this.maxDate,this.selectedDate,this.urlFormat,this.dates)).toggleClass("t-meta-view",c==1||c==2);return this},navigateVertically:function(d,f,g,o){this.viewedMonth=b.datetime.firstDayOfMonth(f);this.currentView=b.calendar.views[d];this.overlay(true);var n=a(".t-content",this.element);var e=n.outerWidth();var l=n.outerHeight();var h=n.css("font-size");var p=n.css("line-height");if(p==="normal"){p=parseInt(h)*1.5}n.find("td").removeClass("t-state-hover");a(".t-nav-fast",this.element).html(this.currentView.title(f)).toggleClass("t-state-disabled",d==b.calendar.views.length-1);a(".t-nav-prev",this.element).toggleClass("t-state-disabled",this.currentView.compare(this.viewedMonth,this.minDate,false)<=0);a(".t-nav-next",this.element).toggleClass("t-state-disabled",this.currentView.compare(this.viewedMonth,this.maxDate,true)>=0);var q=a('
').html(this.currentView.body(f,this.minDate,this.maxDate,this.selectedDate,this.urlFormat,this.dates)).toggleClass("t-meta-view",d==1||d==2);var c=this;var k={fontSize:h,lineHeight:p,top:0,left:0,width:e,height:l,opacity:1};var j;if(g){j=b.fx._wrap(n).css({overflow:"hidden",position:"relative"});q.wrap(a("
").addClass("t-animation-container").css(a.extend({position:"absolute",zIndex:1,fontSize:1,lineHeight:1,width:o.outerWidth(),height:o.outerHeight(),opacity:0},o.position()))).parent().insertAfter(n);if(!this.stopAnimation){q.parent().animate({fontSize:h,lineHeight:p,top:0,left:0,width:e,height:l,opacity:1},"normal",function(){q.appendTo(c.element);j.remove();c.overlay(false)})}else{n.remove();q.appendTo(c.element);j.remove();c.overlay(false)}}else{q.insertBefore(n);j=b.fx._wrap(q).css({overflow:"hidden",position:"relative"});var i;if(d!=0){i=b.calendar.views[d].verticalDate(this.viewedMonth)}var m={top:(Math.floor(i/4)*l)/3,left:((i%4)*e)/4};n.wrap(a("
").addClass("t-animation-container").css(a.extend({position:"absolute"},k))).parent().insertAfter(q);if(!this.stopAnimation){n.parent().animate(a.extend({fontSize:1,lineHeight:1,width:48,height:54,opacity:0},m),"normal",function(){q.appendTo(c.element);j.remove();c.overlay(false)})}else{n.remove();q.appendTo(c.element);j.remove();c.overlay(false)}}b.trigger(this.element,"navigate",{direction:g})},navigateHorizontally:function(c,e,g){this.viewedMonth=b.datetime.firstDayOfMonth(b.calendar.fitDateToRange(e,this.minDate,this.maxDate));this.currentView=b.calendar.views[c];a(".t-nav-fast",this.element).html(this.currentView.title(e)).toggleClass("t-state-disabled",c==b.calendar.views.length-1);a(".t-nav-prev",this.element).toggleClass("t-state-disabled",this.currentView.compare(this.viewedMonth,this.minDate,false)<=0);a(".t-nav-next",this.element).toggleClass("t-state-disabled",this.currentView.compare(this.viewedMonth,this.maxDate,true)>=0);this.overlay(true);var f=a('
').html(this.currentView.body(e,this.minDate,this.maxDate,this.selectedDate,this.urlFormat,this.dates)).toggleClass("t-meta-view",c==1||c==2);var d=a(".t-content",this.element);var j=d.outerWidth();d.add(f).css({width:j,"float":"left"});var i=b.fx._wrap(d).css({position:"relative",width:j*2,"float":"left",left:(g?0:-200)});f[g?"insertAfter":"insertBefore"](d);var h=this;if(!this.stopAnimation){i.animate({left:(g?-200:0)},"normal",function(){f.appendTo(h.element);i.remove();h.overlay(false)})}else{d.remove();f.appendTo(h.element);i.remove();h.overlay(false)}b.trigger(this.element,"navigate",{direction:g})},navigateUp:function(d){if(d){d.preventDefault()}var c=this.currentView.index;this.navigateVertically(c+1,this.viewedMonth,false)},navigateDown:function(l,j,c){var f=a(a(l.target).hasClass("t-input")?j:l.target);var m=f.text();var k=c||this.currentView.index;var d=f.attr("href");if(d&&(d.charAt(d.length-1)=="#")){l.preventDefault()}if(k==0){var i=parseInt(m,10);var h=this.viewedMonth.month();if(f.parent().hasClass("t-other-month")){h+=(i<15?1:-1)}var g=new b.datetime(this.viewedMonth.year(),h,i);if(!this.selectedDate||(this.selectedDate.value>g.value||g.value>this.selectedDate.value)){if(b.trigger(this.element,"change",{previousDate:this.selectedDate===null?null:this.selectedDate.toDate(),date:g.toDate()})){return this}this.selectedDate=g}this.updateSelection()}else{if(k!=0){b.calendar.views[k].verticalDate(this.viewedMonth,m)}this.viewedMonth=b.calendar.fitDateToRange(this.viewedMonth,this.minDate,this.maxDate);this.navigateVertically(k-1,this.viewedMonth,true,f.add(f.parent()).filter("td"))}},navigateToPast:function(d){if(d){d.preventDefault()}var c=this.currentView.index;if(c==0){this.viewedMonth.date(1).date(-1)}else{this.viewedMonth.addYear(-Math.pow(10,c-1))}this.navigateHorizontally(c,this.viewedMonth,false)},navigateToFuture:function(d){if(d){d.preventDefault()}var c=this.currentView.index;if(c==0){this.viewedMonth.date(32).date(1)}else{this.viewedMonth.addYear(Math.pow(10,c-1))}this.navigateHorizontally(c,this.viewedMonth,true)}};a.fn.tCalendar=function(c){return b.create(this,{name:"tCalendar",init:function(d,e){return new b.calendar(d,e)},options:c})};a.fn.tCalendar.defaults={selectedDate:null,minDate:new b.datetime(1899,11,31),maxDate:new b.datetime(2100,0,1)};a.extend(b.calendar,{views:[{index:0,title:function(c){return new b.stringBuilder().cat(b.cultureInfo.months[c.month()]).cat(" ").cat(c.year()).string()},body:function(e,m,j,h,g,l){var r=(new b.stringBuilder()).cat('');for(var f=0;f<7;f++){r.cat('').cat(b.cultureInfo.days[f].charAt(0)).cat("")}r.cat("");var n=b.datetime.firstVisibleDay(e);var c=e.month();var p=h===null?false:e.year()==h.year();var q;for(var o=0;o<6;o++){r.cat("");for(var d=0;d<7;d++){q=n.month()!=c?"t-other-month":(p&&n.month()==h.month()&&n.date()==h.date())?" t-state-selected":"";r.cat("");if(b.calendar.isInRange(n,m,j)){r.cat('').cat(n.date()).cat("")}else{r.cat(" ")}r.cat("");b.datetime.modify(n,b.datetime.msPerDay)}r.cat("")}r.cat("");return r.string()},compare:function(d,c){var f;var i=d.month();var e=d.year();var h=c.month();var g=c.year();if(e>g){f=1}else{if(eh?1:-1}}return f},firstLastDay:function(e,c,d){return c?b.datetime.firstDayOfMonth(e):new b.datetime(e.year(),e.month()+1,0)},navCheck:function(d,c,e){return e?new b.datetime(c.year(),c.month()+1,c.date()).value-d.value<=0:d.value=j&&g<=h){f.push(b.cultureInfo.abbrMonths[g])}else{f.push(" ")}}return f})},compare:function(c,d){return c.year()>d.year()?1:c.year()=f&&h+k<=j?h+k:" ")}return g})},compare:function(d,c,f){var g=d.year();var e=(g-g%10);var h=(g-g%10+9);return b.calendar.check(e,h,c,f)},verticalDate:function(c,d){if(!d){return c.year()%10+1}c.year(d)},firstLastDay:function(c,d){return new b.datetime(c.year()-c.year()%10+(d?0:9),0,1)},navCheck:function(e,c,f){var d=this.compare(c,e,f);return f?d==-1:d==1}},{index:3,title:function(d){var c=d.year()-d.year()%100;return c+"-"+(c+99)},body:function(d,c,e){return b.calendar.metaView(false,d,function(){var h=d.year()-d.year()%100;var f=[];for(var j=-1;j<11;j++){var g=h+j*10;if((g+10)>=c.year()&&g<=e.year()){f.push(g+"-
"+(g+9)+" ")}else{f.push(" 
 ")}}return f})},compare:function(d,c,e){var f=d.year();var h=(f-f%100);var g=(f-f%100+99);return b.calendar.check(h,g,c,e)},verticalDate:function(c,d){if(!d){return Math.ceil(c.year()/10)%10+1}c.year(d.substring(0,d.indexOf("-")))},firstLastDay:function(c,d){return d?new b.datetime(c.year()-(c.year()%100),0,1):new b.datetime(c.year()-(c.year()%100)+99,0,1)},navCheck:function(e,c,f){var d=this.compare(c,e,f);return f?d==-1:d==1}}],check:function(f,g,c,d){var e=function(h){return hc.year()?1:0};return d?e(g):e(f)},html:function(f,d,c,g,h,e){f=f||new b.datetime();c=c||a.fn.tCalendar.defaults.minDate;g=g||a.fn.tCalendar.defaults.maxDate;return new b.stringBuilder().cat('
').cat('").cat('').cat(b.calendar.views[0].body(f,c,g,d,h,e)).cat("
").string()},metaView:function(g,j,d){var e=new b.stringBuilder();var h=d();e.cat("");for(var c=0,f=h.length;c",c>0&&c%4==0).cat("");if(h[c]!==" "&&h[c]!==" 
 "){e.cat('').cat(h[c]).cat("")}else{e.cat(h[c])}e.cat("")}e.cat("");return e.string()},isInRange:function(e,c,d){if(!e){return false}return c.value-e.value<=0&&d.value-e.value>=0},fitDateToRange:function(e,c,d){if(e.valued.value){e=new b.datetime(d.value)}return e},isInCollection:function(f,c){var d=c[f.year()];if(d){var e=d[f.month()];if(e&&a.inArray(f.date(),e)!=-1){return true}}return false},findTarget:function(h,k,j,f){var c=function(l,m){return a.grep(l,function(n){return a(n).children().eq(0).text().indexOf(m)>-1})[0]};var d=f?"last":"first";var i=a(".t-content:"+d+" td:has(> .t-link)",j).removeClass("t-state-focus");var e;if(k==0){e=a(c(i.filter(":not(.t-other-month)"),h.date()))}else{if(k==1){e=a(c(i,b.cultureInfo.abbrMonths[h.month()]))}else{if(k==2||k==3){var g=h.year();e=a(c(i,k==2?g:g-(g%10)));if(e.length==0&&k==3){e=a(c(i,g-(g%10)+99))}}}}return e},focusDate:function(f,c,e,d){b.calendar.findTarget(f,c,e,d).addClass("t-state-focus")},formatUrl:function(c,d){return c.replace("{0}",b.datetime.format(d.toDate(),b.cultureInfo.shortDate))}});a.extend(b.formatters,{date:b.datetime.format})})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.combobox.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.combobox.min.js new file mode 100644 index 000000000..3919d4e78 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.combobox.min.js @@ -0,0 +1 @@ +(function(a){var b=a.telerik;b.combobox=function(c,d){a.extend(this,d);var e=a(c);this.element=c;this.$element=e;this.loader=new b.list.loader(this);this.trigger=new b.list.trigger(this);this.$text=e.find("> .t-dropdown-wrap > .t-input").attr("autocomplete","off");var h=this.$input=this.$element.find("input:last");var f=e.find("> .t-dropdown-wrap > .t-select");if(!h.attr("disabled")){f.bind("click",a.proxy(k,this))}this.filtering=new b.list.filtering(this);this.filtering.autoFill=function(l,m){if(l.autoFill&&(l.lastKeyCode!=8&&l.lastKeyCode!=46)){var n=l.$text[0];var r=b.caretPos(n);var q=n.value.substring(0,r);var p=m.toLowerCase().indexOf(q.toLowerCase());if(p!=-1){var o=m.substring(p+q.length);n.value=q+o;b.list.selection(n,r,r+o.length)}}};this.dropDown=new b.dropDown({attr:this.dropDownAttr,effects:this.effects,onOpen:a.proxy(function(){var m=this.data;var l=this.dropDown;if(m.length==0){return}var o=this.$text.val();var n=this.selectedIndex;if(n!=-1&&this.isFiltered){if(o==m[n].Text){this.filteredDataIndexes=[];l.onItemCreate=null;l.dataBind(this.data);this.select(l.$items[n])}else{this.filters[this.filter](this,this.data,o)}this.isFiltered=false}},this),onClick:a.proxy(function(l){this.select(l.item);this.trigger.change();this.trigger.close()},this)});this.dropDown.$element.css("direction",e.closest(".t-rtl").length?"rtl":"");this.enable=function(){e.removeClass("t-state-disabled").find(".t-input").removeAttr("disabled");f.bind("click",a.proxy(k,this))};this.disable=function(){e.addClass("t-state-disabled").find(".t-input").attr("disabled","disabled");f.unbind("click")};this.fill=function(m){function o(u){var t=u.value();if(t){u.select(function(A){return t==(A.Value||A.Text)});return}var v=l.$items;var x=u.index;var w=v.filter(".t-state-selected");var y=w.length;var z=x!=-1&&x0?w[y-1]:null;if(z){u.select(z)}else{u.selectedIndex=-1;if(u.highlightFirst){u.highlight(v[0])}}}var p=this.loader;var l=this.dropDown;var r=this.minChars;var q=this.text();var n=q.length;if(!l.$items&&!p.ajaxError){if(p.isAjax()&&n>=r){var s={};s[this.queryString.text]=q;p.ajaxRequest(function(t){this.data=t;this.dataBind(t,true);o(this);b.trigger(this.element,"dataBound");this.trigger.change();if(m){m()}},{data:s})}else{this.dataBind(this.data,true);o(this);if(m){m()}}}};this.reload=function(){this.dropDown.$items=null;this.fill()};this.select=function(m){var l=this.highlight(m);if(l==-1){return l}var n=this.filteredDataIndexes;this.selectedIndex=(n&&n.length)>0?n[l]:l;b.list.updateTextAndValue(this,a(this.dropDown.$items[l]).text(),this.data[this.selectedIndex].Value)};this.text=function(){return this.$text.val.apply(this.$text,arguments)};this.value=function(){if(arguments.length){var m=arguments[0];var l=this.select(function(n){return m==n.Value});if(l==-1){this.$input.val(m);this.text(m)}this.previousValue=this.$input.val()}else{return this.$input.val()}};b.list.common.call(this);b.list.filters.call(this);b.list.initialize.call(this);this.$text.bind({change:a.proxy(function(l){l.stopPropagation()},this),keydown:a.proxy(i,this),keypress:a.proxy(j,this),focus:a.proxy(function(o){var m=this.trigger;var l=this.dropDown;if(!l.$items){this.fill(m.open)}else{m.open()}var n=this.$text;b.list.selection(n[0],0,n.val().length)},this)});function k(l){this.loader.ajaxError=false;if(!this.dropDown.isOpened()){this.$text[0].focus()}else{this.trigger.close()}}function g(l){clearTimeout(l.timeout);l.timeout=setTimeout(function(){l.filtering.filter(l)},l.delay)}function i(t){var o=this.trigger;var m=this.dropDown;var q=t.keyCode||t.which;this.lastKeyCode=q;if(t.altKey&&q==38){o.close();return}if(t.altKey&&q==40){o.open();return}if(!t.shiftKey&&(q==38||q==40)){t.preventDefault();if(!m.$items){this.fill()}var n=m.$items;var r=n.filter(".t-state-selected:first");var l=r.length==0||n.length==1?n.first():(q==38)?r.prev():(q==40)?r.next():[];if(l.length){var u=l[0];this.select(u);m.scrollTo(u);if(!m.isOpened()){o.change()}}}if(q==8||q==46){var p=this.$text;if(p.val()!=""){g(this)}setTimeout(a.proxy(function(){if(p.val()==""){this.selectedIndex=-1;this.$input.val("")}else{this.$input.val(this.$text.val())}},this),0)}if(q==13){if(m.isOpened()){t.preventDefault()}var s=m.$items.filter(".t-state-selected:first");if(s.length>0){this.select(s[0])}else{this.$input.val(this.$text.val())}o.change();o.close();b.list.moveToEnd(this.$text[0])}if(q==27||q==9){o.change();o.close();if(q==27){this.$text.blur()}}}function j(m){var l=m.keyCode||m.charCode;if(l==0||a.inArray(l,b.list.keycodes)!=-1){return true}setTimeout(a.proxy(function(){this.$input.val(this.$text.val())},this),0);g(this)}};a.fn.tComboBox=function(c){return b.create(this,{name:"tComboBox",init:function(d,e){return new b.combobox(d,e)},options:c})};a.fn.tComboBox.defaults={effects:b.fx.slide.defaults(),index:-1,autoFill:true,highlightFirst:true,filter:0,delay:200,minChars:0,cache:true,queryString:{text:"text"}}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.common.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.common.min.js new file mode 100644 index 000000000..c1acee48d --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.common.min.js @@ -0,0 +1 @@ +(function(d){try{if(document.execCommand){document.execCommand("BackgroundImageCache",false,true)}}catch(h){}var c=/\d/;var b=parseInt(d.browser.version.substring(0,5).replace(".",""));var f=d.browser.mozilla&&b>=180&&b<=191;var a=/d{1,4}|M{1,4}|yy(?:yy)?|([Hhmstf])\1*|"[^"]*"|'[^']*'/g;var i=d.telerik={create:function(e,j){var l=j.name;var k=d.extend({},d.fn[l].defaults,j.options);return e.each(function(){var m=d(this);k=d.meta?d.extend({},k,m.data()):k;if(!m.data(l)){var n=j.init(this,k);m.data(l,n);i.trigger(this,"load");if(j.success){j.success(n)}}})},toJson:function(e){var j=[];for(var l in e){var k=e[l];if(typeof k!="object"){j.push('"'+l+'":"'+k+'"')}else{j.push('"'+l+'":'+this.toJson(k))}}return"{"+j.join(",")+"}"},delegate:function(j,e){return function(k){e.apply(j,[k,this])}},stop:function(e,j){return function(k){k.stopPropagation();e.apply(j||this,arguments)}},stopAll:function(e,j){return function(k){k.preventDefault();k.stopPropagation();e.apply(j||this,arguments)}},bind:function(e,j){var k=d(e.element);d.each(j,function(l){if(d.isFunction(this)){k.bind(l,this)}})},preventDefault:function(j){j.preventDefault()},hover:function(){d(this).addClass("t-state-hover")},leave:function(){d(this).removeClass("t-state-hover")},buttonHover:function(){d(this).addClass("t-button-hover")},buttonLeave:function(){d(this).removeClass("t-button-hover")},stringBuilder:function(){this.buffer=[]},ajaxError:function(l,k,e,m){var j=this.trigger(l,k,{XMLHttpRequest:e,textStatus:m});if(!j){if(m=="error"&&e.status!="0"){alert("Error! The requested URL returned "+e.status+" - "+e.statusText)}if(m=="timeout"){alert("Error! Server timeout.")}}return j},trigger:function(k,j,l){l=d.extend(l||{},new d.Event(j));l.stopPropagation();d(k).trigger(l);return l.isDefaultPrevented()},getType:function(e){if(e instanceof Date){return"date"}if(!isNaN(e)){return"number"}return"object"},formatString:function(){var n=arguments[0];for(var e=0,j=arguments.length-1;e-1;l--){if(e.substr(l,k)==j){return l}}return -1},caretPos:function(e){var j=-1;if(document.selection){j=Math.abs(e.document.selection.createRange().moveStart("character",-e.value.length))}else{if(e.selectionStart!==undefined){j=e.selectionStart}}return j},formatters:{},fx:{},cultureInfo:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbrDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],abbrMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longTime:"h:mm:ss tt",longDate:"dddd, MMMM dd, yyyy",shortDate:"M/d/yyyy",shortTime:"h:mm tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",generalDateShortTime:"M/d/yyyy h:mm tt",generalDateTime:"M/d/yyyy h:mm:ss tt",sortableDateTime:"yyyy'-'MM'-'ddTHH':'mm':'ss",universalSortableDateTime:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",monthYear:"MMMM, yyyy",monthDay:"MMMM dd",today:"today",tomorrow:"tomorrow",yesterday:"yesterday",next:"next",last:"last",year:"year",month:"month",week:"week",day:"day",am:"AM",pm:"PM",dateSeparator:"/",timeSeparator:":"}};i.dropDown=function(e){d.extend(this,e);this.$element=d(new i.stringBuilder().cat("
    ').string()).addClass("t-popup t-group").hide()};i.dropDown.prototype={_html:function(m){var k=new i.stringBuilder();if(m){for(var j=0,n=m.length;j').cat(o.html).cat("")}}return k.string()},open:function(e){if(this.onOpen){this.onOpen()}if(this.isOpened()||!this.$items){return}var l=this.$element;var j=".t-reset > .t-item";l.css("overflowY","auto");l.css("width",e.outerWidth?e.outerWidth-2:0);l.delegate(j,"mouseenter",i.hover).delegate(j,"mouseleave",i.leave).delegate(j,"click",d.proxy(function(m){if(this.onClick){this.onClick(d.extend(m,{item:d(m.target).closest(".t-item")[0]}))}},this)).appendTo(document.body);var k=e.offset;k.top+=e.outerHeight;i.fx._wrap(l).css(d.extend({position:"absolute",zIndex:e.zIndex},k));if(f){l.css("overflow","hidden")}i.fx.play(this.effects,l,{direction:"bottom"},d.proxy(function(){if(f){l.css("overflow","auto")}var m=this.$items.filter(".t-state-selected");if(m.length){this.scrollTo(m[0])}},this))},close:function(){if(!this.isOpened()){return}var e=this.$element;if(f){e.css("overflow","hidden")}i.fx.rewind(this.effects,e,{direction:"bottom"},function(){if(f){e.css("overflow","auto")}e.parent().remove()})},dataBind:function(j){j=j||[];var m=this.$element;var l=m[0].style.height;var k=l&&l!="auto"?m[0].style.height:"200px";var e=this.$items=d(this._html(j));m.find("> ul").html(e);m.css("height",e.length>10?k:"auto")},highlight:function(e){return d(e).addClass("t-state-selected").siblings().removeClass("t-state-selected").end().index()},isOpened:function(){return this.$element.is(":visible")},scrollTo:function(o){if(!o){return}var e=o.offsetTop;var m=o.offsetHeight;var j=this.$element[0];var k=j.scrollTop;var n=j.clientHeight;var l=e+m;j.scrollTop=k>e?e:l>(k+n)?l-n:k}};i.datetime=function(){if(arguments.length==0){this.value=new Date()}else{if(arguments.length==1){this.value=new Date(arguments[0])}else{if(arguments.length==3){this.value=new Date(arguments[0],arguments[1],arguments[2])}else{if(arguments.length==6){this.value=new Date(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])}else{this.value=new Date(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6])}}}}return this};d.extend(i.datetime,{msPerMinute:60000,msPerDay:86400000,add:function(m,j){var k=m.timeOffset();var l=new i.datetime(m.time()+j);var e=l.timeOffset()-k;return new i.datetime(l.time()+e*i.datetime.msPerMinute)},subtract:function(l,k){k=new i.datetime(k).toDate();var e=l.time()-k;var j=l.timeOffset()-k.timeOffset();return e-(j*i.datetime.msPerMinute)},firstDayOfMonth:function(e){return new i.datetime(0).hours(e.hours()).minutes(e.minutes()).seconds(e.seconds()).milliseconds(e.milliseconds()).year(e.year(),e.month(),1)},firstVisibleDay:function(e){var j=new i.datetime(e.year(),e.month(),0,e.hours(),e.minutes(),e.seconds(),e.milliseconds());while(j.day()!=0){i.datetime.modify(j,-1*i.datetime.msPerDay)}return j},modify:function(m,e){var k=m.timeOffset();var j=new i.datetime(m.time()+e);var l=j.timeOffset()-k;m.time(j.time()+l*i.datetime.msPerMinute)},pad:function(e){if(e<10){return"0"+e}return e},standardFormat:function(e){var j=i.cultureInfo;var k={d:j.shortDate,D:j.longDate,F:j.fullDateTime,g:j.generalDateShortTime,G:j.generalDateTime,m:j.monthDay,M:j.monthDay,s:j.sortableDateTime,t:j.shortTime,T:j.longTime,u:j.universalSortableDateTime,y:j.monthYear,Y:j.monthYear};return k[e]},format:function(w,e){var q=i.cultureInfo;var u=w.getDate();var j=w.getDay();var t=w.getMonth();var k=w.getFullYear();var p=w.getHours();var o=w.getMinutes();var n=w.getSeconds();var v=w.getMilliseconds();var r=i.datetime.pad;var x={d:u,dd:r(u),ddd:q.abbrDays[j],dddd:q.days[j],M:t+1,MM:r(t+1),MMM:q.abbrMonths[t],MMMM:q.months[t],yy:r(k%100),yyyy:k,h:p%12||12,hh:r(p%12||12),H:p,HH:r(p),m:o,mm:r(o),s:n,ss:r(n),f:Math.floor(v/100),ff:Math.floor(v/10),fff:v,tt:p<12?q.am:q.pm};e=e||"G";e=i.datetime.standardFormat(e)?i.datetime.standardFormat(e):e;return e.replace(a,function(l){return l in x?x[l]:l.slice(1,l.length-1)})},parse:function(k){var e=k.value;var j=k.format;j=i.datetime.standardFormat(j)?i.datetime.standardFormat(j):j;if(c.test(e)){return i.datetime.parseMachineDate({value:e,format:j,shortYearCutOff:k.shortYearCutOff,baseDate:k.baseDate,AM:i.cultureInfo.am,PM:i.cultureInfo.pm})}return i.datetime.parseByToken?i.datetime.parseByToken(e,k.today):null},parseMachineDate:function(z){var M=z.AM;var F=z.PM;var m=z.value;var p=z.format;var e=z.baseDate;var I=z.shortYearCutOff||30;var u=-1;var C=-1;var v=-1;var l=0;var s=0;var x=0;var w=0;var K;var G;var q=false;var L=function(O){var N=0;while(t(O)){N++;y++}return N};var k=function(){var N=t("'");if(N){y++}return N};var t=function(N){return(y+10?M:"a";F=E>0?F:"p";var o=m.substr(D).toLowerCase();K=o.indexOf(M.toLowerCase())!=-1;G=o.indexOf(F.toLowerCase())!=-1;D+=G?F.length:K?M.length:0;break;case"'":H();q=true;break;default:H()}}}var B=new i.datetime();if(u!=-1&&u<100){u+=B.year()-B.year()%100+(u<=I?0:-100)}l=(G&&l<12)?l+12:l==12&&K?0:l;if(e==undefined){if(u==-1){u=B.year()}B=new i.datetime(u,C-1,v,l,s,x,w);if(B.year()!=u||B.month()!=(C-1)||B.date()!=v){return null}}else{B=e.year(u!=-1?u:e.year()).month(C!=-1?C-1:e.month()).date(v!=-1?v:e.date()).hours(l).minutes(s).seconds(x).milliseconds(w);if((u!=-1&&B.year()!=u)||(C!=-1&&B.month()!=(C-1))||(v!=-1&&B.date()!=v)||(l!=-1&&B.hours()!=l)||(s!=-1&&B.minutes()!=s)||(x!=-1&&B.seconds()!=x)||(w!=-1&&B.milliseconds()!=w)){return null}}return B}});i.datetime.prototype={year:function(){if(arguments.length==0){return this.value.getFullYear()}else{if(arguments.length==1){this.value.setFullYear(arguments[0])}else{this.value.setFullYear(arguments[0],arguments[1],arguments[2])}}return this},timeOffset:function(){return this.value.getTimezoneOffset()},day:function(){return this.value.getDay()},toDate:function(){return this.value},addMonth:function(e){this.month(this.month()+e)},addYear:function(e){this.year(this.year()+e)}};d.each(["Month","Date","Hours","Minutes","Seconds","Milliseconds","Time"],function(e,j){i.datetime.prototype[j.toLowerCase()]=function(){if(arguments.length==1){this.value["set"+j](arguments[0])}else{return this.value["get"+j]()}return this}});i.stringBuilder.prototype={cat:function(e){this.buffer.push(e);return this},rep:function(j,e){for(var k=0;k").addClass("t-animation-container").css({width:e.outerWidth(),height:e.outerHeight()}))}return e.parent()},play:function(m,n,k,e){var p=g(m,n,e);if(p===null){return}n.stop(false,true);for(var j=0,o=m.list.length;j=0;j--){var l=n.data("effect-"+j)||new i.fx[m.list[j].name](n);l.rewind(d.extend(m.list[j],{openDuration:m.openDuration,closeDuration:m.closeDuration},k),o);n.data("effect-"+j,null)}}});i.fx.toggle=function(e){this.element=e.stop(false,true)};i.fx.toggle.prototype={play:function(e,j){this.element.show();if(j){j()}},rewind:function(e,j){this.element.hide();if(j){j()}}};i.fx.toggle.defaults=function(){return{list:[{name:"toggle"}]}};i.fx.slide=function(e){this.element=e;this.animationContainer=i.fx._wrap(e)};i.fx.slide.prototype={play:function(j,n){var e=this.animationContainer;this.element.css("display","block").stop();e.css({display:"block",overflow:"hidden"});var k=this.element.outerWidth();var p=this.element.outerHeight();var o=j.direction=="bottom"?"marginTop":"marginLeft";var l=j.direction=="bottom"?-p:-k;e.css({width:k,height:p});var m={};m[o]=0;this.element.css("width",this.element.width()).each(function(){this.style.cssText=this.style.cssText}).css(o,l).animate(m,{queue:false,duration:j.openDuration,easing:"linear",complete:function(){e.css("overflow","");if(n){n()}}})},rewind:function(k,j){var l=this.animationContainer;this.element.stop();l.css({overflow:"hidden"});var e;switch(k.direction){case"bottom":e={marginTop:-this.element.outerHeight()};break;case"right":e={marginLeft:-this.element.outerWidth()};break}this.element.animate(e,{queue:false,duration:k.closeDuration,easing:"linear",complete:function(){l.css({display:"none",overflow:""});if(j){j()}}})}};i.fx.slide.defaults=function(){return{list:[{name:"slide"}],openDuration:"fast",closeDuration:"fast"}};i.fx.property=function(e){this.element=e};i.fx.property.prototype={_animate:function(m,l,j,e){var n={overflow:"hidden"},o={},k=this.element;d.each(m,function(q,r){var p;switch(r){case"height":case"width":p=k[r]();break;case"opacity":p=1;break;default:p=k.css(r);break}n[r]=j?p:0;o[r]=j?0:p});k.css(n).show().animate(o,{queue:false,duration:l,easing:"linear",complete:function(){if(j){k.hide()}d.each(o,function(p){o[p]=""});k.css(d.extend({overflow:""},o));if(e){e()}}})},play:function(j,e){this._animate(j.properties,j.openDuration,false,e)},rewind:function(j,e){this._animate(j.properties,j.closeDuration,true,e)}};i.fx.property.defaults=function(){return{list:[{name:"property",properties:arguments}],openDuration:"fast",closeDuration:"fast"}};d(document).ready(function(){if(d.browser.msie&&typeof(Sys)!="undefined"&&typeof(Sys.Mvc)!="undefined"&&typeof(Sys.Mvc.FormContext)!="undefined"){var e=function(k,j){return d.grep(k.getElementsByTagName("*"),function(l){return l.name==j})};Sys.Mvc.FormContext.$F=Sys.Mvc.FormContext._getFormElementsWithName=e}})})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.datepicker.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.datepicker.min.js new file mode 100644 index 000000000..f8bb48072 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.datepicker.min.js @@ -0,0 +1 @@ +(function(d){var b=d.telerik;var a=null;b.datetime.parseByToken=function(g,i){if(g===null||g===""){return null}i=i||new b.datetime();var e=null;var m=null;var k=null;var n=0;var f=function(o){var p=null;if(o&&g.substring(n,n+o.length).toLowerCase()==o.toLowerCase()){p=o}return p};var j=function(){var o=null;d.each(["days","abbrDays","months","abbrMonths"],function(q,p){if(o!==null){return}d.each(b.cultureInfo[p],function(s,r){if(o!==null){return}o=f(r)});k=p});return o};var h=function(){var o;var p=function(r,s){i[s?"date":"month"](i[s?"date":"month"]()+(o!=0?((o+((o>0?1:-1)*r))%r):0)+(m?(e==b.cultureInfo.next?1:-1)*r:0))};var q=d.inArray(m||e,b.cultureInfo[k]);if(k.toLowerCase().indexOf("day")>-1){o=(q==0?7:q)-i.day();p(7,true)}else{o=q-i.month();p(12,false)}};var l=function(){var p=function(q){var r;switch(m){case"year":r=q==1?1:0;break;case"month":r=q==2?1:0;break;case"week":r=q==3?7:0;break;case"day":r=q==3?1:0;break}return r};var o=(e==b.cultureInfo.next?1:-1);i.year(i.year()+p(1)*o,i.month()+p(2)*o,i.date()+p(3)*o)};d.each(["today","tomorrow","yesterday","next","last"],function(p,o){if(e!==null){return}e=f(b.cultureInfo[o])});if(e!==null){n+=e.length;if(/[^\s\d]\s+[^\s\d]/i.test(g)){n++;d.each(["year","month","week","day"],function(p,o){if(m!==null){return}m=f(b.cultureInfo[o])});k=null;if(m===null){m=j()}if(m===null){return null}}else{switch(e){case b.cultureInfo.today:break;case b.cultureInfo.tomorrow:i.date(i.date()+1);break;case b.cultureInfo.yesterday:i.date(i.date()-1);break;default:i=null;break}return i}}else{e=j();if(e!=null){h();return i}else{return null}}if(k!==null){h()}else{l()}return i};function c(h,g,f,e){if(!h){h=new b.datetime()}if(g){h=new b.datetime(g.toDate())}else{h=b.calendar.isInRange(h,f,e)?h:new b.datetime(f.value)}return h}b.dateView=function(e){d.extend(this,e);this.isValueChanged=false;this.focusedValue=c(null,this.selectedValue,this.minValue,this.maxValue);this.$calendar=this._createSharedCalendar()};b.dateView.prototype={_createSharedCalendar:function(){if(!a){a=d(b.calendar.html(this.focusedValue,this.selectedValue,this.minValue,this.maxValue)).hide().addClass("t-datepicker-calendar").bind("click",function(f){f.stopPropagation()}).appendTo(document.body).tCalendar({selectedValue:this.selectedValue,minDate:this.minValue,maxDate:this.maxValue});b.fx._wrap(a);if(d.browser.msie&&d.browser.version<=6){d('').prependTo(a).height(a.height())}}return a},_getCalendar:function(){return a.data("tCalendar")},_reassignSharedCalendar:function(){var e=this._getCalendar();if(a.data("associatedDateView")!=this){a.stop(true,true);this.focusedValue=c(this.focusedValue,this.selectedValue,this.minValue,this.maxValue);e.minDate=this.minValue;e.maxDate=this.maxValue;e.selectedValue=this.selectedValue;e.goToView(0,this.focusedValue);a.unbind("change").bind("change",d.proxy(function(h){var g=this.selectedValue;var f=new b.datetime(h.date);if(g!==null){f.hours(g.hours()).minutes(g.minutes()).seconds(g.seconds()).milliseconds(g.milliseconds())}this.onChange(f)},this)).unbind("navigate").bind("navigate",d.proxy(function(i){var h=this.focusedValue;var f=e.viewedMonth;var g=e.currentView.index;if(g==0){h=this.selectedValue?new b.datetime(this.selectedValue.toDate()):h}else{h.year(f.year(),f.month(),h.date())}b.calendar.focusDate(h,g,a,i.direction)},this)).data("associatedDateView",this);if(this.selectedValue){e.value(this.selectedValue)}b.calendar.focusDate(this.focusedValue,e.currentView.index,a)}},open:function(e){if(this.isOpened()){return}this._reassignSharedCalendar();var i=this.isRtl;var h=this.$calendar;elementPosition=e.offset;elementPosition.top+=e.outerHeight;if(i){elementPosition.left-=(a.outerWidth()||a.parent().outerWidth())-e.outerWidth}b.fx._wrap(a).css(d.extend({position:"absolute",direction:i?"rtl":"",display:a.is(":visible")?"":"none"},elementPosition));var f=this._getCalendar();var g=f.currentView.index;if(!a.is(":visible")&&f.viewedMonth.value-this.focusedValue.value!=0){f.goToView(g,this.focusedValue).value(this.selectedValue)}b.calendar.focusDate(this.focusedValue,f.currentView.index,a);b.fx._wrap(h).css("zIndex",e.zIndex).show();b.fx.play(this.effects,h,{direction:"bottom"})},close:function(){if(this.isOpened()){b.fx.rewind(this.effects,this.$calendar,{direction:"bottom"},function(){if(a){b.fx._wrap(a).hide()}})}},isOpened:function(){return a&&a.data("associatedDateView")==this&&a.is(":visible")},value:function(e){if(e===undefined){return this.selectedValue.toDate()}var g=e===null;var f=this._getCalendar();if(!g){e=e.value?e:new b.datetime(e)}f.value(e);this.selectedValue=e;if(g){e=new b.datetime()}this.focusedValue=new b.datetime(e.toDate());b.calendar.focusDate(e,f.currentView.index,a)},navigate:function(p){if(this.isOpened()&&d(".t-overlay",a).length>0){return}var m;var k=false;var o=this.$calendar;var l=this._getCalendar();var n=l.viewedMonth;var h=l.currentView;var f=h.index;var q=new b.datetime(this.focusedValue.value);var r=function(e,t,s){if(!d(e,o).hasClass("t-state-disabled")){if("navigateUp"==t){f+=1}m=s||false;l[t]();return true}else{return false}};var g=function(){var e=b.calendar.findTarget(q,f,o,false)[0];l.navigateDown(p,e,f);f=f==0?0:f-1;m=true};var i=function(e,u,s){var t=!s?-1:1;if(!r(e,u,s)){return false}if(f==0){q.addMonth(t)}else{q.addYear(t*(f==1?1:f==2?10:100))}return true};var j=b.datepicker.adjustDate;if(o.is(":visible")&&!p.shiftKey){k=true;switch(p.keyCode){case 37:if(p.ctrlKey){if(!i(".t-nav-prev","navigateToPast")){return}}else{j(f,q,-1,-1);if(h.navCheck(q,n,false)){if(!r(".t-nav-prev","navigateToPast")){return}}}break;case 38:if(p.ctrlKey){r(".t-nav-fast","navigateUp")}else{j(f,q,-7,-4);if(h.navCheck(q,n,false)){if(!r(".t-nav-prev","navigateToPast")){return}}}break;case 39:if(p.ctrlKey){if(!i(".t-nav-next","navigateToFuture",true)){return}}else{j(f,q,1,1);if(h.navCheck(q,n,true)){if(!r(".t-nav-next","navigateToFuture",true)){return}}}break;case 40:if(p.ctrlKey){g()}else{j(f,q,7,4);if(h.navCheck(q,n,true)){if(!r(".t-nav-next","navigateToFuture",true)){return}}}break;case 33:if(!i(".t-nav-prev","navigateToPast")){return}break;case 34:if(!i(".t-nav-next","navigateToFuture",true)){return}break;case 35:q=b.calendar.views[f].firstLastDay(q,false,l);break;case 36:q=b.calendar.views[f].firstLastDay(q,true,l);break;case 13:p.stopPropagation();if(f==0){this.onChange(this.focusedValue)}else{g()}break;default:k=false;break}}if(k){p.preventDefault();q=b.calendar.fitDateToRange(q,this.minValue,this.maxValue);b.calendar.focusDate(q,f,o,m);this.focusedValue=q}}};d.each(["min","max"],d.proxy(function(f,e){b.dateView.prototype[e]=function(h){var g=e+"Value";if(h===undefined){return this[g].toDate()}this[g]=h.value?h:new b.datetime(h);a.data("associatedDateView",null);this._reassignSharedCalendar()}},this));b.datepicker=function(e,f){this.element=e;d.extend(this,f);var g=this.$input=d(".t-input",e).attr("autocomplete","off").bind({change:function(h){h.stopPropagation()},keydown:d.proxy(this._keydown,this),focus:d.proxy(function(h){this._change(g.val());this._open();this.$input.removeClass("t-state-error")},this)});this.inputValue=g.val();this.dateView=new b.dateView({selectedValue:this.selectedValue,minValue:this.minDate,maxValue:this.maxDate,effects:this.effects,isRtl:g.closest(".t-rtl").length,onChange:d.proxy(function(h){this._change(h);this._close()},this)});d(".t-icon-calendar",e).bind("click",this.enabled?d.proxy(this._togglePopup,this):b.preventDefault);d(document.documentElement).bind("mousedown",d.proxy(function(h){if(!a){return}var i=a.data("associatedDateView");if(i&&i==this.dateView){if(d.contains(e,h.target)||d.contains(a[0],h.target)){return}this._change(this.$input.val());this._close()}},this));b.bind(this,{open:this.onOpen,close:this.onClose,change:this.onChange,load:this.onLoad})};b.datepicker.prototype={_togglePopup:function(){var e=this.$input;if(this.dateView.isOpened()){this._change(e.val());this._close()}else{e[0].focus()}},_close:function(){if(!a.is(":animated")&&this.dateView.isOpened()){this._trigger("close")}},_open:function(){if(!this.dateView.isOpened()){this._trigger("open")}},_trigger:function(e){if(!b.trigger(this.element,e)){this[e]()}},_change:function(e){var g=this.selectedValue;var f=this.parse(e);if(f!=null){if(f.value-this.minDate.value<=0){f=this.minDate}else{if(f.value-this.maxDate.value>=0){f=this.maxDate}}}if((g===null&&f!==null)||(g!==null&&f===null)||(g&&f&&(g.value>f.value||f.value>g.value))){b.trigger(this.element,"change",{previousValue:g===null?null:g.toDate(),value:f===null?null:f.toDate(),previousDate:g===null?null:g.toDate(),date:f===null?null:f.toDate()})}if(f==null||this.inputValue!=e){this._value(f)}},_keydown:function(h){var g=h.keyCode;var f=h.target.value;if(g==9){this._change(f);this._close()}else{if(g==27){this._close()}else{if(g==13&&(this.inputValue!=f||!this.dateView.isOpened())){this._change(f);this._close()}else{if(h.altKey){if(g==40){this._open()}else{if(g==38){this._close()}}}else{this.dateView.navigate(h)}}}}},enable:function(){this.$input.attr("disabled",false);d(this.element).removeClass("t-state-disabled").find(".t-icon").unbind("click").bind("click",d.proxy(this._togglePopup,this))},disable:function(f){this.$input.attr("disabled",true);d(this.element).addClass("t-state-disabled").find(".t-icon").unbind("click").bind("click",b.preventDefault)},_value:function(e){var g=this.$input.val();var f=e===null;this.selectedValue=e;this.dateView.value(e);if(!f){g=b.datetime.format(e.toDate(),this.format)}this.inputValue=g;this.$input.toggleClass("t-state-error",f&&g!="").val(g)},value:function(e){if(e===undefined){return this.selectedValue===null?null:this.selectedValue.toDate()}var f=this.parse(e);f=b.calendar.isInRange(f,this.minDate,this.maxDate)?f:null;if(f===null){this.$input.removeClass("t-state-error").val("")}this._value(f);return this},showPopup:function(){this.open()},hidePopup:function(){this.close()},open:function(){var e=this.$input;this.dateView.open({offset:e.offset(),outerHeight:e.outerHeight(),outerWidth:e.outerWidth(),zIndex:b.getElementZIndex(e[0])})},close:function(){this.dateView.close()},parse:function(f,e){if(f===null||f.value){return f}return f.getDate?new b.datetime(f):b.datetime.parse({value:f,format:e||this.format,shortYearCutOff:this.shortYearCutOff})}};d.each(["min","max"],d.proxy(function(f,e){b.datepicker.prototype[e]=function(g){var h=e+"Date";if(g===undefined){return this[h].toDate()}var i=this.parse(g);if(i!==null){this[h]=i;this.dateView[e](i);this._change(i)}}},this));d.extend(b.datepicker,{adjustDate:function(e,h,g,f){if(e==0){b.datetime.modify(h,b.datetime.msPerDay*g)}else{if(e==1){h.addMonth(f)}else{h.addYear((e==2?f:10*f))}}}});d.fn.tDatePicker=function(e){return b.create(this,{name:"tDatePicker",init:function(f,g){return new b.datepicker(f,g)},options:e})};d.fn.tDatePicker.defaults={effects:b.fx.slide.defaults(),selectedValue:null,format:b.cultureInfo.shortDate,minDate:new b.datetime(1899,11,31),maxDate:new b.datetime(2100,0,1),shortYearCutOff:30,enabled:true}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.datetimepicker.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.datetimepicker.min.js new file mode 100644 index 000000000..b0418df2b --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.datetimepicker.min.js @@ -0,0 +1 @@ +(function(a){var b=a.telerik;b.datetimepicker=function(d,e){a.extend(this,e);this.element=d;var f=this.$element=a(d);var c=this.$input=f.find(".t-input").bind({change:function(g){g.stopPropagation()},keydown:a.proxy(this._keydown,this),focus:a.proxy(function(g){this._change(c.val());this.$input.removeClass("t-state-error")},this)});this.inputValue=c.val();f.find(".t-icon-clock").bind("click",a.proxy(this._toggleTimeView,this)).end().find(".t-icon-calendar").bind("click",a.proxy(this._toggleDateView,this));this.timeView=new b.timeView({effects:this.effects,dropDownAttr:this.dropDownAttr,format:this.timeFormat,interval:this.interval,isRtl:c.closest(".t-rtl").length,minValue:this.startTimeValue,maxValue:this.endTimeValue,onNavigateWithOpenPopup:a.proxy(function(h){var g=this.parse(h,this.timeFormat);this.$input.val(b.datetime.format(g.toDate(),this.format))},this),onChange:a.proxy(function(g){this._change(this.parse(g,this.timeFormat));this._close("time")},this)});this.dateView=new b.dateView({selectedValue:this.selectedValue,minValue:this.minValue,maxValue:this.maxValue,effects:this.effects,isRtl:c.closest(".t-rtl").length,onChange:a.proxy(function(g){this._change(g);this._close("date")},this)});a(document.documentElement).bind("mousedown",a.proxy(function(k){var g=this.dateView.$calendar;if(!g){return}var j=this.timeView.dropDown.$element;var h=j&&j.parent().length>0;var l=g.data("associatedDateView");var i=k.target;if(a.contains(this.element,i)||(l&&l==this.dateView&&a.contains(g[0],i))||(h&&a.contains(j.parent()[0],i))){return}this._change(this.$input.val());this._close("date");this._close("time")},this));b.bind(this,{open:this.onOpen,close:this.onClose,change:this.onChange,load:this.onLoad})};b.datetimepicker.prototype={_change:function(d){var e=this.minValue;var c=this.maxValue;var g=this.parse(d);var f=this.selectedValue;if(g!=null){if(g.value-e.value<=0){g=e}else{if(g.value-c.value>=0){g=c}}}if((f===null&&g!==null)||(f!==null&&g===null)||(f&&g&&(f.value>g.value||g.value>f.value))){b.trigger(this.element,"change",{previousValue:f===null?null:f.toDate(),value:g===null?null:g.toDate()})}this._value(g)},_value:function(c){var g=this.$input.val();var f=c===null;var d=this.dateView;var e=d.$calendar.data("associatedDateView");this.selectedValue=c;this.timeView.value(f?null:b.datetime.format(c.toDate(),this.timeFormat));if(e&&e==d){d.value(c)}if(!f){g=b.datetime.format(c.toDate(),this.format)}this.inputValue=g;this.$input.toggleClass("t-state-error",f&&g!="").val(g)},_open:function(c){if(!this[c=="time"?"timeView":"dateView"].isOpened()){this._trigger(c,"open")}},_close:function(e){var c=this.dateView;var d=this.timeView.dropDown;if((e=="time"&&!d.$element.is(":animated")&&d.isOpened())||(!c.$calendar.is(":animated")&&c.isOpened())){this._trigger(e,"close")}},_trigger:function(c,d){if(!b.trigger(this.element,d,{popup:c})){this[d](c)}},_keydown:function(f){var d=f.keyCode;var c=f.target.value;if(d==9||d==27||(d==13&&this.inputValue!=c)){this._change(c);this._close("date");this._close("time");return}if(f.altKey){if(d==40){this._open("date")}else{if(d==38){this._close("date")}}return}if(this.dateView.isOpened()){this.dateView.navigate(f)}if(this.timeView.isOpened()){this.timeView.navigate(f)}},_toggleDateView:function(){if(this.dateView.isOpened()){this._close("date")}else{this.$input[0].focus();this._change(this.parse(this.$input.val()));this._open("date");this._close("time")}},_toggleTimeView:function(){if(this.timeView.isOpened()){this._close("time")}else{this.$input[0].focus();this._change(this.parse(this.$input.val()));this._open("time");this._close("date")}},enable:function(){this.$input.attr("disabled",false);this.$element.removeClass("t-state-disabled").find(".t-icon-clock").unbind("click").bind("click",a.proxy(this._toggleTimeView,this)).end().find(".t-icon-calendar").unbind("click").bind("click",a.proxy(this._toggleDateView,this))},disable:function(c){this.$input.attr("disabled",true);this.$element.addClass("t-state-disabled").find(".t-icon").unbind("click").bind("click",b.preventDefault)},open:function(d){var e=this.$input;var c={offset:e.offset(),outerHeight:e.outerHeight(),outerWidth:e.outerWidth(),zIndex:b.getElementZIndex(e[0])};this[d=="time"?"timeView":"dateView"].open(c)},close:function(c){this[c=="time"?"timeView":"dateView"].close()},value:function(c){if(c===undefined){return this.selectedValue===null?null:this.selectedValue.toDate()}var d=this.parse(c);d=b.calendar.isInRange(d,this.minValue,this.maxValue)?d:null;if(d===null){this.$input.removeClass("t-state-error").val("")}this._value(d);return this},parse:function(d,c){if(d===null||d.value){return d}c=c||this.format;return d.getDate?new b.datetime(d):b.datetime.parse({AM:b.cultureInfo.AM,PM:b.cultureInfo.PM,value:d,format:c,baseDate:this.selectedValue?new b.datetime(this.selectedValue.value):new b.datetime()})}};a.each(["min","max"],a.proxy(function(d,c){b.datetimepicker.prototype[c]=function(e){var f=c+"Value";if(e===undefined){return this[f].toDate()}var g=this.parse(e);if(g!==null){this[f]=g;this.dateView[c](g);this.timeView[c](g)}}},this));a.each(["startTime","endTime"],a.proxy(function(d,c){b.datetimepicker.prototype[c]=function(e){var f=c+"Value";if(e===undefined){return this[f].toDate()}var g=this.parse(e,b.cultureInfo.shortTime);if(g!==null){this[f]=g;c=="startTime"?this.timeView.min(g):this.timeView.max(g)}}},this));a.fn.tDateTimePicker=function(c){return b.create(this,{name:"tDateTimePicker",init:function(d,e){return new b.datetimepicker(d,e)},options:c})};a.fn.tDateTimePicker.defaults={effects:b.fx.slide.defaults(),selectedValue:null,format:b.cultureInfo.generalDateShortTime,timeFormat:b.cultureInfo.shortTime,focusedDate:new b.datetime(),minValue:new b.datetime(1899,11,31),maxValue:new b.datetime(2100,0,1),shortYearCutOff:30,enabled:true,interval:30}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.draganddrop.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.draganddrop.min.js new file mode 100644 index 000000000..c0454f00f --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.draganddrop.min.js @@ -0,0 +1 @@ +(function(d){var g=d.telerik,b=function(){},c={},a={},f={scope:"default",drop:b,over:b,out:b,owner:document.body},e={distance:5,cursorAt:{left:10,top:10},scope:"default",start:b,drag:b,stop:b,destroy:b,owner:document.body,cue:function(){return d("")}};g.droppable=function(h){d.extend(this,f,h);d(this.owner).delegate(this.selector,"mouseenter",d.proxy(this._over,this)).delegate(this.selector,"mouseup",d.proxy(this._drop,this)).delegate(this.selector,"mouseleave",d.proxy(this._out,this))};g.droppable.prototype={_over:function(h){this._raise(h,this.over)},_out:function(h){this._raise(h,this.out)},_drop:function(h){this._raise(h,d.proxy(function(i){this.drop(i);i.destroy(i)},this))},_raise:function(j,i){var h=c[this.scope];if(h){i(d.extend(j,h,{$droppable:d(j.currentTarget)}))}}};g.dragCue=function(h){return d('
    ').html(h).prepend('').appendTo(document.body)};g.dragCueStatus=function(h,i){h.find(".t-drag-status").attr("className","t-icon t-drag-status").addClass(i)};g.draggable=function(h){d.extend(this,e,h);d(this.owner).delegate(this.selector,"mousedown",d.proxy(this._wait,this)).delegate(this.selector,"dragstart",g.preventDefault);this._startProxy=d.proxy(this._start,this);this._destroyProxy=d.proxy(this._destroy,this);this._stopProxy=d.proxy(this._stop,this);this._dragProxy=d.proxy(this._drag,this)};g.draggable.prototype={_raise:function(j,i){var h=c[this.scope];if(h){return i(d.extend(j,h))}},_wait:function(h){this.$target=d(h.currentTarget);this._startPosition={x:h.pageX,y:h.pageY};d(document).bind({mousemove:this._startProxy,mouseup:this._destroyProxy}).trigger("mousedown",h);return false},_start:function(l){var k=this._startPosition.x-l.pageX,j=this._startPosition.y-l.pageY;var i=Math.sqrt((k*k)+(j*j));if(i>=this.distance){var h=a[this.selector];if(!h){h=a[this.selector]=this.cue({$draggable:this.$target});d(document).unbind("mousemove",this._startProxy).unbind("mouseup",this._destroyProxy).bind({"mouseup keydown":this._stopProxy,mousemove:this._dragProxy,selectstart:false})}c[this.scope]={$cue:h.css({position:"absolute",left:l.pageX+this.cursorAt.left,top:l.pageY+this.cursorAt.top}),$draggable:this.$target,destroy:this._destroyProxy};if(this._raise(l,this.start)===false){this._destroy(l)}}},_drag:function(h){this._raise(h,this.drag);c[this.scope].$cue.css({left:h.pageX+this.cursorAt.left,top:h.pageY+this.cursorAt.top})},_stop:function(h){if(h.type=="mouseup"||h.keyCode==27){if(this._raise(h,this.stop)===false){this._destroy(h)}else{var i=c[this.scope];i.$cue.animate(i.$draggable.offset(),"fast",this._destroyProxy)}}},_destroy:function(h){d(document).unbind("mouseup keydown",this._stopProxy).unbind("mousemove",this._dragProxy).unbind("mousemove",this._startProxy).unbind("selectstart",false);this._raise(h,this.destroy);c[this.scope]=null;a[this.selector]=null}}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.editor.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.editor.min.js new file mode 100644 index 000000000..6fa8133a2 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.editor.min.js @@ -0,0 +1 @@ +(function(s){var ao=s.telerik;function F(aZ){var aY={};for(var aX=0;aX1?aZ:"0"+aZ}).join("")},encode:function(aX){return aX.replace(/&/g,"&").replace(//g,">").replace(/\u00a0/g," ")},name:function(aX){return aX.nodeName.toLowerCase()},significantChildNodes:function(aX){return s.grep(aX.childNodes,function(aY){return aY.nodeType!=3||!C.isWhitespace(aY)})},lastTextNode:function(aY){if(aY.nodeType==3){return aY}var aX=null;for(var aZ=aY.lastChild;aZ;aZ=aZ.previousSibling){if(aX=C.lastTextNode(aZ)){return aX}}return aX},is:function(aX,aY){return C.name(aX)==aY},isMarker:function(aX){return aX.className=="t-marker"},isWhitespace:function(aX){return aB.test(aX.nodeValue)},isBlock:function(aX){return L[C.name(aX)]},isEmpty:function(aX){return aH[C.name(aX)]},isInline:function(aX){return aQ[C.name(aX)]},scrollTo:function(aX){aX.ownerDocument.body.scrollTop=s(ac(aX)?aX.parentNode:aX).offset().top},insertAt:function(aY,aX,aZ){aY.insertBefore(aX,aY.childNodes[aZ]||null)},insertBefore:function(aX,aY){return aY.parentNode.insertBefore(aX,aY)},insertAfter:function(aX,aY){return aY.parentNode.insertBefore(aX,aY.nextSibling)},remove:function(aX){aX.parentNode.removeChild(aX)},trim:function(aY){for(var aX=aY.childNodes.length-1;aX>=0;aX--){var aZ=aY.childNodes[aX];if(ac(aZ)){if(aZ.nodeValue.replace(/\ufeff/g,"").length==0){C.remove(aZ)}if(C.isWhitespace(aZ)){C.insertBefore(aZ,aY)}}else{if(aZ.className!="t-marker"){C.trim(aZ);if(aZ.childNodes.length==0&&!C.isEmpty(aZ)){C.remove(aZ)}}}}return aY},parentOfType:function(aX,aY){do{aX=aX.parentNode}while(aX&&!(C.ofType(aX,aY)));return aX},ofType:function(aX,aY){return s.inArray(C.name(aX),aY)>=0},changeTag:function(a1,aY){var a0=C.create(a1.ownerDocument,aY);var a4=a1.attributes;for(var aZ=0;aZ")},end:function(){a2.push("")}},b:{start:function(){a2.push("")},end:function(){a2.push("")}},i:{start:function(){a2.push("")},end:function(){a2.push("")}},u:{start:function(){a2.push('')},end:function(){a2.push("")}},font:{start:function(a5){a2.push('')},end:function(a3){a2.push("")}}};function aY(a4){var bb=[],bj=a4.attributes,bg=s.trim;if(C.is(a4,"img")){var bm=a4.style.width,bc=a4.style.height,ba=s(a4);if(bm){ba.attr("width",parseInt(bm));C.unstyle(a4,{width:undefined})}if(bc){ba.attr("height",parseInt(bc));C.unstyle(a4,{height:undefined})}}for(var a9=0,be=bj.length;a9bo.nodeName?1:bn.nodeName=0){a3=C.toHex(a3)}a2.push(a5);a2.push(":");a2.push(a3);a2.push(";")}}}else{if(bl=="src"||bl=="href"){a2.push(a4.getAttribute(bl,2))}else{a2.push(K[bl]?bl:bf)}}a2.push('"')}}function aX(a3,a4){for(var a5=a3.firstChild;a5;a5=a5.nextSibling){a0(a5,a4)}}function a0(a6,a7){var ba=a6.nodeType;if(ba==1){if(a6.attributes._moz_dirty&&C.is(a6,"br")){return}var a4=C.name(a6);var a8=a1[a4];if(a8){a8.start(a6);aX(a6);a8.end(a6);return}a2.push("<");a2.push(a4);aY(a6);if(aH[a4]){a2.push(" />")}else{a2.push(">");aX(a6,a7||C.is(a6,"pre"));a2.push("")}}else{if(ba==3){var a3=a6.nodeValue;if(!a7&&s.support.leadingWhitespace){var a9=a6.parentNode;var a5=(C.isInline(a9)?a9:a6).previousSibling;if(!a5||a5.innerHTML==""||C.isBlock(a5)){a3=a3.replace(/^[\r\n\v\f\t ]+/,"")}a3=a3.replace(/ +/," ")}a2.push(C.encode(a3))}else{if(ba==4){a2.push("")}else{if(ba==8){if(a6.data.indexOf("[CDATA[")<0){a2.push("")}else{a2.push("")}}}}}}aX(aZ);return a2.join("")}var u=0,an=1,a=2,R=3;function q(aY){var aX=aY.startContainer;return aX.nodeType==9?aX:aX.ownerDocument}function D(aX){return aX.getSelection?aX.getSelection():new at(aX.document)}function ai(aY){var aX=q(aY);return aV(aX)}function aV(aX){return D(ax(aX))}function ax(aX){return aX.defaultView||aX.parentWindow}function aj(aX,aY,a0){function aZ(a3){var a1=aX.cloneRange();a1.collapse(a3);a1[a3?"setStartBefore":"setEndAfter"](aY);var a2=a1.extractContents();if(a0){a2=C.trim(a2)}C[a3?"insertBefore":"insertAfter"](a2,aY)}aZ(true);aZ(false)}function M(aY){var aZ=S.image(aY);if(aZ){aY.setStartAfter(aZ);aY.setEndAfter(aZ)}var aX=ai(aY);aX.removeAllRanges();aX.addRange(aY)}function J(aX){s.extend(this,{ownerDocument:aX,startContainer:aX,endContainer:aX,commonAncestorContainer:aX,startOffset:0,endOffset:0,collapsed:true})}J.prototype={setStart:function(aX,aY){this.startContainer=aX;this.startOffset=aY;v(this);t(this,true)},setEnd:function(aX,aY){this.endContainer=aX;this.endOffset=aY;v(this);t(this,false)},setStartBefore:function(aX){this.setStart(aX.parentNode,p(aX))},setStartAfter:function(aX){this.setStart(aX.parentNode,p(aX)+1)},setEndBefore:function(aX){this.setEnd(aX.parentNode,p(aX))},setEndAfter:function(aX){this.setEnd(aX.parentNode,p(aX)+1)},selectNode:function(aX){this.setStartBefore(aX);this.setEndAfter(aX)},selectNodeContents:function(aX){this.setStart(aX,0);this.setEnd(aX,aX[aX.nodeType===1?"childNodes":"nodeValue"].length)},collapse:function(aX){if(aX){this.setEnd(this.startContainer,this.startOffset)}else{this.setStart(this.endContainer,this.endOffset)}},deleteContents:function(){var aY=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(az(this.commonAncestorContainer,this.startContainer))}this.collapse(true);(function aX(aZ){while(aZ.next()){aZ.hasPartialSubtree()?aX(aZ.getSubtreeIterator()):aZ.remove()}})(new l(aY))},cloneContents:function(){var aX=q(this);return(function aY(a1){for(var a0,aZ=aX.createDocumentFragment();a0=a1.next();){a0=a0.cloneNode(!a1.hasPartialSubtree());if(a1.hasPartialSubtree()){a0.appendChild(aY(a1.getSubtreeIterator()))}aZ.appendChild(a0)}return aZ})(new l(this))},extractContents:function(){var aY=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(az(this.commonAncestorContainer,this.startContainer))}this.collapse(true);var aZ=this;var aX=q(this);return(function a0(a3){for(var a2,a1=aX.createDocumentFragment();a2=a3.next();){a3.hasPartialSubtree()?a2=a2.cloneNode(false):a3.remove(aZ.originalRange);if(a3.hasPartialSubtree()){a2.appendChild(a0(a3.getSubtreeIterator()))}a1.appendChild(a2)}return a1})(new l(aY))},insertNode:function(aX){if(ac(this.startContainer)){if(this.startOffset!=this.startContainer.nodeValue.length){ar(this.startContainer,this.startOffset)}C.insertAfter(aX,this.startContainer)}else{C.insertAt(this.startContainer,aX,this.startOffset)}this.setStart(this.startContainer,this.startOffset)},cloneRange:function(){return s.extend(new J(this.ownerDocument),{startContainer:this.startContainer,endContainer:this.endContainer,commonAncestorContainer:this.commonAncestorContainer,startOffset:this.startOffset,endOffset:this.endOffset,collapsed:this.collapsed,originalRange:this})},toString:function(){var aY=this.startContainer.nodeName,aX=this.endContainer.nodeName;return[aY=="#text"?this.startContainer.nodeValue:aY,"(",this.startOffset,") : ",aX=="#text"?this.endContainer.nodeValue:aX,"(",this.endOffset,")"].join("")}};function m(aZ,aX,a4,a1){if(aZ==aX){return a1-a4}var a3=aX;while(a3&&a3.parentNode!=aZ){a3=a3.parentNode}if(a3){return p(a3)-a4}a3=aZ;while(a3&&a3.parentNode!=aX){a3=a3.parentNode}if(a3){return a1-p(a3)-1}var a2=C.commonAncestor(aZ,aX);var a0=aZ;while(a0&&a0.parentNode!=a2){a0=a0.parentNode}if(!a0){a0=a2}var aY=aX;while(aY&&aY.parentNode!=a2){aY=aY.parentNode}if(!aY){aY=a2}if(a0==aY){return 0}return p(aY)-p(a0)}function t(aY,aZ){function aX(a1){try{return m(a1.startContainer,a1.endContainer,a1.startOffset,a1.endOffset)<0}catch(a0){return true}}if(aX(aY)){if(aZ){aY.commonAncestorContainer=aY.endContainer=aY.startContainer;aY.endOffset=aY.startOffset}else{aY.commonAncestorContainer=aY.startContainer=aY.endContainer;aY.startOffset=aY.endOffset}aY.collapsed=true}}function v(aY){aY.collapsed=aY.startContainer==aY.endContainer&&aY.startOffset==aY.endOffset;var aX=aY.startContainer;while(aX&&aX!=aY.endContainer&&!k(aX,aY.endContainer)){aX=aX.parentNode}aY.commonAncestorContainer=aX}function aM(aX){return aX.createRange?aX.createRange():new J(aX)}function l(aY){s.extend(this,{range:aY,_current:null,_next:null,_end:null});if(aY.collapsed){return}var aX=aY.commonAncestorContainer;this._next=aY.startContainer==aX&&!ac(aY.startContainer)?aY.startContainer.childNodes[aY.startOffset]:az(aX,aY.startContainer);this._end=aY.endContainer==aX&&!ac(aY.endContainer)?aY.endContainer.childNodes[aY.endOffset]:az(aX,aY.endContainer).nextSibling}l.prototype={hasNext:function(){return !!this._next},next:function(){var aX=this._current=this._next;this._next=this._current&&this._current.nextSibling!=this._end?this._current.nextSibling:null;if(ac(this._current)){if(this.range.endContainer==this._current){(aX=aX.cloneNode(true)).deleteData(this.range.endOffset,aX.length-this.range.endOffset)}if(this.range.startContainer==this._current){(aX=aX.cloneNode(true)).deleteData(0,this.range.startOffset)}}return aX},traverse:function(aY){function aX(){this._current=this._next;this._next=this._current&&this._current.nextSibling!=this._end?this._current.nextSibling:null;return this._current}var aZ;while(aZ=aX.call(this)){if(this.hasPartialSubtree()){this.getSubtreeIterator().traverse(aY)}else{aY(aZ)}}return aZ},remove:function(a2){var a1=this.range.startContainer==this._current;var aZ=this.range.endContainer==this._current;if(ac(this._current)&&(a1||aZ)){var aY=a1?this.range.startOffset:0;var aX=aZ?this.range.endOffset:this._current.length;var a4=aX-aY;if(a2&&(a1||aZ)){if(this._current==a2.startContainer&&aY<=a2.startOffset){a2.startOffset-=a4}if(this._current==a2.endContainer&&aX<=a2.endOffset){a2.endOffset-=a4}}this._current.deleteData(aY,a4)}else{var a3=this._current.parentNode;if(a2&&(this.range.startContainer==a3||this.range.endContainer==a3)){var a0=p(this._current);if(a3==a2.startContainer&&a0<=a2.startOffset){a2.startOffset-=1}if(a3==a2.endContainer&&a00&&a0.previousSibling);a3.setEndPoint(aX?"EndToStart":"EndToEnd",a2);var a1=a0.nextSibling;if(!a1){a1=a0.previousSibling;if(a1&&ac(a1)){aY.setEnd(a1,a1.nodeValue.length);C.remove(a0)}else{aY.selectNodeContents(aZ);C.remove(a0);aY.endOffset-=1}return}C.remove(a0);if(ac(a1)){aY[aX?"setStart":"setEnd"](a1,a3.text.length)}else{aY[aX?"setStartBefore":"setEndBefore"](a1)}}function ag(aX){this.enumerate=function(){var aZ=[];function aY(a0){if(C.is(a0,"img")||(a0.nodeType==3&&!C.isWhitespace(a0))){aZ.push(a0)}else{a0=a0.firstChild;while(a0){aY(a0);a0=a0.nextSibling}}}new l(aX).traverse(aY);return aZ}}function j(aX){return new ag(aX).enumerate()}function X(a1){var aX=[];for(var aY=0,a0=a1.length;aY'}aZ.selectNodeContents(a3)}}aZ.collapse(true)};this.add=function(aY,a0){if(a0&&aY.collapsed){this.addCaret(aY);aY=S.expand(aY)}var aZ=aY.cloneRange();aZ.collapse(false);this.end=C.create(q(aY),"span",{className:"t-marker"});aZ.insertNode(this.end);aZ=aY.cloneRange();aZ.collapse(true);this.start=this.end.cloneNode(true);aZ.insertNode(this.start);aY.setStartBefore(this.start);aY.setEndAfter(this.end);g(aY.commonAncestorContainer);return aY};this.remove=function(a5){var aY=this.start,ba=this.end;g(a5.commonAncestorContainer);while(!aY.nextSibling&&aY.parentNode){aY=aY.parentNode}while(!ba.previousSibling&&ba.parentNode){ba=ba.parentNode}var a0=(aY.previousSibling&&aY.previousSibling.nodeType==3)&&(aY.nextSibling&&aY.nextSibling.nodeType==3);var a6=(ba.previousSibling&&ba.previousSibling.nodeType==3)&&(ba.nextSibling&&ba.nextSibling.nodeType==3);aY=aY.nextSibling;ba=ba.previousSibling;var a9=false;var a3=false;if(aY==this.end){a3=!!this.start.previousSibling;aY=ba=this.start.previousSibling||this.end.nextSibling;a9=true}C.remove(this.start);C.remove(this.end);if(aY==null||ba==null){a5.selectNodeContents(a5.commonAncestorContainer);a5.collapse(true);return}var a8=a9?ac(aY)?aY.nodeValue.length:aY.childNodes.length:0;var a1=ac(ba)?ba.nodeValue.length:ba.childNodes.length;if(aY.nodeType==3){while(aY.previousSibling&&aY.previousSibling.nodeType==3){aY=aY.previousSibling;a8+=aY.nodeValue.length}}if(ba.nodeType==3){while(ba.previousSibling&&ba.previousSibling.nodeType==3){ba=ba.previousSibling;a1+=ba.nodeValue.length}}var a4=p(aY),a7=aY.parentNode;var a2=p(ba),aZ=ba.parentNode;for(var bc=aY;bc.previousSibling;bc=bc.previousSibling){if(bc.nodeType==3&&bc.previousSibling.nodeType==3){a4--}}for(var bb=ba;bb.previousSibling;bb=bb.previousSibling){if(bb.nodeType==3&&bb.previousSibling.nodeType==3){a2--}}g(a7);if(aY.nodeType==3){aY=a7.childNodes[a4]}g(aZ);if(ba.nodeType==3){ba=aZ.childNodes[a2]}if(a9){if(aY.nodeType==3){a5.setStart(aY,a8)}else{a5[a3?"setStartAfter":"setStartBefore"](aY)}a5.collapse(true)}else{if(aY.nodeType==3){a5.setStart(aY,a8)}else{a5.setStartBefore(aY)}if(ba.nodeType==3){a5.setEnd(ba,a1)}else{a5.setEndAfter(ba)}}if(aX){this.removeCaret(a5)}}}var ap=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/;var S={nodes:function(aY){var aX=j(aY);if(!aX.length){aY.selectNodeContents(aY.commonAncestorContainer);aX=j(aY);if(!aX.length){aX=C.significantChildNodes(aY.commonAncestorContainer)}}return aX},image:function(aY){var aX=[];new l(aY).traverse(function(aZ){if(C.is(aZ,"img")){aX.push(aZ)}});if(aX.length==1){return aX[0]}},expand:function(aY){var aZ=aY.cloneRange();var a2=aZ.startContainer.childNodes[aZ.startOffset==0?0:aZ.startOffset-1];var a3=aZ.endContainer.childNodes[aZ.endOffset];if(!ac(a2)||!ac(a3)){return aZ}var a0=a2.nodeValue;var a1=a3.nodeValue;if(a0==""||a1==""){return aZ}var aX=a0.split("").reverse().join("").search(ap);var a4=a1.search(ap);if(aX==0||a4==0){return aZ}a4=a4==-1?a1.length:a4;aX=aX==-1?0:a0.length-aX;aZ.setStart(a2,aX);aZ.setEnd(a3,a4);return aZ},isExpandable:function(aY){var a3=aY.startContainer;var a2=q(aY);if(a3==a2||a3==a2.body){return false}var aZ=aY.cloneRange();var aX=a3.nodeValue;if(!aX){return false}var a0=aX.substring(0,aZ.startOffset);var a1=aX.substring(aZ.startOffset);var a4=0,a5=0;if(a0!=""){a4=a0.split("").reverse().join("").search(ap)}if(a1!=""){a5=a1.search(ap)}return a4!=0&&a5!=0}};function c(aY){var aZ=new ak(aY.range);var aX=new aa();this.formatter=aY.formatter;this.getRange=function(){return aZ.toRange()};this.lockRange=function(a0){return aX.add(this.getRange(),a0)};this.releaseRange=function(a0){aX.remove(a0);M(a0)};this.undo=function(){aZ.body.innerHTML=aZ.html;M(aZ.toRange())};this.redo=function(){this.exec()};this.exec=function(){var a0=this.lockRange(true);this.formatter.editor=this.editor;this.formatter.toggle(a0);this.releaseRange(a0)}}function aS(aZ,aY){var aX=aZ.body;this.redo=function(){aX.innerHTML=aY.html;M(aY.toRange())};this.undo=function(){aX.innerHTML=aZ.html;M(aZ.toRange())}}function aN(aX){c.call(this,aX);this.managesUndoRedo=true;this.exec=function(){var aZ=this.editor;var aY=aZ.getRange();var a0=new ak(aY);aZ.clipboard.paste(aX.value||"");aZ.undoRedoStack.push(new aS(a0,new ak(aZ.getRange())));aZ.focus()}}function w(){V.call(this);this.command=function(aX){return new aN(aX)};this.update=function(aX,aY){aX.data("tSelectBox").close()};this.init=function(aZ,aX){var aY=aX.editor;aZ.tSelectBox({data:aY.insertHtml,onItemCreate:function(a0){a0.html=''+a0.dataItem.Text+""},onChange:function(a0){V.exec(aY,"insertHtml",a0.value)},highlightFirst:false}).find(".t-input").html(aY.localization.insertHtml)}}function P(){var aY=[],aX=-1;this.push=function(aZ){aY=aY.slice(0,aX+1);aX=aY.push(aZ)-1};this.undo=function(){if(this.canUndo()){aY[aX--].undo()}};this.redo=function(){if(this.canRedo()){aY[++aX].redo()}};this.canUndo=function(){return aX>=0};this.canRedo=function(){return aX!=aY.length-1}}function aK(aX){this.keydown=function(a0){var aZ=aX.keyboard;var aY=aZ.isTypingKey(a0);if(!aY){au(aX)}if(aY&&!aZ.typingInProgress()){this.startRestorePoint=new ak(aX.getRange());aZ.startTyping(s.proxy(function(){this.endRestorePoint=new ak(aX.getRange());aX.undoRedoStack.push(new aS(this.startRestorePoint,this.endRestorePoint))},this));return true}return false};this.keyup=function(aY){var aZ=aX.keyboard;if(aZ.typingInProgress()){aZ.endTyping();return true}return false}}function z(aY){var aX=false;this.createUndoCommand=function(){this.endRestorePoint=new ak(aY.getRange());aY.undoRedoStack.push(new aS(this.startRestorePoint,this.endRestorePoint));this.startRestorePoint=this.endRestorePoint};this.changed=function(){if(this.startRestorePoint){return this.startRestorePoint.html!=aY.body.innerHTML}return false},this.keydown=function(aZ){var a0=aY.keyboard;if(a0.isModifierKey(aZ)){if(a0.typingInProgress()){a0.endTyping(true)}this.startRestorePoint=new ak(aY.getRange());return true}if(a0.isSystem(aZ)){aX=true;if(this.changed()){aX=false;this.createUndoCommand()}return true}return false};this.keyup=function(aZ){if(aX&&this.changed()){aX=false;this.createUndoCommand(aZ);return true}return false}}function aE(aY){var a0=false;var a3;var aZ;function aX(a4){return(a4>=48&&a4<=90)||(a4>=96&&a4<=111)||(a4>=186&&a4<=192)||(a4>=219&&a4<=222)}this.toolFromShortcut=function(a6,a8){var a5=String.fromCharCode(a8.keyCode);for(var a7 in a6){var a4=a6[a7];if((a4.key==a5||a4.key==a8.keyCode)&&!!a4.ctrl==a8.ctrlKey&&!!a4.alt==a8.altKey&&!!a4.shift==a8.shiftKey){return a7}}};this.isTypingKey=function(a5){var a4=a5.keyCode;return(aX(a4)&&!a5.ctrlKey&&!a5.altKey)||a4==32||a4==13||a4==8||(a4==46&&!a5.shiftKey&&!a5.ctrlKey&&!a5.altKey)};this.isModifierKey=function(a5){var a4=a5.keyCode;return(a4==17&&!a5.shiftKey&&!a5.altKey)||(a4==16&&!a5.ctrlKey&&!a5.altKey)||(a4==18&&!a5.ctrlKey&&!a5.shiftKey)};this.isSystem=function(a4){return a4.keyCode==46&&a4.ctrlKey&&!a4.altKey&&!a4.shiftKey};this.startTyping=function(a4){aZ=a4;a0=true};function a1(){a0=false;aZ()}this.endTyping=function(a4){this.clearTimeout();if(a4){a1()}else{a3=window.setTimeout(a1,1000)}};this.typingInProgress=function(){return a0};this.clearTimeout=function(){window.clearTimeout(a3)};function a2(a6,a5){for(var a4=0;a4$/g,"li>");var a3=aX(a6);var a5=a1.getRange();a5.deleteContents();if(a5.startContainer==a1.document){a5.selectNodeContents(a1.body)}var a7=new aa();var ba=a7.addCaret(a5);var a9=aZ(a3,ba);var a8=false;if(!/body|td/.test(C.name(a9))&&(a3||C.isInline(a9))){a5.selectNode(ba);aj(a5,a9,true);a8=true}var bb=aY(a6);a5.insertNode(bb);a9=aZ(a3,ba);if(a8){while(ba.parentNode!=a9){C.unwrap(ba.parentNode)}C.unwrap(ba.parentNode)}g(a5.commonAncestorContainer);ba.style.display="inline";C.scrollTo(ba);a7.removeCaret(a5);M(a5)}}function f(){var aX=[//g,"",/mso-[^;"]*;?/ig,"",/<\/?(meta|link|style|o:|v:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:)[^>]*>)?/ig,""];this.applicable=function(a0){return/class="?Mso|style="[^"]*mso-/i.test(a0)};function aY(a0){if(/^[\u2022\u00b7\u00a7\u00d8o\-]\u00a0+/.test(a0)){return"ul"}if(/^\s*\w+[\.\)]\u00a0{2,}/.test(a0)){return"ol"}}function aZ(bd){var a5=C.create(document,"div",{innerHTML:bd});var bc=s(G.join(","),a5);var a7=-1,a2,bb={ul:{},ol:{}},a0=a5;for(var a8=0;a8]*>/g,"").replace(/ /g,"\u00a0");var a6=aY(bd);if(!a6||C.name(a3)!="p"){if(a3.innerHTML==""){C.remove(a3)}else{bb={ul:{},ol:{}};a0=a5;a7=-1}continue}var a9=parseFloat(a3.style.marginLeft||0);var ba=bb[a6][a9];if(a9>a7||!ba){ba=C.create(document,a6);if(a0==a5){C.insertBefore(ba,a3)}else{a0.appendChild(ba)}bb[a6][a9]=ba}if(a2!=a6){for(var a4 in bb){for(var a1 in bb[a4]){if(s.contains(ba,bb[a4][a1])){delete bb[a4][a1]}}}}C.remove(a3.firstChild);a0=C.create(document,"li",{innerHTML:a3.innerHTML});ba.appendChild(a0);C.remove(a3);a7=a9;a2=a6}return a5.innerHTML}this.clean=function(a1){for(var a0=0,a2=aX.length;a0]*"?/ig,"");return a1}}function i(aX){function aY(a1){var aZ=0;for(var a0=a1.parentNode.firstChild;a0;a0=a0.nextSibling){if(a0!=a1&&a0.className!="t-marker"&&a0.nodeType==1){aZ++}}return aZ}this.findSuitable=function(a0,aZ){if(!aZ&&aY(a0)>0){return null}return C.parentOfType(a0,aX[0].tags)};this.findFormat=function(a3){for(var aZ=0;aZ1){var a2=a4.pop();var a3=a4[a4.length-1];if(a2.previousSibling&&a2.previousSibling.className=="t-marker"){a3.appendChild(a2.previousSibling)}if(a2.previousSibling==a3&&a2.style.cssText==a3.style.cssText){while(a2.firstChild){a3.appendChild(a2.firstChild)}C.remove(a2)}}}}function aW(aY,aX){i.call(this,aY);function aZ(a3){var be=a3.attributes,bb=s.trim;for(var a2=0,a9=be.length;a2=0?C.toHex(a1):a1}}}}return}function a0(a5){var a6=s(ac(a5)?a5.parentNode:a5);var a4=a6.parents().andSelf();for(var a2=0,a3=a4.length;a2'+a3.dataItem.Text+""}}}function aU(aY){V.call(this,aY);var aX=new aW([{tags:["span"]}],aY.cssAttr);this.update=function(aZ){aZ.data("tColorPicker").close()};this.command=function(aZ){return new aF(s.extend(aZ,{formatter:function(){var a0={};a0[aY.domAttr]=aZ.value;return new E([{tags:["span"]}],{style:a0},aY.cssAttr)}}))};this.init=function(a1,aZ){var a0=aZ.editor;a1.tColorPicker({selectedColor:"#000000",onChange:function(a2){V.exec(a0,aY.name,a2.value)}})}}function Z(){V.call(this);var aX=new aW([{tags:["span"]}],"className");this.command=function(aY){return new aF(s.extend(aY,{formatter:function(){return new E([{tags:["span"]}],{className:aY.value})}}))};this.update=function(aY,a0){var aZ=aY.data("tSelectBox");aZ.close();aZ.value(aX.getFormat(a0))};this.init=function(a0,aY){var aZ=aY.editor;a0.tSelectBox({data:aZ.style,title:aZ.localization.style,onItemCreate:function(a1){var a2=C.inlineStyle(aZ.document,"span",{className:a1.dataItem.Value});a1.html=''+a1.html+""},onChange:function(a1){V.exec(aZ,"style",a1.value)}})}}function x(aY){function aX(a1,a2){for(var aZ=0;aZ'+a2.dataItem.Text+""},onChange:function(a1){V.exec(aZ,"formatBlock",a1.value)},highlightFirst:false})}}function aO(aX){c.call(this,aX);this.exec=function(){var a0=this.getRange();var a8=q(a0);var a6=s.browser.msie?"":'
    ';var a9=C.parentOfType(a0.startContainer,["p"]),aY=C.parentOfType(a0.endContainer,["p"]),aZ=(a9&&!aY)||(!a9&&aY);a0.deleteContents();var a7=C.create(a8,"a");a0.insertNode(a7);var a1=C.parentOfType(a7,"li".split(","));var a2;if(a1){var a4=a0.cloneRange();a4.selectNode(a1);if(j(a4).length==0){var ba=C.create(a8,"p");if(a1.nextSibling){aj(a4,a1.parentNode)}C.insertAfter(ba,a1.parentNode);C.remove(a1.parentNode.childNodes.length==1?a1.parentNode:a1);ba.innerHTML=a6;a2=ba}}if(!a2){if(!a1){new U([{tags:["p"]}]).apply([a7])}a0.selectNode(a7);var a3=C.parentOfType(a7,[a1?"li":"p"]);aj(a0,a3,aZ);var a5=a3.previousSibling;if(C.is(a5,"li")&&a5.firstChild&&!C.is(a5.firstChild,"br")){a5=a5.firstChild}a2=a3.nextSibling;if(C.is(a2,"li")&&a2.firstChild&&!C.is(a2.firstChild,"br")){a2=a2.firstChild}C.remove(a3);if(a5.firstChild&&C.is(a5.firstChild,"br")){C.remove(a5.firstChild)}if(ac(a5)&&a5.nodeValue==""){a5=a5.parentNode}if(a5&&a5.innerHTML==""){a5.innerHTML=a6}if(a2.firstChild&&C.is(a2.firstChild,"br")){C.remove(a2.firstChild)}if(ac(a2)&&a2.nodeValue==""){a2=a2.parentNode}if(a2.innerHTML==""){a2.innerHTML=a6}g(a5)}g(a2);a0.selectNodeContents(a2);a0.collapse(true);C.scrollTo(a2);M(a0)}}function d(aX){c.call(this,aX);this.exec=function(){var aZ=this.getRange();aZ.deleteContents();var aY=C.create(q(aZ),"br");aZ.insertNode(aY);aY.parentNode.normalize();if(!s.browser.msie&&(!aY.nextSibling||C.isWhitespace(aY.nextSibling))){var a0=aY.cloneNode(true);a0.setAttribute("_moz_dirty","");C.insertAfter(a0,aY)}aZ.setStartAfter(aY);aZ.collapse(true);M(aZ)}}function am(aY){var aX=[aY=="ul"?"ol":"ul",aY];x.call(this,[{tags:aX}]);this.isFormatted=function(a2){var aZ=[],a0;for(var a1=0;a11){C.insertAfter(a0[a0.length-1],a1);C.insertAfter(a0[1],a1);C[aZ.length>0?"insertBefore":"insertAfter"](a0[0],a1)}}else{var a2=new b([{tags:["a"]}],a3);a2.finder=this.finder;a2.apply(aZ)}}}function al(aX){aX.formatter={toggle:function(aY){new b([{tags:["a"]}]).remove(j(aY))}};c.call(this,aX)}function Y(aY){c.call(this,aY);var aX;this.async=true;var aZ=new aT();this.exec=function(){var a4=this.getRange();var a2=a4.collapsed;a4=this.lockRange(true);var a7=j(a4);var a6=null;var a1=this;function a8(be){var bd=s("#t-editor-link-url",a5.element).val();if(bd&&bd!="http://"){aX={href:bd};var ba=s("#t-editor-link-title",a5.element).val();if(ba){aX.title=ba}var bb=s("#t-editor-link-text",a5.element).val();if(bb!==a6){aX.innerHTML=bb}var bc=s("#t-editor-link-target",a5.element).is(":checked");if(bc){aX.target="_blank"}aZ.apply(a4,aX)}a3(be);if(a1.change){a1.change()}}function a3(ba){ba.preventDefault();a5.destroy();ax(q(a4)).focus();a1.releaseRange(a4)}var a9=a7.length?aZ.finder.findSuitable(a7[0]):null;var a0=a7.length<=1||(a7.length==2&&a2);var a5=ao.window.create(s.extend({},this.editor.dialogOptions,{title:"Insert link",html:new s.telerik.stringBuilder().cat('
    ').cat("
      ").cat('
    1. ').catIf('
    2. ',a0).cat('
    3. ').cat('
    4. ').cat("
    ").cat('
    ').cat('').cat(" or ").cat('Close').cat("
    ").cat("
    ").string(),onClose:a3})).hide().find(".t-dialog-insert").click(a8).end().find(".t-dialog-close").click(a3).end().find(".t-form-text-row input").keydown(function(ba){if(ba.keyCode==13){a8(ba)}else{if(ba.keyCode==27){a3(ba)}}}).end().delegate(".t-button","mouseenter",ao.buttonHover).delegate(".t-button","mouseleave",ao.buttonLeave).find("#t-editor-link-url").val(a9?a9.getAttribute("href",2):"http://").end().find("#t-editor-link-text").val(a7.length>0?(a7.length==1?a7[0].nodeValue:a7[0].nodeValue+a7[1].nodeValue):"").end().find("#t-editor-link-title").val(a9?a9.title:"").end().find("#t-editor-link-target").attr("checked",a9?a9.target=="_blank":false).end().show().data("tWindow").center();if(a0&&a7.length>0){a6=s("#t-editor-link-text",a5.element).val()}s("#t-editor-link-url",a5.element).focus().select()},this.redo=function(){var a0=this.lockRange(true);aZ.apply(a0,aX);this.releaseRange(a0)}}function aP(aY){V.call(this,s.extend(aY,{command:al}));var aX=new i([{tags:["a"]}]);this.init=function(aZ){aZ.attr("unselectable","on").addClass("t-state-disabled")};this.update=function(aZ,a0){aZ.toggleClass("t-state-disabled",!aX.isFormatted(a0)).removeClass("t-state-hover")}}function aJ(aY){c.call(this,aY);this.async=true;var aX;function aZ(a0,a1){if(aX.src&&aX.src!="http://"){if(!a0){a0=C.create(q(a1),"img",aX);a0.onload=a0.onerror=function(){a0.removeAttribute("complete");a0.removeAttribute("width");a0.removeAttribute("height")};a1.deleteContents();a1.insertNode(a0);a1.setStartAfter(a0);a1.setEndAfter(a0);M(a1);return true}else{C.attr(a0,aX)}}return false}this.redo=function(){var a0=this.lockRange();if(!aZ(S.image(a0),a0)){this.releaseRange(a0)}};this.exec=function(){var a3=this.lockRange();var a0=false;var a5=S.image(a3);var a1=this;function a6(a7){aX={src:s("#t-editor-image-url",a4.element).val(),alt:s("#t-editor-image-title",a4.element).val()};a0=aZ(a5,a3);a2(a7);if(a1.change){a1.change()}}function a2(a7){a7.preventDefault();a4.destroy();ax(q(a3)).focus();if(!a0){a1.releaseRange(a3)}}var a4=ao.window.create(s.extend({},this.editor.dialogOptions,{title:"Insert image",html:new s.telerik.stringBuilder().cat('
    ').cat("
      ").cat('
    1. ').cat('
    2. ').cat("
    ").cat('
    ').cat('').cat(" or ").cat('Close').cat("
    ").cat("
    ").string(),onClose:a2})).hide().find(".t-dialog-insert").click(a6).end().find(".t-dialog-close").click(a2).end().find(".t-form-text-row input").keydown(function(a7){if(a7.keyCode==13){a6(a7)}else{if(a7.keyCode==27){a2(a7)}}}).end().delegate(".t-button","mouseenter",ao.buttonHover).delegate(".t-button","mouseleave",ao.buttonLeave).find("#t-editor-image-url").val(a5?a5.getAttribute("src",2):"http://").end().find("#t-editor-image-title").val(a5?a5.alt:"").end().show().data("tWindow").center();s("#t-editor-image-url",a4.element).focus().select()}}ao.selectbox=function(aX,aY){var a5;var aZ=s(aX);var a1=aZ.find(".t-input");var a2=this.dropDown=new ao.dropDown({effects:ao.fx.slide.defaults(),onItemCreate:aY.onItemCreate,onClick:function(a6){a4(aY.data[s(a6.item).index()].Value);aY.onChange({value:a5})}});function a0(){if(!a2.$items){a2.dataBind(aY.data)}}function a3(a6){a1.html(a6?a6:" ")}function a4(a8){a0();var a7=-1;for(var a6=0,a9=aY.data.length;a60?"rtl":"");s(document.documentElement).bind("mousedown",s.proxy(function(a8){var a6=a2.$element;var a7=a6&&a6.parent().length>0;if(a7&&!s.contains(aX,a8.target)&&!s.contains(a6.parent()[0],a8.target)){a2.close()}},this))};s.fn.tSelectBox=function(aX){return ao.create(this,{name:"tSelectBox",init:function(aY,aZ){return new ao.selectbox(aY,aZ)},options:aX})};s.fn.tSelectBox.defaults={effects:s.fn.tDropDownList.defaults.effects};ao.colorpicker=function(aX,aY){this.element=aX;var aZ=s(aX);s.extend(this,aY);aZ.bind("click",s.proxy(this.click,this)).find("*").attr("unselectable","on");if(this.selectedColor){aZ.find(".t-selected-color").css("background-color",this.selectedColor)}s(aX.ownerDocument.documentElement).bind("mousedown",s.proxy(function(a0){if(!s(a0.target).closest(".t-colorpicker-popup").length){this.close()}},this));ao.bind(this,{change:this.onChange,load:this.onLoad})};ao.colorpicker.prototype={select:function(aX){if(aX){aX=C.toHex(aX);if(!ao.trigger(this.element,"change",{value:aX})){this.value(aX);this.close()}}else{ao.trigger(this.element,"change",{value:this.selectedColor})}},open:function(){var aX=this.popup();var a0=s(this.element);var aZ=a0.offset();aZ.top+=a0.outerHeight();if(a0.closest(".t-rtl").length){aZ.left-=aX.outerWidth()-a0.outerWidth()}var aY="auto";a0.parents().andSelf().each(function(){aY=s(this).css("zIndex");if(Number(aY)){aY=Number(aY)+1;return false}});ao.fx._wrap(aX).css(s.extend({position:"absolute",zIndex:aY},aZ));aX.find(".t-item").bind("click",s.proxy(function(a2){var a1=s(a2.target,a2.target.ownerDocument).css("background-color");this.select(a1)},this));ao.fx.play(this.effects,aX,{direction:"bottom"})},close:function(){if(!this.$popup){return}ao.fx.rewind(this.effects,this.$popup,{direction:"bottom"},s.proxy(function(){C.remove(this.$popup[0].parentNode);this.$popup=null},this))},toggle:function(){if(!this.$popup||!this.$popup.is(":visible")){this.open()}else{this.close()}},click:function(aX){if(s(aX.target).closest(".t-tool-icon").length>0){this.select()}else{this.toggle()}},value:function(aX){if(!aX){return this.selectedColor}aX=C.toHex(aX);this.selectedColor=aX;s(".t-selected-color",this.element).css("background-color",aX)},popup:function(){if(!this.$popup){this.$popup=s(ao.colorpicker.buildPopup(this)).hide().appendTo(document.body).find("*").attr("unselectable","on").end()}return this.$popup}};s.extend(ao.colorpicker,{buildPopup:function(aX){var a0=new ao.stringBuilder();a0.cat('
    ').cat('
      ');var a2=aX.data;var aZ=(aX.value()||"").substring(1);for(var aY=0,a1=a2.length;aY')}a0.cat("
    ");return a0.string()}});s.fn.tColorPicker=function(aX){return ao.create(this,{name:"tColorPicker",init:function(aY,aZ){return new ao.colorpicker(aY,aZ)},options:aX})};s.fn.tColorPicker.defaults={data:"000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7".split(","),selectedColor:null,effects:s.fn.tDropDownList.defaults.effects};function aR(){var aY=new x([{tags:G}]);function aX(aZ){return aZ.style.marginLeft||0}this.apply=function(a4){var a2=aY.findSuitable(a4);if(a2.length){var a1=[];for(var a0=0;a0ul")[0];if(!a7){a7=C.create(a5.ownerDocument,C.name(a8));a3.append(a7)}while(a5&&a5.parentNode==a8){a7.appendChild(a5);a5=a1.shift()}}else{var aZ=parseInt(aX(a5))+30;C.style(a5,{marginLeft:aZ})}}}else{var a6=new U([{tags:G}],{style:{marginLeft:30}});a6.apply(a4)}};this.remove=function(a1){var a3=aY.findSuitable(a1);for(var aZ=0;aZ",{src:'javascript:""',frameBorder:"0",className:"t-content"}).css("display","").insertBefore(aX)[0];var aY=a1.contentWindow||a1;var a0=aY.document||a1.contentDocument;var aZ=aX.val().replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/ig,"$1");if(!aZ.length&&s.browser.mozilla){aZ='
    '}a0.designMode="On";a0.open();a0.write(new ao.stringBuilder().cat("").cat('').cat('").cat(s.map(a2,function(a3){return[''].join("")}).join("")).cat('').cat(aZ).cat("").string());a0.close();return aY}function T(aX){ao.trigger(aX.element,"selectionChange")}function au(aX){if(aX.pendingFormats.length==0){return}aX.pendingFormats.reverse();s.each(aX.pendingFormats,function(){for(var aY=this.firstChild;aY;aY=aY.nextSibling){while(aY.nodeType==3&&(charIndex=aY.nodeValue.indexOf("\ufeff"))>=0){aY.deleteData(charIndex,1)}}});s.each(aX.pendingFormats,function(){if(this.innerHTML==""&&this.parentNode){C.remove(this)}});aX.pendingFormats=[]}ao.editor=function(aX,aY){if(/Mobile.*Safari/.test(navigator.userAgent)){return}var aZ=this;this.element=aX;var a0=s(aX);a0.closest("form").bind("submit",function(){aZ.update()});s.extend(this,aY);ao.bind(this,{load:this.onLoad,selectionChange:this.onSelectionChange,change:this.onChange,execute:this.onExecute});this.textarea=a0.find("textarea").attr("autocomplete","off")[0];this.window=av(s(this.textarea),this.stylesheets);this.document=this.window.contentDocument||this.window.document;this.body=this.document.body;this.keyboard=new aE([new aK(this),new z(this)]);this.clipboard=new ay(this);this.pendingFormats=[];this.undoRedoStack=new P();function a4(a5){var a6=s.grep(a5.className.split(" "),function(a7){return !/^t-(widget|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(a7)});return a6[0]?a6[0].substring(2):"custom"}function a3(a6,a5){if(!a5.key){return a6}return new ao.stringBuilder().cat(a6).cat(" (").catIf("Ctrl + ",a5.ctrl).catIf("Shift + ",a5.shift).catIf("Alt + ",a5.alt).cat(a5.key).cat(")").string()}s(this.window).bind("blur",function(){var a5=aZ.textarea.value;var a6=aZ.encodedValue();aZ.update(a6);if(a6!=a5){ao.trigger(aZ.element,"change")}});var a2=".t-editor-toolbar > li > *";var a1=".t-editor-button .t-tool-icon:not(.t-state-disabled)";a0.delegate(a1,"mouseenter",ao.hover).delegate(a1,"mouseleave",ao.leave).delegate(a1,"mousedown",ao.preventDefault).delegate(a1,"click",ao.stopAll(function(a5){aZ.focus();aZ.exec(a4(this))})).find(a2).each(function(){var a9=a4(this),a6=aZ.tools[a9],a8=aZ.localization[a9],a7=s(this);if(!a6){return}if(a9=="fontSize"||a9=="fontName"){var a5=aZ.localization[a9+"Inherit"]||aL[a9+"Inherit"];aZ[a9][0].Text=a5;a7.find("input").val(a5).end().find("span.t-input").text(a5).end()}a6.init(a7,{title:a3(a8,a6),editor:aZ})}).end().bind("selectionChange",function(){var a6=aZ.getRange();aZ.selectionRestorePoint=new ak(a6);var a5=j(a6);if(!a5.length){a5=[a6.startContainer]}a0.find(a2).each(function(){var a7=aZ.tools[a4(this)];if(a7){a7.update(s(this),a5)}})});s(document).bind("mousedown",function(){if(aZ.keyboard.typingInProgress()){aZ.keyboard.endTyping(true)}}).bind("DOMNodeInserted",function(a5){if(s.contains(a5.target,aZ.element)||aZ.element==a5.target){s(aZ.element).find("iframe").remove();aZ.window=av(s(aZ.textarea),aZ.stylesheets);aZ.document=aZ.window.contentDocument||aZ.window.document;aZ.body=aZ.document.body}});s(this.document).bind({keydown:function(a6){var a5=aZ.keyboard.toolFromShortcut(aZ.tools,a6);if(a5){a6.preventDefault();aZ.exec(a5);return false}aZ.keyboard.clearTimeout();aZ.keyboard.keydown(a6)},keyup:function(a5){var a6=[8,9,13,33,34,35,36,37,38,39,40,40,45,46];if(s.inArray(a5.keyCode,a6)>-1){T(aZ)}aZ.keyboard.keyup(a5)},mouseup:function(){T(aZ)}});s(this.body).bind("cut paste",function(a5){aZ.clipboard["on"+a5.type](a5)})};s.extend(ao.editor,{Dom:C,RestorePoint:ak,Marker:aa,RangeUtils:S,RangeEnumerator:ag,LinkFormatter:aT,LinkFormatFinder:H,LinkCommand:Y,UnlinkCommand:al,InlineFormatter:b,GreedyInlineFormatter:E,InlineFormatFinder:i,GreedyInlineFormatFinder:aW,BlockFormatter:U,GreedyBlockFormatter:aq,BlockFormatFinder:x,FormatCommand:aF,IndentFormatter:aR,IndentCommand:o,OutdentCommand:Q,ListFormatFinder:am,ListFormatter:I,ListCommand:aw,ParagraphCommand:aO,NewLineCommand:d,ImageCommand:aJ,InsertHtmlCommand:aN,GenericCommand:aS,UndoRedoStack:P,TypingHandler:aK,SystemHandler:z,Keyboard:aE,MSWordFormatCleaner:f});ao.editor.prototype={value:function(aZ){var aX=this.body;if(aZ===undefined){return B(aX)}aZ=aZ.replace(//g,"");aZ=aZ.replace(/]*)>(.*)?<\/script>/ig,"$2");if(s.browser.msie){aZ="
    "+aZ;var a0="originalsrc",aY="originalhref";aZ=aZ.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,aY+'="$1"');aZ=aZ.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,a0+'="$1"');aX.innerHTML=aZ;C.remove(aX.firstChild);s(aX).find("telerik\\:script,script,link,img,a").each(function(){var a1=this;if(a1[aY]){a1.setAttribute("href",a1[aY]);a1.removeAttribute(aY)}if(a1[a0]){a1.setAttribute("src",a1[a0]);a1.removeAttribute(a0)}})}else{aX.innerHTML=aZ}this.update()},focus:function(){this.window.focus()},update:function(aX){this.textarea.value=aX||this.encoded?this.encodedValue():this.value()},encodedValue:function(){return C.encode(this.value())},createRange:function(aX){return aM(aX||this.document)},getSelection:function(){return aV(this.document)},selectRange:function(aY){var aX=this.getSelection();aX.removeAllRanges();aX.addRange(aY)},getRange:function(){var aX=this.getSelection();return aX.rangeCount>0?aX.getRangeAt(0):this.createRange()},selectedHtml:function(){return B(this.getRange().cloneContents())},paste:function(aX){this.clipboard.paste(aX)},exec:function(a0,aX){a0=a0.toLowerCase();var a2="";for(var aZ in this.tools){if(aZ.toLowerCase()==a0){a2=this.tools[aZ];break}}if(a2){var aY=this.getRange();var a1=a2.command?a2.command(s.extend({range:aY},aX)):null;ao.trigger(this.element,"execute",{name:a0,command:a1});if(/undo|redo/i.test(a0)){this.undoRedoStack[a0]()}else{if(a1){if(!a1.managesUndoRedo){this.undoRedoStack.push(a1)}a1.editor=this;a1.exec();if(a1.async){a1.change=s.proxy(function(){T(this)},this);return}}}T(this)}}};s.fn.tEditor=function(aX){return ao.create(this,{name:"tEditor",init:function(aY,aZ){return new ao.editor(aY,aZ)},options:aX})};var ah={bold:[{tags:["strong"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}],italic:[{tags:["em"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}],underline:[{tags:["span"],attr:{style:{textDecoration:"underline"}}}],strikethrough:[{tags:["del"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}],justifyLeft:[{tags:G,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left"}}}],justifyCenter:[{tags:G,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto"}}}],justifyRight:[{tags:G,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right"}}}],justifyFull:[{tags:G,attr:{style:{textAlign:"justify"}}}]};function ab(aZ,aY){for(var aX=0;aX=0){return aY[aX]}}}function V(aX){s.extend(this,aX);this.init=function(aY,aZ){aY.attr({unselectable:"on",title:aZ.title})};this.command=function(aY){return new aX.command(aY)};this.update=function(){}}V.exec=function(aY,aZ,aX){aY.focus();if(aY.selectionRestorePoint){aY.selectRange(aY.selectionRestorePoint.toRange())}aY.exec(aZ,{value:aX})};function af(aX){V.call(this,aX);this.command=function(aY){return new aF(s.extend(aY,{formatter:aX.formatter}))};this.update=function(aY,aZ){aY.toggleClass("t-state-active",aX.finder.isFormatted(aZ))}}var O=function(){return{isFormatted:function(){return false}}};var aL={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertHtml:"Insert HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",style:"Styles"};s.fn.tEditor.defaults={localization:aL,formats:ah,encoded:true,stylesheets:[],dialogOptions:{modal:true,resizable:false,draggable:true,effects:{list:[{name:"toggle"}]}},fontName:[{Text:aL.fontNameInherit,Value:"inherit"},{Text:"Arial",Value:"Arial,Helvetica,sans-serif"},{Text:"Courier New",Value:"'Courier New',Courier,monospace"},{Text:"Georgia",Value:"Georgia,serif"},{Text:"Impact",Value:"Impact,Charcoal,sans-serif"},{Text:"Lucida Console",Value:"'Lucida Console',Monaco,monospace"},{Text:"Tahoma",Value:"Tahoma,Geneva,sans-serif"},{Text:"Times New Roman",Value:"'Times New Roman',Times,serif"},{Text:"Trebuchet MS",Value:"'Trebuchet MS',Helvetica,sans-serif"},{Text:"Verdana",Value:"Verdana,Geneva,sans-serif"}],fontSize:[{Text:aL.fontSizeInherit,Value:"inherit"},{Text:"1 (8pt)",Value:"xx-small"},{Text:"2 (10pt)",Value:"x-small"},{Text:"3 (12pt)",Value:"small"},{Text:"4 (14pt)",Value:"medium"},{Text:"5 (18pt)",Value:"large"},{Text:"6 (24pt)",Value:"x-large"},{Text:"7 (36pt)",Value:"xx-large"}],formatBlock:[{Text:"Paragraph",Value:"p"},{Text:"Quotation",Value:"blockquote"},{Text:"Heading 1",Value:"h1"},{Text:"Heading 2",Value:"h2"},{Text:"Heading 3",Value:"h3"},{Text:"Heading 4",Value:"h4"},{Text:"Heading 5",Value:"h5"},{Text:"Heading 6",Value:"h6"}],tools:{bold:new W({key:"B",ctrl:true,format:ah.bold}),italic:new W({key:"I",ctrl:true,format:ah.italic}),underline:new W({key:"U",ctrl:true,format:ah.underline}),strikethrough:new W({format:ah.strikethrough}),undo:{key:"Z",ctrl:true},redo:{key:"Y",ctrl:true},insertLineBreak:new V({key:13,shift:true,command:d}),insertParagraph:new V({key:13,command:aO}),justifyCenter:new N({format:ah.justifyCenter}),justifyLeft:new N({format:ah.justifyLeft}),justifyRight:new N({format:ah.justifyRight}),justifyFull:new N({format:ah.justifyFull}),insertUnorderedList:new aI({tag:"ul"}),insertOrderedList:new aI({tag:"ol"}),createLink:new V({key:"K",ctrl:true,command:Y}),unlink:new aP({key:"K",ctrl:true,shift:true}),insertImage:new V({command:aJ}),indent:new V({command:o}),outdent:new ad(),insertHtml:new w(),style:new Z(),fontName:new aA({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName"}),fontSize:new aA({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize"}),formatBlock:new n(),foreColor:new aU({cssAttr:"color",domAttr:"color",name:"foreColor"}),backColor:new aU({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor"})}}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.editing.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.editing.min.js new file mode 100644 index 000000000..ab4dd3db6 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.editing.min.js @@ -0,0 +1 @@ +(function(e){var g=e.telerik;var d=function(i){this.formId=i;this._isBuild=false;var k="tUnobtrusiveValidation";var j="tUnobtrusiveContainer";var h=this.unobtrusive={adapters:[],parseElement:function(l,o){var m=e(l),n=m.parents("form")[0],q,p,r;if(!n){return}q=h.validationInfo(n);q.options.rules[l.name]=p={};q.options.messages[l.name]=r={};e.each(this.adapters,function(){var s="data-val-"+this.name,t=m.attr(s),u={};if(t!==undefined){s+="-";e.each(this.params,function(){u[this]=m.attr(s+this)});this.adapt({element:l,form:n,message:t,params:u,rules:p,messages:r})}});if(!o){q.attachValidation()}},parse:function(l){e(l).find(":input[data-val=true]").each(function(){h.parseElement(this,true)});e("form").each(function(){var m=h.validationInfo(this);if(m){m.attachValidation()}})},onError:function(l,o){var n=e(this).find("[data-valmsg-for='"+o[0].name+"']"),m=e.parseJSON(n.attr("data-valmsg-replace"))!==false;n.removeClass("field-validation-valid").addClass("field-validation-error");l.data(j,n);if(m){n.empty();l.removeClass("input-validation-error").appendTo(n)}else{l.hide()}},onErrors:function(l,o){var n=e(this).find("[data-valmsg-summary=true]"),m=n.find("ul");if(m&&m.length&&o.errorList.length){m.empty();n.addClass("validation-summary-errors").removeClass("validation-summary-valid");e.each(o.errorList,function(){e("
  • ").html(this.message).appendTo(m)})}},onSuccess:function(l){var n=l.data(j),m=e.parseJSON(n.attr("data-valmsg-replace"));if(n){n.addClass("field-valiion-valid").removeClass("field-validation-error");l.removeData(j);if(m){n.empty()}}},validationInfo:function(l){var n=e(l),m=n.data(k);if(!m){m={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:e.proxy(h.onError,l),invalidHandler:e.proxy(h.onErrors,l),messages:{},rules:{},success:e.proxy(h.onSuccess,l)},attachValidation:function(){n.validate(this.options)},validate:function(){n.validate();return n.valid()}};n.data(k,m)}return m}}};d.prototype={build:function(){if(this._isBuild){return}this._isBuild=true;var j=[];function h(m,l,k){m.rules[l]=k;if(m.message){m.messages[l]=m.message}}function i(k){return k.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}j=this.unobtrusive.adapters;j.add=function(m,l,k){if(!k){k=l;l=[]}this.push({name:m,params:l,adapt:k});return this};j.addBool=function(l,k){return this.add(l,function(m){h(m,k||l,true)})};j.addMinMax=function(n,l,p,k,m,o){return this.add(n,[m||"min",o||"max"],function(s){var q=s.params.min,r=s.params.max;if(q&&r){h(s,k,[q,r])}else{if(q){h(s,l,q)}else{if(r){h(s,p,r)}}}})};j.addSingleVal=function(l,m,k){return this.add(l,[m||"val"],function(n){h(n,k||l,n.params[m])})};j.addSingleVal("accept","exts").addSingleVal("regex","pattern");j.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");j.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");j.add("equalto",["other"],function(l){var k=e(l.form).find(":input[name="+l.params.other+"]")[0];h(l,"equalTo",k)});j.add("required",function(k){if(k.element.tagName.toUpperCase()!=="INPUT"||k.element.type.toUpperCase()!=="CHECKBOX"){h(k,"required",true)}});j.add("remote",["url","type","fields"],function(k){var l={url:k.params.url,type:k.params.type||"GET",data:{}};e.each(i(k.params.fields||k.element.name),function(m,n){l.data[n]=function(){return e(k.form).find(":input[name='"+n+"']").val()}});h(k,"remote",l)});if(e.validator.unobtrusive&&e.validator.unobtrusive.adapters){e.extend(j,e.validator.unobtrusive.adapters)}e.validator.addMethod("regex",function(k,m,l){if(this.optional(m)){return true}var n=new RegExp(l).exec(k);return n&&n.index==0&&n[0].length==k.length});e.validator.addMethod("number",function(k,n){var l=g.cultureInfo.numericgroupsize;var m=new g.stringBuilder();m.cat("^-?(?:\\d+|\\d{1,").cat(l).cat("}(?:").cat(g.cultureInfo.numericgroupseparator).cat("\\d{").cat(l).cat("})+)(?:\\").cat(g.cultureInfo.numericdecimalseparator).cat("\\d+)?$");return this.optional(n)||new RegExp(m.string()).test(k)})},parse:function(){this.build();this.unobtrusive.parse(this.formId)}};var c=function(h){this.validationMetaData=h};c.prototype={build:function(l){e.validator.addMethod("regex",function(x,z,y){if(this.optional(z)){return true}var A=new RegExp(y).exec(x);return A&&A.index==0&&A[0].length==x.length});e.validator.addMethod("number",function(x,A){var y=g.cultureInfo.numericgroupsize;var z=new g.stringBuilder();z.cat("^-?(?:\\d+|\\d{1,").cat(y).cat("}(?:").cat(g.cultureInfo.numericgroupseparator).cat("\\d{").cat(y).cat("})+)(?:\\").cat(g.cultureInfo.numericdecimalseparator).cat("\\d+)?$");return this.optional(A)||new RegExp(z.string()).test(x)});function q(y,x,z){y.range=[x,z]}function m(x,y){x.regex=y}function w(x){x.required=true}function s(x,y){x.maxlength=y}function j(x,y,z){x[y]=z}function u(A){var x={};for(var z=0;z",{id:j.element.id+"PopUp"}).appendTo(j.element).css({top:0,left:"50%",marginLeft:-90}).tWindow(j.settings).delegate(".t-grid-cancel","click",g.stopAll(function(){i()}));e(j.element).unbind("dataBound").bind("dataBound",function(){e(this).unbind("dataBound",arguments.callee);i()});e.each(["insert","update"],function(k,l){if(j[l]){h.undelegate(".t-grid-"+l,"click").delegate(".t-grid-"+l,"click",g.stopAll(function(m){j[l](m.target,h)}))}});h.find(".t-close").bind("click",g.stopAll(i)).end().data("tWindow").title(j.title).content(j.content).open();return h}g.editing.implementation={insertRow:function(h){var i=this.extractValues(h);if(g.trigger(this.element,"save",{mode:"insert",values:i,form:h.find("form")[0]})){return}this.sendValues(i,"insertUrl")},updateRow:function(h){var i=this.dataItem(h.data("tr")||h);var j=this.extractValues(h,true);if(g.trigger(this.element,"save",{mode:"edit",dataItem:i,values:j,form:h.find("form")[0]})){return}this.sendValues(j,"updateUrl")},deleteRow:function(h){if(g.trigger(this.element,"delete",{dataItem:this.dataItem(h)})){return}if(this.editing.confirmDelete===false||confirm(this.localization.deleteConfirmation)){this.sendValues(this.extractValues(h,true),"deleteUrl")}},editRow:function(j){a();var k=new g.stringBuilder();var l=b(this.columns,"edit");this.form(k,[{name:"update",attr:l.attr,buttonType:l.buttonType,imageAttr:l.imageAttr},{name:"cancel",attr:l.attr,buttonType:l.buttonType,imageAttr:l.imageAttr}],j.find(".t-hierarchy-cell").find(".t-icon").hasClass("t-plus"));var i=this.dataItem(j);var h=e(k.string());h.find("form").submit(g.preventDefault);h.children().hide();var m=h.find("tr:first td:not(.t-group-cell, .t-hierarchy-cell)");var n=this.editing.mode;if(n!="PopUp"){j.html(h)}else{f({title:this.localization.edit,element:this.element,settings:this.editing.popup,content:h,update:e.proxy(function(p,o){this.save(p,e.proxy(function(){o.data("tr",j);this.updateRow(o)},this))},this)})}this.formViewBinder.bind(h,i);if(n=="InLine"){e.each(this.columns,function(o){if(this.readonly){m.eq(o).html(this.display(i))}})}h.children().show();g.trigger(this.element,"edit",{mode:"edit",form:h.find("form")[0]||h[0],dataItem:i});this.validation()},addRow:function(){a();var l=new g.stringBuilder();var j=this.editing.mode;var k=b(this.columns,"edit");var i;if(j!="PopUp"){l.cat('');this.form(l,[{name:"insert",attr:k.attr,buttonType:k.buttonType,imageAttr:k.imageAttr},{name:"cancel",attr:k.attr,buttonType:k.buttonType,imageAttr:k.imageAttr}]);l.cat("");var h=e(l.string());h.find("form").submit(g.preventDefault);i=h.prependTo(this.$tbody)}else{this.form(l,[{name:"insert",attr:k.attr,buttonType:k.buttonType,imageAttr:k.imageAttr},{name:"cancel",attr:k.attr,buttonType:k.buttonType,imageAttr:k.imageAttr}]);i=e(l.string());i.find("form").submit(g.preventDefault);f({title:this.localization.insert,element:this.element,settings:this.editing.popup,content:i,insert:e.proxy(function(n,m){this.save(n,e.proxy(function(){this.insertRow(m)},this))},this)})}g.trigger(this.element,"edit",{mode:"insert",form:i.find("form")[0]||i[0]});this.validation()},extractValues:function(m,j){var k=this.modelBinder.bind(m);if(j){var l=this.dataItem(m.data("tr")||m);for(var i in this.dataKeys){var h=this.valueFor({member:i})(l);if(h instanceof Date){h=g.formatString("{0:G}",h)}k[this.ws?i:this.dataKeys[i]]=h}}return k},cancelRow:function(h){if(!h.length){return}if(h.is(".t-grid-new-row")){var l=h.closest("tbody");h.remove();if(e.browser.msie){l.hide().show()}return}var k=this.dataItem(h);var j=new g.stringBuilder();var i=h.find(".t-hierarchy-cell").find(".t-icon").hasClass("t-plus");j.rep('',this.groups.length).catIf('',this.detail);e.each(this.columns,e.proxy(function(m,n){j.cat("");if(n.display){j.cat(n.display(k))}this.appendCommandHtml(n.commands,j);j.cat("")},this));h.html(j.string());g.trigger(this.element,"rowDataBound",{row:h[0],dataItem:k})},form:function(k,h,l){var i=this.$tbody.siblings("colgroup");var m=this.editing.mode;if(m!="PopUp"){k.cat('')}k.cat('
    ');if(m=="InLine"){k.cat('');e(this.element).find("colgroup:first").children().each(function(){var n=this.style.width;if(e(this).hasClass("t-group-col")){k.cat('')}else{if(n!="0px"){k.cat('')}else{k.cat("")}}});var j=new g.stringBuilder();j.cat('");k.cat("").rep('")},this));k.cat("
    ').catIf('',l!=undefined).cat("
    ',this.groups.length).catIf(j.string(),this.detail);e.each(this.columns,e.proxy(function(n,o){k.cat("").catIf(unescape(o.editor),o.editor).catIf(" ",!o.editor&&!o.commands);if(o.commands){var p=e.grep(o.commands,function(q){return q.name=="edit"})[0];this.appendCommandHtml(p?h:o.commands,k)}k.cat("
    ")}else{k.cat('
    ').cat(unescape(this.editing.editor));this.appendCommandHtml(h,k);k.cat("
    ")}k.cat("
    ");k.catIf("",m!="PopUp")},save:function(h,i){e(h).closest("form").validate().form()&&i()},cancel:function(){this.cancelRow(e("#"+this.formId()).closest("tr"))},sendValues:function(l,h){if(this.ws){for(var i in l){var k=this.columnFromMember(i);if(k&&k.type=="Date"){var j=g.datetime.parse({value:l[i],format:g.cultureInfo.shortDate}).toDate();l[i]="\\/Date("+j.getTime()+")\\/"}}}e.ajax(this.ajaxOptions({data:this.ws?{value:l}:l,url:this.url(h),hasErrors:e.proxy(this.hasErrors,this),displayErrors:e.proxy(this.displayErrors,this)}))},displayErrors:function(h){this.errorView.bind(e("#"+this.formId()),h.modelState)},hasErrors:function(h){var i=h.modelState;var j=false;if(i){e.each(i,function(k,l){if("errors" in l){j=true;return false}})}return j},formId:function(){return e(this.element).attr("id")+"form"},validation:function(){this.validator().parse()},validator:function(){if(!this._validator){if(this.validationMetadata){this._validator=new c(this.validationMetadata)}else{this._validator=new d(e("#"+this.formId()))}}return this._validator}};g.grid.ModelBinder=function(){this.binders={":input":function(){return e(this).val()},":checkbox":function(){return e(this).is(":checked")}};this.bind=function(h){var i={};e.each(this.binders,function(j,k){h.find(j).each(function(){if(!this.disabled){i[this.name]=k.call(this)}})});return i}};g.grid.FormViewBinder=function(h){this.converters=h||{};this.binders={":input":function(j){e(this).val(j)},":checkbox":function(j){e(this).attr("checked",j==true)}};function i(j){return function(k){e(this).parent().data(j).value(k)}}this.binders[".t-numerictextbox :input:hidden"]=i("tTextBox");this.binders[".t-dropdown :input:hidden"]=i("tDropDownList");this.binders[".t-combobox :input:hidden"]=i("tComboBox");this.evaluate=function(k,n){if(n!=null){var j=k,l=false,p=n.split(".");while(p.length){var q=p.shift();if(j!=null&&typeof(j[q])!="undefined"){j=j[q];l=true}else{if(l){l=false;break}}}if(l&&!e.isPlainObject(j)){var m=/^\/Date\((.*?)\)\/$/.exec(j);if(m){j=new Date(parseInt(m[1]))}var o=g.getType(j);if(o in this.converters){j=this.converters[o](n,j)}return j}}};this.bind=function(l,k){var j;e.each(this.binders,e.proxy(function(m,n){l.find(m).each(e.proxy(function(p,q){var o=this.evaluate(k,q.name);if(o!=j){n.call(q,o)}},this))},this))}};g.grid.ErrorView=function(){this.bind=function(h,i){h.find("span[id$=_validationMessage]").removeClass("field-validation-error").addClass("field-validation-valid").html("").end().find(".input-validation-error").removeClass("input-validation-error").addClass("valid");e.each(i,function(j,k){if("errors" in k&&k.errors[0]){h.find("#"+j+"_validationMessage").html(k.errors[0]).removeClass("field-validation-valid").addClass("field-validation-error").end().find("#"+j).removeClass("valid").addClass("input-validation-error")}})}}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.filtering.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.filtering.min.js new file mode 100644 index 000000000..743194560 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.filtering.min.js @@ -0,0 +1 @@ +(function(c){var b=c.telerik;var e=/'/ig;var d=b.fx.slide.defaults();function f(g){if(!g.format){return b.cultureInfo.shortDate}return/\{0(:([^\}]+))?\}/.exec(g.format)[2]}function a(h,g){if(h.type=="Date"){return b.formatString(h.format||"{0:G}",new Date(parseInt(g.replace(/\/Date\((.*?)\)\//,"$1"))))}return g}b.filtering={};b.filtering.initialize=function(g){c.extend(g,b.filtering.implementation);g.filterBy=g.filterExpr();c("> .t-grid-content",g.element).bind("scroll",function(){g.hideFilter()});c(document).click(function(h){if(h.which!=3){g.hideFilter()}});g.$header.find(".t-grid-filter").click(c.proxy(g.showFilter,g)).hover(function(){c(this).toggleClass("t-state-hover")})};b.filtering.implementation={createFilterCommands:function(h,g){var i={};c.each(this.localization,function(m,j){var k="filter"+g.type;var l=m.indexOf(k);if(l>-1){i[m.substring(l+k.length).toLowerCase()]=j}});h.cat('")},createTypeSpecificInput:function(j,g,h,i){if(g.type=="Date"){j.cat('
    ').cat('').cat('
    ')}else{if(g.type=="Boolean"){j.cat('
    ').cat('
    ")}else{if(g.type=="Enum"){j.cat("
    ")}else{if(g.type=="Number"){j.cat('
    ').cat('').cat("
    ")}else{j.cat('')}}}}},createFilterMenu:function(g){var j=new b.stringBuilder();j.cat('
    ");var i=c(j.string());c.each(g.filters||[],function(k){i.find(".t-filter-operator:eq("+k+")").val(this.operator).end().find(":text:eq("+k+"),select:not(.t-filter-operator):eq("+k+")").val(a(g,this.value));if(g.type=="Boolean"){i.find(":radio[id$="+this.value+"]").attr("checked",true)}});return i.find(".t-datepicker").each(function(){c(this).tDatePicker({format:f(g)})}).end().find(".t-numerictextbox").each(function(){c(this).tTextBox({type:"numeric",minValue:null,maxValue:null,numFormat:"",groupSeparator:""})}).end().appendTo(this.element)},showFilter:function(m){m.stopPropagation();var g=c(m.target).closest(".t-grid-filter");this.hideFilter(function(){return this.parentNode!=g[0]});var k=g.data("filter");if(!k){var h=this.columns[this.$columns().index(g.parent())];k=this.createFilterMenu(h).data("column",h).click(function(p){p.stopPropagation();if(c(p.target).parents(".t-datepicker").length==0){c(".t-datepicker",this).each(function(){c(this).data("tDatePicker").hidePopup()})}}).find(".t-filter-button").click(c.proxy(this.filterClick,this)).end().find(".t-clear-button").click(c.proxy(this.clearClick,this)).end().find("input[type=text]").keyup(c.proxy(function(p){if(p.keyCode==13){this.filterClick(p)}},this)).end();g.data("filter",k)}var l=0;c(this.element).find("> .t-grouping-header, > .t-grid-toolbar").add(this.$header).each(function(){l+=this.offsetHeight});var i={top:l};var n=-this.$headerWrap.scrollLeft()-1;g.parent().add(g.parent().prevAll("th")).each(function(){if(c(this).css("display")!="none"){n+=this.offsetWidth}});var j=n-g.outerWidth();var o=k.outerWidth()||k.find(".t-group").outerWidth();if(j+o>this.$header.outerWidth()){j=n-o+1}if(c(this.element).closest(".t-rtl").length){i.right=j+(c.browser.mozilla||c.browser.safari?18:0)}else{i.left=j}k.css(i);b.fx[k.find(".t-filter-options").is(":visible")?"rewind":"play"](d,k.find(".t-filter-options"),{direction:"bottom"})},hideFilter:function(g){g=g||function(){return true};c(".t-grid .t-animation-container").find(".t-datepicker").each(function(){c(this).data("tDatePicker").hidePopup()}).end().find(".t-filter-options").filter(g).each(function(){b.fx.rewind(d,c(this),{direction:"bottom"})})},clearClick:function(i){i.preventDefault();var h=c(i.target);var g=h.closest(".t-animation-container").data("column");g.filters=null;h.parent().find("input").removeAttr("checked").removeClass("t-state-error").not(":radio").val("").end().end().find("select").removeClass("t-state-error").find("option:first").attr("selected","selected");this.filter(this.filterExpr())},filterClick:function(j){j.preventDefault();var i=c(j.target);var g=i.closest(".t-animation-container").data("column");g.filters=[];var h=false;i.parent().find("input[type=text]:visible,select:not(.t-filter-operator)").each(c.proxy(function(p,n){var l=c(n);var k=c.trim(l.val());if(!k){l.removeClass("t-state-error");return true}var m=this.isValidFilterValue(g,k);l.toggleClass("t-state-error",!m);if(!m){h=true;return true}var o=l.prev("select").val()||l.parent().prev("select").val()||l.parent().parent().prev("select").val();if(k!=this.localization.filterSelectValue){g.filters.push({operator:o,value:k})}},this));i.parent().find("input:checked").each(c.proxy(function(m,l){var n=c(l);var k=c(l).attr("value");g.filters.push({operator:"eq",value:k})},this));if(!h){if(g.filters.length>0){this.filter(this.filterExpr())}this.hideFilter()}},isValidFilterValue:function(h,g){if(h.type=="Number"){return !isNaN(g)}return true},encodeFilterValue:function(g,h){switch(g.type){case"String":return"'"+h.replace(e,"''")+"'";case"Date":var i;if(h.indexOf("Date(")>-1){i=new Date(parseInt(h.replace(/^\/Date\((.*?)\)\/$/,"$1")))}else{i=b.datetime.parse({value:h,format:f(g)}).toDate()}return"datetime'"+b.formatString("{0:yyyy-MM-ddTHH-mm-ss}",i)+"'"}return h},filterExpr:function(){var h=[];for(var g=0;g');f.$groupHeader=d("> .t-grouping-header",f.element);function h(){var k=d.map(f.$groupHeader.find(".t-group-indicator"),function(l){var m=d(l);var n=m.offset().left;var o=m.outerWidth();return{left:n,right:n+o,width:o,$group:m}});return{first:k[0],all:k,last:k[k.length-1]}}function g(r){var m=r.$cue.text();if(!d.contains(f.element,r.target)||!d(r.target).closest(".t-grouping-header").length||(f.groupFromTitle(m)&&r.$draggable.closest(".t-header").length)){f.$groupDropCue.remove();return}var n=d("> .t-grid-toolbar",f.element).outerHeight()+c;var o=h();if(!o.all.length){f.$groupDropCue.css({top:n,left:a}).appendTo(f.$groupHeader);return}var q=o.first;var s=o.last;var l=parseInt(q.$group.css("marginLeft"));var k=parseInt(q.$group.css("marginRight"));var p=d.grep(o.all,function(t){return r.pageX>=t.left-l-k&&r.pageX<=t.right})[0];if(!p&&q&&r.pageX=0){f.groups.splice(d.inArray(m,f.groups),1);f.groups.splice(o,0,m)}f.groupBy=d.map(f.groups,function(q){return q.member+"-"+q.order}).join("~");if(this.isAjax()){var p=this.$groupHeader.find('div:contains("'+l+'")');if(p.length==0){var k=new d.telerik.stringBuilder().cat('
    ').cat('').cat(l).cat("").cat('').cat("
    ").string();p=d(k).appendTo(this.$groupHeader)}if(this.$groupDropCue.is(":visible")){p.insertBefore(this.$groupDropCue)}p.find(".t-link .t-icon").toggleClass("t-arrow-up-small",m.order=="asc").toggleClass("t-arrow-down-small",m.order=="desc");this.ajaxRequest()}else{this.serverRequest()}};f.unGroup=function(l){var k=f.groupFromTitle(l);f.groups.splice(d.inArray(k,f.groups),1);if(f.groups.length==0){f.$groupHeader.html(f.localization.groupHint)}f.groupBy=d.map(f.groups,function(m){return m.member+"-"+m.order}).join("~");if(f.isAjax()){f.$groupHeader.find('div:contains("'+k.title+'")').remove();f.ajaxRequest()}else{f.serverRequest()}},f.normalizeColumns=function(n){var o=f.groups.length;var m=n-f.$tbody.parent().find(" > colgroup > col").length;if(m==0){return}var p=f.$tbody.parent().add(f.$headerWrap.find("table")).add(f.$footerWrap.find("table"));if(d.browser.msie){if(m>0){d(new b.stringBuilder().rep('',m).string()).prependTo(p.find("colgroup"));d(new b.stringBuilder().rep(' ',m).string()).insertBefore(p.find("th.t-header:first"));d(new b.stringBuilder().rep(' ',m).string()).insertBefore(p.find("tr.t-footer-template > td:first"))}else{p.find("th:lt("+Math.abs(m)+"), tr.t-footer-template > td:lt("+Math.abs(m)+")").remove().end().find("col:lt("+Math.abs(m)+")").remove()}var k=[];var l=0;d("table",f.element).each(function(){k.push(this.parentNode)}).appendTo(d("
    ")).each(function(){k[l++].appendChild(this)})}else{p.find("col.t-group-col").remove();d(new b.stringBuilder().rep('',o).string()).prependTo(p.find("colgroup"));p.find("th.t-group-cell").remove();p.find("tr.t-footer-template > td.t-group-cell").remove();d(new b.stringBuilder().rep(' ',o).string()).insertBefore(p.find("th.t-header:first"));d(new b.stringBuilder().rep(' ',o).string()).insertBefore(p.find("tr.t-footer-template > td:first"))}f.$footer.find(".t-pager-wrapper").attr("colspan",n)},f.bindGroup=function(n,r,q,p){var o=f.groups[p];var t=n.Key;var m=d.grep(f.columns,function(l){return o.member==l.member})[0];if(m&&(m.format||m.type=="Date")){t=b.formatString(m.format||"{0:G}",t)}q.cat('').rep('',p).cat('

    ').cat(o.title).cat(": ").cat(t).cat("

    ");if(n.HasSubgroups){for(var k=0,s=n.Items.length;k)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<#=(.+?)#>/g,"',$1,'").split("<#").join("');").split("#>").join("p.push('")+"');}return p.join('');"))}function a(f){return(f!=null?f+"":"").replace(/&/g,"&").replace(//g,">")}b.grid=function(f,g){this.element=f;this.groups=[];this.editing={};this.filterBy="";this.groupBy="";this.orderBy="";e.extend(this,g);this.sorted=e.grep(this.columns,function(i){return i.order});this.$tbody=e("> .t-grid-content > table tbody",f);this.scrollable=this.$tbody.length>0;if(!this.scrollable){this.$tbody=e("> table > tbody",f);this.$header=e("> table > thead tr",f);this.$footer=e("> table > tfoot",f)}else{this.$header=e("> .t-grid-header tr",f);this.$footer=e("> .t-grid-footer",f)}this.$footerWrap=this.$footer.find(".t-footer-template-wrap");var l=this.$headerWrap=e("> .t-grid-header > .t-grid-header-wrap",f);e("> .t-grid-content",f).bind("scroll",function(){l.scrollLeft(this.scrollLeft)});this.$tbody.delegate(".t-hierarchy-cell .t-plus, .t-hierarchy-cell .t-minus","click",b.stopAll(function(p){var o=e(p.target);var n=o.hasClass("t-plus");o.toggleClass("t-minus",n).toggleClass("t-plus",!n);var i=o.closest("tr.t-master-row");if(this.detail&&!i.next().hasClass("t-detail-row")){e(new b.stringBuilder().cat('').rep('',i.find(".t-group-cell").length).cat('').cat('').cat(this.displayDetails(this.dataItem(i))).cat("").string()).insertAfter(i)}b.trigger(this.element,n?"detailViewExpand":"detailViewCollapse",{masterRow:i[0],detailRow:i.next(".t-detail-row")[0]});i.next().toggle(n)},this));this.$pager=e("> .t-pager-wrapper .t-pager",f).add(this.$footer.find(".t-pager"));this.$pager.delegate(".t-state-disabled","click",b.preventDefault).delegate(".t-link:not(.t-state-disabled)","mouseenter",b.hover).delegate(".t-link:not(.t-state-disabled)","mouseleave",b.leave).delegate("input[type=text]","keydown",e.proxy(this.pagerKeyDown,this));this.$footer.add(e("> .t-pager-wrapper",f)).delegate(".t-refresh","click",e.proxy(this.refreshClick,this));e(f).delegate(".t-button","hover",b.stop(function(){e(this).toggleClass("t-button-hover")}));if(this.sort){this.$header.delegate(".t-link","hover",function(){e(this).toggleClass("t-state-hover")})}var m="tr:not(.t-grouping-row,.t-detail-row,.t-no-data)";if(this.selectable){var k=this.$tbody[0];var j=this;this.$tbody.delegate(m,"click",function(i){if(this.parentNode==k){j.rowClick(i)}}).delegate(m,"hover",function(){if(this.parentNode==k){e(this).toggleClass("t-state-hover")}})}if(this.isAjax()){this.$pager.delegate(".t-link:not(.t-state-disabled)","click",b.stop(this.pagerClick,this));if(this.sort){this.$header.delegate(".t-link","click",b.stop(this.headerClick,this))}}for(var h=0;h tr:not(.t-grouping-row,.t-detail-row)")},expandRow:function(f){e(f).find("> td .t-plus, > td .t-expand").click()},collapseRow:function(f){e(f).find("> td .t-minus, > td .t-collapse").click()},headerClick:function(f){f.preventDefault();this.toggleOrder(this.$columns().index(e(f.target).closest("th")));this.sort(this.sortExpr())},refreshClick:function(g,f){if(e(f).is(".t-loading")){return}if(this.isAjax()){g.preventDefault();this.ajaxRequest(true)}},sort:function(f){this.orderBy=f;this.ajaxRequest()},columnFromTitle:function(g){g=e.trim(g);var f=e.grep(this.$columns(),function(h){return e.trim(e(h).text())==g})[0];if(f){return this.columns[this.$columns().index(f)]}return e.grep(this.columns,function(h){return h.title==g})[0]},columnFromMember:function(f){var g=e.grep(this.columns,function(h){return h.member==f})[0];if(!g){g=e.grep(this.columns,function(i){var h="."+i.member;return f.substr(f.length-h.length)==h})[0]}return g},toggleOrder:function(f){f=typeof f=="number"?this.columns[f]:f;var h="asc";if(f.order=="asc"){h="desc"}else{if(f.order=="desc"){h=null}}f.order=h;var g=e.inArray(f,this.sorted);if(this.sortMode=="single"&&g<0){e.each(this.sorted,function(){this.order=null});this.sorted=[]}if(g<0&&h){this.sorted.push(f)}if(!h){this.sorted.splice(g,1)}},sortExpr:function(){return e.map(this.sorted,function(f){return f.member+"-"+f.order}).join("~")},pagerKeyDown:function(f){if(f.keyCode==13){var g=this.sanitizePage(e(f.target).val());if(g!=this.currentPage){this.pageTo(g)}else{e(f.target).val(g)}}},isAjax:function(){return this.ajax||this.ws||this.onDataBinding},url:function(f){return(this.ajax||this.ws)[f]},pagerClick:function(k){k.preventDefault();var g=e(k.target).closest(".t-link");var h=this.currentPage;var i=g.find(".t-icon");if(i.hasClass("t-arrow-next")){h++}else{if(i.hasClass("t-arrow-last")){h=this.totalPages()}else{if(i.hasClass("t-arrow-prev")){h--}else{if(i.hasClass("t-arrow-first")){h=1}else{var f=g.text();if(f=="..."){var j=g.parent().children().index(g);if(j==0){h=parseInt(g.next().text())-1}else{h=parseInt(g.prev().text())+1}}else{h=parseInt(f)}}}}}this.pageTo(isFinite(h)?h:this.currentPage)},pageTo:function(f){this.currentPage=f;if(this.isAjax()){this.ajaxRequest()}else{this.serverRequest()}},ajaxOptions:function(g){var f={type:"POST",dataType:"text",dataFilter:function(i,j){return i.replace(c,"new Date($1)")},error:e.proxy(function(j,i){if(b.ajaxError(this.element,"error",j,i)){return}},this),complete:e.proxy(this.hideBusy,this),success:e.proxy(function(j,k,i){try{j=eval("("+j+")")}catch(l){if(!b.ajaxError(this.element,"error",i,"parseeror")){alert("Error! The requested URL did not return JSON.")}return}j=j.d||j;if(g.hasErrors&&g.hasErrors(j)){g.displayErrors(j);return}this.total=j.total||j.Total||0;this.dataBind(j.data||j.Data)},this)};e.extend(f,g);var h=this.ws?f.data.state={}:f.data;h[this.queryString.page]=this.currentPage;h[this.queryString.size]=this.pageSize;h[this.queryString.orderBy]=this.orderBy||"";h[this.queryString.groupBy]=this.groupBy;h[this.queryString.filter]=(this.filterBy||"").replace(/\"/g,'\\"');if(this.ws){f.data=b.toJson(f.data);f.contentType="application/json; charset=utf-8"}return f},showBusy:function(){this.busyTimeout=setTimeout(e.proxy(function(){e(".t-pager-wrapper",this.element).find(".t-status .t-icon").addClass("t-loading")},this),100)},hideBusy:function(){clearTimeout(this.busyTimeout);e(".t-pager-wrapper",this.element).find(".t-status .t-icon").removeClass("t-loading")},serverRequest:function(){location.href=b.formatString(unescape(this.urlFormat),this.currentPage,this.orderBy||"~",this.groupBy||"~",encodeURIComponent(this.filterBy)||"~")},ajaxRequest:function(){var f={page:this.currentPage,sortedColumns:this.sorted,filteredColumns:e.grep(this.columns,function(g){return g.filters})};if(b.trigger(this.element,"dataBinding",f)){return}if(!this.ajax&&!this.ws){return}this.showBusy();e.ajax(this.ajaxOptions({data:e.extend({},f.data),url:this.url("selectUrl")}))},valueFor:function(f){if(f.type=="Date"){return new Function("data","var value = data."+f.member+'; if (!value) return null; return value instanceof Date? value : new Date(parseInt(value.replace(/\\/Date\\((.*?)\\)\\//, "$1")));')}return new Function("data","return data"+(f.member?"."+f.member:"")+";")},displayFor:function(g){if(!g.template){var f=g.value;if(g.format||g.type=="Date"){f=function(h){var i=g.value(h);return i==null?"":b.formatString(g.format||"{0:G}",i)}}return g.encoded===false?f:function(h){return a(f(h))}}return d(g.template)},createColumnMappings:function(){e.each(this.columns,e.proxy(function(f,g){if(g.member!==undefined){g.value=this.valueFor(g);g.display=this.displayFor(g);g.edit=g.type!="Date"?g.value:g.display}else{if(g.template){g.display=this.displayFor(g);g.readonly=true}}},this));if(this.detail){this.displayDetails=d(this.detail.template)}},bindData:function(g,k,m){Array.prototype.push.apply(this.data,g);var o=Math.min(this.pageSize,g.length);o=this.pageSize?o:g.length;if(e.browser.msie){e(this.element).find(".t-grid-content colgroup:first col").css("display","")}for(var p=0;p')}else{k.cat("")}k.rep('',m).catIf('',this.detail);for(var h=0,l=this.columns.length;h");var j=n.display;if(j){k.cat(j(g[p]))}this.appendCommandHtml(n.commands,k);k.cat("")}k.cat("")}},appendCommandHtml:function(h,i){if(h){var f=this.localization;var g=function(j,k){k.cat('")};e.each(h,function(){var k=i.cat('");var j=this.buttonType;if(j=="Image"){g(this,k)}else{if(j=="ImageAndText"){g(this,k);k.cat(f[this.name])}else{k.cat(f[this.name])}}k.cat("")})}},normalizeColumns:function(){},dataItem:function(f){return this.data[this.$tbody.find("> tr:not(.t-grouping-row,.t-detail-row)").index(e(f))]},bindTo:function(k){var h=new b.stringBuilder();var j=this.groups.length+this.columns.length+(this.detail?1:0);if(k&&k.length){this.normalizeColumns(j);if(typeof k[0].HasSubgroups!="undefined"){for(var f=0,g=k.length;f").cat("").cat(this.noRecordsTemplate?this.noRecordsTemplate:this.localization.noRecords).cat("")}this.$tbody.html(h.string());if(this.onRowDataBound){var m=jQuery.grep(this.$tbody[0].rows,function(i){return !e(i).hasClass("t-grouping-row")});for(var f=0,g=this.data.length;f=f).removeClass("t-state-hover");this.$pager.find(".t-arrow-prev").parent().add(this.$pager.find(".t-arrow-first").parent()).toggleClass("t-state-disabled",h==1).removeClass("t-state-hover");var g=this.localization;this.$pager.find(".t-page-i-of-n").each(function(){this.innerHTML=new b.stringBuilder().cat(g.page).cat(' ').cat(b.formatString(g.pageOf,f)).string()});this.$pager.find(".t-numeric").each(e.proxy(function(j,i){this.numericPager(i,h,f)},this));this.$pager.parent().find(".t-status-text").text(b.formatString(g.displayingItems,this.firstItemInPage(),this.lastItemInPage(),this.total))},numericPager:function(g,m,n){var k=10;var i=1;if(m>k){var f=(m%k);i=(f==0)?(m-k)+1:(m-f)+1}var j=(i+k)-1;j=Math.min(j,n);var h=new b.stringBuilder();if(i>1){h.cat('...')}for(var l=i;l<=j;l++){if(l==m){h.cat('').cat(l).cat("")}else{h.cat('').cat(l).cat("")}}if(j...')}g.innerHTML=h.string()},$columns:function(){return this.$header.find("th:not(.t-hierarchy-cell,.t-group-cell)")},updateSorting:function(){this.sorted=[];e.each(this.orderBy.split("~"),e.proxy(function(g,f){var h=f.split("-");var i=this.columnFromMember(h[0]);if(i){i.order=h[1];this.sorted.push(i)}},this));this.$columns().each(e.proxy(function(g,k){var h=this.columns[g].order;var f=e(k).children(".t-link");var j=f.children(".t-icon");if(!h){j.hide()}else{if(j.length==0){j=e('').appendTo(f)}j.toggleClass("t-arrow-up",h=="asc").toggleClass("t-arrow-down",h=="desc").show()}},this))},sanitizePage:function(g){var f=parseInt(g,10);if(isNaN(f)||f<1){return this.currentPage}return Math.min(f,this.totalPages())},totalPages:function(){return Math.ceil(this.total/this.pageSize)},firstItemInPage:function(){return this.total>0?(this.currentPage-1)*this.pageSize+1:0},lastItemInPage:function(){return Math.min(this.currentPage*this.pageSize,this.total)},dataBind:function(f){this.data=[];this.bindTo(f);this.updatePager();this.updateSorting();b.trigger(this.element,"dataBound")},rebind:function(g){this.sorted=[];this.filterBy="";this.currentPage=1;e.each(this.columns,function(){this.order=null;this.filters=[]});e(".t-filter-options",this.element).find('input[type="text"], select').val("").removeClass("t-state-error");for(var i in g){var h=new RegExp(b.formatString("({0})=([^&]*)",i),"g");if(h.test(this.ajax.selectUrl)){this.ajax.selectUrl=this.ajax.selectUrl.replace(h,"$1="+g[i])}else{var f=new b.stringBuilder();f.cat(this.ajax.selectUrl);if(this.ajax.selectUrl.indexOf("?")<0){f.cat("?")}else{f.cat("&")}this.ajax.selectUrl=f.cat(i).cat("=").cat(g[i]).string()}}this.ajaxRequest()}};e.fn.tGrid=function(f){return b.create(this,{name:"tGrid",init:function(g,h){return new b.grid(g,h)},options:f,success:function(g){if(g.$tbody.find("tr.t-no-data").length){g.ajaxRequest()}}})};e.fn.tGrid.defaults={columns:[],plugins:[],currentPage:1,pageSize:10,localization:{addNew:"Add new record","delete":"Delete",cancel:"Cancel",insert:"Insert",update:"Update",select:"Select",pageOf:"of {0}",displayingItems:"Displaying items {0} - {1} of {2}",edit:"Edit",noRecords:"No records to display.",page:"Page ",filter:"Filter",filterClear:"Clear Filter",filterShowRows:"Show rows with value that",filterAnd:"And",filterStringEq:"Is equal to",filterStringNe:"Is not equal to",filterStringStartsWith:"Starts with",filterStringSubstringOf:"Contains",filterStringEndsWith:"Ends with",filterNumberEq:"Is equal to",filterNumberNe:"Is not equal to",filterNumberLt:"Is less than",filterNumberLe:"Is less than or equal to",filterNumberGt:"Is greater than",filterNumberGe:"Is greater than or equal to",filterDateEq:"Is equal to",filterDateNe:"Is not equal to",filterDateLt:"Is before",filterDateLe:"Is before or equal to",filterDateGt:"Is after",filterDateGe:"Is after or equal to",filterEnumEq:"Is equal to",filterEnumNe:"Is not equal to",filterBoolIsTrue:"is true",filterBoolIsFalse:"is false",filterSelectValue:"-Select value-",filterOpenPopupHint:"Open the calendar popup",groupHint:"Drag a column header and drop it here to group by that column",deleteConfirmation:"Are you sure you want to delete this record?"},queryString:{page:"page",size:"size",orderBy:"orderBy",groupBy:"groupBy",filter:"filter"}}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.reordering.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.reordering.min.js new file mode 100644 index 000000000..ad40d8fcb --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.reordering.min.js @@ -0,0 +1 @@ +(function(a){var b=a.telerik;b.reordering={};b.reordering.initialize=function(d){d.$reorderDropCue=a('
    ');var c=d.$header.children("th").length-1;var e=function(i,l){var k=a.inArray(l,d.columns);d.columns.splice(k,1);d.columns.splice(i,0,l);h(d.$columns(),k,i);h(d.$tbody.parent().find("> colgroup > col:not(.t-group-col,.t-hierarchy-col)"),k,i);h(d.$headerWrap.find("table").find("> colgroup > col:not(.t-group-col,.t-hierarchy-col)"),k,i);var j=d.$footerWrap.find("table");h(j.find("> colgroup > col:not(.t-group-col,.t-hierarchy-col)"),k,i);h(j.find("> tbody > tr.t-footer-template > td:not(.t-group-cell,.t-hierarchy-cell)").add(d.$footer.find("tr.t-footer-template > td:not(.t-group-cell,.t-hierarchy-cell)")),k,i);a.each(d.$tbody.children(),function(){h(a(this).find(" > td:not(.t-group-cell, .t-hierarchy-cell, .t-detail-cell)"),k,i)})};d.reorderColumn=e;function f(i,k,l,j){g(i,k,l,j,"th","t-last-header");g(i,k,l,j,"td","t-last")}function g(j,l,k,m,i,n){if(k.is(i)&&m==c){j.addClass(n);k.removeClass(n)}if(j.is(i)&&l==c){j.removeClass(n).prev(i).addClass(n)}}function h(j,k,i){var l=j.eq(k);var m=j.eq(i);f(l,k,m,i);l[k>i?"insertBefore":"insertAfter"](m)}new b.draggable({owner:d.$header,selector:".t-header:not(.t-group-cell,.t-hierarchy-cell)",scope:d.element.id+"-reodering",cue:function(i){return b.dragCue(i.$draggable.text())},destroy:function(i){i.$cue.remove()}});new b.droppable({owner:d.$header,scope:d.element.id+"-reodering",selector:".t-header:not(.t-group-cell,.t-hierarchy-cell)",over:function(i){var j=a.trim(i.$draggable.text())==a.trim(i.$droppable.text());b.dragCueStatus(i.$cue,j?"t-denied":"t-add");if(!j){d.$reorderDropCue.css({height:i.$droppable.outerHeight(),top:a("> .t-grid-toolbar",d.element).outerHeight()+a("> .t-pager-wrapper",d.element).outerHeight()+a("> .t-grouping-header",d.element).outerHeight(),left:function(){return i.$droppable.position().left+((i.$droppable.index()>i.$draggable.index())?i.$droppable.outerWidth():0)}}).appendTo(d.element)}},out:function(i){d.$reorderDropCue.remove();b.dragCueStatus(i.$cue,"t-denied")},drop:function(k){d.$reorderDropCue.remove();if(k.$cue.find(".t-drag-status").is(".t-add")){var i=d.columnFromTitle(a.trim(k.$draggable.text()));var j=d.$columns().index(k.$droppable);b.trigger(d.element,"columnReorder",{column:i,oldIndex:a.inArray(i,d.columns),newIndex:j});e(j,i)}}})}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.resizing.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.resizing.min.js new file mode 100644 index 000000000..8f26e86f9 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.grid.resizing.min.js @@ -0,0 +1 @@ +(function(a){var b=a.telerik;b.resizing={};b.resizing.initialize=function(p){var c,o=a('
    '),j,d,i,m=3;function n(q,r){a("th, th .t-grid-filter, th .t-link",q).add(document.body).css("cursor",r)}function l(q){var r=0;a(".t-grouping-header, .t-grid-toolbar, > .t-pager-wrapper",q).each(function(){r+=this.offsetHeight});return r}function e(t){var r=0;a(".t-resize-handle",p.element).each(function(){r+=a(this).data("th").outerWidth();a(this).css("left",r-m)});r=-p.$tbody.closest(".t-grid-content").scrollLeft();t.prevAll("th").add(t).each(function(){r+=this.offsetWidth});var q=p.scrollable?a(".t-grid-content",p.element):a("tbody",p.element);var s=q.attr(p.scrollable?"clientWidth":"offsetWidth");if(r>=s){o.remove()}else{o.css({left:r,top:l(p.element),height:t.outerHeight()+q.attr(p.scrollable?"clientHeight":"offsetHeight")});if(!o.parent().length){o.appendTo(p.element)}}}function k(r){var q=r.$draggable.data("th");c=a("colgroup",p.element).find("col:eq("+q.index()+")");i=r.pageX;d=q.outerWidth();j=p.$tbody.outerWidth()}function h(q){var r=d+q.pageX-i;if(r>10){c.css("width",r);if(p.scrollable){p.$tbody.parent().add(p.$headerWrap.find("table")).add(p.$footerWrap.find("table")).css("width",j+q.pageX-i)}e(q.$draggable.data("th"))}}function g(s){o.remove();n(p.element,"");var r=s.$draggable.data("th");var q=r.outerWidth();if(p.onColumnResize&&q!=d){b.trigger(p.element,"columnResize",{column:p.columns[p.$columns().index(r)],oldWidth:d,newWidth:q})}return false}var f=0;a(p.element).bind("mouseenter",function(){a(this).unbind("mouseenter",arguments.callee).find(".t-header").each(function(){f+=this.offsetWidth;var q=a(this);if(!q.hasClass("t-group-cell")){a('
    ').css({left:f-m,top:p.scrollable?0:l(p.element),width:m*2}).appendTo(p.scrollable?p.$headerWrap:p.element).data("th",q).mousedown(function(){e(q);n(p.element,a(this).css("cursor"))}).mouseup(function(){n(p.element,"")})}});new b.draggable({owner:p.element,selector:".t-resize-handle",scope:p.element.id+"-column-resizing",distance:0,start:k,drag:h,stop:g})})}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.list.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.list.min.js new file mode 100644 index 000000000..8f9eff5c6 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.list.min.js @@ -0,0 +1 @@ +(function(d){var a=d.telerik;a.list={initialize:function(){this.previousValue=this.value();a.bind(this,{dataBinding:this.onDataBinding,dataBound:this.onDataBound,error:this.onError,open:this.onOpen,close:this.onClose,valueChange:this.onChange,load:this.onLoad});d(document.documentElement).bind("mousedown",d.proxy(function(h){var f=this.dropDown.$element;var g=f&&f.parent().length>0;if(g&&!d.contains(this.element,h.target)&&!d.contains(f.parent()[0],h.target)){this.trigger.change();this.trigger.close()}},this))},common:function(){this.open=function(){if(this.data.length==0){return}var g=this.$element;var e=this.dropDown;var f={offset:g.offset(),outerHeight:g.outerHeight(),outerWidth:g.outerWidth(),zIndex:a.getElementZIndex(g[0])};if(e.$items){e.open(f)}else{this.fill(function(){e.open(f)})}};this.close=function(){this.dropDown.close()};this.dataBind=function(e,g){e=e||[];this.data=e;for(var h=0,f=e.length;h-1&&h0){l.filters[j](l,e,i);var f=l.filteredDataIndexes;if((f&&f.length>0)||(j==0&&l.selectedIndex!=-1)){r=false}}if(r){var o={};o[l.queryString.text]=i;l.loader.ajaxRequest(function(t){var u=l.trigger;var s=l.dropDown;if(t&&t.length==0){s.close();s.dataBind();return}l.data=t;a.trigger(l.element,"dataBound");l.filters[j](l,t,i);var v=s.$items;if(v.length>0){if(!s.isOpened()){u.open()}l.filtering.autoFill(l,v.first().text())}else{u.close()}},{data:o})}}else{r=false;l.filters[j](l,l.data,i)}if(!r){var q=k.$items;var g=q.length;var h=l.selectedIndex;var m=j==0?h!=-1?q[h].innerText||q[h].textContent:"":q.length>0?q.first().text():"";this.autoFill(l,m);if(g==0){n.close()}else{if(!k.isOpened()){n.open()}}}};this.multiple=function(e){return e}},filters:function(){this.filters=[function e(f,j,m){if(!j||j.length==0){return}var k=f.dropDown;var h=k.$items;if(h.length==0||f.loader.isAjax()){k.dataBind(j);h=k.$items}for(var g=0,l=j.length;g .t-dropdown-wrap .t-icon").addClass("t-loading")},this),100)},this.hideBusy=function(){clearTimeout(this.busyTimeout);this.component.$element.find("> .t-dropdown-wrap .t-icon").removeClass("t-loading")}},trigger:function(e){this.component=e;this.change=function(){var k=e.data;var m=e.text();var n=m.toLowerCase();var l=e.previousValue;for(var g=0,j=k.length;g0)&&!f.isOpened()&&!a.trigger(e.element,"open")){e.open()}};this.close=function(){if(!e.dropDown.$element.is(":animated")&&e.dropDown.isOpened()&&!a.trigger(e.element,"close")){e.close()}}},highlightFirstOnFilter:function(f,e){if(f.highlightFirst){e.first().addClass("t-state-selected");f.dropDown.scrollTo(e[0])}},moveToEnd:function(e){if(e.createTextRange){var f=e.createTextRange();f.moveStart("textedit",1);f.select()}},selection:function(e,h,f){if(e.createTextRange){var g=e.createTextRange();g.collapse(true);g.moveStart("character",h);g.moveEnd("character",f-h);g.select()}else{if(e.selectionStart){e.selectionStart=h;e.selectionEnd=f}}},updateTextAndValue:function(f,g,e){f.text(g);if(e==null){f.$input.val(g)}else{f.$input.val(e)}},getZIndex:function(e){var f="auto";d(e).parents().andSelf().each(function(){f=d(this).css("zIndex");if(Number(f)){f=Number(f)+1;return false}});return f},keycodes:[8,9,13,27,37,38,39,40,35,36,46]};function c(e,f){return function(h,l,m){if(!l||l.length==0){return}var k=d.map(l,function(o,n){if(f(m,o.Text||o)){return n}});var j=k.length;var g=new RegExp("(?![^&;]+;)(?!<[^<>]*)("+m.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)",e?"ig":"i");h.filteredDataIndexes=k;h.selectedIndex=-1;h.dropDown.onItemCreate=function(n){n.html=n.html.replace(g,"$1")};h.dropDown.dataBind(d.map(k,function(o,n){return l[o]}));var i=h.dropDown.$items;i.removeClass("t-state-selected");a.list.highlightFirstOnFilter(h,i)}}function b(e,g,j){if(!e||!g){return null}var k=j.length;j=j.toLowerCase();for(var f=0,h=e.length;f .t-dropdown-wrap > .t-input");this.$input=this.$element.find("input:last");this.dropDown=new a.dropDown({attr:this.dropDownAttr,effects:this.effects,onClick:d.proxy(function(l){this.select(l.item);this.trigger.change();this.trigger.close()},this)});this.dropDown.$element.css("direction",g.closest(".t-rtl").length?"rtl":"");this.fill=function(o){function n(q){var p;var s=q.value();if(s){p=function(w){return s==(w.Value||w.Text)}}else{var r=q.dropDown.$items;var u=q.index;var t=r.filter(".t-state-selected");var v=t.length;var p=u!=-1&&u0?v-1:0}q.select(p)}var l=this.dropDown;var m=this.loader;if(!l.$items&&!m.ajaxError){if(m.isAjax()){m.ajaxRequest(function(p){this.data=p;this.dataBind(p);n(this);a.trigger(this.element,"dataBound");this.trigger.change();if(o){o()}})}else{this.dataBind(this.data);n(this);if(o){o()}}}};this.enable=function(){g.removeClass("t-state-disabled").bind({keydown:d.proxy(j,this),keypress:d.proxy(k,this),click:d.proxy(function(n){var m=this.trigger;var l=this.dropDown;g.focus();if(l.isOpened()){m.close()}else{if(!l.$items){this.fill(m.open)}else{m.open()}}},this)})};this.disable=function(){g.addClass("t-state-disabled").unbind("click")};this.reload=function(){this.dropDown.$items=null;this.fill()};this.select=function(m){var l=this.highlight(m);if(l==-1){return l}this.selectedIndex=l;a.list.updateTextAndValue(this,d(this.dropDown.$items[l]).text(),this.data[l].Value)};this.text=function(l){if(l!==undefined){this.$text.html(l||" ")}else{return this.$text.html()}};this.value=function(m){if(m!==undefined){var l=this.select(function(n){return m==n.Value});if(l==-1){l=this.select(function(n){return m==n.Text})}if(l!=-1){this.previousValue=m}}else{return this.$input.val()}};a.list.common.call(this);a.list.initialize.call(this);this[this.enabled?"enable":"disable"]();function i(){clearTimeout(this.timeout);this.timeout=setTimeout(d.proxy(function(){h=""},this),1000)}function j(r){var o=this.trigger;var m=this.dropDown;var p=r.keyCode||r.which;if(r.altKey&&p==38){o.close();return}if(r.altKey&&p==40){o.open();return}if(p>34&&p<41){r.preventDefault();if(!m.$items){this.fill();return}var n=m.$items;var q=d(n[this.selectedIndex]);var l=(p==35)?n.last():(p==36)?n.first():(p==37||p==38)?q.prev():(p==39||p==40)?q.next():[];if(l.length){var s=l[0];this.select(s);m.scrollTo(s);if(!m.isOpened()){o.change()}}}if(p==8){i();r.preventDefault();h=h.slice(0,-1)}if(p==9||p==13||p==27){o.change();o.close()}}function k(p){var l=this.dropDown;var m=p.keyCode||p.charCode;if(m==0||d.inArray(m,a.list.keycodes)!=-1||p.ctrlKey||p.altKey||p.shiftKey){return}if(!l.$items){this.fill();return}var n=h;n+=String.fromCharCode(m);if(n){var o=b(this.data,l.$items,n);if(o){this.select(o);l.scrollTo(o)}h=n}i()}};d.fn.tDropDownList=function(e){return a.create(this,{name:"tDropDownList",init:function(f,g){return new a.dropDownList(f,g)},options:e})};d.fn.tDropDownList.defaults={effects:a.fx.slide.defaults(),accessible:false,index:0,enabled:true}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.menu.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.menu.min.js new file mode 100644 index 000000000..8aa3a61e4 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.menu.min.js @@ -0,0 +1 @@ +(function(d){var a=d.telerik;a.menu=function(e,f){this.element=e;this.nextItemZIndex=100;d.extend(this,f);d(".t-item:not(.t-state-disabled)",e).live("mouseenter",a.delegate(this,this.mouseenter),true).live("mouseleave",a.delegate(this,this.mouseleave),true).live("click",a.delegate(this,this.click));d(".t-item:not(.t-state-disabled) > .t-link",e).live("mouseenter",a.hover).live("mouseleave",a.leave);d(document).click(a.delegate(this,this.documentClick));a.bind(this,{select:this.onSelect,open:this.onOpen,close:this.onClose,load:this.onLoad})};function b(e){var f=e.parent();return{direction:f.hasClass("t-menu")?f.hasClass("t-menu-vertical")?"right":"bottom":"right"}}function c(f,g){try{return d.contains(f,g)}catch(h){return false}}a.menu.prototype={toggle:function(f,e){d(f).each(function(){d(this).toggleClass("t-state-default",e).toggleClass("t-state-disabled",!e)})},enable:function(e){this.toggle(e,true)},disable:function(e){this.toggle(e,false)},open:function(f){var e=this;d(f).each(function(){var g=d(this);clearTimeout(g.data("timer"));g.data("timer",setTimeout(function(){var h=g.find(".t-group:first");if(h.length){a.fx.play(e.effects,h,b(g));g.css("z-index",e.nextItemZIndex++)}},100))})},close:function(f){var e=this;d(f).each(function(h,i){var g=d(i);clearTimeout(g.data("timer"));g.data("timer",setTimeout(function(){var j=g.find(".t-group:first");if(j.length){a.fx.rewind(e.effects,j,b(g),function(){g.css("zIndex","");if(d(e.element).find(".t-group:visible").length==0){e.nextItemZIndex=100}});j.find(".t-group").stop(false,true)}},100))})},mouseenter:function(i,h){var g=d(h);if(!this.openOnClick||this.clicked){if(!c(h,i.relatedTarget)){this.triggerEvent("open",g);this.open(g);var f=g.parent().closest(".t-item")[0];if(f&&!c(f,i.relatedTarget)){this.mouseenter(i,f)}}}if(this.openOnClick&&this.clicked){this.triggerEvent("close",g);g.siblings().each(d.proxy(function(j,e){this.close(d(e))},this))}},mouseleave:function(i,h){if(!this.openOnClick&&!c(h,i.relatedTarget)){var g=d(h);this.triggerEvent("close",g);this.close(g);var f=g.parent().closest(".t-item")[0];if(f&&!c(f,i.relatedTarget)){this.mouseleave(i,f)}}},click:function(h,g){h.stopPropagation();var f=d(g);if(f.hasClass("t-state-disabled")){h.preventDefault();return}a.trigger(this.element,"select",{item:f[0]});if(!f.parent().hasClass("t-menu")||!this.openOnClick){return}h.preventDefault();this.clicked=true;this.triggerEvent("open",f);this.open(f)},documentClick:function(g,f){if(d.contains(this.element,g.target)){return}if(this.clicked){this.clicked=false;d(this.element).children(".t-item").each(d.proxy(function(e,h){this.close(d(h))},this))}},hasChildren:function(e){return e.find(".t-group:first").length},triggerEvent:function(e,f){if(this.hasChildren(f)){a.trigger(this.element,e,{item:f[0]})}}};d.fn.tMenu=function(e){return a.create(this,{name:"tMenu",init:function(f,g){return new a.menu(f,g)},options:e})};d.fn.tMenu.defaults={orientation:"horizontal",effects:a.fx.slide.defaults(),openOnClick:false}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.panelbar.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.panelbar.min.js new file mode 100644 index 000000000..0f41192e8 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.panelbar.min.js @@ -0,0 +1 @@ +(function(c){var a=c.telerik;var b={single:0,multi:1};c.extend(a,{panelbar:function(f,g){this.element=f;var h=c(f);c.extend(this,g);var d=".t-item:not(.t-state-disabled) > .t-link";h.delegate(d,"click",c.proxy(this._click,this)).delegate(d,"mouseenter",a.hover).delegate(d,"mouseleave",a.leave).delegate(".t-item.t-state-disabled > .t-link","click",a.preventDefault);a.bind(this,{expand:this.onExpand,collapse:this.onCollapse,select:c.proxy(function(i){if(i.target==this.element&&this.onSelect){this.onSelect(i)}},this),error:this.onError,load:this.onLoad});var e=h.find("li.t-state-active > .t-content");if(e.length>0&&e.eq(0).children().length==0){this.expand(e.parent())}}});a.panelbar.prototype={expand:function(d){c(d).each(c.proxy(function(f,g){var e=c(g);if(!e.hasClass(".t-state-disabled")&&e.find("> .t-group, > .t-content").length>0){if(this.expandMode==b.single&&this._collapseAllExpanded(e)){return}this._toggleItem(e,false,null)}},this))},collapse:function(d){c(d).each(c.proxy(function(f,g){var e=c(g);if(!e.hasClass(".t-state-disabled")&&e.find("> .t-group, > .t-content").is(":visible")){this._toggleItem(e,true,null)}},this))},toggle:function(e,d){c(e).each(function(){c(this).toggleClass("t-state-default",d).toggleClass("t-state-disabled",!d)})},enable:function(d){this.toggle(d,true)},disable:function(d){this.toggle(d,false)},_click:function(m){var f=c(m.target);var g=this.element;if(f.closest(".t-widget")[0]!=g){return}var d=f.closest(".t-link");var j=d.closest(".t-item");c(g).find(".t-state-selected").removeClass("t-state-selected");d.addClass("t-state-selected");if(a.trigger(g,"select",{item:j[0]})){m.preventDefault()}var l=j.find("> .t-content, > .t-group");var h=d.attr("href");var k=(h&&(h.charAt(h.length-1)=="#"||h.indexOf("#"+g.id+"-")!=-1));if(k||l.length>0){m.preventDefault()}else{return}if(this.expandMode==b.single){if(this._collapseAllExpanded(j)){return}}if(l.length!=0){var i=l.is(":visible");if(!a.trigger(g,!i?"expand":"collapse",{item:j[0]})){this._toggleItem(j,i,m)}}},_toggleItem:function(f,h,i){var j=f.find("> .t-group");if(j.length!=0){this._toggleGroup(j,h);if(i!=null){i.preventDefault()}}else{var g=f.parent().children().index(f);var d=f.find("> .t-content");if(d.length>0){if(i!=null){i.preventDefault()}if(c.trim(d.html()).length>0){this._toggleGroup(d,h)}else{this._ajaxRequest(f,d,h)}}}},_toggleGroup:function(d,e){if(d.data("animating")){return}d.data("animating",true).parent().toggleClass("t-state-default",e).toggleClass("t-state-active",!e).find("> .t-link > .t-icon").toggleClass("t-arrow-up",!e).toggleClass("t-panelbar-collapse",!e).toggleClass("t-arrow-down",e).toggleClass("t-panelbar-expand",e);a.fx[!e?"play":"rewind"](this.effects,d,null,function(){d.data("animating",false)})},_collapseAllExpanded:function(d){if(d.find("> .t-link").hasClass("t-header")){if(d.find("> .t-content, > .t-group").is(":visible")||d.find("> .t-content, > .t-group").length==0){return true}else{c(this.element).children().find("> .t-content, > .t-group").filter(function(){return c(this).is(":visible")}).each(c.proxy(function(f,e){this._toggleGroup(c(e),true)},this))}}},_ajaxRequest:function(e,d,g){var h=e.find(".t-panelbar-collapse, .t-panelbar-expand");var f=setTimeout(function(){h.addClass("t-loading")},100);var i={};c.ajax({type:"GET",cache:false,url:e.find(".t-link").attr("href"),dataType:"html",data:i,error:c.proxy(function(k,j){if(a.ajaxError(this.element,"error",k,j)){return}},this),complete:function(){clearTimeout(f);h.removeClass("t-loading")},success:c.proxy(function(j,l){d.html(j);this._toggleGroup(d,g);var k=d.prev(".t-link");k.data("ContentUrl",k.attr("href")).attr("href","#")},this)})}};c.fn.tPanelBar=function(d){return a.create(this,{name:"tPanelBar",init:function(e,f){return new a.panelbar(e,f)},options:d})};c.fn.tPanelBar.defaults={effects:a.fx.property.defaults("height")}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.tabstrip.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.tabstrip.min.js new file mode 100644 index 000000000..f41c494f2 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.tabstrip.min.js @@ -0,0 +1 @@ +(function(a){var b=a.telerik;a.extend(b,{tabstrip:function(c,d){this.element=c;var f=a(c);this.$contentElements=f.find("> .t-content");a.extend(this,d);var h=".t-tabstrip-items > .t-item:not(.t-state-disabled)";f.delegate(h,"mouseenter",b.hover).delegate(h,"mouseleave",b.leave).delegate(h,d.activateEvent,b.delegate(this,this._click)).delegate("> .t-reset > .t-item.t-state-disabled > .t-link","click",b.preventDefault);b.bind(this,{select:a.proxy(function(i){if(i.target==this.element&&this.onSelect){this.onSelect(i)}},this),error:this.onError,load:this.onLoad});var g=f.find("li.t-state-active");var e=a(this.getContentElement(g.parent().children().index(g)));if(e.length>0&&e.children().length==0){this.activateTab(g.eq(0))}}});a.extend(b.tabstrip.prototype,{select:function(c){a(c).each(a.proxy(function(e,f){var d=a(f);if(d.is(".t-state-disabled,.t-state-active")){return}this.activateTab(d)},this))},enable:function(c){a(c).addClass("t-state-default").removeClass("t-state-disabled")},disable:function(c){a(c).removeClass("t-state-default").removeClass("t-state-active").addClass("t-state-disabled")},reload:function(d){var c=this;a(d).each(function(){var f=a(this);var e=f.find(".t-link").data("ContentUrl");if(e){c.ajaxRequest(f,a(c.getContentElement(f.index())),null,e)}})},_click:function(j,f){var h=a(f);var c=h.find(".t-link");var d=c.attr("href");var g=a(this.getContentElement(h.parent().children().index(h)));if(h.is(".t-state-disabled,.t-state-active")){j.preventDefault();return}if(b.trigger(this.element,"select",{item:h[0],contentElement:g[0]})){j.preventDefault()}var i=(d&&(d.charAt(d.length-1)=="#"||d.indexOf("#"+this.element.id+"-")!=-1));if(!d||i||(g.length>0&&g.children().length==0)){j.preventDefault()}else{return}if(this.activateTab(h)){j.preventDefault()}},activateTab:function(d){var f=d.parent().children().removeClass("t-state-active").addClass("t-state-default").index(d);d.removeClass("t-state-default").addClass("t-state-active");var g=this.$contentElements;if(g.length>0){var j=g.filter(".t-state-active");var e=a(this.getContentElement(f));var h=this;if(e.length==0){j.removeClass("t-state-active");b.fx.rewind(h.effects,j,{});return false}var c=a.trim(e.html()).length==0;var i=function(){e.addClass("t-state-active");b.fx.play(h.effects,e,{})};j.removeClass("t-state-active").stop(false,true);b.fx.rewind(h.effects,j,{},function(){if(d.hasClass("t-state-active")){if(!c){i()}else{if(c){h.ajaxRequest(d,e,function(){if(d.hasClass("t-state-active")){i()}})}}}});return true}return false},getSelectedTabIndex:function(){return a(this.element).find("li.t-state-active").index()},getContentElement:function(g){if(isNaN(g-0)){return}var c=this.$contentElements;var e=new RegExp("-"+(g+1)+"$");for(var d=0,f=c.length;d').prependTo(e.find(".t-link"))},100);var c={};a.ajax({type:"GET",cache:false,url:f||e.find(".t-link").attr("href"),dataType:"html",data:c,error:a.proxy(function(k,j){if(b.ajaxError(this.element,"error",k,j)){return}},this),complete:function(){clearTimeout(g);if(h!==null){h.remove()}},success:a.proxy(function(j,m){d.html(j);var k=e.find(".t-link");var l=k.attr("href");if(l&&l!="#"){k.data("ContentUrl",l).attr("href","#")}if(i){i.call(this,d)}},this)})}});a.fn.tTabStrip=function(c){return b.create(this,{name:"tTabStrip",init:function(d,e){return new b.tabstrip(d,e)},options:c})};a.fn.tTabStrip.defaults={activateEvent:"click",effects:b.fx.toggle.defaults()}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.textbox.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.textbox.min.js new file mode 100644 index 000000000..867fe07a8 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.textbox.min.js @@ -0,0 +1 @@ +(function(d){var g=d.telerik,a=[8,9,37,38,39,40,46,35,36,44];g.textbox=function(h,i){this.element=h;d.extend(this,i);var k=d(".t-input",h);this.enabled=!k.is("[disabled]");var p=new g.stringBuilder();p.cat("[ |").cat(this.groupSeparator).catIf("|"+this.symbol,this.symbol).cat("]");this.replaceRegExp=new RegExp(p.string(),"g");var n=d.browser.msie?"paste":"input";var l=k.attr("value");var o=d("",d.extend({id:k.attr("id")+"-text",name:k.attr("name")+"-text",value:(l||this.enabled?this.text:""),"class":k.attr("class"),style:k.attr("style")},this.inputAttributes));if(this.enabled){o.attr("disabled",true)}o.bind({blur:d.proxy(this.blur,this),focus:d.proxy(this.focus,this),keydown:d.proxy(this.keydown,this),keypress:d.proxy(this.keypress,this),change:function(q){q.stopPropagation()}}).bind(n,d.proxy(this[n],this)).insertBefore(k);k.hide().appendTo(h);var j=d(".t-arrow-up, .t-arrow-down",h).bind({click:g.preventDefault,dragstart:g.preventDefault});this[this.enabled?"enable":"disable"]();this.numFormat=this.numFormat===undefined?this.type.charAt(0):this.numFormat;var m=this.separator;this.step=this.parse(this.step,m);this.val=this.parse(this.val,m);this.minValue=this.parse(this.minValue,m);this.maxValue=this.parse(this.maxValue,m);this.decimals={"190":".","188":",","110":m};if(l!=""){this.value(l)}g.bind(this,{change:this.onChange,load:this.onLoad})};g.textbox.prototype={enable:function(){var i=d(this.element),k=i.find(".t-input"),j=i.find(".t-arrow-up, .t-arrow-down"),h=d.proxy(this.clearTimer,this);this.enabled=true;i.removeClass("t-state-disabled");k.removeAttr("disabled");if(!this.val&&this.val!=0){k.eq(0).val(this.text)}j.unbind("mouseup").unbind("mouseout").unbind("dblclick").bind({mouseup:h,mouseout:h,dblclick:h});d(j[0]).unbind("mousedown").mousedown(d.proxy(function(l){this.updateState();this.stepper(l,1)},this));d(j[1]).unbind("mousedown").mousedown(d.proxy(function(l){this.updateState();this.stepper(l,-1)},this))},disable:function(){var h=d(this.element);this.enabled=false;h.addClass("t-state-disabled").find(".t-input").attr("disabled","disabled").end().find(".t-icon").unbind("mousedown").bind("mousedown",g.preventDefault);if(!this.val&&this.val!=0){h.find(".t-input:first").val("")}},updateState:function(){var h=d("> .t-input:first",this.element).val();if(this.val!=this.parse(h,this.separator)){this.parseTrigger(h)}},input:function(k,i){var h=d(i).val();if(h=="-"){return true}var j=this.parse(h,this.separator);if(j||j==0){this.trigger(this.round(j,this.digits))}},paste:function(m,h){var j=d(h);var i=j.val();var k=h.document.selection.createRange().text;var n=window.clipboardData.getData("Text");if(k>0){i=i.replace(k,n)}else{i+=n}var l=this.parse(i,this.separator);if(l||l==0){this.trigger(this.round(l,this.digits))}},focus:function(h){this.focused=true;this.updateState();var i=this.formatEdit(this.val);d(h.target).val(i||(i==0?0:""));if(!d.browser.safari){h.target.select()}},blur:function(l){this.focused=false;var h=this.minValue;var k=this.maxValue;var i=d(l.target);var j=this.parse(i.val(),this.separator);if(j!=null){if(h!=null&&jk){j=k}}}i.removeClass("t-state-error");this.parseTrigger(j);this.value(j)},keydown:function(l){var h=l.keyCode,i=d(l.target),j=this.separator;setTimeout(d.proxy(function(){i.toggleClass("t-state-error",!this.inRange(this.parse(i.val(),this.separator),this.minValue,this.maxValue))},this));var k=this.decimals[h];if(k){if(k==j&&this.digits>0&&g.caretPos(i[0])!=0&&i.val().indexOf(j)==-1){return true}else{l.preventDefault()}}if(h==8||h==46){setTimeout(d.proxy(function(){this.parseTrigger(i.val())},this));return true}if(h==38||h==40){this.modifyInput(i,this.step*(h==38?1:-1));return true}if(h==222){l.preventDefault()}},keypress:function(i){var j=d(i.target),h=i.keyCode||i.which;if(h==0||d.inArray(h,a)!=-1||i.ctrlKey||(i.shiftKey&&h==45)){return true}if(((this.minValue!==null?this.minValue<0:true)&&String.fromCharCode(h)=="-"&&g.caretPos(j[0])==0&&j.val().indexOf("-")==-1)||this.inRange(h,48,57)){setTimeout(d.proxy(function(){this.parseTrigger(j.val())},this));return true}i.preventDefault()},clearTimer:function(h){clearTimeout(this.timeout);clearInterval(this.timer);clearInterval(this.acceleration)},stepper:function(k,h){if(k.which==1){var i=d(".t-input:first",this.element),j=this.step;this.modifyInput(i,h*j);this.timeout=setTimeout(d.proxy(function(){this.timer=setInterval(d.proxy(function(){this.modifyInput(i,h*j)},this),80);this.acceleration=setInterval(function(){j+=1},1000)},this),200)}},value:function(h){if(arguments.length==0){return this.val}var j=(typeof h===typeof 1)?h:this.parse(h,this.separator);if(!this.inRange(j,this.minValue,this.maxValue)){j=null}var i=j===null;var k=this.enabled?this.text:"";this.val=j;d(this.element).find(".t-input:last").val(i?"":this.formatEdit(j)).end().find(".t-input:first").val(i?k:this.format(j));return this},modifyInput:function(i,h){var k=this.val,l=this.minValue,n=this.maxValue;k=k?k+h:h;k=(l!==null&&kn)?n:k;var j=this.round(k,this.digits);this.trigger(j);var m=this.focused?this.formatEdit(j):this.format(j);i.removeClass("t-state-error").val(m)},formatEdit:function(i){var h=this.separator;if(i&&h!="."){i=i.toString().replace(".",h)}return i},format:function(h){return g.textbox.formatNumber(h,this.numFormat,this.digits,this.separator,this.groupSeparator,this.groupSize,this.positive,this.negative,this.symbol,true)},trigger:function(h){if(this.val!=h){if(g.trigger(this.element,"change",{oldValue:this.val,newValue:h})){return}d(".t-input:last",this.element).val(this.formatEdit(h));this.val=h}},parseTrigger:function(h){this.trigger(this.round(this.parse(h,this.separator),this.digits))},inRange:function(j,h,i){return j===null||((h!==null?j>=h:true)&&(i!==null?j<=i:true))},parse:function(h,j){var i=null;if(h||h=="0"){if(typeof h==typeof 1){return h}h=h.replace(this.replaceRegExp,"");if(j&&j!="."){h=h.replace(j,".")}var l=d.fn.tTextBox.patterns[this.type].negative[this.negative].replace(/(\(|\))/g,"\\$1").replace("*","").replace("n","([\\d|\\.]*)"),k=new RegExp(l);if(k.test(h)){i=-parseFloat(k.exec(h)[1])}else{i=parseFloat(h)}}return isNaN(i)?null:i},round:function(i,h){if(i||i==0){return parseFloat(i.toFixed(h||2))}return null}};d.fn.tTextBox=function(j){var i=j.type,h=d.fn.tTextBox.defaults[i];h.digits=g.cultureInfo[i+"decimaldigits"];h.separator=g.cultureInfo[i+"decimalseparator"];h.groupSeparator=g.cultureInfo[i+"groupseparator"];h.groupSize=g.cultureInfo[i+"groupsize"];h.positive=g.cultureInfo[i+"positive"];h.negative=g.cultureInfo[i+"negative"];h.symbol=g.cultureInfo[i+"symbol"];j=d.extend({},h,j);return this.each(function(){var k=d(this);j=d.meta?d.extend({},j,k.data()):j;if(!k.data("tTextBox")){k.data("tTextBox",new g.textbox(this,j));g.trigger(this,"load")}})};var f={val:null,text:"",step:1,inputAttributes:""};d.fn.tTextBox.defaults={numeric:d.extend(f,{minValue:-100,maxValue:100}),currency:d.extend(f,{minValue:0,maxValue:1000}),percent:d.extend(f,{minValue:0,maxValue:100})};d.fn.tTextBox.patterns={numeric:{negative:["(n)","-n","- n","n-","n -"]},currency:{positive:["*n","n*","* n","n *"],negative:["(*n)","-*n","*-n","*n-","(n*)","-n*","n-*","n*-","-n *","-* n","n *-","* n-","* -n","n- *","(* n)","(n *)"]},percent:{positive:["n *","n*","*n"],negative:["-n *","-n*","-*n"]}};if(!g.cultureInfo.numericnegative){d.extend(g.cultureInfo,{currencydecimaldigits:2,currencydecimalseparator:".",currencygroupseparator:",",currencygroupsize:3,currencynegative:0,currencypositive:0,currencysymbol:"$",numericdecimaldigits:2,numericdecimalseparator:".",numericgroupseparator:",",numericgroupsize:3,numericnegative:1,percentdecimaldigits:2,percentdecimalseparator:".",percentgroupseparator:",",percentgroupsize:3,percentnegative:0,percentpositive:0,percentsymbol:"%"})}var c=/[0#?]/;function b(h){return h.split("").reverse().join("")}function e(n,h,q){var k=0,l=0,p=h.length,r=n.length,u=new g.stringBuilder();while(k=0){if(h.charAt(k).match(c)){u.cat(n.charAt(l++))}else{u.cat(h.charAt(k))}k++}u.catIf(n.substring(l),l-1){s=t.indexOf("0")}if(s>-1){var m=t.slice(0,s),o=t.slice(s,t.length);t=m.replace(/#/g,"")+o.replace(/#/g,"0")}else{t=t.replace(/#/g,"")}if(t.indexOf(",")==0){t=t.replace(/,/g,"")}return q?t:b(t)}g.textbox.formatNumber=function(K,n,s,u,i,Q,o,q,M,F){if(!n){return K}var P,G,L,m,J=K<0;n=n.split(":");n=n.length>1?n[1].replace("}",""):n[0];var l=n.search(c)!=-1;if(l){n=n.split(";");G=n[0];L=n[1];m=n[2];n=(J&&L?L:G).indexOf("%")!=-1?"p":"n"}switch(n.toLowerCase()){case"d":return Math.round(K).toString();case"c":P="currency";break;case"n":P="numeric";break;case"p":P="percent";if(!F){K=Math.abs(K)*100}break;default:return K.toString()}var z=function(T,R,S){for(var U=T.length;U1?C[1]:"";var h=g.lastIndexOf(A,"0");var x=g.lastIndexOf(A,"#");var s=(x>h?x:h)+1}var B=Math.pow(10,s);var N=(Math.round(K*B)/B);K=isFinite(N)?N:K;var v=K.toString().split(/e/i);y=v.length>1?parseInt(v[1]):0;v=v[0].split(".");j=v[0];j=J?j.replace("-",""):j;r=v.length>1?v[1]:"";if(y){if(!J){r=z(r,y,false);j+=r.slice(0,y);r=r.substr(y)}else{j=z(j,y+1,true);r=j.slice(y,j.length)+r;j=j.slice(0,y)}}var O=r.length;if(s<1||(l&&h==-1&&O===0)){r=""}else{r=O>s?r.slice(0,s):z(r,s,false)}var k;if(l){if(j==0){j=""}j=e(b(j),b(w),true);j=w.indexOf(",")!=-1?I(j,i,Q):j;r=r&&A?e(r,A):"";k=K===0&&m?m:(J&&!L?"-":"")+j+(r.length>0?u+r:"")}else{j=I(j,i,Q);H=H[P];var t=J?H.negative[q]:M?H.positive[o]:null;var p=j+(r.length>0?u+r:"");k=t?t.replace("n",p).replace("*",M):p}return k};d.extend(g.formatters,{number:g.textbox.formatNumber})})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.timepicker.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.timepicker.min.js new file mode 100644 index 000000000..1dca736aa --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.timepicker.min.js @@ -0,0 +1 @@ +(function(a){var b=a.telerik;b.timeView=function(c){a.extend(this,c);var d=this.dropDown=new b.dropDown({attr:this.dropDownAttr,effects:this.effects,onClick:function(f){var g=f.item;c.onChange(g.innerText||g.textContent)}});d.$element.addClass("t-time-popup").css("direction",this.isRtl?"rtl":"")};b.timeView.prototype={_ensureItems:function(){if(!this.dropDown.$items){this.bind()}},open:function(c){this._ensureItems();this.dropDown.open(c)},close:function(){this.dropDown.close()},bind:function(){var j=b.timeView.getTimeMilliseconds;var g=[];var c=this.format;var n=this.interval;var p=this.minValue;var d=j(p);var f=j(this.maxValue);var l=n*b.datetime.msPerMinute;var k=parseInt(b.datetime.msPerDay/(n*b.datetime.msPerMinute));if(d!=f){var o=di?i+d:i;h=e>h?h+d:h;return e-h==0||i>=e&&i<=h},getTimeMilliseconds:function(c){return((c.hours()*60)+c.minutes())*b.datetime.msPerMinute+c.seconds()*1000+c.milliseconds()}});b.timepicker=function(c,d){a.extend(this,d);this.element=c;this.$element=a(c);var e=this.$input=a(".t-input",c).attr("autocomplete","off").bind({change:function(f){f.stopPropagation()},keydown:a.proxy(this._keydown,this),focus:a.proxy(function(f){this._change(e.val());this._open();this.$input.removeClass("t-state-error")},this)});this.inputValue=e.val();this.timeView=new b.timeView({effects:this.effects,dropDownAttr:this.dropDownAttr,format:this.format,interval:this.interval,isRtl:e.closest(".t-rtl").length,minValue:this.minValue,maxValue:this.maxValue,onNavigateWithOpenPopup:a.proxy(function(f){this.$input.val(f)},this),onChange:a.proxy(function(f){this._change(f);this._close()},this)});a(".t-icon",c).bind("click",this.enabled?a.proxy(this._togglePopup,this):b.preventDefault);a(document.documentElement).bind("mousedown",a.proxy(function(h){var f=this.timeView.dropDown.$element;var g=f&&f.parent().length>0;if(!g||a.contains(this.element,h.target)||a.contains(f.parent()[0],h.target)){return}this._change(this.$input.val());this._close()},this));b.bind(this,{open:this.onOpen,close:this.onClose,change:this.onChange,load:this.onLoad})};b.timepicker.prototype={_close:function(){var c=this.timeView.dropDown;if(!c.$element.is(":animated")&&c.isOpened()){this._trigger("close")}},_open:function(){if(!this.timeView.isOpened()){this._trigger("open")}},_trigger:function(c){if(!b.trigger(this.element,c)){this[c]()}},_togglePopup:function(){if(this.timeView.isOpened()){this._change(this.$input.val());this._close()}else{this.$input[0].focus()}},_change:function(c){var k=this.minValue;var e=this.maxValue;var i=this.parse(c);var m=this.selectedValue;if(!b.timeView.isInRange(i,k,e)){var d=b.timeView.getTimeMilliseconds;var h=d(i);var f=d(k);var l=d(e);var j=Math.abs(f-h);var g=Math.abs(l-h);i=new b.datetime(ji.value||i.value>m.value))){b.trigger(this.element,"change",{previousValue:m===null?null:m.toDate(),value:i===null?null:i.toDate()})}if(i==null||this.inputValue!=c){this._value(i)}},_value:function(c){var e=this.$input.val();var d=c===null;this.selectedValue=c;this.timeView.value(d?null:b.datetime.format(c.toDate(),this.format));if(!d){e=b.datetime.format(c.toDate(),this.format)}this.inputValue=e;this.$input.toggleClass("t-state-error",d&&e!="").val(e)},_keydown:function(h){var f=h.keyCode||h.which;var d=h.target.value;var c=this.timeView.dropDown;if(h.altKey){if(f==40){this._open()}else{if(f==38){this._close()}}}if(!h.shiftKey&&f==38||f==40){this.timeView.navigate(h)}if(f==9||f==13||f==27){if(c.isOpened()&&f!=9){h.preventDefault()}var i;var g=this.timeView.value();if(this.inputValue!=d||!g){i=d}else{i=g}this._change(i);this._close()}},enable:function(){this.$input.attr("disabled",false);this.$element.removeClass("t-state-disabled").find(".t-icon").unbind("click").bind("click",a.proxy(this._togglePopup,this))},disable:function(c){this.$input.attr("disabled",true);this.$element.addClass("t-state-disabled").find(".t-icon").unbind("click").bind("click",b.preventDefault)},value:function(c){if(c===undefined){return this.selectedValue===null?null:this.selectedValue.toDate()}var d=this.parse(c);d=b.timeView.isInRange(d,this.minValue,this.maxValue)?d:null;if(d===null){this.$input.removeClass("t-state-error").val("")}this._value(d);return this},parse:function(c){if(c===null||c.value){return c}return c.getDate?new b.datetime(c):b.datetime.parse({AM:b.cultureInfo.AM,PM:b.cultureInfo.PM,value:c,format:this.format,baseDate:this.selectedValue?new b.datetime(this.selectedValue.value):new b.datetime()})},open:function(){var c=this.$input;this.timeView.open({offset:c.offset(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth(),zIndex:b.getElementZIndex(c[0])})},close:function(){this.timeView.close()}};a.each(["min","max"],a.proxy(function(d,c){b.timepicker.prototype[c]=function(e){var f=c+"Value";if(e===undefined){return this[f].toDate()}var g=this.parse(e);if(g!==null){this[f]=g;this.timeView[c](g);this._change(g)}}},this));a.fn.tTimePicker=function(c){return b.create(this,{name:"tTimePicker",init:function(d,e){return new b.timepicker(d,e)},options:c})};a.fn.tTimePicker.defaults={effects:b.fx.slide.defaults(),selectedValue:null,format:b.cultureInfo.shortTime,interval:30,enabled:true}})(jQuery); \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/2010.3.1110/telerik.treeview.min.js b/NzbDrone.Web/Scripts/2010.3.1110/telerik.treeview.min.js new file mode 100644 index 000000000..c2561d9e5 --- /dev/null +++ b/NzbDrone.Web/Scripts/2010.3.1110/telerik.treeview.min.js @@ -0,0 +1 @@ +(function(c){var b=c.telerik;function a(d){d.find(".t-plus").each(function(){var e=c(this.parentNode);e.parent().data("loaded",e.next(".t-group").length>0)})}b.treeview=function(f,g){this.element=f;var h=c(f);c.extend(this,g);var d=".t-in:not(.t-state-selected,.t-state-disabled)";c(".t-in.t-state-selected",f).live("mouseenter",b.preventDefault);h.delegate(d,"mouseenter",b.hover).delegate(d,"mouseleave",b.leave).delegate(d,"click",b.delegate(this,this.nodeSelect)).delegate("div:not(.t-state-disabled) .t-in","dblclick",b.delegate(this,this.nodeClick)).delegate(":checkbox","click",b.delegate(this,this.checkboxClick)).delegate(".t-plus, .t-minus","click",b.delegate(this,this.nodeClick));if(this.isAjax()){a(h)}if(this.dragAndDrop){b.bind(this,{nodeDragStart:this.onNodeDragStart,nodeDragging:this.onNodeDragging,nodeDragCancelled:this.onNodeDragCancelled,nodeDrop:this.onNodeDrop,nodeDropped:this.onNodeDropped});(function(k){var i=c('
    ');var n;function j(o){if(b.trigger(k.element,"nodeDragStart",{item:o.$draggable.closest(".t-item")[0]})){return false}i.appendTo(k.element)}function l(w){var r;n=c(w.target);b.trigger(this.element,"nodeDragging",{pageY:w.pageY,dropTarget:w.target,setStatusClass:function(z){r=z},item:w.$draggable.closest(".t-item")[0]});if(r){i.css("visibility","hidden");b.dragCueStatus(w.$cue,r);return}r="t-insert-middle";if(k.dragAndDrop.dropTargets&&c(w.target).closest(k.dragAndDrop.dropTargets).length>0){b.dragCueStatus(w.$cue,"t-add");return}if(!c.contains(k.element,w.target)){i.css("visibility","hidden");return}else{if(c.contains(w.$draggable.closest(".t-item")[0],w.target)){i.css("visibility","hidden");b.dragCueStatus(w.$cue,"t-denied");return}}i.css("visibility","visible");var q=n.closest(".t-top,.t-mid,.t-bot");if(q.length>0){var v=q.outerHeight();var t=q.offset().top;var y=n.closest(".t-in");var x=v/(y.length>0?4:2);var u=w.pageY<(t+x);var o=(t+v-x)0&&!u&&!o;y.toggleClass("t-state-hover",p);i.css("visibility",p?"hidden":"visible");if(p){r="t-add"}else{var s=q.position();s.top+=u?0:v;i.css(s)[u?"prependTo":"appendTo"](n.closest(".t-item").find("> div:first"));r="t-insert-middle";if(u&&q.hasClass("t-top")){r="t-insert-top"}if(o&&q.hasClass("t-bot")){r="t-insert-bottom"}}}b.dragCueStatus(w.$cue,r)}function m(v){if(v.keyCode==27){b.trigger(k.element,"nodeDragCancelled",{item:v.$draggable.closest(".t-item")[0]})}else{var q="over",p;if(i.css("visibility")=="visible"){q=i.prevAll(".t-in").length>0?"after":"before";p=i.closest(".t-item").find("> div")}else{if(n){p=n.closest(".t-top,.t-mid,.t-bot")}}var r=b.trigger(k.element,"nodeDrop",{isValid:!v.$cue.find(".t-drag-status").hasClass("t-denied"),dropTarget:v.target,destinationItem:p.parent()[0],dropPosition:q,item:v.$draggable.closest(".t-item")[0]});if(r||!c.contains(k.element,v.target)){return !r}var t=v.$draggable.closest(".t-top,.t-mid,.t-bot");var u=t.parent();var x=t.closest(".t-group");if(c.contains(u[0],v.target)){return false}if(u.hasClass("t-last")){u.removeClass("t-last").prev().addClass("t-last").find("> div").removeClass("t-top t-mid").addClass("t-bot")}if(i.css("visibility")=="visible"){p.parent()[q](u)}else{var o=p.next(".t-group");if(o.length===0){o=c('
      ').appendTo(p.parent());if(!k.isAjax()){p.prepend('')}else{o.hide();k.nodeToggle(null,p.parent(),true);o.show()}}o.append(u);if(p.find("> .t-icon").hasClass("t-plus")){k.nodeToggle(null,p.parent(),true)}}var s=u.parents(".t-group").length;function w(z){var A=z.prev().length===0;var y=z.next().length===0;z.toggleClass("t-first",A&&s===1).toggleClass("t-last",y).find("> div").toggleClass("t-top",A&&!y).toggleClass("t-mid",!A&&!y).toggleClass("t-bot",y)}w(u);w(u.prev());w(u.next());if(x.children().length===0){x.prev("div").find(".t-plus,.t-minus").remove();x.remove()}b.trigger(k.element,"nodeDropped",{destinationItem:p.closest(".t-item")[0],dropPosition:q,item:t.parent(".t-item")[0]});return false}}new b.draggable({owner:k.element,selector:"div:not(.t-state-disabled) .t-in",scope:k.element.id,cue:function(o){return b.dragCue(o.$draggable.text())},start:j,drag:l,stop:m,destroy:function(o){i.remove();o.$cue.remove()}})})(this)}var e=h.find(".t-item > .t-content");if(e.length>0&&c(e[0]).children().length==0){h.find(".t-icon").hide()}b.bind(this,{expand:this.onExpand,collapse:this.onCollapse,select:c.proxy(function(i){if(i.target==this.element&&this.onSelect){this.onSelect(i)}},this),checked:this.onChecked,error:this.onError,load:this.onLoad,dataBinding:this.onDataBinding,dataBound:this.onDataBound})};b.treeview.prototype={expand:function(d){c(d,this.element).each(c.proxy(function(g,h){var f=c(h);var e=f.find("> .t-group, > .t-content");if((e.length>0&&!e.is(":visible"))||this.isAjax()){this.nodeToggle(null,f)}},this))},collapse:function(d){c(d,this.element).each(c.proxy(function(g,h){var f=c(h),e=f.find("> .t-group, > .t-content");if(e.length>0&&e.is(":visible")){this.nodeToggle(null,f)}},this))},enable:function(d){this.toggle(d,true)},disable:function(d){this.toggle(d,false)},toggle:function(e,d){c(e,this.element).each(c.proxy(function(g,h){var f=c(h),i=!f.find("> .t-group, > .t-content").is(":visible");if(!d){this.collapse(f);i=true}f.find("> div > .t-in").toggleClass("t-state-default",d).toggleClass("t-state-disabled",!d).end().find("> div > .t-checkbox > :checkbox").attr("disabled",d?"":"disabled").end().find("> div > .t-icon").toggleClass("t-plus",i&&d).toggleClass("t-plus-disabled",i&&!d).toggleClass("t-minus",!i&&d).toggleClass("t-minus-disabled",!i&&!d)},this))},reload:function(e){var d=this;c(e).each(function(){var f=c(this);f.find(".t-group").remove();d.ajaxRequest(f)})},shouldNavigate:function(e){var d=c(e).closest(".t-item").find("> .t-content, > .t-group");var f=c(e).attr("href");return !((f&&(f.charAt(f.length-1)=="#"||f.indexOf("#"+this.element.id+"-")!=-1))||(d.length>0&&d.children().length==0))},nodeSelect:function(g,f){if(!this.shouldNavigate(f)){g.preventDefault()}var d=c(f);if(!d.hasClass(".t-state-selected")&&!b.trigger(this.element,"select",{item:d.closest(".t-item")[0]})){c(".t-in",this.element).removeClass("t-state-hover t-state-selected");d.addClass("t-state-selected")}},nodeToggle:function(i,f,h){if(i!=null){i.preventDefault()}if(f.data("animating")||!f.find("> div > .t-icon").is(":visible")||f.find("> div > .t-in").hasClass("t-state-disabled")){return}f.data("animating",!h);var d=f.find(">.t-group, >.t-content, >.t-animation-container>.t-group, >.t-animation-container>.t-content"),g=!d.is(":visible");if(d.children().length>0&&f.data("loaded")!==false&&!b.trigger(this.element,g?"expand":"collapse",{item:f[0]})){f.find("> div > .t-icon").toggleClass("t-minus",g).toggleClass("t-plus",!g);if(!h){b.fx[g?"play":"rewind"](this.effects,d,{direction:"bottom"},function(){f.data("animating",false)})}else{d[g?"show":"hide"]()}}else{if(g&&this.isAjax()&&(d.length==0||f.data("loaded")===false)){if(!b.trigger(this.element,g?"expand":"collapse",{item:f[0]})){this.ajaxRequest(f)}}}},nodeClick:function(h,g){var f=c(g),d=f.closest(".t-item");if(f.hasClass("t-plus-disabled")||f.hasClass("t-minus-disabled")){return}this.nodeToggle(h,d)},isAjax:function(){return this.ajax||this.ws||this.onDataBinding},url:function(d){return(this.ajax||this.ws)[d]},ajaxOptions:function(d,g){var e={type:"POST",dataType:"text",error:c.proxy(function(i,h){if(b.ajaxError(this.element,"error",i,h)){return}if(h=="parsererror"){alert("Error! The requested URL did not return JSON.")}},this),success:c.proxy(function(h){h=eval("("+h+")");h=h.d||h;this.dataBind(d,h)},this)};e=c.extend(e,g);var f=this.ws?e.data.node={}:e.data;if(d.hasClass("t-item")){f[this.queryString.value]=this.getItemValue(d);f[this.queryString.text]=this.getItemText(d)}if(this.ws){e.data=b.toJson(e.data);e.contentType="application/json; charset=utf-8"}return e},ajaxRequest:function(d){d=d||c(this.element);if(b.trigger(this.element,"dataBinding",{item:d[0]})||(!this.ajax&&!this.ws)){return}d.data("loadingIconTimeout",setTimeout(function(){d.find("> div > .t-icon").addClass("t-loading")},100));c.ajax(this.ajaxOptions(d,{data:{},url:this.url("selectUrl")}))},bindTo:function(d){this.dataBind(this.element,d)},dataBind:function(d,h){d=c(d);if(h.length==0){c(".t-icon",d).hide();return}var g=new b.stringBuilder(),e=d.find("> .t-group"),f=e.length==0;b.treeview.getGroupHtml({data:h,html:g,isAjax:this.isAjax(),isFirstLevel:d.hasClass("t-treeview"),showCheckBoxes:this.showCheckBox,groupLevel:d.find('> div > .t-checkbox :input[name="'+this.element.id+'_checkedNodes.Index"]').val(),isExpanded:(f?d.eq(0).is(".t-treeview")?true:h[0].Expanded:false),renderGroup:f,elementId:this.element.id});d.data("animating",true);if(e.length>0&&d.data("loaded")===false){c(g.string()).prependTo(e)}else{if(e.length>0&&d.data("loaded")!==false){e.html(g.string())}else{if(e.length==0){e=c(g.string()).appendTo(d)}}}b.fx.play(this.effects,e,{direction:"bottom"},function(){d.data("animating",false)});clearTimeout(d.data("loadingIconTimeout"));if(d.hasClass("t-item")){d.data("loaded",true).find(".t-icon:first").removeClass("t-loading").removeClass("t-plus").addClass("t-minus")}if(this.isAjax()){a(d)}b.trigger(this.element,"dataBound")},checkboxClick:function(h,f){var d=c(f).is(":checked");var g=b.trigger(this.element,"checked",{item:c(f).closest(".t-item")[0],checked:d});if(!g){this.nodeCheck(f,d)}else{h.preventDefault()}return g},nodeCheck:function(e,d){c(e,this.element).each(c.proxy(function(h,i){var f=c(i).closest(".t-item"),g=c("> div > .t-checkbox",f),j=this.element.id+"_checkedNodes",h=g.find(':input[name="'+j+'.Index"]').val();g.find(':input[name="'+j+"["+h+'].Text"]').remove();g.find(':input[name="'+j+"["+h+'].Value"]').remove();g.find(":checkbox").attr("checked",d?"checked":"");if(d){c(b.treeview.getNodeInputsHtml(this.getItemValue(f),this.getItemText(f),j,h)).appendTo(g)}},this))},getItemText:function(d){return c(d).find("> div > .t-in").text()},getItemValue:function(d){return c(d).find('>div>:input[name="itemValue"]').val()||this.getItemText(d)}};c.extend(b.treeview,{getNodeInputsHtml:function(g,e,f,d){return new b.stringBuilder().cat('').cat('').string()},getItemHtml:function(e){var m=e.item,h=e.html,i=e.isFirstLevel,f=e.groupLevel,g=e.itemIndex,d=e.itemsCount,l=new b.stringBuilder().cat(f).catIf(":",f).cat(g).string();h.cat('
    • ').cat('
      ');if((e.isAjax&&m.LoadOnDemand)||(m.Items&&m.Items.length>0)){h.cat('')}if(e.showCheckBoxes&&m.Checkable!==false){var j=e.elementId+"_checkedNodes";h.cat('').cat('').cat('");if(m.Checked){h.cat(b.treeview.getNodeInputsHtml(m.Value,m.Text,j,l))}h.cat("")}var k=m.NavigateUrl||m.Url;h.cat(k?'');if(m.ImageUrl!=null){h.cat('')}h.catIf(m.Text,m.Encoded===false).catIf(m.Text.replace(//g,">"),m.Encoded!==false).cat(k?"":"");if(m.Value){h.cat('')}h.cat("
      ");if(m.Items&&m.Items.length>0){b.treeview.getGroupHtml({data:m.Items,html:h,isAjax:e.isAjax,isFirstLevel:false,showCheckBoxes:e.showCheckBoxes,groupLevel:l,isExpanded:m.Expanded,elementId:e.elementId})}h.cat("
    • ")},getGroupHtml:function(e){var d=e.data;var g=e.html;var j=e.isFirstLevel;var k=e.renderGroup;if(k!==false){g.cat('