parent
3d961654d8
commit
206144d7e3
@ -1,37 +1,36 @@
|
||||
@using NzbDrone.Web.Models;
|
||||
@model List<SeasonEditModel>
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div style="vertical-align: middle">
|
||||
@foreach (var season in Model)
|
||||
{
|
||||
Html.RenderAction("GetSingleSeasonView", "Series", season);
|
||||
}
|
||||
</div>
|
||||
@section Scripts{
|
||||
<script type="text/javascript">
|
||||
var lastChecked = null;
|
||||
|
||||
<script type="text/javascript">
|
||||
var lastChecked = null;
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.chkbox').click(function (event) {
|
||||
if (!lastChecked) {
|
||||
lastChecked = this;
|
||||
return;
|
||||
}
|
||||
$(document).ready(function () {
|
||||
$('.chkbox').click(function (event) {
|
||||
if (!lastChecked) {
|
||||
lastChecked = this;
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.shiftKey) {
|
||||
var start = $('.chkbox').index(this);
|
||||
var end = $('.chkbox').index(lastChecked);
|
||||
if (event.shiftKey) {
|
||||
var start = $('.chkbox').index(this);
|
||||
var end = $('.chkbox').index(lastChecked);
|
||||
|
||||
for (i = Math.min(start, end); i <= Math.max(start, end); i++) {
|
||||
$('.chkbox')[i].checked = lastChecked.checked;
|
||||
for (i = Math.min(start, end); i <= Math.max(start, end); i++) {
|
||||
$('.chkbox')[i].checked = lastChecked.checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lastChecked = this;
|
||||
lastChecked = this;
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
}
|
||||
|
@ -1,253 +1,242 @@
|
||||
@using NzbDrone.Web.Helpers
|
||||
@model NzbDrone.Web.Models.EpisodeSortingModel
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var options = {
|
||||
target: '#result',
|
||||
beforeSubmit: showRequest,
|
||||
success: showResponse,
|
||||
type: 'post',
|
||||
resetForm: false
|
||||
};
|
||||
$('#form').ajaxForm(options);
|
||||
$('#save_button').attr('disabled', '');
|
||||
createExamples();
|
||||
});
|
||||
|
||||
function showRequest(formData, jqForm, options) {
|
||||
$("#result").empty().html('Saving...');
|
||||
$("#form :input").attr("disabled", true);
|
||||
}
|
||||
|
||||
function showResponse(responseText, statusText, xhr, $form) {
|
||||
$("#result").empty().html(responseText);
|
||||
$("#form :input").attr("disabled", false);
|
||||
}
|
||||
</script>
|
||||
@using (Html.BeginForm("SaveEpisodeSorting", "Settings", FormMethod.Post, new { id = "form", name = "form" }))
|
||||
{
|
||||
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
|
||||
|
||||
<fieldset>
|
||||
<legend>Episode Sorting</legend>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.SeriesName)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.SeriesName)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.SeriesName)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.SeriesName)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.EpisodeName)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.EpisodeName)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.EpisodeName)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.EpisodeName)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.ReplaceSpaces)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.ReplaceSpaces)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.ReplaceSpaces)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.ReplaceSpaces)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.AppendQuality)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.AppendQuality)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.AppendQuality)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.AppendQuality)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.SeasonFolders)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.SeasonFolders)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.SeasonFolders)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.SeasonFolders)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.SeasonFolderFormat)</div>
|
||||
<div class="config-value">@Html.TextBoxFor(m => m.SeasonFolderFormat)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.SeasonFolderFormat)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.SeasonFolderFormat)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.SeparatorStyle)</div>
|
||||
<div class="config-value">@Html.DropDownListFor(m => m.SeparatorStyle, Model.SeparatorStyles)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.SeparatorStyle)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.SeparatorStyle)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.NumberStyle)</div>
|
||||
<div class="config-value">@Html.DropDownListFor(m => m.NumberStyle, Model.NumberStyles)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.NumberStyle)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.NumberStyle)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.MultiEpisodeStyle)</div>
|
||||
<div class="config-value">@Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.MultiEpisodeStyle)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.MultiEpisodeStyle)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="singleEpisodeExample"></div>
|
||||
<div id="multiEpisodeExample"></div>
|
||||
|
||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.SeriesName)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.SeriesName)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.SeriesName)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.SeriesName)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.EpisodeName)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.EpisodeName)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.EpisodeName)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.EpisodeName)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.ReplaceSpaces)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.ReplaceSpaces)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.ReplaceSpaces)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.ReplaceSpaces)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.AppendQuality)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.AppendQuality)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.AppendQuality)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.AppendQuality)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.SeasonFolders)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.SeasonFolders)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.SeasonFolders)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.SeasonFolders)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.SeasonFolderFormat)</div>
|
||||
<div class="config-value">@Html.TextBoxFor(m => m.SeasonFolderFormat)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.SeasonFolderFormat)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.SeasonFolderFormat)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.SeparatorStyle)</div>
|
||||
<div class="config-value">@Html.DropDownListFor(m => m.SeparatorStyle, Model.SeparatorStyles)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.SeparatorStyle)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.SeparatorStyle)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.NumberStyle)</div>
|
||||
<div class="config-value">@Html.DropDownListFor(m => m.NumberStyle, Model.NumberStyles)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.NumberStyle)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.NumberStyle)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.MultiEpisodeStyle)</div>
|
||||
<div class="config-value">@Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.MultiEpisodeStyle)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.MultiEpisodeStyle)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="singleEpisodeExample">
|
||||
</div>
|
||||
<div id="multiEpisodeExample">
|
||||
</div>
|
||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||
</fieldset>
|
||||
}
|
||||
<div id="result" class="hiddenResult"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$('#SeriesName').live('change', function () { createExamples(); });
|
||||
$('#EpisodeName').live('change', function () { createExamples(); });
|
||||
$('#ReplaceSpaces').live('change', function () { createExamples(); });
|
||||
$('#AppendQuality').live('change', function () { createExamples(); });
|
||||
$('#SeparatorStyle').live('change', function () { createExamples(); });
|
||||
$('#NumberStyle').live('change', function () { createExamples(); });
|
||||
$('#MultiEpisodeStyle').live('change', function () { createExamples(); });
|
||||
|
||||
function createExamples() {
|
||||
createSingleEpisodeExample();
|
||||
createMultiEpisodeExample();
|
||||
}
|
||||
|
||||
function createSingleEpisodeExample() {
|
||||
var result = '';
|
||||
|
||||
var separator = ' - ';
|
||||
|
||||
if ($("#SeparatorStyle option:selected").val() == 1)
|
||||
separator = ' ';
|
||||
|
||||
if ($('#SeriesName').attr('checked')) {
|
||||
result += 'Series Name';
|
||||
result += separator;
|
||||
<div id="result" class="hiddenResult">
|
||||
</div>
|
||||
@section Scripts{
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var options = {
|
||||
target: '#result',
|
||||
beforeSubmit: showRequest,
|
||||
success: showResponse,
|
||||
type: 'post',
|
||||
resetForm: false
|
||||
};
|
||||
$('#form').ajaxForm(options);
|
||||
$('#save_button').attr('disabled', '');
|
||||
createExamples();
|
||||
});
|
||||
|
||||
function showRequest(formData, jqForm, options) {
|
||||
$("#result").empty().html('Saving...');
|
||||
$("#form :input").attr("disabled", true);
|
||||
}
|
||||
|
||||
result += $("#NumberStyle option:selected").text();
|
||||
|
||||
if ($('#EpisodeName').attr('checked')) {
|
||||
result += separator;
|
||||
result += 'Episode Name';
|
||||
function showResponse(responseText, statusText, xhr, $form) {
|
||||
$("#result").empty().html(responseText);
|
||||
$("#form :input").attr("disabled", false);
|
||||
}
|
||||
|
||||
if ($('#AppendQuality').attr('checked'))
|
||||
result += ' [TV]';
|
||||
|
||||
if ($('#ReplaceSpaces').attr('checked'))
|
||||
result = result.replace(/\s/g, '.');
|
||||
|
||||
result = '<b>Single Episode Example: </b>' + result;
|
||||
$('#SeriesName').live('change', function () { createExamples(); });
|
||||
$('#EpisodeName').live('change', function () { createExamples(); });
|
||||
$('#ReplaceSpaces').live('change', function () { createExamples(); });
|
||||
$('#AppendQuality').live('change', function () { createExamples(); });
|
||||
$('#SeparatorStyle').live('change', function () { createExamples(); });
|
||||
$('#NumberStyle').live('change', function () { createExamples(); });
|
||||
$('#MultiEpisodeStyle').live('change', function () { createExamples(); });
|
||||
|
||||
function createExamples() {
|
||||
createSingleEpisodeExample();
|
||||
createMultiEpisodeExample();
|
||||
}
|
||||
|
||||
$('#singleEpisodeExample').html(result);
|
||||
}
|
||||
function createSingleEpisodeExample() {
|
||||
var result = '';
|
||||
|
||||
function createMultiEpisodeExample() {
|
||||
var result = '';
|
||||
var separator = ' - ';
|
||||
|
||||
var separator = ' - ';
|
||||
if ($("#SeparatorStyle option:selected").val() == 1)
|
||||
separator = ' ';
|
||||
|
||||
if ($("#SeparatorStyle option:selected").val() == 1)
|
||||
separator = ' ';
|
||||
if ($('#SeriesName').attr('checked')) {
|
||||
result += 'Series Name';
|
||||
result += separator;
|
||||
}
|
||||
|
||||
if ($('#SeriesName').attr('checked')) {
|
||||
result += 'Series Name';
|
||||
result += separator;
|
||||
}
|
||||
|
||||
var numberStyle = $("#NumberStyle option:selected").text();
|
||||
var numberId = $("#NumberStyle option:selected").val();
|
||||
var style = $("#MultiEpisodeStyle option:selected").val();
|
||||
result += $("#NumberStyle option:selected").text();
|
||||
|
||||
result += numberStyle;
|
||||
if ($('#EpisodeName').attr('checked')) {
|
||||
result += separator;
|
||||
result += 'Episode Name';
|
||||
}
|
||||
|
||||
if (style == 0)
|
||||
result += '-06';
|
||||
if ($('#AppendQuality').attr('checked'))
|
||||
result += ' [TV]';
|
||||
|
||||
if (style == 1) {
|
||||
result += separator;
|
||||
result += numberStyle.replace('5', '6');
|
||||
}
|
||||
|
||||
if (style == 2) {
|
||||
if (numberId <= 1)
|
||||
result += 'x06';
|
||||
if ($('#ReplaceSpaces').attr('checked'))
|
||||
result = result.replace(/\s/g, '.');
|
||||
|
||||
if (numberId == 2)
|
||||
result += 'E06';
|
||||
result = '<b>Single Episode Example: </b>' + result;
|
||||
|
||||
if (numberId == 3)
|
||||
result += 'e06';
|
||||
$('#singleEpisodeExample').html(result);
|
||||
}
|
||||
|
||||
if (style == 3) {
|
||||
if (numberId <= 1)
|
||||
result += '-x06';
|
||||
function createMultiEpisodeExample() {
|
||||
var result = '';
|
||||
|
||||
if (numberId == 2)
|
||||
result += '-E06';
|
||||
var separator = ' - ';
|
||||
|
||||
if (numberId == 3)
|
||||
result += '-e06';
|
||||
}
|
||||
if ($("#SeparatorStyle option:selected").val() == 1)
|
||||
separator = ' ';
|
||||
|
||||
if ($('#EpisodeName').attr('checked')) {
|
||||
result += separator;
|
||||
result += 'Episode Name';
|
||||
}
|
||||
if ($('#SeriesName').attr('checked')) {
|
||||
result += 'Series Name';
|
||||
result += separator;
|
||||
}
|
||||
|
||||
var numberStyle = $("#NumberStyle option:selected").text();
|
||||
var numberId = $("#NumberStyle option:selected").val();
|
||||
var style = $("#MultiEpisodeStyle option:selected").val();
|
||||
|
||||
result += numberStyle;
|
||||
|
||||
if (style == 0)
|
||||
result += '-06';
|
||||
|
||||
if (style == 1) {
|
||||
result += separator;
|
||||
result += numberStyle.replace('5', '6');
|
||||
}
|
||||
|
||||
if ($('#AppendQuality').attr('checked'))
|
||||
result += ' [TV]';
|
||||
if (style == 2) {
|
||||
if (numberId <= 1)
|
||||
result += 'x06';
|
||||
|
||||
if ($('#ReplaceSpaces').attr('checked'))
|
||||
result = result.replace(/\s/g, '.');
|
||||
if (numberId == 2)
|
||||
result += 'E06';
|
||||
|
||||
result = '<b>Multi-Episode Example: </b>' + result;
|
||||
if (numberId == 3)
|
||||
result += 'e06';
|
||||
}
|
||||
|
||||
$('#multiEpisodeExample').html(result);
|
||||
}
|
||||
</script>
|
||||
if (style == 3) {
|
||||
if (numberId <= 1)
|
||||
result += '-x06';
|
||||
|
||||
if (numberId == 2)
|
||||
result += '-E06';
|
||||
|
||||
if (numberId == 3)
|
||||
result += '-e06';
|
||||
}
|
||||
|
||||
if ($('#EpisodeName').attr('checked')) {
|
||||
result += separator;
|
||||
result += 'Episode Name';
|
||||
}
|
||||
|
||||
if ($('#AppendQuality').attr('checked'))
|
||||
result += ' [TV]';
|
||||
|
||||
if ($('#ReplaceSpaces').attr('checked'))
|
||||
result = result.replace(/\s/g, '.');
|
||||
|
||||
result = '<b>Multi-Episode Example: </b>' + result;
|
||||
|
||||
$('#multiEpisodeExample').html(result);
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
@ -1,161 +1,136 @@
|
||||
@model NzbDrone.Web.Models.NotificationSettingsModel
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var options = {
|
||||
target: '#result',
|
||||
beforeSubmit: showRequest,
|
||||
success: showResponse,
|
||||
type: 'post',
|
||||
resetForm: false
|
||||
};
|
||||
$('#form').ajaxForm(options);
|
||||
$('#save_button').attr('disabled', '');
|
||||
});
|
||||
|
||||
function showRequest(formData, jqForm, options) {
|
||||
$("#result").empty().html('Saving...');
|
||||
$("#form :input").attr("disabled", true);
|
||||
}
|
||||
|
||||
function showResponse(responseText, statusText, xhr, $form) {
|
||||
$("#result").empty().html(responseText);
|
||||
$("#form :input").attr("disabled", false);
|
||||
}
|
||||
</script>
|
||||
|
||||
@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new {id = "form", name = "form"}))
|
||||
@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "form", name = "form" }))
|
||||
{
|
||||
<fieldset>
|
||||
<legend>Notification Settings</legend>
|
||||
|
||||
<fieldset class="sub-field">
|
||||
<legend>XBMC</legend>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcEnabled)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcEnabled)</div>
|
||||
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcEnabled)</div>
|
||||
<legend>Notification Settings</legend>
|
||||
<fieldset class="sub-field">
|
||||
<legend>XBMC</legend>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcEnabled)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcEnabled)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcNotifyOnGrab)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcNotifyOnGrab)</div>
|
||||
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcNotifyOnGrab)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcEnabled)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcNotifyOnGrab)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcNotifyOnGrab)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcNotifyOnDownload)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcNotifyOnDownload)</div>
|
||||
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcNotifyOnDownload)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcNotifyOnGrab)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcNotifyOnDownload)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcNotifyOnDownload)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcNotifyOnRename)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcNotifyOnRename)</div>
|
||||
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcNotifyOnRename)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcNotifyOnDownload)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcNotifyOnRename)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcNotifyOnRename)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcNotificationImage)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcNotificationImage)</div>
|
||||
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcNotificationImage)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcNotifyOnRename)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcNotificationImage)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcNotificationImage)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcDisplayTime)</div>
|
||||
<div class="config-value">@Html.TextBoxFor(m => m.XbmcDisplayTime)</div>
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcDisplayTime)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcNotificationImage)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcDisplayTime)</div>
|
||||
<div class="config-value">@Html.TextBoxFor(m => m.XbmcDisplayTime)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcUpdateOnDownload)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcUpdateOnDownload)</div>
|
||||
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcUpdateOnDownload)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcDisplayTime)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcUpdateOnDownload)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcUpdateOnDownload)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcUpdateOnRename)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcUpdateOnRename)</div>
|
||||
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcUpdateOnRename)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcUpdateOnDownload)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcUpdateOnRename)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcUpdateOnRename)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcFullUpdate)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcFullUpdate)</div>
|
||||
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcFullUpdate)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcUpdateOnRename)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcFullUpdate)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcFullUpdate)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcCleanOnDownload)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcCleanOnDownload)</div>
|
||||
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcCleanOnDownload)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcFullUpdate)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcCleanOnDownload)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcCleanOnDownload)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcCleanOnRename)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcCleanOnRename)</div>
|
||||
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcCleanOnRename)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcCleanOnDownload)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcCleanOnRename)</div>
|
||||
<div class="config-value">@Html.CheckBoxFor(m => m.XbmcCleanOnRename)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcHosts)</div>
|
||||
<div class="config-value">@Html.TextBoxFor(m => m.XbmcHosts)</div>
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcHosts)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcCleanOnRename)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcHosts)</div>
|
||||
<div class="config-value">@Html.TextBoxFor(m => m.XbmcHosts)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcUsername)</div>
|
||||
<div class="config-value">@Html.TextBoxFor(m => m.XbmcUsername)</div>
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcUsername)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcHosts)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcUsername)</div>
|
||||
<div class="config-value">@Html.TextBoxFor(m => m.XbmcUsername)</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcPassword)</div>
|
||||
<div class="config-value">@Html.TextBoxFor(m => m.XbmcPassword)</div>
|
||||
</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcPassword)</div>
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcUsername)</div>
|
||||
</div>
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.XbmcPassword)</div>
|
||||
<div class="config-value">@Html.TextBoxFor(m => m.XbmcPassword)</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.XbmcPassword)</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||
</fieldset>
|
||||
}
|
||||
<div id="result" class="hiddenResult"></div>
|
||||
<div id="result" class="hiddenResult">
|
||||
</div>
|
||||
@section Scripts{
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var options = {
|
||||
target: '#result',
|
||||
beforeSubmit: showRequest,
|
||||
success: showResponse,
|
||||
type: 'post',
|
||||
resetForm: false
|
||||
};
|
||||
$('#form').ajaxForm(options);
|
||||
$('#save_button').attr('disabled', '');
|
||||
});
|
||||
|
||||
function showRequest(formData, jqForm, options) {
|
||||
$("#result").empty().html('Saving...');
|
||||
$("#form :input").attr("disabled", true);
|
||||
}
|
||||
|
||||
function showResponse(responseText, statusText, xhr, $form) {
|
||||
$("#result").empty().html(responseText);
|
||||
$("#form :input").attr("disabled", false);
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
@ -1,122 +1,121 @@
|
||||
@using NzbDrone.Web.Helpers;
|
||||
@model NzbDrone.Web.Models.QualityModel
|
||||
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new { id = "form", name = "form" }))
|
||||
{
|
||||
<fieldset style="position: relative;">
|
||||
<legend>Quality</legend>
|
||||
<div id="top">
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.DefaultQualityProfileId)</div>
|
||||
<div class="config-value">@Html.DropDownListFor(m => m.DefaultQualityProfileId, Model.QualityProfileSelectList)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.DefaultQualityProfileId)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.DefaultQualityProfileId)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bottom" style="float: left; padding-bottom: 55px;">
|
||||
<div style="padding-left: 7px; margin-bottom: 5px;">
|
||||
<a id="addItem" style="text-decoration:none;" href="@Url.Action("AddProfile", "Settings")">
|
||||
<img src="../../Content/Images/Plus.png" alt="Add New Profile" width="20px" height="20px" />
|
||||
<h4 style="margin-left: 3px; display: inline; color: Black;">
|
||||
Add New Profile</h4>
|
||||
</a>
|
||||
</div>
|
||||
<div id="profiles">
|
||||
@foreach (var item in Model.Profiles)
|
||||
{
|
||||
Html.RenderAction("GetQualityProfileView", item);
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" id="save_button" value="Save" disabled="disabled" style="position: absolute;
|
||||
bottom: 0px; display: block; padding-left: 5px;" />
|
||||
</fieldset>
|
||||
}
|
||||
<div id="result" class="hiddenResult">
|
||||
</div>
|
||||
@section Scripts{
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var options = {
|
||||
target: '#result',
|
||||
beforeSubmit: showRequest,
|
||||
success: showResponse,
|
||||
type: 'post',
|
||||
resetForm: false
|
||||
};
|
||||
$('#form').ajaxForm(options);
|
||||
$('#save_button').attr('disabled', '');
|
||||
});
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var options = {
|
||||
target: '#result',
|
||||
beforeSubmit: showRequest,
|
||||
success: showResponse,
|
||||
type: 'post',
|
||||
resetForm: false
|
||||
};
|
||||
$('#form').ajaxForm(options);
|
||||
$('#save_button').attr('disabled', '');
|
||||
});
|
||||
|
||||
function showRequest(formData, jqForm, options) {
|
||||
$("#result").empty().html('Saving...');
|
||||
$("#form :input").attr("disabled", true);
|
||||
}
|
||||
|
||||
function showResponse(responseText, statusText, xhr, $form) {
|
||||
$("#result").empty().html(responseText);
|
||||
$("#form :input").attr("disabled", false);
|
||||
}
|
||||
|
||||
function addOption(text, value) {
|
||||
var myCombo = $('#DefaultQualityProfileId');
|
||||
function showRequest(formData, jqForm, options) {
|
||||
$("#result").empty().html('Saving...');
|
||||
$("#form :input").attr("disabled", true);
|
||||
}
|
||||
|
||||
var exists = $("#DefaultQualityProfileId option[value='" + value + "']");
|
||||
|
||||
if (exists.length == 0)
|
||||
myCombo.append($('\<option\> \</option\>').val(value).html(text));
|
||||
}
|
||||
function showResponse(responseText, statusText, xhr, $form) {
|
||||
$("#result").empty().html(responseText);
|
||||
$("#form :input").attr("disabled", false);
|
||||
}
|
||||
|
||||
function removeOption(value) {
|
||||
$("#DefaultQualityProfileId option[value='" + value + "']").remove();
|
||||
}
|
||||
function addOption(text, value) {
|
||||
var myCombo = $('#DefaultQualityProfileId');
|
||||
|
||||
function renameOption(text, value) {
|
||||
$("#DefaultQualityProfileId option[value='" + value + "']").html(text);
|
||||
}
|
||||
</script>
|
||||
var exists = $("#DefaultQualityProfileId option[value='" + value + "']");
|
||||
|
||||
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new {id = "form", name = "form"}))
|
||||
{
|
||||
<fieldset style="position: relative;">
|
||||
<legend>Quality</legend>
|
||||
if (exists.length == 0)
|
||||
myCombo.append($('\<option\> \</option\>').val(value).html(text));
|
||||
}
|
||||
|
||||
<div id="top">
|
||||
<div class="config-section">
|
||||
<div class="config-group">
|
||||
<div class="config-title">@Html.LabelFor(m => m.DefaultQualityProfileId)</div>
|
||||
<div class="config-value">@Html.DropDownListFor(m => m.DefaultQualityProfileId, Model.QualityProfileSelectList)</div>
|
||||
</div>
|
||||
<div class="config-group2">
|
||||
<div class="config-validation">@Html.ValidationMessageFor(m => m.DefaultQualityProfileId)</div>
|
||||
<div class="config-description">@Html.DescriptionFor(m => m.DefaultQualityProfileId)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bottom" style="float: left; padding-bottom: 55px;">
|
||||
<div style="padding-left: 7px; margin-bottom: 5px;">
|
||||
<a id="addItem" style="text-decoration:none;" href="@Url.Action("AddProfile", "Settings")">
|
||||
<img src="../../Content/Images/Plus.png" alt="Add New Profile" width="20px" height="20px" />
|
||||
<h4 style="margin-left: 3px; display: inline; color: Black;">Add New Profile</h4></a>
|
||||
</div>
|
||||
function removeOption(value) {
|
||||
$("#DefaultQualityProfileId option[value='" + value + "']").remove();
|
||||
}
|
||||
|
||||
<div id="profiles">
|
||||
@foreach (var item in Model.Profiles)
|
||||
{
|
||||
Html.RenderAction("GetQualityProfileView", item);
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
function renameOption(text, value) {
|
||||
$("#DefaultQualityProfileId option[value='" + value + "']").html(text);
|
||||
}
|
||||
|
||||
<input type="submit" id="save_button" value="Save" disabled="disabled" style="position: absolute; bottom: 0px; display: block; padding-left: 5px;"/>
|
||||
</fieldset>
|
||||
}
|
||||
<div id="result" class="hiddenResult"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#addItem").click(function () {
|
||||
$.ajax({
|
||||
url: this.href,
|
||||
cache: false,
|
||||
success: function (html) {
|
||||
$("#profiles").append(html);
|
||||
|
||||
$("#addItem").click(function () {
|
||||
$.ajax({
|
||||
url: this.href,
|
||||
cache: false,
|
||||
success: function (html) {
|
||||
$("#profiles").append(html);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
var deleteQualityProfileUrl = '@Url.Action("DeleteQualityProfile", "Settings")';
|
||||
|
||||
function deleteProfile(id) {
|
||||
sendToServer(id);
|
||||
}
|
||||
|
||||
function sendToServer(id) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: deleteQualityProfileUrl,
|
||||
data: jQuery.param({ profileId: id }),
|
||||
error: function (req, status, error) {
|
||||
alert("Sorry! We could not delete your Profile at this time. " + error);
|
||||
},
|
||||
success: function (data, textStatus, jqXHR) {
|
||||
if (data == "ok") {
|
||||
$("#profile_" + id).remove();
|
||||
removeOption(id);
|
||||
}
|
||||
|
||||
else {
|
||||
alert(data);
|
||||
var deleteQualityProfileUrl = '@Url.Action("DeleteQualityProfile", "Settings")';
|
||||
|
||||
function deleteProfile(id) {
|
||||
sendToServer(id);
|
||||
}
|
||||
|
||||
function sendToServer(id) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: deleteQualityProfileUrl,
|
||||
data: jQuery.param({ profileId: id }),
|
||||
error: function (req, status, error) {
|
||||
alert("Sorry! We could not delete your Profile at this time. " + error);
|
||||
},
|
||||
success: function (data, textStatus, jqXHR) {
|
||||
if (data == "ok") {
|
||||
$("#profile_" + id).remove();
|
||||
removeOption(id);
|
||||
}
|
||||
|
||||
else {
|
||||
alert(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
});
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
Loading…
Reference in new issue