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

This commit is contained in:
Mark McDowall 2011-11-30 21:08:53 -08:00
commit 3c09533976
12 changed files with 430 additions and 449 deletions

View File

@ -68,7 +68,7 @@ namespace NzbDrone.Web.Controllers
public ActionResult Index()
{
return RedirectToAction("Indexers");
return View();
}
public ActionResult Indexers()

View File

@ -518,6 +518,12 @@
<LastGenOutput>EditorLocalization.en-US.designer.cs</LastGenOutput>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="Views\Settings\Index.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Shared\_RefrenceLayout.cshtml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@ -1,24 +1,21 @@
@using NzbDrone.Core.Repository
@section TitleContent{
@section TitleContent{
Add Series
}
@section Scripts
{
<script type="text/javascript" src="../../Scripts/NzbDrone/addSeries.js"></script>
}
@section MainContent{
<h2>
Add New Series</h2>
<div id="addNewSeries">
@{ Html.RenderAction("AddNew", "AddSeries"); }
</div>
<h2>
Add Series Already on Disk</h2>
<h3>
Manage Root Folders
</h3>
@{Html.RenderAction("RootDir");}
<div id="existingSeries">
@{ Html.RenderAction("ExistingSeries", "AddSeries"); }
</div>
}
<h2>
Add New Series</h2>
<div id="addNewSeries">
@{ Html.RenderAction("AddNew", "AddSeries"); }
</div>
<h2>
Add Series Already on Disk</h2>
<h3>
Manage Root Folders
</h3>
@{Html.RenderAction("RootDir");}
<div id="existingSeries">
@{ Html.RenderAction("ExistingSeries", "AddSeries"); }
</div>

View File

@ -0,0 +1,24 @@
@section TitleContent
{
Settings
}
@section Scripts
{
<script type="text/javascript">
$(function () {
$("#tabs222").tabs();
});
</script>
}
@section MainContent{
<div id="tabs222">
<ul>
<li>@Html.ActionLink("Naming", "Naming", "Settings")</li>
<li>@Html.ActionLink("Indexers", "Indexers", "Settings")</li>
<li>@Html.ActionLink("Quality", "Quality", "Settings")</li>
<li>@Html.ActionLink("SABnzbd", "Sabnzbd", "Settings")</li>
<li>@Html.ActionLink("Notifications", "Notifications", "Settings")</li>
<li>@Html.ActionLink("System", "System", "Settings")</li>
</ul>
</div>
}

View File

@ -1,5 +1,6 @@
@using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.IndexerSettingsModel
@{ Layout = "~/Views/Shared/_RefrenceLayout.cshtml"; }
@section HeaderContent{
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
<link rel="stylesheet" type="text/css" href="../../Content/IndexerSettings.css" />
@ -10,113 +11,105 @@
}
</style>
}
@section TitleContent{
Settings > Indexers
}
@section ActionMenu{
@{Html.RenderPartial("SubMenu");}
}
@section MainContent{
<div class="infoBox">
RSS feeds are checked every 15 minutes for new episodes.</div>
<div id="stylized">
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" }))
{
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<div id="accordion">
<h3>
<a href="#">NZBs.org</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsOrgEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbsOrgEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsOrgUId)
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgUId)</span>
</label>
@Html.TextBoxFor(m => m.NzbsOrgUId, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsOrgHash)
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgHash)</span>
</label>
@Html.TextBoxFor(m => m.NzbsOrgHash, new { @class = "inputClass" })
</div>
<h3>
<a href="#">NZBMatrix</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbMatrixEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbMatrixEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbMatrixUsername)
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixUsername)</span>
</label>
@Html.TextBoxFor(m => m.NzbMatrixUsername, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbMatrixApiKey)
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixApiKey)</span>
</label>
@Html.TextBoxFor(m => m.NzbMatrixApiKey, new { @class = "inputClass" })
</div>
<h3>
<a href="#">NZBsRus</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsRUsEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbsRUsEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsrusUId)
<span class="small">@Html.DescriptionFor(m => m.NzbsrusUId)</span>
</label>
@Html.TextBoxFor(m => m.NzbsrusUId, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsrusHash)
<span class="small">@Html.DescriptionFor(m => m.NzbsrusHash)</span>
</label>
@Html.TextBoxFor(m => m.NzbsrusHash, new { @class = "inputClass" })
</div>
<h3>
<a href="#">Newsbin</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NewzbinEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NewzbinEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NewzbinUsername)
<span class="small">@Html.DescriptionFor(m => m.NewzbinUsername)</span>
</label>
@Html.TextBoxFor(m => m.NewzbinUsername, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NewzbinPassword)
<span class="small">@Html.DescriptionFor(m => m.NewzbinPassword)</span>
</label>
@Html.TextBoxFor(m => m.NewzbinPassword, new { @class = "inputClass" })
</div>
<h3>
<a href="#">Newznab</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NewznabEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NewznabEnabled, new { @class = "inputClass checkClass" })
<br />
<br />
<p>
</p>
<a id="addItem" href="@Url.Action("AddNewznabProvider", "Settings")">
<img src="../../Content/Images/Plus.png" alt="Add Newznab Provider" width="20px"
height="20px" />
Add Newznab Provider</a>
<div id="newznabProviders">
@foreach (var provider in Model.NewznabDefinitions)
{
Html.RenderAction("GetNewznabProviderView", provider);
}
</div>
<div class="infoBox">
RSS feeds are checked every 15 minutes for new episodes.</div>
<div id="stylized">
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" }))
{
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<div id="accordion">
<h3>
<a href="#">NZBs.org</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsOrgEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbsOrgEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsOrgUId)
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgUId)</span>
</label>
@Html.TextBoxFor(m => m.NzbsOrgUId, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsOrgHash)
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgHash)</span>
</label>
@Html.TextBoxFor(m => m.NzbsOrgHash, new { @class = "inputClass" })
</div>
<h3>
<a href="#">NZBMatrix</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbMatrixEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbMatrixEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbMatrixUsername)
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixUsername)</span>
</label>
@Html.TextBoxFor(m => m.NzbMatrixUsername, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbMatrixApiKey)
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixApiKey)</span>
</label>
@Html.TextBoxFor(m => m.NzbMatrixApiKey, new { @class = "inputClass" })
</div>
<h3>
<a href="#">NZBsRus</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsRUsEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NzbsRUsEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsrusUId)
<span class="small">@Html.DescriptionFor(m => m.NzbsrusUId)</span>
</label>
@Html.TextBoxFor(m => m.NzbsrusUId, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NzbsrusHash)
<span class="small">@Html.DescriptionFor(m => m.NzbsrusHash)</span>
</label>
@Html.TextBoxFor(m => m.NzbsrusHash, new { @class = "inputClass" })
</div>
<h3>
<a href="#">Newsbin</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NewzbinEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NewzbinEnabled, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.NewzbinUsername)
<span class="small">@Html.DescriptionFor(m => m.NewzbinUsername)</span>
</label>
@Html.TextBoxFor(m => m.NewzbinUsername, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.NewzbinPassword)
<span class="small">@Html.DescriptionFor(m => m.NewzbinPassword)</span>
</label>
@Html.TextBoxFor(m => m.NewzbinPassword, new { @class = "inputClass" })
</div>
<h3>
<a href="#">Newznab</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NewznabEnabled)</span>
</label>
@Html.CheckBoxFor(m => m.NewznabEnabled, new { @class = "inputClass checkClass" })
<br />
<br />
<p>
</p>
<a id="addItem" href="@Url.Action("AddNewznabProvider", "Settings")">
<img src="../../Content/Images/Plus.png" alt="Add Newznab Provider" width="20px"
height="20px" />
Add Newznab Provider</a>
<div id="newznabProviders">
@foreach (var provider in Model.NewznabDefinitions)
{
Html.RenderAction("GetNewznabProviderView", provider);
}
</div>
</div>
<br />
<button type="submit" id="save_button" disabled="disabled">
Save</button>
}
</div>
}
</div>
<br />
<button type="submit" id="save_button" disabled="disabled">
Save</button>
}
</div>
@section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript">

View File

@ -1,9 +1,8 @@
@using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.EpisodeNamingModel
@{ Layout = "~/Views/Shared/_RefrenceLayout.cshtml"; }
@section HeaderContent{
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
<style>
#examples
{
@ -18,79 +17,63 @@
}
</style>
}
@section TitleContent{
Settings > Naming
}
@section ActionMenu{
@{Html.RenderPartial("SubMenu");}
}
@section MainContent{
<div id="stylized">
@using (Html.BeginForm("SaveNaming", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" }))
{
<div class="settingsContainer">
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<label class="labelClass">@Html.LabelFor(m => m.SeriesName)
<span class="small">@Html.DescriptionFor(m => m.SeriesName)</span>
</label>
@Html.CheckBoxFor(m => m.SeriesName, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.EpisodeName)
<span class="small">@Html.DescriptionFor(m => m.EpisodeName)</span>
</label>
@Html.CheckBoxFor(m => m.EpisodeName, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.ReplaceSpaces)
<span class="small">@Html.DescriptionFor(m => m.ReplaceSpaces)</span>
</label>
@Html.CheckBoxFor(m => m.ReplaceSpaces, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.AppendQuality)
<span class="small">@Html.DescriptionFor(m => m.AppendQuality)</span>
</label>
@Html.CheckBoxFor(m => m.AppendQuality, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.SeasonFolders)
<span class="small">@Html.DescriptionFor(m => m.SeasonFolders)</span>
</label>
@Html.CheckBoxFor(m => m.SeasonFolders, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.SeasonFolderFormat)
<span class="small">@Html.DescriptionFor(m => m.SeasonFolderFormat)</span>
</label>
@Html.TextBoxFor(m => m.SeasonFolderFormat, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.SeparatorStyle)
<span class="small">@Html.DescriptionFor(m => m.SeparatorStyle)</span>
</label>
@Html.DropDownListFor(m => m.SeparatorStyle, Model.SeparatorStyles, new { @class = "inputClass selectClass" })
<label class="labelClass">@Html.LabelFor(m => m.NumberStyle)
<span class="small">@Html.DescriptionFor(m => m.NumberStyle)</span>
</label>
@Html.DropDownListFor(m => m.NumberStyle, Model.NumberStyles, new { @class = "inputClass selectClass" })
<label class="labelClass">@Html.LabelFor(m => m.MultiEpisodeStyle)
<span class="small">@Html.DescriptionFor(m => m.MultiEpisodeStyle)</span>
</label>
@Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles, new { @class = "inputClass selectClass" })
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<label class="labelClass">@Html.LabelFor(m => m.SeriesName)
<span class="small">@Html.DescriptionFor(m => m.SeriesName)</span>
</label>
@Html.CheckBoxFor(m => m.SeriesName, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.EpisodeName)
<span class="small">@Html.DescriptionFor(m => m.EpisodeName)</span>
</label>
@Html.CheckBoxFor(m => m.EpisodeName, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.ReplaceSpaces)
<span class="small">@Html.DescriptionFor(m => m.ReplaceSpaces)</span>
</label>
@Html.CheckBoxFor(m => m.ReplaceSpaces, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.AppendQuality)
<span class="small">@Html.DescriptionFor(m => m.AppendQuality)</span>
</label>
@Html.CheckBoxFor(m => m.AppendQuality, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.SeasonFolders)
<span class="small">@Html.DescriptionFor(m => m.SeasonFolders)</span>
</label>
@Html.CheckBoxFor(m => m.SeasonFolders, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.SeasonFolderFormat)
<span class="small">@Html.DescriptionFor(m => m.SeasonFolderFormat)</span>
</label>
@Html.TextBoxFor(m => m.SeasonFolderFormat, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.SeparatorStyle)
<span class="small">@Html.DescriptionFor(m => m.SeparatorStyle)</span>
</label>
@Html.DropDownListFor(m => m.SeparatorStyle, Model.SeparatorStyles, new { @class = "inputClass selectClass" })
<label class="labelClass">@Html.LabelFor(m => m.NumberStyle)
<span class="small">@Html.DescriptionFor(m => m.NumberStyle)</span>
</label>
@Html.DropDownListFor(m => m.NumberStyle, Model.NumberStyles, new { @class = "inputClass selectClass" })
<label class="labelClass">@Html.LabelFor(m => m.MultiEpisodeStyle)
<span class="small">@Html.DescriptionFor(m => m.MultiEpisodeStyle)</span>
</label>
@Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles, new { @class = "inputClass selectClass" })
</div>
<div id ="examples">
<div id="singleEpisodeExample"><b>Single Episode Example: </b><span class="result"></span></div>
<div id="multiEpisodeExample"><b>Multi-Episode Example: </b><span class="result"></span></div>
<div id="examples">
<div id="singleEpisodeExample">
<b>Single Episode Example: </b><span class="result"></span>
</div>
<div id="multiEpisodeExample">
<b>Multi-Episode Example: </b><span class="result"></span>
</div>
</div>
<button type="submit" id="save_button" disabled="disabled">Save</button>
<button type="submit" id="save_button" disabled="disabled">
Save</button>
}
</div>
}
@section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
createExamples();

View File

@ -1,9 +1,7 @@
@using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.NotificationSettingsModel
@model NzbDrone.Web.Models.NotificationSettingsModel
@{ Layout = "~/Views/Shared/_RefrenceLayout.cshtml"; }
@section HeaderContent{
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
<style>
.notifier
{
@ -22,7 +20,7 @@
{
margin-top: 10px;
}
#smtpTest
{
margin-top: 10px;
@ -31,70 +29,59 @@
}
</style>
}
@section TitleContent{
Settings > Notifications
}
@section ActionMenu{
@{Html.RenderPartial("SubMenu");}
}
@section MainContent{
<div id="stylized">
@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" }))
{
<div id="accordion">
<h3><a href="#">XBMC</a></h3>
@{Html.RenderPartial("Xbmc", Model);}
<h3><a href="#">SMTP</a></h3>
@{Html.RenderPartial("Smtp", Model);}
<h3><a href="#">Twitter</a></h3>
@{Html.RenderPartial("Twitter", Model);}
<h3><a href="#">Growl</a></h3>
@{Html.RenderPartial("Growl", Model);}
<h3><a href="#">Prowl</a></h3>
@{Html.RenderPartial("Prowl", Model);}
</div>
<div id="stylized">
@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" }))
{
<div id="accordion2">
<h3>
<a href="#">XBMC</a></h3>
@{Html.RenderPartial("Xbmc", Model);}
<h3>
<a href="#">SMTP</a></h3>
@{Html.RenderPartial("Smtp", Model);}
<h3>
<a href="#">Twitter</a></h3>
@{Html.RenderPartial("Twitter", Model);}
<h3>
<a href="#">Growl</a></h3>
@{Html.RenderPartial("Growl", Model);}
<h3>
<a href="#">Prowl</a></h3>
@{Html.RenderPartial("Prowl", Model);}
</div>
<button type="submit" id="save_button" disabled="disabled">Save</button>
}
</div>
}
<button type="submit" id="save_button" disabled="disabled">
Save</button>
}
</div>
@section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#accordion").accordion({
$("#accordion2").accordion({
autoHeight: false
});
});
//Twitter
getAuthorizationUrl = '../Command/GetTwitterAuthorization';
verifyAuthorizationUrl = '../Command/VerifyTwitterAuthorization';
function requestTwitterAuthorization() {
$.ajax({
type: "GET",
url: getAuthorizationUrl,
error: function(req, status, error) {
alert("Sorry! We could get Twitter Authorization at this time. " + error);
},
success: function(data, textStatus, jqXHR) {
if (data.IsMessage)
return false;
type: "GET",
url: getAuthorizationUrl,
error: function (req, status, error) {
alert("Sorry! We could get Twitter Authorization at this time. " + error);
},
success: function (data, textStatus, jqXHR) {
if (data.IsMessage)
return false;
$('#authorizationRequestToken').val(data.Token);
window.open(data.Url);
}
});
$('#authorizationRequestToken').val(data.Token);
window.open(data.Url);
}
});
}
function verifyTwitterAuthorization() {
@ -102,45 +89,45 @@
var verifier = $('#twitterVerification').val();
$.ajax({
type: "GET",
url: verifyAuthorizationUrl,
data: jQuery.param({ token: token, verifier: verifier }),
error: function(req, status, error) {
alert("Sorry! We could verify Twitter Authorization at this time. " + error);
}
});
}
type: "GET",
url: verifyAuthorizationUrl,
data: jQuery.param({ token: token, verifier: verifier }),
error: function (req, status, error) {
alert("Sorry! We could verify Twitter Authorization at this time. " + error);
}
});
}
//SMTP
function testSmtpSettings() {
//Get the variables
var server = $('#SmtpServer').val();
var port = $('#SmtpPort').val();
var ssl = $('#SmtpUseSsl').val();
var username = $('#SmtpUsername').val();
var password = $('#SmtpPassword').val();
var fromAddress = $('#SmtpFromAddress').val();
var toAddresses = $('#SmtpToAddresses').val();
//SMTP
function testSmtpSettings() {
//Get the variables
var server = $('#SmtpServer').val();
var port = $('#SmtpPort').val();
var ssl = $('#SmtpUseSsl').val();
var username = $('#SmtpUsername').val();
var password = $('#SmtpPassword').val();
var fromAddress = $('#SmtpFromAddress').val();
var toAddresses = $('#SmtpToAddresses').val();
//Send the data!
$.ajax({
type: "POST",
url: '../Command/SendTestEmail',
data: jQuery.param({
server: server,
port: port,
ssl: ssl,
username: username,
password: password,
fromAddress: fromAddress,
toAddresses: toAddresses
}),
error: function (req, status, error) {
alert("Sorry! We could send a test email at this time. " + error);
}
});
//Send the data!
$.ajax({
type: "POST",
url: '../Command/SendTestEmail',
data: jQuery.param({
server: server,
port: port,
ssl: ssl,
username: username,
password: password,
fromAddress: fromAddress,
toAddresses: toAddresses
}),
error: function (req, status, error) {
alert("Sorry! We could send a test email at this time. " + error);
}
});
return false;
}
</script>
return false;
}
</script>
}

View File

@ -1,94 +1,93 @@
@using NzbDrone.Core.Repository.Quality
@using NzbDrone.Web.Helpers;
@model NzbDrone.Web.Models.QualityModel
@{ Layout = "~/Views/Shared/_RefrenceLayout.cshtml"; }
@section HeaderContent{
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
<link href="../../Content/QualitySettings.css" rel="stylesheet" type="text/css" />
}
@section TitleContent{
Settings > Quality
}
@section ActionMenu{
@{Html.RenderPartial("SubMenu");}
}
@section MainContent{
<div id="stylized">
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new { id = "form", name = "form" }))
{
<div id="top" class="settingsForm">
<label class="labelClass">@Html.LabelFor(m => m.DefaultQualityProfileId)
<span class="small">@Html.DescriptionFor(m => m.DefaultQualityProfileId)</span>
</label>
@Html.DropDownListFor(m => m.DefaultQualityProfileId, Model.QualityProfileSelectList, new { @class = "inputClass" })
<div class="sliders">
<div class="slider-container">
<b>SDTV</b>
<div id="sdtv-slider" class="slider"></div>
@Html.HiddenFor(m => m.SdtvMaxSize, new { @class="slider-value" })
30 minute size: <span class="30-minute"></span> | 60 minute size: <span class="60-minute"></span>
<div id="stylized">
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new { id = "form", name = "form" }))
{
<div id="top" class="settingsForm">
<label class="labelClass">@Html.LabelFor(m => m.DefaultQualityProfileId)
<span class="small">@Html.DescriptionFor(m => m.DefaultQualityProfileId)</span>
</label>
@Html.DropDownListFor(m => m.DefaultQualityProfileId, Model.QualityProfileSelectList, new { @class = "inputClass" })
<div class="sliders">
<div class="slider-container">
<b>SDTV</b>
<div id="sdtv-slider" class="slider">
</div>
<div class="slider-container">
<b>DVD</b>
<div id="dvd-slider" class="slider"></div>
@Html.HiddenFor(m => m.DvdMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span> | 60 minute size: <span class="60-minute"></span>
@Html.HiddenFor(m => m.SdtvMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span>| 60 minute size: <span class="60-minute">
</span>
</div>
<div class="slider-container">
<b>DVD</b>
<div id="dvd-slider" class="slider">
</div>
<div class="slider-container">
<b>HDTV</b>
<div id="hdtv-slider" class="slider"></div>
@Html.HiddenFor(m => m.HdtvMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span> | 60 minute size: <span class="60-minute"></span>
@Html.HiddenFor(m => m.DvdMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span>| 60 minute size: <span class="60-minute">
</span>
</div>
<div class="slider-container">
<b>HDTV</b>
<div id="hdtv-slider" class="slider">
</div>
<div class="slider-container">
<b>WEBDL</b>
<div id="webdl-slider" class="slider"></div>
@Html.HiddenFor(m => m.WebdlMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span> | 60 minute size: <span class="60-minute"></span>
@Html.HiddenFor(m => m.HdtvMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span>| 60 minute size: <span class="60-minute">
</span>
</div>
<div class="slider-container">
<b>WEBDL</b>
<div id="webdl-slider" class="slider">
</div>
<div class="slider-container">
<b>Bluray 720p</b>
<div id="bluray720p-slider" class="slider"></div>
@Html.HiddenFor(m => m.Bluray720pMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span> | 60 minute size: <span class="60-minute"></span>
@Html.HiddenFor(m => m.WebdlMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span>| 60 minute size: <span class="60-minute">
</span>
</div>
<div class="slider-container">
<b>Bluray 720p</b>
<div id="bluray720p-slider" class="slider">
</div>
<div class="slider-container">
<b>Bluray 1080p</b>
<div id="bluray1080p-slider" class="slider"></div>
@Html.HiddenFor(m => m.Bluray1080pMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span> | 60 minute size: <span class="60-minute"></span>
@Html.HiddenFor(m => m.Bluray720pMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span>| 60 minute size: <span class="60-minute">
</span>
</div>
<div class="slider-container">
<b>Bluray 1080p</b>
<div id="bluray1080p-slider" class="slider">
</div>
@Html.HiddenFor(m => m.Bluray1080pMaxSize, new { @class = "slider-value" })
30 minute size: <span class="30-minute"></span>| 60 minute size: <span class="60-minute">
</span>
</div>
</div>
</div>
<div id="bottom">
<div id="profileContainer">
<div id="profileHeader">
<a id="addItem" href="@Url.Action("AddProfile", "Settings")">
<img src="../../Content/Images/Plus.png" alt="Add New Profile" width="20px" height="20px" />
Add New Profile</a>
</div>
<div id="profiles">
@foreach (var item in (List<QualityProfile>)ViewData["Profiles"])
{
Html.RenderAction("GetQualityProfileView", item);
}
</div>
<div id="bottom">
<div id="profileContainer">
<div id="profileHeader">
<a id="addItem" href="@Url.Action("AddProfile", "Settings")">
<img src="../../Content/Images/Plus.png" alt="Add New Profile" width="20px" height="20px" />
Add New Profile</a>
</div>
<div id="profiles">
@foreach (var item in (List<QualityProfile>)ViewData["Profiles"])
{
Html.RenderAction("GetQualityProfileView", item);
}
</div>
<br />
<button type="submit" id="save_button" disabled="disabled">Save</button>
</div>
}
</div>
}
<br />
<button type="submit" id="save_button" disabled="disabled">
Save</button>
</div>
}
</div>
@section Scripts{
<script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.validate.unobtrusive.min.js"type="text/javascript"></script>
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript">
var deleteQualityProfileUrl = '@Url.Action("DeleteQualityProfile", "Settings")';
@ -190,31 +189,31 @@ Settings > Quality
});
}
});
var sliderOptions = {
min: 0,
max: 200,
max: 200,
value: 0,
step: 1,
create: function( event, ui ) {
step: 1,
create: function (event, ui) {
var startingValue = $(this).siblings('.slider-value').val();
$(this).siblings('.30-minute').text(startingValue * 30);
$(this).siblings('.60-minute').text(startingValue * 60);
},
slide: function( event, ui ) {
$(this).siblings('.slider-value').val(ui.value);
$(this).siblings('.30-minute').text(ui.value * 30);
$(this).siblings('.60-minute').text(ui.value * 60);
}
$(this).siblings('.30-minute').text(startingValue * 30);
$(this).siblings('.60-minute').text(startingValue * 60);
},
slide: function (event, ui) {
$(this).siblings('.slider-value').val(ui.value);
$(this).siblings('.30-minute').text(ui.value * 30);
$(this).siblings('.60-minute').text(ui.value * 60);
}
};
function setupSliders() {
$(".slider").each(function() {
$(".slider").each(function () {
var localOptions = sliderOptions;
localOptions["value"] = $(this).siblings('.slider-value').val();
$(this).empty().slider(localOptions);
});
$(this).empty().slider(localOptions);
});
}
</script>
}

View File

@ -1,78 +1,67 @@
@using NzbDrone.Web.Helpers;
@model NzbDrone.Web.Models.SabnzbdSettingsModel
@{ Layout = "~/Views/Shared/_RefrenceLayout.cshtml"; }
@section HeaderContent{
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
}
@section TitleContent{
Settings > Sabnzbd
}
@section ActionMenu{
@{Html.RenderPartial("SubMenu");}
}
@section MainContent{
<div id="stylized">
<div id="stylized">
@using (Html.BeginForm("SaveSabnzbd", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" }))
{
<label class="labelClass">Auto-Configure
<span class="small">If access to SABnzbd doesn't require a username + password and is on the same system as NzbDrone, you can auto-configure it</span>
<label class="labelClass">
Auto-Configure <span class="small">If access to SABnzbd doesn't require a username +
password and is on the same system as NzbDrone, you can auto-configure it</span>
</label>
<input type="button" onclick="autoConfigureSab(); return false;" value="Auto-Configure" class="inputClass"/>
<input type="button" onclick="autoConfigureSab(); return false;" value="Auto-Configure"
class="inputClass" />
<label class="labelClass">@Html.LabelFor(m => m.SabHost)
<span class="small">@Html.DescriptionFor(m => m.SabHost)</span>
<span class="small">@Html.DescriptionFor(m => m.SabHost)</span>
</label>
@Html.TextBoxFor(m => m.SabHost, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.SabPort)
<span class="small">@Html.DescriptionFor(m => m.SabPort)</span>
<span class="small">@Html.DescriptionFor(m => m.SabPort)</span>
</label>
@Html.TextBoxFor(m => m.SabPort, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.SabApiKey)
<span class="small">@Html.DescriptionFor(m => m.SabApiKey)</span>
<span class="small">@Html.DescriptionFor(m => m.SabApiKey)</span>
</label>
@Html.TextBoxFor(m => m.SabApiKey, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.SabUsername)
<span class="small">@Html.DescriptionFor(m => m.SabUsername)</span>
<span class="small">@Html.DescriptionFor(m => m.SabUsername)</span>
</label>
@Html.TextBoxFor(m => m.SabUsername, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.SabPassword)
<span class="small">@Html.DescriptionFor(m => m.SabPassword)</span>
<span class="small">@Html.DescriptionFor(m => m.SabPassword)</span>
</label>
@Html.TextBoxFor(m => m.SabPassword, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.SabTvCategory)
<span class="small">@Html.DescriptionFor(m => m.SabTvCategory)</span>
<span class="small">@Html.DescriptionFor(m => m.SabTvCategory)</span>
</label>
@Html.DropDownListFor(m => m.SabTvCategory, Model.SabTvCategorySelectList, new { @class = "inputClass selectClass" })
<label class="labelClass">@Html.LabelFor(m => m.SabTvPriority)
<span class="small">@Html.DescriptionFor(m => m.SabTvPriority)</span>
<span class="small">@Html.DescriptionFor(m => m.SabTvPriority)</span>
</label>
@Html.DropDownListFor(m => m.SabTvPriority, Model.PrioritySelectList, new { @class = "inputClass selectClass" })
<label class="labelClass">@Html.LabelFor(m => m.SabDropDirectory)
<span class="small">@Html.DescriptionFor(m => m.SabDropDirectory)</span>
<span class="small">@Html.DescriptionFor(m => m.SabDropDirectory)</span>
</label>
@Html.TextBoxFor(m => m.SabDropDirectory, new { @class = "inputClass folderLookup" })
<button type="submit" id="save_button" disabled="disabled">Save</button>
<button type="submit" id="save_button" disabled="disabled">
Save</button>
}
</div>
<div id="result" class="hiddenResult"></div>
}
</div>
<div id="result" class="hiddenResult">
</div>
@section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript">
var autoConfigureSabUrl = '@Url.Action("AutoConfigureSab", "Settings")';

View File

@ -1,42 +1,33 @@
@using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.SystemSettingsModel
@{ Layout = "~/Views/Shared/_RefrenceLayout.cshtml"; }
@section HeaderContent{
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
}
@section TitleContent{
Settings > System
}
@section ActionMenu{
@{Html.RenderPartial("SubMenu");}
}
@section MainContent{
<div id="stylized">
@using (Html.BeginForm("SaveSystem", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" }))
{
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<label class="labelClass">@Html.LabelFor(m => m.LaunchBrowser)
<span class="small">@Html.DescriptionFor(m => m.LaunchBrowser)</span>
<span class="small">@Html.DescriptionFor(m => m.LaunchBrowser)</span>
</label>
@Html.CheckBoxFor(m => m.LaunchBrowser, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.Port)
<span class="small">@Html.DescriptionFor(m => m.Port)</span>
<span class="small">@Html.DescriptionFor(m => m.Port)</span>
</label>
@Html.TextBoxFor(m => m.Port, new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.AuthenticationType)
<span class="small">@Html.DescriptionFor(m => m.AuthenticationType)</span>
<span class="small">@Html.DescriptionFor(m => m.AuthenticationType)</span>
</label>
@Html.DropDownListFor(m => m.AuthenticationType, Model.AuthTypeSelectList, new { @class = "inputClass" })
<button type="submit" id="save_button" disabled="disabled">Save</button>
<button type="submit" id="save_button" disabled="disabled">
Save</button>
}
</div>
}
@section Scripts{
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
}

View File

@ -1,24 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@{ Layout = "~/Views/Shared/_RefrenceLayout.cshtml"; }
@using NzbDrone.Common
@using NzbDrone.Web.Helpers
@using Telerik.Web.Mvc.UI
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link rel="SHORTCUT ICON" href="../../favicon.ico" />
<title>NzbDrone</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link type="text/css" rel="stylesheet" href="../../Content/2011.3.1115/telerik.common.min.css" />
<link type="text/css" rel="stylesheet" href="../../Content/2011.3.1115/telerik.sitefinity.min.css" />
<link type="text/css" rel="stylesheet" href="../../Content/jQueryUI/jquery-ui-1.8.16.custom.css" />
<link type="text/css" rel="stylesheet" href="../../Content/jquery.gritter.css" />
<link type="text/css" rel="stylesheet" href="../../Content/NzbDrone.css" />
<link type="text/css" rel="stylesheet" href="../../Content/ActionButton.css" />
<link type="text/css" rel="stylesheet" href="../../Content/overrides.css" />
<link type="text/css" rel="stylesheet" href="../../Content/Menu.css" />
<link type="text/css" rel="stylesheet" href="../../Content/Messages.css" />
@section HeaderContent
{
@MvcMiniProfiler.MiniProfiler.RenderIncludes()
@RenderSection("HeaderContent", required: false)
</head>
}
<body>
<div id="centered">
<div id="menu">
@ -30,14 +19,13 @@
@MvcHtmlString.Create(Html.CurrentActionLink("Settings", "Index", "Settings"))
@MvcHtmlString.Create(Html.CurrentActionLink("Logs", "Index", "Log"))
</ul>
<input id="localSeriesLookup" type="text"/>
<input id="localSeriesLookup" type="text" />
</div>
<div id="logo">
@RenderSection("TitleContent", required: false)
</div>
<div id="page">
@RenderSection("ActionMenu", required: false)
@RenderSection("MainContent", required: false)
@RenderBody()
</div>
<div id="footer">
@ -47,22 +35,10 @@
<div id="msgBox">
<span id="msgText">background notification</span>
</div>
@(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/MicrosoftAjax.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.form.js"></script>
<script type="text/javascript" src="../../Scripts/jquery-tgc-countdown-1.0.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.watermark.min.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.hotkeys.js"></script>
<script type="text/javascript" src="../../Scripts/doTimeout.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/episodeSearch.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/AutoComplete.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/LocalSearch.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/Notification.js"></script>
@section Scripts
{
@RenderSection("Scripts", required: false)
@if (EnviromentProvider.IsProduction)
@if (EnviromentProvider.IsProduction)
{
<script type="text/javascript">
var _gaq = _gaq || [];
@ -78,5 +54,4 @@
})();
</script>
}
</body>
</html>
}

View File

@ -0,0 +1,37 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@using Telerik.Web.Mvc.UI
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link rel="SHORTCUT ICON" href="../../favicon.ico" />
<title>NzbDrone</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link type="text/css" rel="stylesheet" href="../../Content/2011.3.1115/telerik.common.min.css" />
<link type="text/css" rel="stylesheet" href="../../Content/2011.3.1115/telerik.sitefinity.min.css" />
<link type="text/css" rel="stylesheet" href="../../Content/jQueryUI/jquery-ui-1.8.16.custom.css" />
<link type="text/css" rel="stylesheet" href="../../Content/jquery.gritter.css" />
<link type="text/css" rel="stylesheet" href="../../Content/NzbDrone.css" />
<link type="text/css" rel="stylesheet" href="../../Content/ActionButton.css" />
<link type="text/css" rel="stylesheet" href="../../Content/overrides.css" />
<link type="text/css" rel="stylesheet" href="../../Content/Menu.css" />
<link type="text/css" rel="stylesheet" href="../../Content/Messages.css" />
@RenderSection("HeaderContent", required: false)
</head>
<body>
@RenderBody()
@(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/MicrosoftAjax.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.form.js"></script>
<script type="text/javascript" src="../../Scripts/jquery-tgc-countdown-1.0.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.watermark.min.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.hotkeys.js"></script>
<script type="text/javascript" src="../../Scripts/doTimeout.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/episodeSearch.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/AutoComplete.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/LocalSearch.js"></script>
<script type="text/javascript" src="../../Scripts/NzbDrone/Notification.js"></script>
@RenderSection("Scripts", required: false)
</body>
</html>