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

This commit is contained in:
Mark McDowall 2011-11-30 23:12:45 -08:00
commit 027e16389b
30 changed files with 441 additions and 270 deletions

View File

@ -45,14 +45,15 @@ namespace NzbDrone.Core.Providers
private List<UpdatePackage> GetAvailablePackages() private List<UpdatePackage> GetAvailablePackages()
{ {
var updateList = new List<UpdatePackage>(); var updateList = new List<UpdatePackage>();
var rawUpdateList = _httpProvider.DownloadString(_configProvider.UpdateUrl); var updateUrl = _configProvider.UpdateUrl;
var rawUpdateList = _httpProvider.DownloadString(updateUrl);
var matches = parseRegex.Matches(rawUpdateList); var matches = parseRegex.Matches(rawUpdateList);
foreach (Match match in matches) foreach (Match match in matches)
{ {
var updatePackage = new UpdatePackage(); var updatePackage = new UpdatePackage();
updatePackage.FileName = match.Groups["filename"].Value; updatePackage.FileName = match.Groups["filename"].Value;
updatePackage.Url = _configProvider.UpdateUrl + updatePackage.FileName; updatePackage.Url = updateUrl + updatePackage.FileName;
updatePackage.Version = new Version(match.Groups["version"].Value); updatePackage.Version = new Version(match.Groups["version"].Value);
updateList.Add(updatePackage); updateList.Add(updatePackage);
} }

View File

@ -169,18 +169,6 @@ hr
margin-right: 135px; margin-right: 135px;
} }
button, input[type="button"], input[type="submit"], input[type="reset"]
{
color: white;
background-color: #065EFE;
border-style: solid;
border-color: #065EFE;
}
button:active, input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active
{
border-color: #0C48B6;
}
input[type=text], select input[type=text], select
{ {

View File

@ -1,11 +1,19 @@
body body
{ {
/*font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif; /*font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif; font-size:12px;*/
font-size:12px;*/
} }
p, h1, form, button{border:0; margin:0; padding:0;} p, h1, form, button
.spacer{clear:both; height:1px;} {
border: 0;
margin: 0;
padding: 0;
}
.spacer
{
clear: both;
height: 1px;
}
.settingsForm .settingsForm
{ {
@ -75,21 +83,12 @@ p, h1, form, button{border:0; margin:0; padding:0;}
margin-bottom: 10px; margin-bottom: 10px;
width: 125px; width: 125px;
height: 31px; height: 31px;
background:#666666;
text-align: center; text-align: center;
line-height: 31px; line-height: 31px;
color:#FFFFFF;
font-size: 11px; font-size: 11px;
font-weight: bold; font-weight: bold;
} }
#save_button:hover
{
border-bottom-style: solid;
border-bottom-width: 4px;
border-color: #3C3C3C;
padding-bottom: 2px;
}
#saveAjax #saveAjax
{ {

View File

@ -372,6 +372,7 @@
<Content Include="Scripts\jquery-1.7.1.js" /> <Content Include="Scripts\jquery-1.7.1.js" />
<Content Include="Scripts\jquery-1.7.1.min.js" /> <Content Include="Scripts\jquery-1.7.1.min.js" />
<Content Include="Scripts\jquery.hotkeys.js" /> <Content Include="Scripts\jquery.hotkeys.js" />
<Content Include="Scripts\jquery.livequery.js" />
<Content Include="Scripts\jquery.validate-vsdoc.js" /> <Content Include="Scripts\jquery.validate-vsdoc.js" />
<Content Include="Scripts\jquery.validate.js" /> <Content Include="Scripts\jquery.validate.js" />
<Content Include="Scripts\jquery.validate.min.js" /> <Content Include="Scripts\jquery.validate.min.js" />
@ -383,7 +384,7 @@
<Content Include="Scripts\NzbDrone\LocalSearch.js" /> <Content Include="Scripts\NzbDrone\LocalSearch.js" />
<Content Include="Scripts\NzbDrone\Notification.js" /> <Content Include="Scripts\NzbDrone\Notification.js" />
<Content Include="Scripts\NzbDrone\seriesDetails.js" /> <Content Include="Scripts\NzbDrone\seriesDetails.js" />
<Content Include="Scripts\NzbDrone\settingsForm.js" /> <Content Include="Scripts\NzbDrone\AutoBind.js" />
<Content Include="Scripts\jquery-ui-1.8.16.js" /> <Content Include="Scripts\jquery-ui-1.8.16.js" />
<Content Include="Scripts\jquery-ui-1.8.16.min.js" /> <Content Include="Scripts\jquery-ui-1.8.16.min.js" />
<Content Include="Scripts\jquery.gritter.js" /> <Content Include="Scripts\jquery.gritter.js" />
@ -414,7 +415,6 @@
<Content Include="Views\Settings\Notifications.cshtml" /> <Content Include="Views\Settings\Notifications.cshtml" />
<Content Include="Views\Settings\Quality.cshtml" /> <Content Include="Views\Settings\Quality.cshtml" />
<Content Include="Views\AddSeries\RootDir.cshtml" /> <Content Include="Views\AddSeries\RootDir.cshtml" />
<Content Include="Views\Settings\SubMenu.cshtml" />
<Content Include="Views\Shared\_Layout.cshtml" /> <Content Include="Views\Shared\_Layout.cshtml" />
<Content Include="Views\Shared\Footer.cshtml" /> <Content Include="Views\Shared\Footer.cshtml" />
<Content Include="Views\_ViewStart.cshtml" /> <Content Include="Views\_ViewStart.cshtml" />
@ -464,9 +464,6 @@
<ItemGroup> <ItemGroup>
<Content Include="Views\AddSeries\RootList.cshtml" /> <Content Include="Views\AddSeries\RootList.cshtml" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="Views\Settings\Test.cshtml" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Views\Misnamed\Index.cshtml" /> <Content Include="Views\Misnamed\Index.cshtml" />
</ItemGroup> </ItemGroup>

View File

@ -0,0 +1,25 @@
$(document).ready(function () {
//All forms are ajax forms
$("form").livequery(function () {
var options = {
type: 'post',
resetForm: false
};
$(this).ajaxForm(options);
});
$('Form button').livequery(function () {
$(this).removeAttr('disabled');
});
//All buttons are jQueryUI buttons
$('button, input[type="button"], input[type="submit"], input[type="reset"]').livequery(function () {
$(this).button();
});
});

View File

@ -13,8 +13,6 @@
jqXHR.success(function (data) { jqXHR.success(function (data) {
//Check if the response is a message type, //Check if the response is a message type,
console.log(this.url);
if (data.IsMessage) { if (data.IsMessage) {
if (data.NotificationType === 0) { if (data.NotificationType === 0) {
$.gritter.add({ $.gritter.add({

View File

@ -1,8 +0,0 @@
$(document).ready(function () {
var options = {
type: 'post',
resetForm: false
};
$('#form').ajaxForm(options);
$('#save_button').removeAttr('disabled');
});

View File

@ -0,0 +1,226 @@
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (MIT_LICENSE.txt)
* and GPL Version 2 (GPL_LICENSE.txt) licenses.
*
* Version: 1.1.1
* Requires jQuery 1.3+
* Docs: http://docs.jquery.com/Plugins/livequery
*/
(function ($) {
$.extend($.fn, {
livequery: function (type, fn, fn2) {
var self = this, q;
// Handle different call patterns
if ($.isFunction(type))
fn2 = fn, fn = type, type = undefined;
// See if Live Query already exists
$.each($.livequery.queries, function (i, query) {
if (self.selector == query.selector && self.context == query.context &&
type == query.type && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid))
// Found the query, exit the each loop
return (q = query) && false;
});
// Create new Live Query if it wasn't found
q = q || new $.livequery(this.selector, this.context, type, fn, fn2);
// Make sure it is running
q.stopped = false;
// Run it immediately for the first time
q.run();
// Contnue the chain
return this;
},
expire: function (type, fn, fn2) {
var self = this;
// Handle different call patterns
if ($.isFunction(type))
fn2 = fn, fn = type, type = undefined;
// Find the Live Query based on arguments and stop it
$.each($.livequery.queries, function (i, query) {
if (self.selector == query.selector && self.context == query.context &&
(!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped)
$.livequery.stop(query.id);
});
// Continue the chain
return this;
}
});
$.livequery = function (selector, context, type, fn, fn2) {
this.selector = selector;
this.context = context;
this.type = type;
this.fn = fn;
this.fn2 = fn2;
this.elements = [];
this.stopped = false;
// The id is the index of the Live Query in $.livequery.queries
this.id = $.livequery.queries.push(this) - 1;
// Mark the functions for matching later on
fn.$lqguid = fn.$lqguid || $.livequery.guid++;
if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++;
// Return the Live Query
return this;
};
$.livequery.prototype = {
stop: function () {
var query = this;
if (this.type)
// Unbind all bound events
this.elements.unbind(this.type, this.fn);
else if (this.fn2)
// Call the second function for all matched elements
this.elements.each(function (i, el) {
query.fn2.apply(el);
});
// Clear out matched elements
this.elements = [];
// Stop the Live Query from running until restarted
this.stopped = true;
},
run: function () {
// Short-circuit if stopped
if (this.stopped) return;
var query = this;
var oEls = this.elements,
els = $(this.selector, this.context),
nEls = els.not(oEls);
// Set elements to the latest set of matched elements
this.elements = els;
if (this.type) {
// Bind events to newly matched elements
nEls.bind(this.type, this.fn);
// Unbind events to elements no longer matched
if (oEls.length > 0)
$.each(oEls, function (i, el) {
if ($.inArray(el, els) < 0)
$.event.remove(el, query.type, query.fn);
});
}
else {
// Call the first function for newly matched elements
nEls.each(function () {
query.fn.apply(this);
});
// Call the second function for elements no longer matched
if (this.fn2 && oEls.length > 0)
$.each(oEls, function (i, el) {
if ($.inArray(el, els) < 0)
query.fn2.apply(el);
});
}
}
};
$.extend($.livequery, {
guid: 0,
queries: [],
queue: [],
running: false,
timeout: null,
checkQueue: function () {
if ($.livequery.running && $.livequery.queue.length) {
var length = $.livequery.queue.length;
// Run each Live Query currently in the queue
while (length--)
$.livequery.queries[$.livequery.queue.shift()].run();
}
},
pause: function () {
// Don't run anymore Live Queries until restarted
$.livequery.running = false;
},
play: function () {
// Restart Live Queries
$.livequery.running = true;
// Request a run of the Live Queries
$.livequery.run();
},
registerPlugin: function () {
$.each(arguments, function (i, n) {
// Short-circuit if the method doesn't exist
if (!$.fn[n]) return;
// Save a reference to the original method
var old = $.fn[n];
// Create a new method
$.fn[n] = function () {
// Call the original method
var r = old.apply(this, arguments);
// Request a run of the Live Queries
$.livequery.run();
// Return the original methods result
return r;
}
});
},
run: function (id) {
if (id != undefined) {
// Put the particular Live Query in the queue if it doesn't already exist
if ($.inArray(id, $.livequery.queue) < 0)
$.livequery.queue.push(id);
}
else
// Put each Live Query in the queue if it doesn't already exist
$.each($.livequery.queries, function (id) {
if ($.inArray(id, $.livequery.queue) < 0)
$.livequery.queue.push(id);
});
// Clear timeout if it already exists
if ($.livequery.timeout) clearTimeout($.livequery.timeout);
// Create a timeout to check the queue and actually run the Live Queries
$.livequery.timeout = setTimeout($.livequery.checkQueue, 20);
},
stop: function (id) {
if (id != undefined)
// Stop are particular Live Query
$.livequery.queries[id].stop();
else
// Stop all Live Queries
$.each($.livequery.queries, function (id) {
$.livequery.queries[id].stop();
});
}
});
// Register core DOM manipulation methods
$.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove', 'html');
// Run Live Queries when the Document is ready
$(function () { $.livequery.play(); });
})(jQuery);

View File

@ -9,10 +9,7 @@ History
<li>@Ajax.ActionLink("Purge History", "Purge", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid" })</li> <li>@Ajax.ActionLink("Purge History", "Purge", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid" })</li>
</ul> </ul>
} }
<link href="../../Content/Grid.css" rel="stylesheet" type="text/css" /> <link href="../../Content/Grid.css" rel="stylesheet" type="text/css" />
@section MainContent{
<div class="grid-container"> <div class="grid-container">
@{Html.Telerik().Grid<HistoryModel>().Name("history") @{Html.Telerik().Grid<HistoryModel>().Name("history")
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
@ -52,7 +49,6 @@ History
c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
.Render();} .Render();}
</div> </div>
}
<script type="text/javascript"> <script type="text/javascript">
deleteHistoryRowUrl = '../History/Delete'; deleteHistoryRowUrl = '../History/Delete';

View File

@ -30,7 +30,6 @@ Logs
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
</div> </div>
} }
@section MainContent{
<div class="infoBox"> <div class="infoBox">
Log entries older than 30 days are automatically deleted.</div> Log entries older than 30 days are automatically deleted.</div>
@{Html.Telerik().Grid<Log>().Name("logsGrid") @{Html.Telerik().Grid<Log>().Name("logsGrid")
@ -54,7 +53,6 @@ Logs
.ClientEvents(c => c.OnRowDataBound("onRowDataBound")) .ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
.Scrollable(c => c.Height(500)) .Scrollable(c => c.Height(500))
.Render();} .Render();}
}
<script type="text/javascript"> <script type="text/javascript">
function reloadGrid() { function reloadGrid() {
var grid = $('#logsGrid').data('tGrid'); var grid = $('#logsGrid').data('tGrid');

View File

@ -8,7 +8,6 @@ Misnamed
<li>@Ajax.ActionLink("Purge History", "Purge", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid" })</li> <li>@Ajax.ActionLink("Purge History", "Purge", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid" })</li>
</ul> </ul>
} }
<style> <style>
.searchImage .searchImage
{ {
@ -26,8 +25,6 @@ Misnamed
background-color: #065EFE; background-color: #065EFE;
} }
</style> </style>
@section MainContent{
<div class="grid-container"> <div class="grid-container">
@{Html.Telerik().Grid<MisnamedEpisodeModel>().Name("misnamed") @{Html.Telerik().Grid<MisnamedEpisodeModel>().Name("misnamed")
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
@ -55,8 +52,6 @@ Misnamed
}) })
.Render();} .Render();}
</div> </div>
}
<script type="text/javascript"> <script type="text/javascript">
deleteHistoryRowUrl = '../History/Delete'; deleteHistoryRowUrl = '../History/Delete';
redownloadUrl = '../History/Redownload'; redownloadUrl = '../History/Redownload';

View File

@ -1,20 +1,15 @@
@model List<MissingEpisodeModel> @model List<MissingEpisodeModel>
@using NzbDrone.Web.Models; @using NzbDrone.Web.Models;
@section TitleContent{ @section TitleContent{
Missing Missing
} }
<link href="../../Content/Grid.css" rel="stylesheet" type="text/css" /> <link href="../../Content/Grid.css" rel="stylesheet" type="text/css" />
@section ActionMenu{ @section ActionMenu{
<ul class="sub-menu"> <ul class="sub-menu">
<li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null, null)</li> <li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null, null)</li>
<li>@Ajax.ActionLink("Start Backlog Search", "BacklogSearch", "Command", null, null)</li> <li>@Ajax.ActionLink("Start Backlog Search", "BacklogSearch", "Command", null, null)</li>
</ul> </ul>
} }
@section MainContent{
@{Html.Telerik().Grid<MissingEpisodeModel>().Name("missing") @{Html.Telerik().Grid<MissingEpisodeModel>().Name("missing")
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns => .Columns(columns =>
@ -51,4 +46,3 @@ Missing
c => c =>
c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
.Render();} .Render();}
}

View File

@ -71,7 +71,7 @@
<li>@Ajax.ActionLink("Rename Episodes", "RenameEpisodes", "Episode", new { seriesId = Model.SeriesId }, null)</li> <li>@Ajax.ActionLink("Rename Episodes", "RenameEpisodes", "Episode", new { seriesId = Model.SeriesId }, null)</li>
</ul> </ul>
} }
@section MainContent{
<div id="banner-container"> <div id="banner-container">
@{ @{
var bannerUrl = "../../Content/Images/img03.jpg"; var bannerUrl = "../../Content/Images/img03.jpg";
@ -146,7 +146,7 @@
.Render();} .Render();}
</div> </div>
} }
}
@section Scripts{ @section Scripts{
<script type="text/javascript"> <script type="text/javascript">
seriesId = @Model.SeriesId; seriesId = @Model.SeriesId;

View File

@ -1,10 +1,8 @@
@using NzbDrone.Core.Helpers;
@using NzbDrone.Web.Models; @using NzbDrone.Web.Models;
@model IEnumerable<NzbDrone.Core.Repository.Series> @model IEnumerable<NzbDrone.Core.Repository.Series>
@section TitleContent{ @section TitleContent{
NzbDrone NzbDrone
} }
<style> <style>
/* progress bar container */ /* progress bar container */
.progressbar .progressbar
@ -47,14 +45,12 @@ NzbDrone
background: #E5ECF9; background: #E5ECF9;
} }
</style> </style>
@section ActionMenu{ @section ActionMenu{
<ul class="sub-menu"> <ul class="sub-menu">
<li>@Html.ActionLink("Add Series", "Index", "AddSeries")</li> <li>@Html.ActionLink("Add Series", "Index", "AddSeries")</li>
<li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null)</li> <li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null)</li>
</ul> </ul>
} }
@section MainContent{
<div class="grid-container"> <div class="grid-container">
@{Html.Telerik().Grid<SeriesModel>().Name("Grid") @{Html.Telerik().Grid<SeriesModel>().Name("Grid")
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
@ -104,7 +100,6 @@ NzbDrone
}) })
.Render();} .Render();}
</div> </div>
}
@section Scripts{ @section Scripts{
<script type="text/javascript"> <script type="text/javascript">
var windowElement; var windowElement;

View File

@ -10,7 +10,6 @@ Settings
}); });
</script> </script>
} }
@section MainContent{
<div id="tabs222"> <div id="tabs222">
<ul> <ul>
<li>@Html.ActionLink("Naming", "Naming", "Settings")</li> <li>@Html.ActionLink("Naming", "Naming", "Settings")</li>
@ -21,4 +20,3 @@ Settings
<li>@Html.ActionLink("System", "System", "Settings")</li> <li>@Html.ActionLink("System", "System", "Settings")</li>
</ul> </ul>
</div> </div>
}

View File

@ -14,7 +14,7 @@
<div class="infoBox"> <div class="infoBox">
RSS feeds are checked every 15 minutes for new episodes.</div> RSS feeds are checked every 15 minutes for new episodes.</div>
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" })) @using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" }))
{ {
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") @Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<div id="accordion"> <div id="accordion">
@ -106,12 +106,12 @@
</div> </div>
</div> </div>
<br /> <br />
<button type="submit" id="save_button" disabled="disabled"> <button type="submit" class="save_button" disabled="disabled">
Save</button> Save</button>
} }
</div> </div>
@section Scripts{ @section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$("#addItem").live('click', function () { $("#addItem").live('click', function () {
$.ajax({ $.ajax({

View File

@ -18,7 +18,7 @@
</style> </style>
} }
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveNaming", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" })) @using (Html.BeginForm("SaveNaming", "Settings", FormMethod.Post, new { id = "NamingForm", name = "NamingForm", @class = "settingsForm" }))
{ {
<div class="settingsContainer"> <div class="settingsContainer">
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") @Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
@ -68,12 +68,12 @@
</div> </div>
</div> </div>
<button type="submit" id="save_button" disabled="disabled"> <button type="submit" class="save_button" disabled="disabled">
Save</button> Save</button>
} }
</div> </div>
@section Scripts{ @section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
createExamples(); createExamples();

View File

@ -30,7 +30,7 @@
</style> </style>
} }
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" })) @using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "NotificationForm", name = "NotificationForm", @class = "settingsForm" }))
{ {
<div id="accordion2"> <div id="accordion2">
<h3> <h3>
@ -50,12 +50,12 @@
@{Html.RenderPartial("Prowl", Model);} @{Html.RenderPartial("Prowl", Model);}
</div> </div>
<button type="submit" id="save_button" disabled="disabled"> <button type="submit" class="save_button" disabled="disabled">
Save</button> Save</button>
} }
</div> </div>
@section Scripts{ @section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
$("#accordion2").accordion({ $("#accordion2").accordion({

View File

@ -7,7 +7,7 @@
<link href="../../Content/QualitySettings.css" rel="stylesheet" type="text/css" /> <link href="../../Content/QualitySettings.css" rel="stylesheet" type="text/css" />
} }
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new { id = "form", name = "form" })) @using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new { id = "QualityForm", name = "QualityForm" }))
{ {
<div id="top" class="settingsForm"> <div id="top" class="settingsForm">
<label class="labelClass">@Html.LabelFor(m => m.DefaultQualityProfileId) <label class="labelClass">@Html.LabelFor(m => m.DefaultQualityProfileId)
@ -81,14 +81,14 @@
</div> </div>
</div> </div>
<br /> <br />
<button type="submit" id="save_button" disabled="disabled"> <button type="submit" class="save_button" disabled="disabled">
Save</button> Save</button>
</div> </div>
} }
</div> </div>
@section Scripts{ @section Scripts{
<script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script> <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var deleteQualityProfileUrl = '@Url.Action("DeleteQualityProfile", "Settings")'; var deleteQualityProfileUrl = '@Url.Action("DeleteQualityProfile", "Settings")';

View File

@ -5,7 +5,7 @@
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" /> <link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
} }
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveSabnzbd", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" })) @using (Html.BeginForm("SaveSabnzbd", "Settings", FormMethod.Post, new { id = "SabForm", name = "SabForm", @class = "settingsForm" }))
{ {
<label class="labelClass"> <label class="labelClass">
Auto-Configure <span class="small">If access to SABnzbd doesn't require a username + Auto-Configure <span class="small">If access to SABnzbd doesn't require a username +
@ -54,14 +54,14 @@
</label> </label>
@Html.TextBoxFor(m => m.SabDropDirectory, new { @class = "inputClass folderLookup" }) @Html.TextBoxFor(m => m.SabDropDirectory, new { @class = "inputClass folderLookup" })
<button type="submit" id="save_button" disabled="disabled"> <button type="submit" class="save_button" disabled="disabled">
Save</button> Save</button>
} }
</div> </div>
<div id="result" class="hiddenResult"> <div id="result" class="hiddenResult">
</div> </div>
@section Scripts{ @section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
var autoConfigureSabUrl = '@Url.Action("AutoConfigureSab", "Settings")'; var autoConfigureSabUrl = '@Url.Action("AutoConfigureSab", "Settings")';

View File

@ -1,10 +0,0 @@
<ul class="sub-menu">
<li>@Html.ActionLink("Indexers", "Indexers", "Settings")</li>
<li>@Html.ActionLink("Quality", "Quality", "Settings")</li>
<li>@Html.ActionLink("Naming", "Naming", "Settings")</li>
<li>@Html.ActionLink("Notifications", "Notifications", "Settings")</li>
<li>@Html.ActionLink("SABnzbd", "Sabnzbd", "Settings")</li>
<li>@Html.ActionLink("System", "System", "Settings")</li>
</ul>
<div style="margin-bottom: 10px">
</div>

View File

@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" /> <link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
} }
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveSystem", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" })) @using (Html.BeginForm("SaveSystem", "Settings", FormMethod.Post, new { id = "SystemForm", name = "SystemForm", @class = "settingsForm" }))
{ {
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") @Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<label class="labelClass">@Html.LabelFor(m => m.LaunchBrowser) <label class="labelClass">@Html.LabelFor(m => m.LaunchBrowser)
@ -24,10 +24,10 @@
</label> </label>
@Html.DropDownListFor(m => m.AuthenticationType, Model.AuthTypeSelectList, new { @class = "inputClass" }) @Html.DropDownListFor(m => m.AuthenticationType, Model.AuthTypeSelectList, new { @class = "inputClass" })
<button type="submit" id="save_button" disabled="disabled"> <button type="submit" class="save_button" disabled="disabled">
Save</button> Save</button>
} }
</div> </div>
@section Scripts{ @section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
} }

View File

@ -1,12 +0,0 @@
<script>
$(function () {
// $(".quality-selectee").each(function() {
// $(this).button();
// });
$('#test').button();
});
</script>
<input type="checkbox" id="test" class="quality-selectee" /><label for="shuffle">SDTV</label>
<input type="checkbox" class="quality-selectee" /><label for="shuffle">DVD</label>
<input type="checkbox" class="quality-selectee" /><label for="shuffle">HDTV</label>

View File

@ -1,15 +1,11 @@
@model HandleErrorInfo @model HandleErrorInfo
@section TitleContent @section TitleContent
{ {
EPIC FAIL!!! EPIC FAIL!!!
} }
@section MainContent
{
<h2> <h2>
@Model.Exception.Message @Model.Exception.Message
</h2> </h2>
<br /> <br />
@Model.Exception.ToString() @Model.Exception.ToString()
}

View File

@ -20,6 +20,7 @@
@RenderBody() @RenderBody()
@(Html.Telerik().ScriptRegistrar().jQuery(true)) @(Html.Telerik().ScriptRegistrar().jQuery(true))
<script type="text/javascript" src="../../Scripts/jquery-ui-1.8.16.min.js"></script> <script type="text/javascript" src="../../Scripts/jquery-ui-1.8.16.min.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.livequery.js"></script>
<script type="text/javascript" src="../../Scripts/MicrosoftAjax.js"></script> <script type="text/javascript" src="../../Scripts/MicrosoftAjax.js"></script>
<script type="text/javascript" src="../../Scripts/MicrosoftMvcAjax.js"></script> <script type="text/javascript" src="../../Scripts/MicrosoftMvcAjax.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.gritter.js"></script> <script type="text/javascript" src="../../Scripts/jquery.gritter.js"></script>
@ -32,6 +33,7 @@
<script type="text/javascript" src="../../Scripts/NzbDrone/AutoComplete.js"></script> <script type="text/javascript" src="../../Scripts/NzbDrone/AutoComplete.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/LocalSearch.js"></script> <script type="text/javascript" src="../../Scripts/NzbDrone/LocalSearch.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/Notification.js"></script> <script type="text/javascript" src="../../Scripts/NzbDrone/Notification.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/AutoBind.js"></script>
@RenderSection("Scripts", required: false) @RenderSection("Scripts", required: false)
</body> </body>
</html> </html>

View File

@ -2,7 +2,6 @@
@section TitleContent{ @section TitleContent{
Configuration Configuration
} }
@section MainContent{
@(Html.Telerik().Grid<NzbDrone.Core.Repository.Config>() @(Html.Telerik().Grid<NzbDrone.Core.Repository.Config>()
.Name("Grid") .Name("Grid")
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
@ -30,4 +29,3 @@ Configuration
.Editable(editing => editing.Mode(GridEditMode.InLine)) .Editable(editing => editing.Mode(GridEditMode.InLine))
.Sortable() .Sortable()
) )
}

View File

@ -2,8 +2,6 @@
@section TitleContent{ @section TitleContent{
Indexers Indexers
} }
@section MainContent{
@{Html.Telerik().Grid(Model).Name("Grid") @{Html.Telerik().Grid(Model).Name("Grid")
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
.Render();} .Render();}
}

View File

@ -1,10 +1,9 @@
@using System.Collections @using NzbDrone.Web.Models
@using NzbDrone.Web.Models
@model IEnumerable<NzbDrone.Core.Repository.JobDefinition> @model IEnumerable<NzbDrone.Core.Repository.JobDefinition>
@section TitleContent{ @section TitleContent{
Jobs Jobs
} }
@section MainContent{
@{Html.Telerik().Grid(Model).Name("Grid") @{Html.Telerik().Grid(Model).Name("Grid")
.Render();} .Render();}
@ -15,4 +14,4 @@ Jobs
.Columns(c => c.Bound(g => g.TargetId).Title("Target")) .Columns(c => c.Bound(g => g.TargetId).Title("Target"))
.Columns(c => c.Bound(g => g.SecondaryTargetId).Title("Secondary Target")) .Columns(c => c.Bound(g => g.SecondaryTargetId).Title("Secondary Target"))
.Render();} .Render();}
}

View File

@ -10,7 +10,6 @@ Pending Processing
items.Add().Text("Purge History").Action("Purge", "History"); items.Add().Text("Purge History").Action("Purge", "History");
}).Render();} }).Render();}
} }
@section MainContent{
<div class="grid-container"> <div class="grid-container">
@{Html.Telerik().Grid<PendingProcessingModel>().Name("PendingProcessingGrid") @{Html.Telerik().Grid<PendingProcessingModel>().Name("PendingProcessingGrid")
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
@ -31,7 +30,6 @@ Pending Processing
c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
.Render();} .Render();}
</div> </div>
}
<script type="text/javascript"> <script type="text/javascript">
var renamePendingUrl = '@Url.Action("RenamePendingProcessing", "System")'; var renamePendingUrl = '@Url.Action("RenamePendingProcessing", "System")';

View File

@ -3,17 +3,15 @@
@section TitleContent{ @section TitleContent{
Upcoming Upcoming
} }
<link href="../../Content/Grid.css" rel="stylesheet" type="text/css" /> <link href="../../Content/Grid.css" rel="stylesheet" type="text/css" />
@section ActionMenu{ @section ActionMenu{
<ul class="sub-menu"> <ul class="sub-menu">
<li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null, null)</li> <li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null, null)</li>
</ul> </ul>
} }
@section MainContent{
<div id="yesterday"> <div id="yesterday">
<h2>Yesterday</h2> <h2>
Yesterday</h2>
<div class="grid-container"> <div class="grid-container">
@{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Yesterday").NoRecordsTemplate( @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Yesterday").NoRecordsTemplate(
"No watched shows aired yesterday") "No watched shows aired yesterday")
@ -51,7 +49,8 @@ Upcoming
</div> </div>
<br /> <br />
<div id="today"> <div id="today">
<h2>Today</h2> <h2>
Today</h2>
<div class="grid-container"> <div class="grid-container">
@{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Today").NoRecordsTemplate("No watched shows airing today.") @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Today").NoRecordsTemplate("No watched shows airing today.")
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
@ -85,7 +84,8 @@ Upcoming
</div> </div>
<br /> <br />
<div id="tomorrow"> <div id="tomorrow">
<h2>Tomorrow</h2> <h2>
Tomorrow</h2>
<div class="grid-container"> <div class="grid-container">
@{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Tomorrow").NoRecordsTemplate( @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Tomorrow").NoRecordsTemplate(
"No watched shows airing tomorrow") "No watched shows airing tomorrow")
@ -121,7 +121,8 @@ Upcoming
</div> </div>
<br /> <br />
<div id="week"> <div id="week">
<h2>Future Forecast</h2> <h2>
Future Forecast</h2>
<div class="grid-container"> <div class="grid-container">
@{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Week").NoRecordsTemplate( @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Week").NoRecordsTemplate(
"No watched shows airing in the next week...") "No watched shows airing in the next week...")
@ -154,4 +155,3 @@ Upcoming
.Render();} .Render();}
</div> </div>
</div> </div>
}