mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Merge branch 'markus101'
This commit is contained in:
commit
7d7032dd56
@ -624,16 +624,7 @@
|
|||||||
<Content Include="Views\Series\index.aspx" />
|
<Content Include="Views\Series\index.aspx" />
|
||||||
<Content Include="Views\Series\SeriesSearchResults.ascx" />
|
<Content Include="Views\Series\SeriesSearchResults.ascx" />
|
||||||
<Content Include="Views\Series\SubMenu.ascx" />
|
<Content Include="Views\Series\SubMenu.ascx" />
|
||||||
<Content Include="Views\Settings\RootDir.ascx" />
|
<Content Include="Views\Settings\Index2.aspx" />
|
||||||
<Content Include="Views\Settings\Notifications.ascx" />
|
|
||||||
<Content Include="Views\Settings\Downloads.ascx" />
|
|
||||||
<Content Include="Views\Settings\EpisodeSorting.ascx" />
|
|
||||||
<Content Include="Views\Settings\General.ascx" />
|
|
||||||
<Content Include="Views\Settings\Index.aspx" />
|
|
||||||
<Content Include="Views\Settings\Quality.ascx" />
|
|
||||||
<Content Include="Views\Settings\SubMenu.ascx" />
|
|
||||||
<Content Include="Views\Settings\UserProfileSection.ascx" />
|
|
||||||
<Content Include="Views\Shared\Footer.ascx" />
|
|
||||||
<Content Include="Views\Upcoming\Index.aspx" />
|
<Content Include="Views\Upcoming\Index.aspx" />
|
||||||
<Content Include="Web.config">
|
<Content Include="Web.config">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@ -664,6 +655,18 @@
|
|||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
<Content Include="Views\Settings\Indexers.cshtml" />
|
<Content Include="Views\Settings\Indexers.cshtml" />
|
||||||
<Content Include="Views\Timers\index.cshtml" />
|
<Content Include="Views\Timers\index.cshtml" />
|
||||||
|
<Content Include="Views\Settings\Downloads.cshtml" />
|
||||||
|
<Content Include="Views\Settings\EpisodeSorting.cshtml" />
|
||||||
|
<Content Include="Views\Settings\General.cshtml" />
|
||||||
|
<Content Include="Views\Settings\Notifications.cshtml" />
|
||||||
|
<Content Include="Views\Settings\Quality.cshtml" />
|
||||||
|
<Content Include="Views\Settings\RootDir.cshtml" />
|
||||||
|
<Content Include="Views\Settings\SubMenu.cshtml" />
|
||||||
|
<Content Include="Views\Settings\UserProfileSection.cshtml" />
|
||||||
|
<Content Include="Views\Shared\SiteLayout.cshtml" />
|
||||||
|
<Content Include="Views\Shared\Footer.cshtml" />
|
||||||
|
<Content Include="Views\Settings\Index.cshtml" />
|
||||||
|
<Content Include="Views\_ViewStart.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="App_Data\" />
|
<Folder Include="App_Data\" />
|
||||||
|
@ -1,189 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NzbDrone.Web.Models.DownloadSettingsModel>" %>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function () {
|
|
||||||
var options = {
|
|
||||||
target: '#result',
|
|
||||||
beforeSubmit: showRequest,
|
|
||||||
success: showResponse,
|
|
||||||
type: 'post',
|
|
||||||
resetForm: false
|
|
||||||
};
|
|
||||||
$('#form').ajaxForm(options);
|
|
||||||
selectDownloadOption(); //Load either SAB or Blackhole div
|
|
||||||
$('#save_button').attr('disabled', '');
|
|
||||||
});
|
|
||||||
|
|
||||||
function selectDownloadOption() {
|
|
||||||
var selected = $("input[name='UseBlackHole']:checked").val();
|
|
||||||
|
|
||||||
if (selected == "True") {
|
|
||||||
document.getElementById('blackhole').style.display = 'block';
|
|
||||||
document.getElementById('sab').style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
document.getElementById('sab').style.display = 'block';
|
|
||||||
document.getElementById('blackhole').style.display = 'none';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
$(".blackhole_radio").live("change", function () {
|
|
||||||
selectDownloadOption(); //Load either SAB or Blackhole div
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<%
|
|
||||||
Html.EnableClientValidation();%>
|
|
||||||
|
|
||||||
<%
|
|
||||||
using (Html.BeginForm("SaveDownloads", "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>Download Settings</legend>
|
|
||||||
<%--//Sync Frequency
|
|
||||||
//Download Propers?
|
|
||||||
//Retention
|
|
||||||
//SAB Host/IP
|
|
||||||
//SAB Port
|
|
||||||
//SAB APIKey
|
|
||||||
//SAB Username
|
|
||||||
//SAB Password
|
|
||||||
//SAB Category
|
|
||||||
//SAB Priority--%>
|
|
||||||
|
|
||||||
<fieldset class="sub-field">
|
|
||||||
<legend>Usenet Variables</legend>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.SyncFrequency)%></div>
|
|
||||||
<div class="config-value"><%=Html.TextBoxFor(m => m.SyncFrequency)%></div>
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.SyncFrequency)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.DownloadPropers)%></div>
|
|
||||||
<div class="config-value"><%=Html.CheckBoxFor(m => m.DownloadPropers)%></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.DownloadPropers)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.Retention)%></div>
|
|
||||||
<div class="config-value"><%=Html.TextBoxFor(m => m.Retention)%></div>
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.Retention)%></div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<b><%=Html.LabelFor(m => m.UseBlackHole)%></b>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<%=Html.RadioButtonFor(m => m.UseBlackHole, true, new {@class = "blackhole_radio"})%>Blackhole
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<%=Html.RadioButtonFor(m => m.UseBlackHole, false, new {@class = "blackhole_radio"})%>SABnzbd
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="sab" style="display:none">
|
|
||||||
<fieldset class="sub-field">
|
|
||||||
<legend>SABnzbd</legend>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.SabHost)%></div>
|
|
||||||
<div class="config-value"><%=Html.TextBoxFor(m => m.SabHost)%></div>
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.SabHost)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.SabPort)%></div>
|
|
||||||
<div class="config-value"><%=Html.TextBoxFor(m => m.SabPort)%></div>
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.SabPort)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.SabApiKey)%></div>
|
|
||||||
<div class="config-value"><%=Html.TextBoxFor(m => m.SabApiKey)%></div>
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.SabApiKey)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.SabUsername)%></div>
|
|
||||||
<div class="config-value"><%=Html.TextBoxFor(m => m.SabUsername)%></div>
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.SabUsername)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.SabPassword)%></div>
|
|
||||||
<div class="config-value"><%=Html.TextBoxFor(m => m.SabPassword)%></div>
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.SabPassword)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.SabTvCategory)%></div>
|
|
||||||
<div class="config-value"><%=Html.TextBoxFor(m => m.SabTvCategory)%></div>
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.SabTvCategory)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.SabTvPriority)%></div>
|
|
||||||
<div class="config-value"><%=Html.DropDownListFor(m => m.SabTvPriority, Model.PrioritySelectList)%></div>
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.SabTvPriority)%></div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="blackhole" style="display:none">
|
|
||||||
<fieldset class="sub-field">
|
|
||||||
<legend>Blackhole</legend>
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.BlackholeDirectory)%></div>
|
|
||||||
<div class="config-value"><%=Html.TextBoxFor(m => m.BlackholeDirectory)%></div>
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.BlackholeDirectory)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
|
||||||
|
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
</fieldset>
|
|
||||||
<div id="result"></div>
|
|
175
NzbDrone.Web/Views/Settings/Downloads.cshtml
Normal file
175
NzbDrone.Web/Views/Settings/Downloads.cshtml
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
@model NzbDrone.Web.Models.DownloadSettingsModel
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
var options = {
|
||||||
|
target: '#result',
|
||||||
|
beforeSubmit: showRequest,
|
||||||
|
success: showResponse,
|
||||||
|
type: 'post',
|
||||||
|
resetForm: false
|
||||||
|
};
|
||||||
|
$('#form').ajaxForm(options);
|
||||||
|
selectDownloadOption(); //Load either SAB or Blackhole div
|
||||||
|
$('#save_button').attr('disabled', '');
|
||||||
|
});
|
||||||
|
|
||||||
|
function selectDownloadOption() {
|
||||||
|
var selected = $("input[name='UseBlackHole']:checked").val();
|
||||||
|
|
||||||
|
if (selected == "True") {
|
||||||
|
document.getElementById('blackhole').style.display = 'block';
|
||||||
|
document.getElementById('sab').style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
document.getElementById('sab').style.display = 'block';
|
||||||
|
document.getElementById('blackhole').style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(".blackhole_radio").live("change", function () {
|
||||||
|
selectDownloadOption(); //Load either SAB or Blackhole div
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
@using (Html.BeginForm("SaveDownloads", "Settings", FormMethod.Post, new { id = "form", name = "form" }))
|
||||||
|
{
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>Download Settings</legend>
|
||||||
|
|
||||||
|
<fieldset class="sub-field">
|
||||||
|
<legend>Usenet Variables</legend>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.SyncFrequency)</div>
|
||||||
|
<div class="config-value">@Html.TextBoxFor(m => m.SyncFrequency)</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.SyncFrequency)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.DownloadPropers)</div>
|
||||||
|
<div class="config-value">@Html.CheckBoxFor(m => m.DownloadPropers)</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.DownloadPropers)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.Retention)</div>
|
||||||
|
<div class="config-value">@Html.TextBoxFor(m => m.Retention)</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.Retention)</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<b>@Html.LabelFor(m => m.UseBlackHole)</b>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
@Html.RadioButtonFor(m => m.UseBlackHole, true, new { @class = "blackhole_radio" })Blackhole
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
@Html.RadioButtonFor(m => m.UseBlackHole, false, new { @class = "blackhole_radio" })SABnzbd
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="sab" style="display:none">
|
||||||
|
<fieldset class="sub-field">
|
||||||
|
<legend>SABnzbd</legend>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.SabHost)</div>
|
||||||
|
<div class="config-value">@Html.TextBoxFor(m => m.SabHost)</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.SabHost)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.SabPort)</div>
|
||||||
|
<div class="config-value">@Html.TextBoxFor(m => m.SabPort)</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.SabPort)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.SabApiKey)</div>
|
||||||
|
<div class="config-value">@Html.TextBoxFor(m => m.SabApiKey)</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.SabApiKey)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.SabUsername)</div>
|
||||||
|
<div class="config-value">@Html.TextBoxFor(m => m.SabUsername)</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.SabUsername)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.SabPassword)</div>
|
||||||
|
<div class="config-value">@Html.TextBoxFor(m => m.SabPassword)</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.SabPassword)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.SabTvCategory)</div>
|
||||||
|
<div class="config-value">@Html.TextBoxFor(m => m.SabTvCategory)</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.SabTvCategory)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.SabTvPriority)</div>
|
||||||
|
<div class="config-value">@Html.DropDownListFor(m => m.SabTvPriority, Model.PrioritySelectList)</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.SabTvPriority)</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="blackhole" style="display:none">
|
||||||
|
<fieldset class="sub-field">
|
||||||
|
<legend>Blackhole</legend>
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.BlackholeDirectory)</div>
|
||||||
|
<div class="config-value">@Html.TextBoxFor(m => m.BlackholeDirectory)</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.BlackholeDirectory)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||||
|
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
}
|
||||||
|
<div id="result"></div>
|
||||||
|
|
@ -1,129 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<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', '');
|
|
||||||
});
|
|
||||||
|
|
||||||
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>
|
|
||||||
|
|
||||||
<%
|
|
||||||
Html.EnableClientValidation();%>
|
|
||||||
|
|
||||||
<%
|
|
||||||
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.ShowName)%></div>
|
|
||||||
<div class="config-value"><%=Html.CheckBoxFor(m => m.ShowName)%></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.ShowName)%></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-validation"><%=Html.ValidationMessageFor(m => m.EpisodeName)%></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-validation"><%=Html.ValidationMessageFor(m => m.ReplaceSpaces)%></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-validation"><%=Html.ValidationMessageFor(m => m.AppendQuality)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-section">
|
|
||||||
<div class="config-group">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.UseAirByDate)%></div>
|
|
||||||
<div class="config-value"><%=Html.CheckBoxFor(m => m.UseAirByDate)%></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.UseAirByDate)%></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-validation"><%=Html.ValidationMessageFor(m => m.SeasonFolders)%></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-validation"><%=Html.ValidationMessageFor(m => m.SeasonFolderFormat)%></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-validation"><%=Html.ValidationMessageFor(m => m.SeparatorStyle)%></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-validation"><%=Html.ValidationMessageFor(m => m.NumberStyle)%></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-validation"><%=Html.ValidationMessageFor(m => m.MultiEpisodeStyle)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
|
||||||
|
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
</fieldset>
|
|
||||||
<div id="result"></div>
|
|
124
NzbDrone.Web/Views/Settings/EpisodeSorting.cshtml
Normal file
124
NzbDrone.Web/Views/Settings/EpisodeSorting.cshtml
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
@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', '');
|
||||||
|
});
|
||||||
|
|
||||||
|
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.ShowName)</div>
|
||||||
|
<div class="config-value">@Html.CheckBoxFor(m => m.ShowName)</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.ShowName)</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-validation">@Html.ValidationMessageFor(m => m.EpisodeName)</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-validation">@Html.ValidationMessageFor(m => m.ReplaceSpaces)</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-validation">@Html.ValidationMessageFor(m => m.AppendQuality)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="config-section">
|
||||||
|
<div class="config-group">
|
||||||
|
<div class="config-title">@Html.LabelFor(m => m.UseAirByDate)</div>
|
||||||
|
<div class="config-value">@Html.CheckBoxFor(m => m.UseAirByDate)</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.UseAirByDate)</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-validation">@Html.ValidationMessageFor(m => m.SeasonFolders)</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-validation">@Html.ValidationMessageFor(m => m.SeasonFolderFormat)</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-validation">@Html.ValidationMessageFor(m => m.SeparatorStyle)</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-validation">@Html.ValidationMessageFor(m => m.NumberStyle)</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-validation">@Html.ValidationMessageFor(m => m.MultiEpisodeStyle)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
}
|
||||||
|
<div id="result"></div>
|
@ -1,92 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NzbDrone.Web.Models.SettingsModel>" %>
|
|
||||||
|
|
||||||
<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("SaveGeneral", "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>General</legend>
|
|
||||||
|
|
||||||
<div style="padding-top: 10px;">
|
|
||||||
<div style="padding-left: 7px; margin-bottom: 5px;">
|
|
||||||
<a id="addItem" style="text-decoration:none;" href="<%:Url.Action("AddRootDir", "Settings")%>">
|
|
||||||
<img src="../Content/Images/Plus.png" alt="Add New Profile" />
|
|
||||||
<h4 style="margin-left: 3px; display: inline; color: Black;">Add New Root Directory</h4></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="root-dirs">
|
|
||||||
<%
|
|
||||||
foreach (var item in Model.Directories)
|
|
||||||
{%>
|
|
||||||
<%
|
|
||||||
Html.RenderPartial("RootDir", item);%>
|
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
|
||||||
</p>
|
|
||||||
</fieldset>
|
|
||||||
<%
|
|
||||||
}
|
|
||||||
Html.EndForm();%>
|
|
||||||
<div id="result"></div>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
$("#addItem").click(function () {
|
|
||||||
$.ajax({
|
|
||||||
url: this.href,
|
|
||||||
cache: false,
|
|
||||||
success: function (html) { $("#root-dirs").append(html); }
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$("a.deleteRow").live("click", function () {
|
|
||||||
$(this).parents("div.rootDirSection:first").remove();
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".defaultCheckbox").live("change", function () {
|
|
||||||
var checked = $(this).attr('checked');
|
|
||||||
|
|
||||||
if (checked) {
|
|
||||||
var thisOne = this;
|
|
||||||
$(".defaultCheckbox").attr('checked', false);
|
|
||||||
$(this).attr('checked', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Don't let the user uncheck a checkbox (Like a radio button)
|
|
||||||
else {
|
|
||||||
$(this).attr('checked', true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
85
NzbDrone.Web/Views/Settings/General.cshtml
Normal file
85
NzbDrone.Web/Views/Settings/General.cshtml
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
@model NzbDrone.Web.Models.SettingsModel
|
||||||
|
|
||||||
|
<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("SaveGeneral", "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>General</legend>
|
||||||
|
|
||||||
|
<div style="padding-top: 10px;">
|
||||||
|
<div style="padding-left: 7px; margin-bottom: 5px;">
|
||||||
|
<a id="addItem" style="text-decoration:none;" href="@Url.Action("AddRootDir", "Settings")">
|
||||||
|
<img src="../../Content/Images/Plus.png" alt="Add New Profile" />
|
||||||
|
<h4 style="margin-left: 3px; display: inline; color: Black;">Add New Root Directory</h4></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="root-dirs">
|
||||||
|
@foreach (var item in Model.Directories)
|
||||||
|
{
|
||||||
|
Html.RenderPartial("RootDir", item);
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||||
|
</p>
|
||||||
|
</fieldset>
|
||||||
|
}
|
||||||
|
<div id="result"></div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$("#addItem").click(function () {
|
||||||
|
$.ajax({
|
||||||
|
url: this.href,
|
||||||
|
cache: false,
|
||||||
|
success: function (html) { $("#root-dirs").append(html); }
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$("a.deleteRow").live("click", function () {
|
||||||
|
$(this).parents("div.rootDirSection:first").remove();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".defaultCheckbox").live("change", function () {
|
||||||
|
var checked = $(this).attr('checked');
|
||||||
|
|
||||||
|
if (checked) {
|
||||||
|
var thisOne = this;
|
||||||
|
$(".defaultCheckbox").attr('checked', false);
|
||||||
|
$(this).attr('checked', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Don't let the user uncheck a checkbox (Like a radio button)
|
||||||
|
else {
|
||||||
|
$(this).attr('checked', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
@ -1,18 +0,0 @@
|
|||||||
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
||||||
Settings
|
|
||||||
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="Menu" ContentPlaceHolderID="ActionMenu" runat="server">
|
|
||||||
<%
|
|
||||||
Html.RenderPartial("SubMenu");%>
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
||||||
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
|
||||||
<script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
|
|
||||||
<%
|
|
||||||
Html.RenderPartial(ViewData["viewName"].ToString());%>
|
|
||||||
</asp:Content>
|
|
13
NzbDrone.Web/Views/Settings/Index.cshtml
Normal file
13
NzbDrone.Web/Views/Settings/Index.cshtml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
@section TitleContent{
|
||||||
|
Settings
|
||||||
|
}
|
||||||
|
|
||||||
|
@section ActionMenu{
|
||||||
|
@{Html.RenderPartial("SubMenu");}
|
||||||
|
}
|
||||||
|
|
||||||
|
@section MainContent{
|
||||||
|
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
||||||
|
<script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
|
||||||
|
@{Html.RenderPartial(ViewData["viewName"].ToString());}
|
||||||
|
}
|
@ -1,168 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<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>
|
|
||||||
|
|
||||||
<%
|
|
||||||
Html.EnableClientValidation();%>
|
|
||||||
|
|
||||||
<%
|
|
||||||
using (Html.BeginForm("SaveNotifications", "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>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>
|
|
||||||
</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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
|
||||||
|
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
</fieldset>
|
|
||||||
<div id="result"></div>
|
|
161
NzbDrone.Web/Views/Settings/Notifications.cshtml
Normal file
161
NzbDrone.Web/Views/Settings/Notifications.cshtml
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
@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"}))
|
||||||
|
{
|
||||||
|
<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>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
}
|
||||||
|
<div id="result"></div>
|
@ -1,4 +1,4 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NzbDrone.Web.Models.QualityModel>" %>
|
@model NzbDrone.Web.Models.QualityModel
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
@ -22,26 +22,20 @@
|
|||||||
$("#result").empty().html(responseText);
|
$("#result").empty().html(responseText);
|
||||||
$("#form :input").attr("disabled", false);
|
$("#form :input").attr("disabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<%
|
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new {id = "form", name = "form"}))
|
||||||
Html.EnableClientValidation();%>
|
{
|
||||||
|
|
||||||
<%
|
|
||||||
using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new {id = "form", name = "form"}))
|
|
||||||
{%>
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Quality</legend>
|
<legend>Quality</legend>
|
||||||
<%--<%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %>--%>
|
|
||||||
|
|
||||||
<div class="rightSide" style="float: right; width: 65%;">
|
<div class="rightSide" style="float: right; width: 65%;">
|
||||||
<div id="defaultQualityDiv" style="float: left; margin: 30px;">
|
<div id="defaultQualityDiv" style="float: left; margin: 30px;">
|
||||||
|
|
||||||
<div class="config-group" style="width: 250px; margin-bottom: 5px; margin-left: 5px;">
|
<div class="config-group" style="width: 250px; margin-bottom: 5px; margin-left: 5px;">
|
||||||
<div class="config-title"><%=Html.LabelFor(m => m.DefaultQualityProfileId)%></div>
|
<div class="config-title">@Html.LabelFor(m => m.DefaultQualityProfileId)</div>
|
||||||
<div class="config-value"><%:Html.DropDownListFor(m => m.DefaultQualityProfileId, Model.SelectList)%></div>
|
<div class="config-value">@Html.DropDownListFor(m => m.DefaultQualityProfileId, Model.SelectList)</div>
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(m => m.DefaultQualityProfileId)%></div>
|
<div class="config-validation">@Html.ValidationMessageFor(m => m.DefaultQualityProfileId)</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -49,19 +43,17 @@
|
|||||||
<div id="leftSide" style="width:35%;">
|
<div id="leftSide" style="width:35%;">
|
||||||
<div style="padding-top: 10px;">
|
<div style="padding-top: 10px;">
|
||||||
<div style="padding-left: 7px; margin-bottom: 5px;">
|
<div style="padding-left: 7px; margin-bottom: 5px;">
|
||||||
<a id="addItem" style="text-decoration:none;" href="<%:Url.Action("AddUserProfile", "Settings")%>">
|
<a id="addItem" style="text-decoration:none;" href="@Url.Action("AddUserProfile", "Settings")">
|
||||||
<img src="../../Content/Images/Plus.png" alt="Add New Profile" />
|
<img src="../../Content/Images/Plus.png" alt="Add New Profile" />
|
||||||
<h4 style="margin-left: 3px; display: inline; color: Black;">Add New Profile</h4></a>
|
<h4 style="margin-left: 3px; display: inline; color: Black;">Add New Profile</h4></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="user-profiles">
|
<div id="user-profiles">
|
||||||
<%
|
|
||||||
foreach (var item in Model.UserProfiles)
|
@foreach (var item in Model.UserProfiles)
|
||||||
{%>
|
{
|
||||||
<%
|
Html.RenderPartial("UserProfileSection", item);
|
||||||
Html.RenderPartial("UserProfileSection", item);%>
|
}
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -71,9 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
}
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
<div id="result"></div>
|
<div id="result"></div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
@ -1,32 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NzbDrone.Core.Repository.RootDir>" %>
|
|
||||||
<%@ Import Namespace="NzbDrone.Web.Helpers" %>
|
|
||||||
<%
|
|
||||||
using (Html.BeginCollectionItem("Directories"))
|
|
||||||
{%>
|
|
||||||
<%
|
|
||||||
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
|
|
||||||
//string sortable1 = String.Format("{0}_sortable1", idClean);
|
|
||||||
%>
|
|
||||||
<style type="text/css">
|
|
||||||
.root_dir_text
|
|
||||||
{
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<div class="rootDirSection">
|
|
||||||
<fieldset>
|
|
||||||
<div>
|
|
||||||
<%:Html.TextBoxFor(m => m.Path, new {@class = "root_dir_text"})%>
|
|
||||||
<a href="#" class="deleteRow">
|
|
||||||
<img src="../Content/Images/X.png" alt="Delete" /></a>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<%:Html.ValidationMessageFor(m => m.Path)%>
|
|
||||||
</div>
|
|
||||||
<div class="hiddenProfileDetails">
|
|
||||||
<%=Html.TextBoxFor(x => x.Id, new {@style = "display:none"})%>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
<%
|
|
||||||
}%>
|
|
30
NzbDrone.Web/Views/Settings/RootDir.cshtml
Normal file
30
NzbDrone.Web/Views/Settings/RootDir.cshtml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
@model NzbDrone.Core.Repository.RootDir
|
||||||
|
@using NzbDrone.Web.Helpers;
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
.root_dir_text
|
||||||
|
{
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
@using (Html.BeginCollectionItem("Directories"))
|
||||||
|
{
|
||||||
|
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
|
||||||
|
|
||||||
|
<div class="rootDirSection">
|
||||||
|
<fieldset>
|
||||||
|
<div>
|
||||||
|
@Html.TextBoxFor(m => m.Path, new { @class = "root_dir_text" })
|
||||||
|
<a href="#" class="deleteRow">
|
||||||
|
<img src="../../Content/Images/X.png" alt="Delete" /></a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
@Html.ValidationMessageFor(m => m.Path)
|
||||||
|
</div>
|
||||||
|
<div class="hiddenProfileDetails">
|
||||||
|
@Html.TextBoxFor(x => x.Id, new { @style = "display:none" })
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
}
|
@ -1,17 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
|
|
||||||
|
|
||||||
<%
|
|
||||||
Html.Telerik().Menu().Name("Menu").Items(items =>
|
|
||||||
{
|
|
||||||
items.Add().Text("General").Action("General", "Settings");
|
|
||||||
items.Add().Text("Indexers").Action("Indexers", "Settings");
|
|
||||||
items.Add().Text("Downloads").Action("Downloads", "Settings");
|
|
||||||
items.Add().Text("Quality").Action("Quality", "Settings");
|
|
||||||
items.Add().Text("Episode Sorting").Action("EpisodeSorting",
|
|
||||||
"Settings");
|
|
||||||
items.Add().Text("Notifications").Action("Notifications",
|
|
||||||
"Settings");
|
|
||||||
}).Render();
|
|
||||||
%>
|
|
||||||
|
|
||||||
|
|
12
NzbDrone.Web/Views/Settings/SubMenu.cshtml
Normal file
12
NzbDrone.Web/Views/Settings/SubMenu.cshtml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
@{Html.Telerik().Menu().Name("SubMenu").Items(items =>
|
||||||
|
{
|
||||||
|
items.Add().Text("General").Action("General", "Settings");
|
||||||
|
items.Add().Text("Indexers").Action("Indexers", "Settings");
|
||||||
|
items.Add().Text("Downloads").Action("Downloads", "Settings");
|
||||||
|
items.Add().Text("Quality").Action("Quality", "Settings");
|
||||||
|
items.Add().Text("Episode Sorting").Action("EpisodeSorting",
|
||||||
|
"Settings");
|
||||||
|
items.Add().Text("Notifications").Action("Notifications",
|
||||||
|
"Settings");
|
||||||
|
}).Render();
|
||||||
|
}
|
@ -1,139 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NzbDrone.Core.Repository.Quality.QualityProfile>" %>
|
|
||||||
<%@ Import Namespace="NzbDrone.Core.Repository.Quality" %>
|
|
||||||
<%@ Import Namespace="NzbDrone.Web.Helpers" %>
|
|
||||||
|
|
||||||
<%
|
|
||||||
using (Html.BeginCollectionItem("UserProfiles"))
|
|
||||||
{%>
|
|
||||||
|
|
||||||
<%
|
|
||||||
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
|
|
||||||
|
|
||||||
string sortable1 = String.Format("{0}_sortable1", idClean);
|
|
||||||
string sortable2 = String.Format("{0}_sortable2", idClean);
|
|
||||||
string allowedStringName = String.Format("{0}_AllowedString", idClean);
|
|
||||||
string connectedSortable = String.Format("connected{0}", idClean);
|
|
||||||
string title = String.Format("{0}_Title", idClean);
|
|
||||||
string nameBox = String.Format("{0}_Name", idClean);
|
|
||||||
%>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
.sortable1, .sortable2 { list-style-type: none; margin-right: 10px; background: #eee; padding-left: 5px; padding-right: 5px; padding-top: 0px; padding-bottom: 6px; width: 107px; margin-bottom: 3px; }
|
|
||||||
.allowedQualities, .otherQualities { list-style-type: none; float: left; margin-right: 10px; background: #eee; padding-left: 5px; padding-right: 5px; padding-top:6px; width: 112px; -khtml-border-radius:8px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px; }
|
|
||||||
.sortable1 li, .sortable2 li { margin: 5px; margin-left: 0px; padding: 0px; font-size: 1.2em; width: 100px; -khtml-border-radius:8px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px; }
|
|
||||||
.sortable1 li { background: #ddd; }
|
|
||||||
.sortable2 li { background: #DAA2A2; }
|
|
||||||
.sortableHeader { margin:2px; margin-left:12px }
|
|
||||||
.sortable1 li.ui-state-highlight, .sortable2 li.ui-state-highlight { background: #fbf5d0; border-color: #065EFE; }
|
|
||||||
.removeDiv { float: left; display:block; }
|
|
||||||
.ui-state-highlight { height: 1.5em; line-height: 1.2em; }
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function () {
|
|
||||||
$("#<%=sortable1%>, #<%=sortable2%>").sortable({
|
|
||||||
connectWith: ".<%=connectedSortable%>",
|
|
||||||
placeholder: "ui-state-highlight",
|
|
||||||
dropOnEmpty: true,
|
|
||||||
|
|
||||||
create: function (event, ui) {
|
|
||||||
var order = $('#<%=sortable1%>').sortable("toArray");
|
|
||||||
$("#<%=allowedStringName%>").val(order);
|
|
||||||
},
|
|
||||||
|
|
||||||
update: function (event, ui) {
|
|
||||||
var order = $('#<%=sortable1%>').sortable("toArray");
|
|
||||||
$("#<%=allowedStringName%>").val(order);
|
|
||||||
}
|
|
||||||
|
|
||||||
}).disableSelection();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="userProfileSectionEditor">
|
|
||||||
|
|
||||||
<fieldset style="width:275px; margin:5px; margin-top: 0px; border-color:#CCCCCD">
|
|
||||||
|
|
||||||
<div id="qualityHeader" style="padding-bottom: 5px; margin: 0px;">
|
|
||||||
<h2 style="display:inline; padding-right: 4px; margin-left: 4px;" id="<%=title%>"><%=Html.DisplayTextFor(m => m.Name)%></h2>
|
|
||||||
<a href="#" class="deleteRow"><img src="../../Content/Images/X.png" alt="Delete" /></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="config-group" style="width: 250px; margin-bottom: 5px; margin-left: 5px;">
|
|
||||||
<div class="config-title"><%=Html.LabelFor(x => x.Name)%></div>
|
|
||||||
<div class="config-value"><%=Html.TextBoxFor(x => x.Name)%></div>
|
|
||||||
<div class="config-validation"><%=Html.ValidationMessageFor(x => x.Name)%></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="sortablesDiv" style="margin: 0px;">
|
|
||||||
<div class="allowedQualities">
|
|
||||||
<h4 class="sortableHeader">Allowed</h4>
|
|
||||||
<ul id="<%=sortable1%>" class="<%=connectedSortable%> sortable1">
|
|
||||||
<%
|
|
||||||
if (Model.Allowed != null)
|
|
||||||
{%>
|
|
||||||
<%
|
|
||||||
for (int i = 0; i < Model.Allowed.Count(); i++)
|
|
||||||
{%>
|
|
||||||
<li class="ui-state-default" id="<%=Model.Allowed[i].ToString()%>">
|
|
||||||
<%=Html.RadioButtonFor(x => x.Cutoff, Model.Allowed[i])%>
|
|
||||||
<%=Html.DisplayTextFor(c => c.Allowed[i])%>
|
|
||||||
</li>
|
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="otherQualities">
|
|
||||||
<h4 class="sortableHeader">Not-Allowed</h4>
|
|
||||||
<ul id="<%=sortable2%>" class="<%=connectedSortable%> sortable2">
|
|
||||||
<%
|
|
||||||
var qualitiesList = (List<QualityTypes>) ViewData["Qualities"];%>
|
|
||||||
|
|
||||||
<%
|
|
||||||
for (int i = 0; i < qualitiesList.Count(); i++)
|
|
||||||
{%>
|
|
||||||
<%
|
|
||||||
//Skip Unknown and any item that is in the allowed list
|
|
||||||
if (qualitiesList[i].ToString() == "Unknown")
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (Model.Allowed != null)
|
|
||||||
{
|
|
||||||
if (Model.Allowed.Contains(qualitiesList[i]))
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
%>
|
|
||||||
|
|
||||||
<li class="ui-state-default" id="<%=qualitiesList[i].ToString()%>">
|
|
||||||
<%=Html.RadioButtonFor(x => x.Cutoff, qualitiesList[i])%>
|
|
||||||
<%=Html.Label(qualitiesList[i].ToString())%>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%=Html.ValidationMessageFor(x => x.Cutoff)%>
|
|
||||||
|
|
||||||
<div class="hiddenProfileDetails">
|
|
||||||
<%=Html.TextBoxFor(x => x.QualityProfileId, new {@style = "display:none"})%>
|
|
||||||
<%=Html.CheckBoxFor(x => x.UserProfile, new {@style = "display:none"})%>
|
|
||||||
<%=Html.TextBoxFor(m => m.AllowedString, new {@style = "display:none"})%>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$("#<%:nameBox%>").keyup(function () {
|
|
||||||
var value = $(this).val();
|
|
||||||
$("#<%=title%>").text(value);
|
|
||||||
}).keyup();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<%
|
|
||||||
}%>
|
|
129
NzbDrone.Web/Views/Settings/UserProfileSection.cshtml
Normal file
129
NzbDrone.Web/Views/Settings/UserProfileSection.cshtml
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
@model NzbDrone.Core.Repository.Quality.QualityProfile
|
||||||
|
@using NzbDrone.Core.Repository.Quality
|
||||||
|
@using NzbDrone.Web.Helpers
|
||||||
|
|
||||||
|
@using (Html.BeginCollectionItem("UserProfiles"))
|
||||||
|
{
|
||||||
|
|
||||||
|
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
|
||||||
|
|
||||||
|
string sortable1 = String.Format("{0}_sortable1", idClean);
|
||||||
|
string sortable2 = String.Format("{0}_sortable2", idClean);
|
||||||
|
string allowedStringName = String.Format("{0}_AllowedString", idClean);
|
||||||
|
string connectedSortable = String.Format("connected{0}", idClean);
|
||||||
|
string title = String.Format("{0}_Title", idClean);
|
||||||
|
string nameBox = String.Format("{0}_Name", idClean);
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
.sortable1, .sortable2 { list-style-type: none; margin-right: 10px; background: #eee; padding-left: 5px; padding-right: 5px; padding-top: 0px; padding-bottom: 6px; width: 117px; margin-bottom: 3px; }
|
||||||
|
.allowedQualities, .otherQualities { list-style-type: none; float: left; margin-right: 10px; background: #eee; padding-left: 5px; padding-right: 5px; padding-top:6px; width: 122px; -khtml-border-radius:8px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px; }
|
||||||
|
.sortable1 li, .sortable2 li { margin: 5px; margin-left: 0px; padding: 0px; font-size: 1.2em; width: 110px; -khtml-border-radius:8px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px; }
|
||||||
|
.sortable1 li { background: #ddd; }
|
||||||
|
.sortable2 li { background: #DAA2A2; }
|
||||||
|
.sortableHeader { margin:2px; margin-left:12px }
|
||||||
|
.sortable1 li.ui-state-highlight, .sortable2 li.ui-state-highlight { background: #fbf5d0; border-color: #065EFE; }
|
||||||
|
.removeDiv { float: left; display:block; }
|
||||||
|
.ui-state-highlight { height: 1.5em; line-height: 1.2em; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
$("#@sortable1, #@sortable2").sortable({
|
||||||
|
connectWith: ".@connectedSortable",
|
||||||
|
placeholder: "ui-state-highlight",
|
||||||
|
dropOnEmpty: true,
|
||||||
|
|
||||||
|
create: function (event, ui) {
|
||||||
|
var order = $('#@sortable1').sortable("toArray");
|
||||||
|
$("#@allowedStringName>").val(order);
|
||||||
|
},
|
||||||
|
|
||||||
|
update: function (event, ui) {
|
||||||
|
var order = $('#@sortable1').sortable("toArray");
|
||||||
|
$("#@allowedStringName").val(order);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).disableSelection();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="userProfileSectionEditor">
|
||||||
|
|
||||||
|
<fieldset style="width:285px; margin:5px; margin-top: 0px; border-color:#CCCCCD">
|
||||||
|
|
||||||
|
<div id="qualityHeader" style="padding-bottom: 5px; margin: 0px;">
|
||||||
|
<h2 style="display:inline; padding-right: 4px; margin-left: 4px;" id="@title"><@Html.DisplayTextFor(m => m.Name)</h2>
|
||||||
|
<a href="#" class="deleteRow"><img src="../../Content/Images/X.png" alt="Delete" /></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="config-group" style="width: 250px; margin-bottom: 5px; margin-left: 5px;">
|
||||||
|
<div class="config-title">@Html.LabelFor(x => x.Name)</div>
|
||||||
|
<div class="config-value">@Html.TextBoxFor(x => x.Name)</div>
|
||||||
|
<div class="config-validation">@Html.ValidationMessageFor(x => x.Name)</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="sortablesDiv" style="margin: 0px;">
|
||||||
|
<div class="allowedQualities">
|
||||||
|
<h4 class="sortableHeader">Allowed</h4>
|
||||||
|
<ul id="@sortable1" class="@connectedSortable sortable1">
|
||||||
|
@if (Model.Allowed != null)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < Model.Allowed.Count(); i++)
|
||||||
|
{
|
||||||
|
<li class="ui-state-default" id="@Model.Allowed[i].ToString()">
|
||||||
|
@Html.RadioButtonFor(x => x.Cutoff, Model.Allowed[i])
|
||||||
|
@Html.DisplayTextFor(c => c.Allowed[i])
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="otherQualities">
|
||||||
|
<h4 class="sortableHeader">Not-Allowed</h4>
|
||||||
|
<ul id="@sortable2" class="@connectedSortable sortable2">
|
||||||
|
|
||||||
|
@{var qualitiesList = (List<QualityTypes>)ViewData["Qualities"];}
|
||||||
|
|
||||||
|
@for (int i = 0; i < qualitiesList.Count(); i++)
|
||||||
|
{
|
||||||
|
//Skip Unknown and any item that is in the allowed list
|
||||||
|
if (qualitiesList[i].ToString() == "Unknown")
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Model.Allowed != null)
|
||||||
|
{
|
||||||
|
if (Model.Allowed.Contains(qualitiesList[i]))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<li class="ui-state-default" id="@qualitiesList[i].ToString()">
|
||||||
|
@Html.RadioButtonFor(x => x.Cutoff, qualitiesList[i])
|
||||||
|
@Html.Label(qualitiesList[i].ToString())
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@Html.ValidationMessageFor(x => x.Cutoff)
|
||||||
|
|
||||||
|
<div class="hiddenProfileDetails">
|
||||||
|
@Html.TextBoxFor(x => x.QualityProfileId, new { @style = "display:none" })
|
||||||
|
@Html.CheckBoxFor(x => x.UserProfile, new { @style = "display:none" })
|
||||||
|
@Html.TextBoxFor(m => m.AllowedString, new { @style = "display:none" })
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#@nameBox").keyup(function () {
|
||||||
|
var value = $(this).val();
|
||||||
|
$("#@title").text(value);
|
||||||
|
}).keyup();
|
||||||
|
</script>
|
||||||
|
}
|
@ -1,6 +1,4 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
|
<script type="text/javascript">
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
document.getElementById('syncTimer').style.display = 'inline'; //Show the timer after the page loads, prevents FOUC (Flash of Unstyled Content)
|
document.getElementById('syncTimer').style.display = 'inline'; //Show the timer after the page loads, prevents FOUC (Flash of Unstyled Content)
|
||||||
@ -11,10 +9,10 @@
|
|||||||
counter_expired: '<div style="color: #FFFFFF;">00:00:00</div>',
|
counter_expired: '<div style="color: #FFFFFF;">00:00:00</div>',
|
||||||
interval: 1000,
|
interval: 1000,
|
||||||
warnonminutesleft: 1
|
warnonminutesleft: 1
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<%--<div>RSS Sync: <span style="display:none" id="syncTimer" class="timer"><%: ViewData["RssTimer"] %></span></div>--%>
|
@*<div>RSS Sync: <span style="display:none" id="syncTimer" class="timer"><@ViewData["RssTimer"]</span></div>*@
|
||||||
<div>RSS Sync: </div>
|
<div>RSS Sync: </div>
|
||||||
<div style="display:none" id="syncTimer" class="timer"><%:ViewData["RssTimer"]%></div>
|
<div style="display:none" id="syncTimer" class="timer">@ViewData["RssTimer"]</div>
|
59
NzbDrone.Web/Views/Shared/SiteLayout.cshtml
Normal file
59
NzbDrone.Web/Views/Shared/SiteLayout.cshtml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
@using Helpers;
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head runat="server">
|
||||||
|
<link rel="SHORTCUT ICON" href="../../favicon.ico"/>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
<title>NZBDrone</title>
|
||||||
|
@{Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.css")
|
||||||
|
.Add("telerik.sitefinity.css")
|
||||||
|
.Add("notibar.css"))
|
||||||
|
.Render();}
|
||||||
|
|
||||||
|
<link href="../../Content/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="../../Content/jquery-ui.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="../../Content/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
|
||||||
|
@*<link href="../../Content/jquery-simpledropdown.css" rel="stylesheet" type="text/css" />*@
|
||||||
|
@*<script type="text/javascript" src="../../Scripts/jquery-1.5.2.min.js"></script>*@
|
||||||
|
@*<script type="text/javascript" src="../../Scripts/jquery-ui-1.8.8.min.js"></script>*@
|
||||||
|
|
||||||
|
@RenderSection("HeaderContent", required: false)
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="centered">
|
||||||
|
<div id="menu">
|
||||||
|
<ul>
|
||||||
|
@MvcHtmlString.Create(Html.CurrentActionLink("Series", "Index", "Series"))
|
||||||
|
@MvcHtmlString.Create(Html.CurrentActionLink("Upcoming", "Index", "Upcoming"))
|
||||||
|
@MvcHtmlString.Create(Html.CurrentActionLink("History", "Index", "History"))
|
||||||
|
@MvcHtmlString.Create(Html.CurrentActionLink("Settings", "Index", "Settings"))
|
||||||
|
@MvcHtmlString.Create(Html.CurrentActionLink("Logs", "Index", "Log"))
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="logo">
|
||||||
|
@RenderSection("TitleContent", required: false)
|
||||||
|
</div>
|
||||||
|
<div id="page">
|
||||||
|
@RenderSection("ActionMenu", required: false)
|
||||||
|
@RenderSection("MainContent", required: false)
|
||||||
|
@RenderBody()
|
||||||
|
</div>
|
||||||
|
<div id="footer">
|
||||||
|
@{Html.RenderAction("Footer", "Shared");}
|
||||||
|
</div>
|
||||||
|
<div id="msgBox">
|
||||||
|
<span id="msgText">Scanning Series Folder...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
@{Html.Telerik().ScriptRegistrar().Scripts(
|
||||||
|
c => c.Add("jquery-ui-1.8.8.min.js")
|
||||||
|
.Add("jquery.form.js")
|
||||||
|
.Add("jquery.jgrowl.js")
|
||||||
|
.Add("Notification.js")
|
||||||
|
.Add("jquery-tgc-countdown-1.0.js")
|
||||||
|
.Add("MicrosoftAjax.js")
|
||||||
|
.Add("MicrosoftMvcValidation.js"))
|
||||||
|
.Render();}
|
||||||
|
</html>
|
3
NzbDrone.Web/Views/_ViewStart.cshtml
Normal file
3
NzbDrone.Web/Views/_ViewStart.cshtml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
@{
|
||||||
|
Layout = "~/Views/Shared/SiteLayout.cshtml";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user