Added Season Monitored editor (linked from Season Count on Series Grid), It would be under AJAX Edit, but it won't play nice with lists.
Editor should support about 40 seasons without scrolling (TvDb doesn't list all seasons for large series) Removed &pp=3 from SabProvider (it will use SAB's configured Post Processing value).pull/4/head
parent
fa2b609ad3
commit
9caacc4809
@ -0,0 +1,47 @@
|
||||
@using NzbDrone.Web.Models;
|
||||
@model List<SeasonEditModel>
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<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);
|
||||
closeSeasonEditor();
|
||||
}
|
||||
</script>
|
||||
|
||||
@using (Html.BeginForm("SaveSeasons", "Series", FormMethod.Post, new { id = "form" }))
|
||||
{
|
||||
<div style="vertical-align: middle">
|
||||
@foreach (var season in Model)
|
||||
{
|
||||
Html.RenderAction("GetSingleSeasonView", "Series", season);
|
||||
}
|
||||
</div>
|
||||
|
||||
<div id="buttons" style="padding-top: 20px; position: absolute; bottom: 5;">
|
||||
<button type="submit" class="t-button t-state-default">Save</button>
|
||||
<button type="button" class="t-button t-state-default" onclick="closeSeasonEditor()">Cancel</button>
|
||||
</div>
|
||||
}
|
||||
<div id="result"></div>
|
@ -0,0 +1,15 @@
|
||||
@using NzbDrone.Web.Helpers;
|
||||
@using NzbDrone.Web.Models;
|
||||
@model SeasonEditModel
|
||||
|
||||
@using (Html.BeginCollectionItem("seasons"))
|
||||
{
|
||||
<fieldset style="display: inline; border-color: lightgrey; width: 26%; margin-bottom: 2px; padding-bottom: 1px; padding-top: 1px;">
|
||||
@Html.DisplayFor(m => m.SeasonString)
|
||||
<span style="float: right;">@Html.CheckBoxFor(m => m.Monitored)</span>
|
||||
|
||||
@Html.HiddenFor(m => m.SeasonId)
|
||||
@Html.HiddenFor(m => m.SeasonNumber)
|
||||
</fieldset>
|
||||
}
|
||||
|
@ -0,0 +1,106 @@
|
||||
<style type="text/css">
|
||||
|
||||
#feedback-open-button
|
||||
{
|
||||
height: 32px;
|
||||
margin: 2em 0 4em;
|
||||
}
|
||||
|
||||
#feedback-form
|
||||
{
|
||||
padding: 0 1em 1em;
|
||||
}
|
||||
|
||||
#feedback-form label
|
||||
{
|
||||
display: block;
|
||||
line-height: 25px;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
#feedback-form input
|
||||
{
|
||||
width: 370px;
|
||||
}
|
||||
|
||||
.form-actions
|
||||
{
|
||||
padding-top: 1em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.form-actions button
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
.example .t-group
|
||||
{
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
padding: 0 1em 1em;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@{ Html.Telerik().Window()
|
||||
.Name("Window")
|
||||
.Title("Submit feedback")
|
||||
.LoadContentFrom("TestPartial", "Settings")
|
||||
.Width(400)
|
||||
.Draggable(true)
|
||||
.Modal(true)
|
||||
.Visible(false)
|
||||
.Render();
|
||||
}
|
||||
|
||||
<button id="feedback-open-button" class="t-button t-state-default">Submit feedback...</button>
|
||||
@if (ViewData["name"] != null || ViewData["email"] != null || ViewData["comment"] != null) {
|
||||
<div class="t-group">
|
||||
<h3>Feedback:</h3>
|
||||
|
||||
<p>
|
||||
Name: @ViewData["name"] <br />
|
||||
E-mail: @ViewData["email"] <br />
|
||||
Comment: @ViewData["comment"]
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@{ Html.Telerik().ScriptRegistrar()
|
||||
.OnDocumentReady(@<text>
|
||||
// open the initially hidden window when the button is clicked
|
||||
|
||||
</text>); }
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var windowElement;
|
||||
|
||||
$('#feedback-open-button')
|
||||
.click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
windowElement = $.telerik.window.create({
|
||||
title: "Season Edition: ",
|
||||
contentUrl: '@Url.Action("SeasonEditor", "Series")' + '/?seriesId=10',
|
||||
width: 400,
|
||||
height: 500,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
draggable: true,
|
||||
scrollable: false
|
||||
});
|
||||
|
||||
windowElement.data('tWindow').center();
|
||||
});
|
||||
// add button hovers
|
||||
$('.t-button').live('mouseenter', $.telerik.buttonHover)
|
||||
.live('mouseleave', $.telerik.buttonLeave);
|
||||
|
||||
function closeWindow() {
|
||||
var window = windowElement.data("tWindow");
|
||||
window.close();
|
||||
}
|
||||
</script>
|
@ -0,0 +1,24 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
|
||||
@using (Html.BeginForm("SaveDownloads", "Settings", FormMethod.Post, new { id = "feedback-form" }))
|
||||
{
|
||||
<p class="note">This is just an example, sent data will <strong>not</strong> be saved.</p>
|
||||
<label for="name">Name:</label>
|
||||
@Html.TextBox("name")
|
||||
<label for="email">E-mail:</label>
|
||||
@Html.TextBox("email")
|
||||
<label for="comment-value">Comments:</label>
|
||||
@(Html.Telerik().Editor()
|
||||
.Name("comment")
|
||||
.Tools(tools => tools
|
||||
.Clear()
|
||||
.Bold().Italic().Separator()
|
||||
.InsertOrderedList().InsertUnorderedList().Separator()
|
||||
.Indent().Outdent()
|
||||
))
|
||||
<button type="submit" class="t-button t-state-default">Save</button>
|
||||
<button type="button" class="t-button t-state-default" onclick="closeWindow()">Close</button>
|
||||
}
|
Loading…
Reference in new issue