Conflicts: NzbDrone.Core/CentralDispatch.cs NzbDrone.Core/NzbDrone.Core.csproj NzbDrone.Web/Views/Settings/Indexers.ascxpull/4/head
commit
2a603d908f
@ -1,70 +0,0 @@
|
||||
<Configuration>
|
||||
<CodeStyleSettings>
|
||||
<ExternalPath IsNull="False">
|
||||
</ExternalPath>
|
||||
<Sharing>SOLUTION</Sharing>
|
||||
<CSharp>
|
||||
<FormatSettings>
|
||||
<MODIFIERS_ORDER IsNull="False">
|
||||
<Item>public</Item>
|
||||
<Item>protected</Item>
|
||||
<Item>internal</Item>
|
||||
<Item>private</Item>
|
||||
<Item>new</Item>
|
||||
<Item>abstract</Item>
|
||||
<Item>virtual</Item>
|
||||
<Item>override</Item>
|
||||
<Item>sealed</Item>
|
||||
<Item>static</Item>
|
||||
<Item>readonly</Item>
|
||||
<Item>extern</Item>
|
||||
<Item>unsafe</Item>
|
||||
<Item>volatile</Item>
|
||||
</MODIFIERS_ORDER>
|
||||
</FormatSettings>
|
||||
<UsingsSettings />
|
||||
<Naming2>
|
||||
<EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
|
||||
<EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
|
||||
</Naming2>
|
||||
</CSharp>
|
||||
<VB>
|
||||
<FormatSettings />
|
||||
<ImportsSettings />
|
||||
<Naming2>
|
||||
<EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
|
||||
<EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
|
||||
</Naming2>
|
||||
</VB>
|
||||
<Web>
|
||||
<Naming2 />
|
||||
</Web>
|
||||
<Xaml>
|
||||
<Naming2 />
|
||||
</Xaml>
|
||||
<XML>
|
||||
<FormatSettings />
|
||||
</XML>
|
||||
<GenerateMemberBody />
|
||||
<Naming2>
|
||||
<EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
|
||||
<EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
|
||||
<PredefinedRule Inspect="True" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />
|
||||
<PredefinedRule Inspect="True" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />
|
||||
<PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />
|
||||
<PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AA_BB" ElementKind="PrivateConstants" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
|
||||
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
|
||||
</Naming2>
|
||||
</CodeStyleSettings>
|
||||
</Configuration>
|
@ -1,136 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NzbDrone.Web.Models.IndexerSettingsModel>" %>
|
||||
<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>
|
||||
<style type="text/css">
|
||||
#sortable
|
||||
{
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 30%;
|
||||
}
|
||||
#sortable li
|
||||
{
|
||||
margin: 0 5px 5px 5px;
|
||||
padding: 5px;
|
||||
font-size: 1.2em;
|
||||
height: 1.5em;
|
||||
}
|
||||
#sortable li
|
||||
{
|
||||
height: 1.5em;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
.ui-state-highlight
|
||||
{
|
||||
height: 1.5em;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#sortable").sortable({
|
||||
placeholder: "ui-state-highlight"
|
||||
});
|
||||
$("#sortable").disableSelection();
|
||||
});
|
||||
</script>
|
||||
<%
|
||||
using (Html.BeginForm("SaveIndexers", "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>Indexers</legend>
|
||||
<ul id="sortable">
|
||||
<%
|
||||
for (int i = 0; i < Model.Indexers.Count(); i++)
|
||||
{%>
|
||||
<li class="ui-state-default" id="<%=Model.Indexers[i].Id%> ">
|
||||
<%=Html.CheckBoxFor(c => c.Indexers[i].Enable)%><%=Html.DisplayTextFor(c => c.Indexers[i].Name)%></li>
|
||||
<%
|
||||
}%>
|
||||
</ul>
|
||||
<%
|
||||
for (int i = 0; i < Model.Indexers.Count(); i++)
|
||||
{%>
|
||||
<%
|
||||
}%>
|
||||
<%--NZBMatrix--%>
|
||||
<div class="editor-label">
|
||||
<%=Html.LabelFor(m => m.NzbMatrixUsername)%>
|
||||
</div>
|
||||
<div class="editor-field">
|
||||
<%=Html.TextBoxFor(m => m.NzbMatrixUsername)%>
|
||||
<%=Html.ValidationMessageFor(m => m.NzbMatrixUsername)%>
|
||||
</div>
|
||||
<div class="editor-label">
|
||||
<%=Html.LabelFor(m => m.NzbMatrixApiKey)%>
|
||||
</div>
|
||||
<div class="editor-field">
|
||||
<%=Html.TextBoxFor(m => m.NzbMatrixApiKey)%>
|
||||
<%=Html.ValidationMessageFor(m => m.NzbMatrixApiKey)%>
|
||||
</div>
|
||||
<br />
|
||||
<%--NZBs.Org--%>
|
||||
<div class="editor-label">
|
||||
<%=Html.LabelFor(m => m.NzbsOrgUId)%>
|
||||
</div>
|
||||
<div class="editor-field">
|
||||
<%=Html.TextBoxFor(m => m.NzbsOrgUId)%>
|
||||
<%=Html.ValidationMessageFor(m => m.NzbsOrgUId)%>
|
||||
</div>
|
||||
<div class="editor-label">
|
||||
<%=Html.LabelFor(m => m.NzbsOrgHash)%>
|
||||
</div>
|
||||
<div class="editor-field">
|
||||
<%=Html.TextBoxFor(m => m.NzbsOrgHash)%>
|
||||
<%=Html.ValidationMessageFor(m => m.NzbsOrgHash)%>
|
||||
</div>
|
||||
<br />
|
||||
<%--NZBsrus--%>
|
||||
<div class="editor-label">
|
||||
<%=Html.LabelFor(m => m.NzbsrusUId)%>
|
||||
</div>
|
||||
<div class="editor-field">
|
||||
<%=Html.TextBoxFor(m => m.NzbsrusUId)%>
|
||||
<%=Html.ValidationMessageFor(m => m.NzbsrusUId)%>
|
||||
</div>
|
||||
<div class="editor-label">
|
||||
<%=Html.LabelFor(m => m.NzbsrusHash)%>
|
||||
</div>
|
||||
<div class="editor-field">
|
||||
<%=Html.TextBoxFor(m => m.NzbsrusHash)%>
|
||||
<%=Html.ValidationMessageFor(m => m.NzbsrusHash)%>
|
||||
</div>
|
||||
<br />
|
||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||
</fieldset>
|
||||
<%
|
||||
}%>
|
||||
<div id="result">
|
||||
</div>
|
@ -0,0 +1,205 @@
|
||||
@model NzbDrone.Web.Models.IndexerSettingsModel
|
||||
|
||||
<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>
|
||||
|
||||
<style>
|
||||
.section_content
|
||||
{
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.indexer_group
|
||||
{
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.indexer_left
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.indexer_right
|
||||
{
|
||||
display:inline;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.indexer_checkbox
|
||||
{
|
||||
margin-right: 135px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@using (Html.BeginForm("SaveIndexers", "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>Indexers</legend>
|
||||
<div>
|
||||
@{ Html.Telerik().PanelBar()
|
||||
.Name("PanelBar")
|
||||
.HtmlAttributes(new { style = "width: 300px; margin: 10px;" })
|
||||
.ExpandMode(PanelBarExpandMode.Single)
|
||||
.SelectedIndex(0)
|
||||
.Items(item =>
|
||||
{
|
||||
item.Add()
|
||||
.Text("NZBs.org")
|
||||
.Content(
|
||||
"<div class=\"section_content\">" +
|
||||
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
"Enabled" +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.CheckBoxFor(m => m.NzbsOrgEnabled, new { @class = "indexer_checkbox" }) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
Html.LabelFor(m => m.NzbsOrgUId) +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.TextBoxFor(m => m.NzbsOrgUId) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
Html.LabelFor(m => m.NzbsOrgHash) +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.TextBoxFor(m => m.NzbsOrgHash) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"</div>"
|
||||
);
|
||||
item.Add()
|
||||
.Text("NZB Matrix")
|
||||
.Content(
|
||||
"<div class=\"section_content\">" +
|
||||
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
"Enabled" +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.CheckBoxFor(m => m.NzbMatrixEnabled, new { @class = "indexer_checkbox" }) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
Html.LabelFor(m => m.NzbMatrixUsername) +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.TextBoxFor(m => m.NzbMatrixUsername) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
Html.LabelFor(m => m.NzbMatrixApiKey) +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.TextBoxFor(m => m.NzbMatrixApiKey) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"</div>"
|
||||
);
|
||||
item.Add()
|
||||
.Text("NZBsRUs")
|
||||
.Content(
|
||||
"<div class=\"section_content\">" +
|
||||
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
"Enabled" +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.CheckBoxFor(m => m.NzbsRUsEnabled, new { @class = "indexer_checkbox" }) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
Html.LabelFor(m => m.NzbsrusUId) +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.TextBoxFor(m => m.NzbsrusUId) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
Html.LabelFor(m => m.NzbsrusHash) +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.TextBoxFor(m => m.NzbsrusHash) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"</div>"
|
||||
);
|
||||
item.Add()
|
||||
.Text("Newzbin")
|
||||
.Content(
|
||||
"<div class=\"section_content\">" +
|
||||
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
"Enabled" +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.CheckBoxFor(m => m.NewzbinEnabled, new { @class = "indexer_checkbox" }) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
Html.LabelFor(m => m.NewzbinUsername) +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.TextBoxFor(m => m.NewzbinUsername) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_group\">" +
|
||||
"<div class=\"indexer_left\">" +
|
||||
Html.LabelFor(m => m.NewzbinPassword) +
|
||||
"</div>" +
|
||||
"<div class=\"indexer_right\">" +
|
||||
Html.TextBoxFor(m => m.NewzbinPassword) +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"</div>"
|
||||
);
|
||||
}).Render();
|
||||
}
|
||||
</div>
|
||||
|
||||
<div id="save_button_div">
|
||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
<div id="result"></div>
|
Loading…
Reference in new issue