1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

Fixed: Settings tabs should load a lot faster.

This commit is contained in:
kay.one 2012-02-23 11:16:11 -08:00
parent ac58d84a78
commit eddafaca93
11 changed files with 402 additions and 430 deletions

View File

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

View File

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

View File

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

View File

@ -1,58 +1,26 @@
@using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.IndexerSettingsModel
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; }
@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>
}
@{ Layout = null; }
<div class="infoBox">
RSS feeds are checked every 25 minutes for new episodes.</div>
<div class="indexerStatusContainer">
<div class="indexerStatus disabled" id="nzbsOrgStatus" title="Enabled/Disabled">Nzbs.Org</div>
<div class="indexerStatus disabled" id="nzbMatrixStatus" title="Enabled/Disabled">NZBMatrix</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 class="indexerStatus disabled" id="nzbsOrgStatus" title="Enabled/Disabled">
Nzbs.Org</div>
<div class="indexerStatus disabled" id="nzbMatrixStatus" title="Enabled/Disabled">
NZBMatrix</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 id="stylized">
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" }))
{
<div class="jquery-accordion">
<h3><a href="#">NZBs.org</a></h3>
<h3>
<a href="#">NZBs.org</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsOrgEnabled)</span>
@ -67,8 +35,8 @@
</label>
@Html.TextBoxFor(m => m.NzbsOrgHash, new { @class = "inputClass" })
</div>
<h3><a href="#">NZBMatrix</a></h3>
<h3>
<a href="#">NZBMatrix</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbMatrixEnabled)</span>
@ -83,10 +51,11 @@
</label>
@Html.TextBoxFor(m => m.NzbMatrixApiKey, new { @class = "inputClass" })
</div>
<h3><a href="#">NZBsRus</a></h3>
<h3>
<a href="#">NZBsRus</a></h3>
<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">
Enable <span class="small">@Html.DescriptionFor(m => m.NzbsRUsEnabled)</span>
</label>
@ -100,8 +69,8 @@
</label>
@Html.TextBoxFor(m => m.NzbsrusHash, new { @class = "inputClass" })
</div>
<h3><a href="#">Newzbin</a></h3>
<h3>
<a href="#">Newzbin</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NewzbinEnabled)</span>
@ -116,8 +85,8 @@
</label>
@Html.TextBoxFor(m => m.NewzbinPassword, new { @class = "inputClass", type = "password" })
</div>
<h3><a href="#">Newznab</a></h3>
<h3>
<a href="#">Newznab</a></h3>
<div class="indexerPanel">
<label class="labelClass">
Enable <span class="small">@Html.DescriptionFor(m => m.NewznabEnabled)</span>
@ -142,7 +111,6 @@
<div class="retentionContainer">
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<label class="labelClass">@Html.LabelFor(m => m.Retention)
<span class="small">@Html.DescriptionFor(m => m.Retention)</span>
</label>
@ -153,87 +121,85 @@
Save</button>
}
</div>
@section Scripts{
<script type="text/javascript">
$(document).ready(function() {
if ($('#NzbsOrgEnabled').attr('checked'))
$('#nzbsOrgStatus').toggleClass('enabled disabled');
<script type="text/javascript">
$(document).ready(function () {
if ($('#NzbsOrgEnabled').attr('checked'))
$('#nzbsOrgStatus').toggleClass('enabled disabled');
if ($('#NzbMatrixEnabled').attr('checked'))
$('#nzbMatrixStatus').toggleClass('enabled disabled');
if ($('#NzbMatrixEnabled').attr('checked'))
$('#nzbMatrixStatus').toggleClass('enabled disabled');
if ($('#NzbsRUsEnabled').attr('checked'))
$('#nzbsRusStatus').toggleClass('enabled disabled');
if ($('#NzbsRUsEnabled').attr('checked'))
$('#nzbsRusStatus').toggleClass('enabled disabled');
if ($('#NewzbinEnabled').attr('checked'))
$('#newzbinStatus').toggleClass('enabled disabled');
if ($('#NewzbinEnabled').attr('checked'))
$('#newzbinStatus').toggleClass('enabled disabled');
if ($('#NewznabEnabled').attr('checked'))
$('#newznabStatus').toggleClass('enabled disabled');
if ($('#NewznabEnabled').attr('checked'))
$('#newznabStatus').toggleClass('enabled disabled');
});
$('.enabledCheck').on('change', function () {
var id = $(this).attr('id');
if (id == 'NzbsOrgEnabled')
$('#nzbsOrgStatus').toggleClass('enabled disabled');
if (id == 'NzbMatrixEnabled')
$('#nzbMatrixStatus').toggleClass('enabled disabled');
if (id == 'NzbsRUsEnabled')
$('#nzbsRusStatus').toggleClass('enabled disabled');
if (id == 'NewzbinEnabled')
$('#newzbinStatus').toggleClass('enabled disabled');
if (id == 'NewznabEnabled')
$('#newznabStatus').toggleClass('enabled disabled');
});
$("#addItem").live('click', function () {
$.ajax({
url: this.href,
cache: false,
success: function (html) {
$("#newznabProviders").append(html);
}
});
return false;
});
$('.enabledCheck').on('change', function () {
var id = $(this).attr('id');
var deleteNewznabProviderUrl = '@Url.Action("DeleteNewznabProvider", "Settings")';
if (id == 'NzbsOrgEnabled')
$('#nzbsOrgStatus').toggleClass('enabled disabled');
if (id == 'NzbMatrixEnabled')
$('#nzbMatrixStatus').toggleClass('enabled disabled');
if (id == 'NzbsRUsEnabled')
$('#nzbsRusStatus').toggleClass('enabled disabled');
if (id == 'NewzbinEnabled')
$('#newzbinStatus').toggleClass('enabled disabled');
if (id == 'NewznabEnabled')
$('#newznabStatus').toggleClass('enabled disabled');
});
$("#addItem").live('click', function () {
$.ajax({
url: this.href,
cache: false,
success: function (html) {
$("#newznabProviders").append(html);
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();
}
});
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();
}
else {
alert(data);
}
else {
alert(data);
}
});
}
}
});
}
function getProviderId(obj) {
var parentProviderSection = $(obj).parents('.providerSection');
return parentProviderSection.children('.newznabProviderId').val();
}
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();
$(".providerName_textbox").live('keyup', function () {
var value = $(this).val();
var profileId = getProviderId(this);
$("#title_" + profileId).text(value);
}).keyup();
</script>
}
</script>

View File

@ -1,10 +1,6 @@
@using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.MiscSettingsModel
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; }
@section HeaderContent{
@Html.IncludeCss("Settings.css")
}
@{ Layout = null; }
<div id="stylized">
@using (Html.BeginForm("SaveMisc", "Settings", FormMethod.Post, new { id = "MiscForm", name = "MiscForm", @class = "settingsForm" }))
{
@ -13,12 +9,10 @@
</label>
@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">
Save</button>
}
</div>
@section Scripts{
}

View File

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

View File

@ -1,55 +1,52 @@
@using NzbDrone.Web.Helpers
@model NzbDrone.Web.Models.NotificationSettingsModel
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; }
@section HeaderContent{
@Html.IncludeCss("Settings.css")
<style>
.notifier
{
overflow: auto;
}
.notifier h4
{
font-weight: bold;
margin-bottom: 0px;
padding-left: 5px;
padding-top: 3px;
}
#save_button
{
margin-top: 10px;
}
#smtpTest
{
margin-top: 10px;
margin-bottom: 10px;
margin-left: 220px;
}
</style>
}
@model NzbDrone.Web.Models.NotificationSettingsModel
@{ Layout = null; }
<style>
.notifier
{
overflow: auto;
}
.notifier h4
{
font-weight: bold;
margin-bottom: 0px;
padding-left: 5px;
padding-top: 3px;
}
#save_button
{
margin-top: 10px;
}
#smtpTest
{
margin-top: 10px;
margin-bottom: 10px;
margin-left: 220px;
}
</style>
<div id="stylized">
@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "NotificationForm", name = "NotificationForm", @class = "settingsForm" }))
{
<div class="jquery-accordion">
<h3><a href="#">XBMC</a></h3>
<h3>
<a href="#">XBMC</a></h3>
@{Html.RenderPartial("Xbmc", Model);}
<h3><a href="#">SMTP</a></h3>
<h3>
<a href="#">SMTP</a></h3>
@{Html.RenderPartial("Smtp", Model);}
<h3><a href="#">Twitter</a></h3>
<h3>
<a href="#">Twitter</a></h3>
@{Html.RenderPartial("Twitter", Model);}
<h3><a href="#">Growl</a></h3>
<h3>
<a href="#">Growl</a></h3>
@{Html.RenderPartial("Growl", Model);}
<h3><a href="#">Prowl</a></h3>
<h3>
<a href="#">Prowl</a></h3>
@{Html.RenderPartial("Prowl", Model);}
<h3><a href="#">Plex</a></h3>
<h3>
<a href="#">Plex</a></h3>
@{Html.RenderPartial("Plex", Model);}
</div>
@ -57,95 +54,93 @@
Save</button>
}
</div>
@section Scripts{
<script type="text/javascript">
//Twitter
getAuthorizationUrl = '../Command/GetTwitterAuthorization';
verifyAuthorizationUrl = '../Command/VerifyTwitterAuthorization';
<script type="text/javascript">
//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;
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;
$('#authorizationRequestToken').val(data.Token);
window.open(data.Url);
}
});
}
$('#authorizationRequestToken').val(data.Token);
window.open(data.Url);
}
});
}
function verifyTwitterAuthorization() {
var token = $('#authorizationRequestToken').val();
var verifier = $('#twitterVerification').val();
function verifyTwitterAuthorization() {
var token = $('#authorizationRequestToken').val();
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);
}
});
}
$.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);
}
});
}
//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;
}
return false;
}
//Growl
function registerGrowl() {
//Get the variables
var host = $('#GrowlHost').val();
var password = $('#GrowlPassword').val();
//Growl
function registerGrowl() {
//Get the variables
var host = $('#GrowlHost').val();
var password = $('#GrowlPassword').val();
//Send the data!
$.ajax({
type: "POST",
url: '../Command/RegisterGrowl',
data: jQuery.param({
host: host,
password: password
}),
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/RegisterGrowl',
data: jQuery.param({
host: host,
password: password
}),
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,11 +1,7 @@
@using NzbDrone.Core.Repository.Quality
@using NzbDrone.Web.Helpers;
@model NzbDrone.Web.Models.QualityModel
@{ Layout = "~/Views/Shared/_ReferenceLayout.cshtml"; }
@section HeaderContent{
@Html.IncludeCss("Settings.css")
@Html.IncludeCss("QualitySettings.css")
}
@{ Layout = null; }
<div id="stylized">
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new { id = "QualityForm", name = "QualityForm" }))
{
@ -18,7 +14,22 @@
<div class="jquery-accordion">
<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="slider-container">
<b>SDTV</b>
@ -69,39 +80,18 @@
</span>
</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>
<br />
<button type="submit" class="save_button" disabled="disabled">
Save</button>
}
</div>
@section Scripts{
@Html.IncludeScript("MicrosoftAjax.js")
<script type="text/javascript">
$(document).ready(function () {
setupSliders();
});
<script type="text/javascript">
$(document).ready(function () {
setupSliders();
});
$('.quality-selectee').livequery(function () {
$(this).button();
});
</script>
}
$('.quality-selectee').livequery(function () {
$(this).button();
});
</script>

View File

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

View File

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

View File

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