1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-11 13:32:42 +01:00
Radarr/NzbDrone.Web/Views/AddSeries/Add.cshtml
Mark McDowall f6578bd535 QualityProfile name, max 15 characters (to keep the UI intact).
Add series has the proper title now.
2011-05-29 23:19:13 -07:00

70 lines
1.9 KiB
Plaintext

@model IEnumerable<String>
<script type="text/javascript" src="../../Scripts/2011.1.315/telerik.window.min.js"></script>
@section TitleContent{
Add Series
}
@section MainContent{
@{ Html.Telerik().Window()
.Name("Window")
.Title("Add New Series")
.Modal(true)
.Buttons(b => b.Close())
.Width(500)
.Height(200)
.Visible(false)
.Draggable(true)
.Resizable(resizing => resizing.Enabled(false))
.LoadContentFrom("AddNew", "AddSeries")
.Render();
}
@if (Model.Count() == 0)
{
@Html.DisplayText("No Series to Add");
}
@Html.Telerik().DropDownList().Name("masterDropbox").BindTo((SelectList) ViewData["qualities"]).HtmlAttributes(
new {style = "width: 100px; margin-left:5px;"}).ClientEvents(events => events.OnChange("masterChanged"))
<button onclick="openAddNewSeries(); return false;" class="listButton" style="margin-left:210px">Add New</button>
@foreach (var path in Model)
{
Html.RenderAction("RenderPartial", "AddSeries", new {path});
}
}
<script type="text/javascript">
function openAddNewSeries() {
var windowElement = $('#Window');
windowElement.data('tWindow').center().open();
}
function closeAddNewSeries() {
var window = $('#Window').data("tWindow");
window.close();
}
function masterChanged() {
var masterQuality = $('#masterDropbox').data("tDropDownList").value();
var qualityDropbox = $(".qualityDropbox");
qualityDropbox.each(function () {
var child = $(this).children("[id^='qualityList']");
var comboBox = child.data("tDropDownList");
comboBox.value(masterQuality);
});
}
function testValue() {
var comboBox = $('#qualityList_tester').data("tDropDownList");
comboBox.value('2');
}
</script>