Fixed: Settings tabs should load a lot faster.

pull/19/head
kay.one 13 years ago
parent ac58d84a78
commit eddafaca93

@ -3,28 +3,28 @@
margin-top: -10px; margin-top: -10px;
margin-left: 15px; margin-left: 15px;
} }
#addItem #addItem
{ {
text-decoration: none; text-decoration: none;
font-size:16px; font-size: 16px;
color: black; color: black;
font-weight:bold; font-weight: bold;
} }
.titleText .titleText
{ {
font-size: 1.5em; font-size: 1.5em;
line-height: 1; line-height: 1;
margin-bottom: 1em; margin-bottom: 1em;
display:inline; display: inline;
position: absolute; position: absolute;
top: -1px; top: -1px;
left: 2px; left: 2px;
padding-bottom: 0px; padding-bottom: 0px;
white-space:nowrap; white-space: nowrap;
} }
.providerHeader .providerHeader
{ {
min-height: 23px; min-height: 23px;
@ -36,7 +36,7 @@
float: left; float: left;
width: 255px; width: 255px;
margin: 2px; margin: 2px;
border:solid 1px #CCCCCD; border: solid 1px #CCCCCD;
display: inline-block; display: inline-block;
overflow: auto; overflow: auto;
padding: 3px; padding: 3px;
@ -51,19 +51,19 @@
font-weight: bold; font-weight: bold;
width: 50px; width: 50px;
} }
.providerOptions input, .providerOptions select .providerOptions input, .providerOptions select
{ {
font-size:12px; font-size: 12px;
padding:4px 2px; padding: 4px 2px;
border:solid 1px #aacfe4; border: solid 1px #aacfe4;
width:170px; width: 170px;
margin-right: 0px; margin-right: 0px;
} }
.providerOptions select .providerOptions select
{ {
width:176px; width: 176px;
} }
.deleteProvider .deleteProvider
@ -83,4 +83,39 @@ input[type="checkbox"]
overflow: auto; overflow: auto;
margin-top: 5px; margin-top: 5px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.indexerPanel
{
overflow: auto;
}
.retentionContainer
{
padding-top: 20px;
overflow: hidden;
}
.indexerStatusContainer
{
margin-left: 12px;
margin-bottom: -4px;
}
.indexerStatus
{
padding: 6px 10px;
display: inline-block;
color: white;
margin: 3px;
}
.enabled
{
background-color: #065EFE;
}
.disabled
{
background-color: #616161;
}

@ -1,33 +1,30 @@
@using NzbDrone.Web.Helpers; @using NzbDrone.Web.Helpers;
@model NzbDrone.Web.Models.DownloadClientSettingsModel @model NzbDrone.Web.Models.DownloadClientSettingsModel
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; } @{ Layout = null; }
@section HeaderContent{ <style>
@Html.IncludeCss("Settings.css") .downloadClient
<style> {
.downloadClient overflow: auto;
{ }
overflow: auto;
} .downloadClient h4
{
.downloadClient h4 font-weight: bold;
{ margin-bottom: 0px;
font-weight: bold; padding-left: 5px;
margin-bottom: 0px; padding-top: 3px;
padding-left: 5px; }
padding-top: 3px;
} #save_button
{
#save_button margin-top: 10px;
{ }
margin-top: 10px;
} #downloadClient-top
{
#downloadClient-top overflow: auto;
{ }
overflow: auto; </style>
}
</style>
}
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveDownloadClient", "Settings", FormMethod.Post, new { id = "DownloadClientForm", name = "DownloadClientForm", @class = "settingsForm" })) @using (Html.BeginForm("SaveDownloadClient", "Settings", FormMethod.Post, new { id = "DownloadClientForm", name = "DownloadClientForm", @class = "settingsForm" }))
{ {
@ -36,7 +33,6 @@
<span class="small">@Html.DescriptionFor(m => m.DownloadClient)</span> <span class="small">@Html.DescriptionFor(m => m.DownloadClient)</span>
</label> </label>
@Html.DropDownListFor(m => m.DownloadClient, Model.DownloadClientSelectList, new { @class = "inputClass selectClass" }) @Html.DropDownListFor(m => m.DownloadClient, Model.DownloadClientSelectList, new { @class = "inputClass selectClass" })
<label class="labelClass">@Html.LabelFor(m => m.DownloadClientDropDirectory) <label class="labelClass">@Html.LabelFor(m => m.DownloadClientDropDirectory)
<span class="small">@Html.DescriptionFor(m => m.DownloadClientDropDirectory)</span> <span class="small">@Html.DescriptionFor(m => m.DownloadClientDropDirectory)</span>
</label> </label>
@ -58,70 +54,67 @@
</div> </div>
<div id="result" class="hiddenResult"> <div id="result" class="hiddenResult">
</div> </div>
@section Scripts{
<script type="text/javascript">
$(document).ready(function () {
$('#downloadClientAccordion').accordion("activate", false);
});
</script>
<script type="text/javascript"> <script type="text/javascript">
var autoConfigureSabUrl = '@Url.Action("AutoConfigureSab", "Settings")'; $(document).ready(function () {
$('#downloadClientAccordion').accordion("activate", false);
});
function autoConfigureSab() { var autoConfigureSabUrl = '@Url.Action("AutoConfigureSab", "Settings")';
$.ajax({
type: "GET",
url: autoConfigureSabUrl,
error: function (req, status, error) {
alert("Sorry! We could not autoconfigure SABnzbd for you");
},
success: autoConfigureSuccess
});
function autoConfigureSuccess(data) { function autoConfigureSab() {
$('#SabHost').val(data.Host); $.ajax({
$('#SabPort').val(data.Port); type: "GET",
$('#SabApiKey').val(data.ApiKey); url: autoConfigureSabUrl,
} error: function (req, status, error) {
alert("Sorry! We could not autoconfigure SABnzbd for you");
},
success: autoConfigureSuccess
});
function autoConfigureSuccess(data) {
$('#SabHost').val(data.Host);
$('#SabPort').val(data.Port);
$('#SabApiKey').val(data.ApiKey);
} }
var sabCategoryUrl = '../Command/GetSabnzbdCategories'; }
var sabCategoryUrl = '../Command/GetSabnzbdCategories';
$('#SabTvCategory').focus(function () { $('#SabTvCategory').focus(function () {
var host = $('#SabHost').val(); var host = $('#SabHost').val();
var port = $('#SabPort').val(); var port = $('#SabPort').val();
var apiKey = $('#SabApiKey').val(); var apiKey = $('#SabApiKey').val();
var username = $('#SabUsername').val(); var username = $('#SabUsername').val();
var password = $('#SabPassword').val(); var password = $('#SabPassword').val();
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: sabCategoryUrl, url: sabCategoryUrl,
data: jQuery.param({ host: host, port: port, apiKey: apiKey, username: username, password: password }), data: jQuery.param({ host: host, port: port, apiKey: apiKey, username: username, password: password }),
error: function (req, status, error) { error: function (req, status, error) {
$.each($('#SabTvCategory option'), function () { $.each($('#SabTvCategory option'), function () {
$(this).remove(); $(this).remove();
}); });
$('#SabTvCategory').append($('<option />').val('tv').text('Please check your SABnzbd Settings')); $('#SabTvCategory').append($('<option />').val('tv').text('Please check your SABnzbd Settings'));
}, },
success: function (data, textStatus, jqXHR) { success: function (data, textStatus, jqXHR) {
//Get the current value //Get the current value
var currentlySelected = $('#SabTvCategory').val(); var currentlySelected = $('#SabTvCategory').val();
//Remove all existing options //Remove all existing options
$.each($('#SabTvCategory option'), function () { $.each($('#SabTvCategory option'), function () {
$(this).remove(); $(this).remove();
}); });
//Add the new ones //Add the new ones
$.each(data.categories, function () { $.each(data.categories, function () {
$('#SabTvCategory').append($('<option />').val(this.toString()).text(this.toString())); $('#SabTvCategory').append($('<option />').val(this.toString()).text(this.toString()));
}); });
//Attempt to reset to the preiously selected value (change to lower-case) //Attempt to reset to the preiously selected value (change to lower-case)
$("#SabTvCategory").val(currentlySelected.toLowerCase()); $("#SabTvCategory").val(currentlySelected.toLowerCase());
} }
});
}); });
</script> });
} </script>

@ -1,11 +1,18 @@
@using NzbDrone.Web.Helpers @using NzbDrone.Web.Helpers
@{ViewBag.Title = "Settings";} @{ViewBag.Title = "Settings";}
@section HeaderContent
{
@Html.IncludeCss("Settings.css")
@Html.IncludeCss("IndexerSettings.css")
@Html.IncludeCss("QualitySettings.css")
}
<div class="jquery-tabs"> <div class="jquery-tabs">
<ul> <ul>
<li>@Html.ActionLink("Naming", "Naming", "Settings")</li> <li>@Html.ActionLink("Naming", "Naming", "Settings")</li>
<li>@Html.ActionLink("Indexers", "Indexers", "Settings")</li>
<li>@Html.ActionLink("Quality", "Quality", "Settings")</li> <li>@Html.ActionLink("Quality", "Quality", "Settings")</li>
<li>@Html.ActionLink("Indexers", "Indexers", "Settings")</li>
<li>@Html.ActionLink("Download Client", "DownloadClient", "Settings")</li> <li>@Html.ActionLink("Download Client", "DownloadClient", "Settings")</li>
<li>@Html.ActionLink("Notifications", "Notifications", "Settings")</li> <li>@Html.ActionLink("Notifications", "Notifications", "Settings")</li>
<li>@Html.ActionLink("System", "System", "Settings")</li> <li>@Html.ActionLink("System", "System", "Settings")</li>

@ -1,58 +1,26 @@
@using NzbDrone.Web.Helpers @using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.IndexerSettingsModel @model NzbDrone.Web.Models.IndexerSettingsModel
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; } @{ Layout = null; }
@section HeaderContent{
@Html.IncludeCss("Settings.css")
@Html.IncludeCss("IndexerSettings.css")
<style>
.indexerPanel
{
overflow: auto;
}
.retentionContainer
{
padding-top: 20px;
overflow: hidden;
}
.indexerStatusContainer {
margin-left: 12px;
margin-bottom: -4px;
}
.indexerStatus {
padding: 6px 10px;
display: inline-block;
color: white;
margin: 3px;
}
.enabled {
background-color: #065EFE;
}
.disabled {
background-color: #616161;
}
</style>
}
<div class="infoBox"> <div class="infoBox">
RSS feeds are checked every 25 minutes for new episodes.</div> RSS feeds are checked every 25 minutes for new episodes.</div>
<div class="indexerStatusContainer"> <div class="indexerStatusContainer">
<div class="indexerStatus disabled" id="nzbsOrgStatus" title="Enabled/Disabled">Nzbs.Org</div> <div class="indexerStatus disabled" id="nzbsOrgStatus" title="Enabled/Disabled">
<div class="indexerStatus disabled" id="nzbMatrixStatus" title="Enabled/Disabled">NZBMatrix</div> Nzbs.Org</div>
<div class="indexerStatus disabled" id="nzbsRusStatus" title="Enabled/Disabled">NZBsRus</div> <div class="indexerStatus disabled" id="nzbMatrixStatus" title="Enabled/Disabled">
<div class="indexerStatus disabled" id="newzbinStatus" title="Enabled/Disabled">Newzbin</div> NZBMatrix</div>
<div class="indexerStatus disabled" id="newznabStatus" title="Enabled/Disabled">Newznab</div> <div class="indexerStatus disabled" id="nzbsRusStatus" title="Enabled/Disabled">
NZBsRus</div>
<div class="indexerStatus disabled" id="newzbinStatus" title="Enabled/Disabled">
Newzbin</div>
<div class="indexerStatus disabled" id="newznabStatus" title="Enabled/Disabled">
Newznab</div>
</div> </div>
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" })) @using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" }))
{ {
<div class="jquery-accordion"> <div class="jquery-accordion">
<h3><a href="#">NZBs.org</a></h3> <h3>
<a href="#">NZBs.org</a></h3>
<div class="indexerPanel"> <div class="indexerPanel">
<label class="labelClass"> <label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsOrgEnabled)</span> Enable <span class="small">@Html.DescriptionFor(m => m.NzbsOrgEnabled)</span>
@ -67,8 +35,8 @@
</label> </label>
@Html.TextBoxFor(m => m.NzbsOrgHash, new { @class = "inputClass" }) @Html.TextBoxFor(m => m.NzbsOrgHash, new { @class = "inputClass" })
</div> </div>
<h3>
<h3><a href="#">NZBMatrix</a></h3> <a href="#">NZBMatrix</a></h3>
<div class="indexerPanel"> <div class="indexerPanel">
<label class="labelClass"> <label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbMatrixEnabled)</span> Enable <span class="small">@Html.DescriptionFor(m => m.NzbMatrixEnabled)</span>
@ -83,10 +51,11 @@
</label> </label>
@Html.TextBoxFor(m => m.NzbMatrixApiKey, new { @class = "inputClass" }) @Html.TextBoxFor(m => m.NzbMatrixApiKey, new { @class = "inputClass" })
</div> </div>
<h3>
<h3><a href="#">NZBsRus</a></h3> <a href="#">NZBsRus</a></h3>
<div class="indexerPanel"> <div class="indexerPanel">
<div class="warningBox">NZBsRus does not support backlog searching</div> <div class="warningBox">
NZBsRus does not support backlog searching</div>
<label class="labelClass"> <label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsRUsEnabled)</span> Enable <span class="small">@Html.DescriptionFor(m => m.NzbsRUsEnabled)</span>
</label> </label>
@ -100,8 +69,8 @@
</label> </label>
@Html.TextBoxFor(m => m.NzbsrusHash, new { @class = "inputClass" }) @Html.TextBoxFor(m => m.NzbsrusHash, new { @class = "inputClass" })
</div> </div>
<h3>
<h3><a href="#">Newzbin</a></h3> <a href="#">Newzbin</a></h3>
<div class="indexerPanel"> <div class="indexerPanel">
<label class="labelClass"> <label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NewzbinEnabled)</span> Enable <span class="small">@Html.DescriptionFor(m => m.NewzbinEnabled)</span>
@ -116,8 +85,8 @@
</label> </label>
@Html.TextBoxFor(m => m.NewzbinPassword, new { @class = "inputClass", type = "password" }) @Html.TextBoxFor(m => m.NewzbinPassword, new { @class = "inputClass", type = "password" })
</div> </div>
<h3>
<h3><a href="#">Newznab</a></h3> <a href="#">Newznab</a></h3>
<div class="indexerPanel"> <div class="indexerPanel">
<label class="labelClass"> <label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NewznabEnabled)</span> Enable <span class="small">@Html.DescriptionFor(m => m.NewznabEnabled)</span>
@ -142,7 +111,6 @@
<div class="retentionContainer"> <div class="retentionContainer">
@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.Retention) <label class="labelClass">@Html.LabelFor(m => m.Retention)
<span class="small">@Html.DescriptionFor(m => m.Retention)</span> <span class="small">@Html.DescriptionFor(m => m.Retention)</span>
</label> </label>
@ -153,87 +121,85 @@
Save</button> Save</button>
} }
</div> </div>
@section Scripts{ <script type="text/javascript">
<script type="text/javascript"> $(document).ready(function () {
$(document).ready(function() { if ($('#NzbsOrgEnabled').attr('checked'))
if ($('#NzbsOrgEnabled').attr('checked')) $('#nzbsOrgStatus').toggleClass('enabled disabled');
$('#nzbsOrgStatus').toggleClass('enabled disabled');
if ($('#NzbMatrixEnabled').attr('checked')) if ($('#NzbMatrixEnabled').attr('checked'))
$('#nzbMatrixStatus').toggleClass('enabled disabled'); $('#nzbMatrixStatus').toggleClass('enabled disabled');
if ($('#NzbsRUsEnabled').attr('checked')) if ($('#NzbsRUsEnabled').attr('checked'))
$('#nzbsRusStatus').toggleClass('enabled disabled'); $('#nzbsRusStatus').toggleClass('enabled disabled');
if ($('#NewzbinEnabled').attr('checked')) if ($('#NewzbinEnabled').attr('checked'))
$('#newzbinStatus').toggleClass('enabled disabled'); $('#newzbinStatus').toggleClass('enabled disabled');
if ($('#NewznabEnabled').attr('checked')) if ($('#NewznabEnabled').attr('checked'))
$('#newznabStatus').toggleClass('enabled disabled'); $('#newznabStatus').toggleClass('enabled disabled');
}); });
$('.enabledCheck').on('change', function () {
var id = $(this).attr('id');
$('.enabledCheck').on('change', function () { if (id == 'NzbsOrgEnabled')
var id = $(this).attr('id'); $('#nzbsOrgStatus').toggleClass('enabled disabled');
if (id == 'NzbsOrgEnabled') if (id == 'NzbMatrixEnabled')
$('#nzbsOrgStatus').toggleClass('enabled disabled'); $('#nzbMatrixStatus').toggleClass('enabled disabled');
if (id == 'NzbMatrixEnabled') if (id == 'NzbsRUsEnabled')
$('#nzbMatrixStatus').toggleClass('enabled disabled'); $('#nzbsRusStatus').toggleClass('enabled disabled');
if (id == 'NzbsRUsEnabled') if (id == 'NewzbinEnabled')
$('#nzbsRusStatus').toggleClass('enabled disabled'); $('#newzbinStatus').toggleClass('enabled disabled');
if (id == 'NewzbinEnabled') if (id == 'NewznabEnabled')
$('#newzbinStatus').toggleClass('enabled disabled'); $('#newznabStatus').toggleClass('enabled disabled');
});
if (id == 'NewznabEnabled') $("#addItem").live('click', function () {
$('#newznabStatus').toggleClass('enabled disabled'); $.ajax({
url: this.href,
cache: false,
success: function (html) {
$("#newznabProviders").append(html);
}
}); });
return false;
});
var deleteNewznabProviderUrl = '@Url.Action("DeleteNewznabProvider", "Settings")';
function deleteProvider(id) {
$.ajax({
type: "POST",
url: deleteNewznabProviderUrl,
data: jQuery.param({ providerId: id }),
error: function (req, status, error) {
alert("Sorry! We could not delete your Provider at this time. " + error);
},
success: function (data, textStatus, jqXHR) {
if (data == "ok") {
$("#provider_" + id).remove();
}
$("#addItem").live('click', function () { else {
$.ajax({ alert(data);
url: this.href,
cache: false,
success: function (html) {
$("#newznabProviders").append(html);
} }
}); }
return false;
}); });
}
var deleteNewznabProviderUrl = '@Url.Action("DeleteNewznabProvider", "Settings")'; function getProviderId(obj) {
var parentProviderSection = $(obj).parents('.providerSection');
function deleteProvider(id) { return parentProviderSection.children('.newznabProviderId').val();
$.ajax({ }
type: "POST",
url: deleteNewznabProviderUrl,
data: jQuery.param({ providerId: id }),
error: function (req, status, error) {
alert("Sorry! We could not delete your Provider at this time. " + error);
},
success: function (data, textStatus, jqXHR) {
if (data == "ok") {
$("#provider_" + id).remove();
}
else { $(".providerName_textbox").live('keyup', function () {
alert(data); var value = $(this).val();
} var profileId = getProviderId(this);
} $("#title_" + profileId).text(value);
}); }).keyup();
}
</script>
function getProviderId(obj) {
var parentProviderSection = $(obj).parents('.providerSection');
return parentProviderSection.children('.newznabProviderId').val();
}
$(".providerName_textbox").live('keyup', function () {
var value = $(this).val();
var profileId = getProviderId(this);
$("#title_" + profileId).text(value);
}).keyup();
</script>
}

@ -1,10 +1,6 @@
@using NzbDrone.Web.Helpers @using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.MiscSettingsModel @model NzbDrone.Web.Models.MiscSettingsModel
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; } @{ Layout = null; }
@section HeaderContent{
@Html.IncludeCss("Settings.css")
}
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveMisc", "Settings", FormMethod.Post, new { id = "MiscForm", name = "MiscForm", @class = "settingsForm" })) @using (Html.BeginForm("SaveMisc", "Settings", FormMethod.Post, new { id = "MiscForm", name = "MiscForm", @class = "settingsForm" }))
{ {
@ -13,12 +9,10 @@
</label> </label>
@Html.CheckBoxFor(m => m.EnableBacklogSearching, new { @class = "inputClass checkClass" }) @Html.CheckBoxFor(m => m.EnableBacklogSearching, new { @class = "inputClass checkClass" })
<div style="overflow: hidden; height: 50px;"></div> <div style="overflow: hidden; height: 50px;">
</div>
<button type="submit" class="save_button" disabled="disabled"> <button type="submit" class="save_button" disabled="disabled">
Save</button> Save</button>
} }
</div> </div>
@section Scripts{
}

@ -1,22 +1,22 @@
@using NzbDrone.Web.Helpers @using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.EpisodeNamingModel @model NzbDrone.Web.Models.EpisodeNamingModel
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; } @{
@section HeaderContent{ Layout = null;
@Html.IncludeCss("Settings.css")
<style>
#examples
{
margin-top: 5px;
margin-bottom: 20px;
padding-left: 20px;
}
.settingsContainer
{
overflow: auto;
}
</style>
} }
<style>
#examples
{
margin-top: 5px;
margin-bottom: 20px;
padding-left: 20px;
}
.settingsContainer
{
overflow: auto;
}
</style>
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveNaming", "Settings", FormMethod.Post, new { id = "NamingForm", name = "NamingForm", @class = "settingsForm" })) @using (Html.BeginForm("SaveNaming", "Settings", FormMethod.Post, new { id = "NamingForm", name = "NamingForm", @class = "settingsForm" }))
{ {
@ -72,10 +72,8 @@
Save</button> Save</button>
} }
</div> </div>
@section Scripts{ <script type="text/javascript">
<script type="text/javascript"> $(document).ready(function () {
$(document).ready(function () { createExamples();
createExamples(); });
}); </script>
</script>
}

@ -1,55 +1,52 @@
@using NzbDrone.Web.Helpers @model NzbDrone.Web.Models.NotificationSettingsModel
@model NzbDrone.Web.Models.NotificationSettingsModel @{ Layout = null; }
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; } <style>
@section HeaderContent{ .notifier
@Html.IncludeCss("Settings.css") {
<style> overflow: auto;
.notifier }
{
overflow: auto; .notifier h4
} {
font-weight: bold;
.notifier h4 margin-bottom: 0px;
{ padding-left: 5px;
font-weight: bold; padding-top: 3px;
margin-bottom: 0px; }
padding-left: 5px;
padding-top: 3px; #save_button
} {
margin-top: 10px;
#save_button }
{
margin-top: 10px; #smtpTest
} {
margin-top: 10px;
#smtpTest margin-bottom: 10px;
{ margin-left: 220px;
margin-top: 10px; }
margin-bottom: 10px; </style>
margin-left: 220px;
}
</style>
}
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "NotificationForm", name = "NotificationForm", @class = "settingsForm" })) @using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "NotificationForm", name = "NotificationForm", @class = "settingsForm" }))
{ {
<div class="jquery-accordion"> <div class="jquery-accordion">
<h3><a href="#">XBMC</a></h3> <h3>
<a href="#">XBMC</a></h3>
@{Html.RenderPartial("Xbmc", Model);} @{Html.RenderPartial("Xbmc", Model);}
<h3>
<h3><a href="#">SMTP</a></h3> <a href="#">SMTP</a></h3>
@{Html.RenderPartial("Smtp", Model);} @{Html.RenderPartial("Smtp", Model);}
<h3>
<h3><a href="#">Twitter</a></h3> <a href="#">Twitter</a></h3>
@{Html.RenderPartial("Twitter", Model);} @{Html.RenderPartial("Twitter", Model);}
<h3>
<h3><a href="#">Growl</a></h3> <a href="#">Growl</a></h3>
@{Html.RenderPartial("Growl", Model);} @{Html.RenderPartial("Growl", Model);}
<h3>
<h3><a href="#">Prowl</a></h3> <a href="#">Prowl</a></h3>
@{Html.RenderPartial("Prowl", Model);} @{Html.RenderPartial("Prowl", Model);}
<h3>
<h3><a href="#">Plex</a></h3> <a href="#">Plex</a></h3>
@{Html.RenderPartial("Plex", Model);} @{Html.RenderPartial("Plex", Model);}
</div> </div>
@ -57,95 +54,93 @@
Save</button> Save</button>
} }
</div> </div>
@section Scripts{ <script type="text/javascript">
<script type="text/javascript"> //Twitter
//Twitter getAuthorizationUrl = '../Command/GetTwitterAuthorization';
getAuthorizationUrl = '../Command/GetTwitterAuthorization'; verifyAuthorizationUrl = '../Command/VerifyTwitterAuthorization';
verifyAuthorizationUrl = '../Command/VerifyTwitterAuthorization';
function requestTwitterAuthorization() { function requestTwitterAuthorization() {
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: getAuthorizationUrl, url: getAuthorizationUrl,
error: function (req, status, error) { error: function (req, status, error) {
alert("Sorry! We could get Twitter Authorization at this time. " + error); alert("Sorry! We could get Twitter Authorization at this time. " + error);
}, },
success: function (data, textStatus, jqXHR) { success: function (data, textStatus, jqXHR) {
if (data.IsMessage) if (data.IsMessage)
return false; return false;
$('#authorizationRequestToken').val(data.Token); $('#authorizationRequestToken').val(data.Token);
window.open(data.Url); window.open(data.Url);
} }
}); });
} }
function verifyTwitterAuthorization() { function verifyTwitterAuthorization() {
var token = $('#authorizationRequestToken').val(); var token = $('#authorizationRequestToken').val();
var verifier = $('#twitterVerification').val(); var verifier = $('#twitterVerification').val();
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: verifyAuthorizationUrl, url: verifyAuthorizationUrl,
data: jQuery.param({ token: token, verifier: verifier }), data: jQuery.param({ token: token, verifier: verifier }),
error: function (req, status, error) { error: function (req, status, error) {
alert("Sorry! We could verify Twitter Authorization at this time. " + error); alert("Sorry! We could verify Twitter Authorization at this time. " + error);
} }
}); });
} }
//SMTP //SMTP
function testSmtpSettings() { function testSmtpSettings() {
//Get the variables //Get the variables
var server = $('#SmtpServer').val(); var server = $('#SmtpServer').val();
var port = $('#SmtpPort').val(); var port = $('#SmtpPort').val();
var ssl = $('#SmtpUseSsl').val(); var ssl = $('#SmtpUseSsl').val();
var username = $('#SmtpUsername').val(); var username = $('#SmtpUsername').val();
var password = $('#SmtpPassword').val(); var password = $('#SmtpPassword').val();
var fromAddress = $('#SmtpFromAddress').val(); var fromAddress = $('#SmtpFromAddress').val();
var toAddresses = $('#SmtpToAddresses').val(); var toAddresses = $('#SmtpToAddresses').val();
//Send the data! //Send the data!
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: '../Command/SendTestEmail', url: '../Command/SendTestEmail',
data: jQuery.param({ data: jQuery.param({
server: server, server: server,
port: port, port: port,
ssl: ssl, ssl: ssl,
username: username, username: username,
password: password, password: password,
fromAddress: fromAddress, fromAddress: fromAddress,
toAddresses: toAddresses toAddresses: toAddresses
}), }),
error: function (req, status, error) { error: function (req, status, error) {
alert("Sorry! We could send a test email at this time. " + error); alert("Sorry! We could send a test email at this time. " + error);
} }
}); });
return false; return false;
} }
//Growl //Growl
function registerGrowl() { function registerGrowl() {
//Get the variables //Get the variables
var host = $('#GrowlHost').val(); var host = $('#GrowlHost').val();
var password = $('#GrowlPassword').val(); var password = $('#GrowlPassword').val();
//Send the data! //Send the data!
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: '../Command/RegisterGrowl', url: '../Command/RegisterGrowl',
data: jQuery.param({ data: jQuery.param({
host: host, host: host,
password: password password: password
}), }),
error: function (req, status, error) { error: function (req, status, error) {
alert("Sorry! We could send a test email at this time. " + error); alert("Sorry! We could send a test email at this time. " + error);
} }
}); });
return false; return false;
} }
</script> </script>
}

@ -1,11 +1,7 @@
@using NzbDrone.Core.Repository.Quality @using NzbDrone.Core.Repository.Quality
@using NzbDrone.Web.Helpers; @using NzbDrone.Web.Helpers;
@model NzbDrone.Web.Models.QualityModel @model NzbDrone.Web.Models.QualityModel
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; } @{ Layout = null; }
@section HeaderContent{
@Html.IncludeCss("Settings.css")
@Html.IncludeCss("QualitySettings.css")
}
<div id="stylized"> <div id="stylized">
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new { id = "QualityForm", name = "QualityForm" })) @using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new { id = "QualityForm", name = "QualityForm" }))
{ {
@ -18,7 +14,22 @@
<div class="jquery-accordion"> <div class="jquery-accordion">
<h3> <h3>
<a href="#">Sizes</a></h3> <a href="#">Profiles</a></h3>
<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>
<h3>
<a href="#">Size Limits</a></h3>
<div class="sliders"> <div class="sliders">
<div class="slider-container"> <div class="slider-container">
<b>SDTV</b> <b>SDTV</b>
@ -69,39 +80,18 @@
</span> </span>
</div> </div>
</div> </div>
<h3>
<a href="#">Profiles</a></h3>
<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>
</div> </div>
<br /> <br />
<button type="submit" class="save_button" disabled="disabled"> <button type="submit" class="save_button" disabled="disabled">
Save</button> Save</button>
} }
</div> </div>
@section Scripts{ <script type="text/javascript">
@Html.IncludeScript("MicrosoftAjax.js") $(document).ready(function () {
setupSliders();
<script type="text/javascript"> });
$(document).ready(function () {
setupSliders();
});
$('.quality-selectee').livequery(function () { $('.quality-selectee').livequery(function () {
$(this).button(); $(this).button();
}); });
</script> </script>
}

@ -1,10 +1,7 @@
@using NzbDrone.Web.Helpers @using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.SystemSettingsModel @model NzbDrone.Web.Models.SystemSettingsModel
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; } @{ Layout = null; }
@section HeaderContent{
@Html.IncludeCss("Settings.css")
}
<div class="infoBox"> <div class="infoBox">
You must manually restart NzbDrone for these changes to take effect. (Automatic restart comming soon!) You must manually restart NzbDrone for these changes to take effect. (Automatic restart comming soon!)
@ -38,6 +35,3 @@
Save</button> Save</button>
} }
</div> </div>
@section Scripts{
}

@ -48,6 +48,8 @@
@section Scripts @section Scripts
{ {
@RenderSection("Scripts", required: false) @RenderSection("Scripts", required: false)
@Html.IncludeScript("jquery.signalR.min.js")
<script src="@Url.Content("~/signalr/hubs")" type="text/javascript"></script>
@if (EnviromentProvider.IsProduction) @if (EnviromentProvider.IsProduction)
{ {
<script type="text/javascript"> <script type="text/javascript">

@ -28,11 +28,9 @@
@Html.IncludeScript("jquery-tgc-countdown-1.0.js") @Html.IncludeScript("jquery-tgc-countdown-1.0.js")
@Html.IncludeScript("jquery.watermark.min.js") @Html.IncludeScript("jquery.watermark.min.js")
@Html.IncludeScript("jquery.hotkeys.js") @Html.IncludeScript("jquery.hotkeys.js")
@Html.IncludeScript("jquery.signalR.min.js")
@Html.IncludeScript("jquery.validate.min.js") @Html.IncludeScript("jquery.validate.min.js")
@Html.IncludeScript("jquery.cookie.js") @Html.IncludeScript("jquery.cookie.js")
@Html.IncludeScript("doTimeout.js") @Html.IncludeScript("doTimeout.js")
<script src="@Url.Content("~/signalr/hubs")" type="text/javascript"></script>
@Html.IncludeScript("NzbDrone/localSearch.js") @Html.IncludeScript("NzbDrone/localSearch.js")
@Html.IncludeScript("NzbDrone/AutoComplete.js") @Html.IncludeScript("NzbDrone/AutoComplete.js")
@Html.IncludeScript("NzbDrone/Notification.js") @Html.IncludeScript("NzbDrone/Notification.js")

Loading…
Cancel
Save