parent
4000387419
commit
0556c31846
@ -0,0 +1,17 @@
|
|||||||
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<String>>" %>
|
||||||
|
|
||||||
|
<%@ Import Namespace="Telerik.Web.Mvc.UI" %>
|
||||||
|
<%@ Import Namespace="NzbDrone.Web.Models" %>
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
||||||
|
Add Existing Series
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||||||
|
<%: Html.DropDownList("qualityProfileId", (SelectList)ViewData["QualitySelectList"], ViewData["QualityProfileId"])%>
|
||||||
|
<%
|
||||||
|
foreach (var path in Model)
|
||||||
|
{
|
||||||
|
Html.RenderAction("RenderPartial", "AddSeries", new { path });
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
</asp:Content>
|
@ -0,0 +1,47 @@
|
|||||||
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SelectList>" %>
|
||||||
|
<div style="position: relative; padding: 10px" id="div_<%:ViewData["guid"] %>">
|
||||||
|
<div style="position: relative; left: 0; width: 50%;">
|
||||||
|
<%=ViewData["path"].ToString() %>
|
||||||
|
</div>
|
||||||
|
<div style="position: relative; right: 0; width: 50%;">
|
||||||
|
<%
|
||||||
|
Html.Telerik().ComboBox()
|
||||||
|
.Name(ViewData["guid"].ToString())
|
||||||
|
// .AutoFill(true)
|
||||||
|
.BindTo(Model)
|
||||||
|
// .DataBinding(b => b.Ajax().Select("TvDbLookup", "AddSeries"))
|
||||||
|
.Filterable(f => f.FilterMode(AutoCompleteFilterMode.Contains))
|
||||||
|
.HighlightFirstMatch(true)
|
||||||
|
.HtmlAttributes(new { style = "width:70%; align:right" })
|
||||||
|
.SelectedIndex(0)
|
||||||
|
.Render();
|
||||||
|
%>
|
||||||
|
<button class="listButton" onclick="addSeries('<%:ViewData["guid"] %>','<%= ViewData["javaPath"].ToString()%>' )">
|
||||||
|
Add</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
|
||||||
|
|
||||||
|
var addSeriesUrl = '<%= Url.Action("AddSeries", "AddSeries") %>';
|
||||||
|
|
||||||
|
|
||||||
|
function addSeries(guid, path) {
|
||||||
|
var qualityProfileId = $("#qualityProfileId").val();
|
||||||
|
var comboBox = $("#" + guid).data("tComboBox");
|
||||||
|
sendToServer(comboBox.value(), path, qualityProfileId);
|
||||||
|
$("#div_" + guid).hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendToServer(id, path, quality) {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: addSeriesUrl,
|
||||||
|
data: jQuery.param({ path: path, seriesId: id, qualityProfileId: quality }),
|
||||||
|
error: function (req, status, error) {
|
||||||
|
alert("Sorry! We could not add " + this.name + "at this time. " + error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
@ -1,12 +0,0 @@
|
|||||||
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
|
|
||||||
|
|
||||||
<asp:Content ID="aboutTitle" ContentPlaceHolderID="TitleContent" runat="server">
|
|
||||||
About Us
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="aboutContent" ContentPlaceHolderID="MainContent" runat="server">
|
|
||||||
<h2>About</h2>
|
|
||||||
<p>
|
|
||||||
Put content here.
|
|
||||||
</p>
|
|
||||||
</asp:Content>
|
|
@ -1,19 +0,0 @@
|
|||||||
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
|
|
||||||
|
|
||||||
<%@ Import Namespace="Telerik.Web.Mvc.UI" %>
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
||||||
Logs
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Menu" ContentPlaceHolderID="ActionMenu" runat="server">
|
|
||||||
<%
|
|
||||||
Html.Telerik().Menu().Name("logMenu").Items(items => items.Add().Text("Clear Logs").Action("Clear", "Log")).Render();
|
|
||||||
%>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
||||||
<h2>
|
|
||||||
<%: ViewData["Message"] %></h2>
|
|
||||||
<p>
|
|
||||||
To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">
|
|
||||||
http://asp.net/mvc</a>.
|
|
||||||
</p>
|
|
||||||
</asp:Content>
|
|
@ -1,31 +0,0 @@
|
|||||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NzbDrone.Web.Models.TestModel>" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
||||||
Test
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
||||||
|
|
||||||
<h2>Test</h2>
|
|
||||||
|
|
||||||
<% using (Html.BeginForm("Test", "Home", FormMethod.Post, new { id = "form", name = "form" }))
|
|
||||||
{%>
|
|
||||||
|
|
||||||
<div>One: <%=Html.RadioButtonFor(t => t.Number, 1)%></div>
|
|
||||||
<div>Two: <%=Html.RadioButtonFor(t => t.Number, 2)%></div>
|
|
||||||
<div>Three: <%=Html.RadioButtonFor(t => t.Number, 3)%></div>
|
|
||||||
<div>Four: <%=Html.RadioButtonFor(t => t.Number, 4)%></div>
|
|
||||||
|
|
||||||
<input type="submit" class="button" value="Save" />
|
|
||||||
<% } %>
|
|
||||||
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="headerContent" runat="server">
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="ActionMenu" runat="server">
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="Scripts" runat="server">
|
|
||||||
</asp:Content>
|
|
@ -1,133 +0,0 @@
|
|||||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
|
|
||||||
|
|
||||||
<%@ Import Namespace="Telerik.Web.Mvc.UI" %>
|
|
||||||
<%@ Import Namespace="NzbDrone.Web.Models" %>
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
||||||
Add Existing Series
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Menu" ContentPlaceHolderID="ActionMenu" runat="server">
|
|
||||||
<%
|
|
||||||
Html.RenderPartial("SubMenu");
|
|
||||||
%>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function () {
|
|
||||||
$('#mastercheckbox').attr("checked", "checked");
|
|
||||||
document.getElementById('unmappedGrid').style.display = 'block';
|
|
||||||
});
|
|
||||||
|
|
||||||
function Grid_onRowDataBound(e) {
|
|
||||||
//the DOM element (<tr>) representing the row which is being databound
|
|
||||||
var row = e.row;
|
|
||||||
//the data item - JavaScript object.
|
|
||||||
var tvDbId = e.dataItem.TvDbId;
|
|
||||||
|
|
||||||
$(row).attr('id', 'row_' + tvDbId);
|
|
||||||
|
|
||||||
//var info = row.cells[1].text();
|
|
||||||
//row.cells[1].innerHTML = '<strong>' + dataItem + '</strong>';
|
|
||||||
//You can use the OnRowDataBound event to customize the way data is presented on the client-side
|
|
||||||
};
|
|
||||||
|
|
||||||
function Grid_onLoad(e) {
|
|
||||||
$('.t-no-data').text("Loading...");
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<%= Html.Label("Quality Profile")%>
|
|
||||||
<%: Html.DropDownList("qualityProfileId", (SelectList)ViewData["QualitySelectList"], ViewData["QualityProfileId"])%>
|
|
||||||
<div id="unmappedGrid" style="display: none">
|
|
||||||
<%
|
|
||||||
Html.Telerik().Grid<AddExistingSeriesModel>().Name("Unmapped_Series_Folders")
|
|
||||||
.TableHtmlAttributes(new { id = "UnmappedSeriesGrid" })
|
|
||||||
.Columns(columns =>
|
|
||||||
{
|
|
||||||
columns.Bound(c => c.IsWanted).ClientTemplate("<input type='checkbox' name='<#= Path #>' class='checkedSeries' value='<#= TvDbId #>' checked='true'/>")
|
|
||||||
.Width(20).Title("<input id='mastercheckbox' type='checkbox' style='margin-left:5px'/>")
|
|
||||||
.HtmlAttributes(new { style = "text-align:center" });
|
|
||||||
|
|
||||||
columns.Bound(c => c.Path).ClientTemplate("<a href=" + Url.Action("AddExistingManual", "Series", new { path = "<#= PathEncoded #>" }) + "><#= Path #></a>")
|
|
||||||
.Template(c =>
|
|
||||||
{ %>
|
|
||||||
<%:Html.ActionLink(c.Path, "AddExistingManual", new { path = c.Path })%>
|
|
||||||
<% }).Title("Path");
|
|
||||||
columns.Bound(c => c.TvDbName);
|
|
||||||
})
|
|
||||||
.DataBinding(d => d.Ajax().Select("_AjaxUnmappedFoldersGrid", "Series"))
|
|
||||||
.ClientEvents(events => events.OnRowDataBound("Grid_onRowDataBound"))
|
|
||||||
.ClientEvents(events => events.OnLoad("Grid_onLoad"))
|
|
||||||
.Footer(false)
|
|
||||||
.Render();
|
|
||||||
%>
|
|
||||||
<p>
|
|
||||||
<button class="t.button" onclick="syncSelected ()">
|
|
||||||
Sync Selected Series</button>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div id="result">
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript" language="javascript">
|
|
||||||
|
|
||||||
// MasterCheckBox functionality
|
|
||||||
$('#mastercheckbox').click(function () {
|
|
||||||
if ($(this).attr('checked')) {
|
|
||||||
$('.checkedSeries').attr('checked', true);
|
|
||||||
} else {
|
|
||||||
$('.checkedSeries').attr('checked', false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//Unchecking a 'normal' checkbox should clear the mastercheckbox as well
|
|
||||||
|
|
||||||
$(".checkedSeries").live("click", function () {
|
|
||||||
var numChkBoxes = $('.checkedSeries').length;
|
|
||||||
var numChkBoxesChecked = $('.checkedSeries:checked').length;
|
|
||||||
|
|
||||||
if (numChkBoxes == numChkBoxesChecked & numChkBoxes > 0) {
|
|
||||||
$('#mastercheckbox').attr('checked', true);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('#mastercheckbox').attr('checked', false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//Sync for selected series
|
|
||||||
function syncSelected() {
|
|
||||||
|
|
||||||
var $checkedRecords = $('.checkedSeries:checked');
|
|
||||||
|
|
||||||
if ($checkedRecords.length < 1) {
|
|
||||||
alert("Check one or more series first");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var qualityProfileId = $("#qualityProfileId").val();
|
|
||||||
|
|
||||||
$checkedRecords.each(function () {
|
|
||||||
$.ajax(
|
|
||||||
{
|
|
||||||
type: "POST",
|
|
||||||
url: "/Series/SyncSelectedSeries",
|
|
||||||
data: jQuery.param({ path: this.name, tvdbid: this.value, qualityProfileId: qualityProfileId }),
|
|
||||||
error: function (req, status, error) {
|
|
||||||
alert("Sorry! We could not add " + this.name + "at this time");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$checkedRecords.each(function () {
|
|
||||||
|
|
||||||
var id = "#row_" + this.value;
|
|
||||||
$(this).attr("checked", false);
|
|
||||||
$(id).hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
|
@ -1,14 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NzbDrone.Core.Repository.Episode>" %>
|
|
||||||
<%@ Import Namespace="Telerik.Web.Mvc.UI" %>
|
|
||||||
<%: Model.Overview %>
|
|
||||||
<%--<%:
|
|
||||||
Html.Telerik().Grid(Model.Files)
|
|
||||||
.Name("files_" + Model.EpisodeId)
|
|
||||||
.Columns(columns =>
|
|
||||||
{
|
|
||||||
columns.Bound(c => c.Path);
|
|
||||||
columns.Bound(c => c.Quality);
|
|
||||||
columns.Bound(c => c.DateAdded);
|
|
||||||
})
|
|
||||||
.Footer(false)
|
|
||||||
%>--%>
|
|
@ -1,12 +1,12 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
|
||||||
<%@ Import Namespace="Telerik.Web.Mvc.UI" %>
|
<%@ Import Namespace="NzbDrone.Web.Controllers" %>
|
||||||
<% Html.Telerik().Menu().Name("telerikGrid").Items(items =>
|
<% Html.Telerik().Menu().Name("telerikGrid").Items(items =>
|
||||||
{
|
{
|
||||||
items.Add().Text("Add Series")
|
items.Add().Text("Add Series")
|
||||||
.Items(subItem => subItem.Add().Text("New Series").Action("AddNew", "Series"))
|
.Items(subItem => subItem.Add().Text("New Series").Action<AddSeriesController>(c => c.AddNew()))
|
||||||
.Items(subItem => subItem.Add().Text("Existing Series").Action("AddExisting", "Series"));
|
.Items(subItem => subItem.Add().Text("Existing Series").Action<AddSeriesController>(c => c.AddExisting()));
|
||||||
|
|
||||||
items.Add().Text("Start RSS Sync").Action("RssSync", "Series");
|
items.Add().Text("Start RSS Sync").Action<SeriesController>(c => c.RssSync());
|
||||||
items.Add().Text("Rename All").Action("RenameAll", "Series");
|
items.Add().Text("Rename All").Action<SeriesController>(c => c.RenameAll());
|
||||||
}).Render();
|
}).Render();
|
||||||
%>
|
%>
|
@ -1,28 +0,0 @@
|
|||||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<NzbDrone.Web.Models.MappingModel>>" %>
|
|
||||||
|
|
||||||
<%@ Import Namespace="Telerik.Web.Mvc.UI" %>
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
||||||
Unmapped
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
||||||
<h2>
|
|
||||||
The following folders aren't currently mapped to any Series.</h2>
|
|
||||||
<h3>
|
|
||||||
Please Re-sync your folders. If the problem persists try renaming your folders to
|
|
||||||
something more similar to the name of series they contain.</h3>
|
|
||||||
<%= Html.Telerik().Grid(Model)
|
|
||||||
.Name("Grid")
|
|
||||||
.DataKeys(dataKeys => dataKeys.Add(c => c.Id))
|
|
||||||
.DataBinding(dataBinding => dataBinding
|
|
||||||
//Server binding
|
|
||||||
.Ajax()
|
|
||||||
.Select("UnMapped", "Series")
|
|
||||||
.Update("Update", "Home")
|
|
||||||
)
|
|
||||||
.Columns(columns =>
|
|
||||||
{
|
|
||||||
columns.Bound(c => c.Path);
|
|
||||||
columns.Command(commands => commands.Edit());
|
|
||||||
})
|
|
||||||
%>
|
|
||||||
</asp:Content>
|
|
Loading…
Reference in new issue