mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-10 23:29:53 +02:00
Added jquery tab, accordion to autobind.
made add series page more awsome.
This commit is contained in:
parent
becd8e2dac
commit
5e386a2bc7
@ -26,6 +26,11 @@
|
|||||||
color: #065EFE;
|
color: #065EFE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jquery-tabs
|
||||||
|
{
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
/*MiniProfiler*/
|
/*MiniProfiler*/
|
||||||
|
|
||||||
.profiler-button
|
.profiler-button
|
||||||
|
@ -16,10 +16,30 @@
|
|||||||
$(this).removeAttr('disabled');
|
$(this).removeAttr('disabled');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//All buttons are jQueryUI buttons
|
//All buttons are jQueryUI buttons
|
||||||
$('button, input[type="button"], input[type="submit"], input[type="reset"]').livequery(function () {
|
$('button, input[type="button"], input[type="submit"], input[type="reset"]').livequery(function () {
|
||||||
$(this).button();
|
$(this).button();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.jquery-accordion').livequery(function () {
|
||||||
|
$(this).accordion({
|
||||||
|
autoHeight: false,
|
||||||
|
collapsible: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.jquery-tabs').livequery(function () {
|
||||||
|
$(this).tabs({
|
||||||
|
fx: { opacity: 'toggle' },
|
||||||
|
select: function (event, ui) {
|
||||||
|
jQuery(this).css('height', jQuery(this).height());
|
||||||
|
jQuery(this).css('overflow', 'hidden');
|
||||||
|
},
|
||||||
|
show: function (event, ui) {
|
||||||
|
jQuery(this).css('height', 'auto');
|
||||||
|
jQuery(this).css('overflow', 'visible');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
@ -14,7 +14,7 @@ var rootListUrl = '../AddSeries/RootList';
|
|||||||
$(".masterQualitySelector").live('change', function () {
|
$(".masterQualitySelector").live('change', function () {
|
||||||
|
|
||||||
var profileId = $(this).val();
|
var profileId = $(this).val();
|
||||||
$("#existingSeries").find(".qualitySelector").each(function () {
|
$("#existingSeriesTab").find(".qualitySelector").each(function () {
|
||||||
$(this).val(profileId);
|
$(this).val(profileId);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -45,7 +45,7 @@ $(".addExistingButton").live('click', function () {
|
|||||||
|
|
||||||
function reloadExistingSeries() {
|
function reloadExistingSeries() {
|
||||||
$.get(existingSeriesUrl, function (data) {
|
$.get(existingSeriesUrl, function (data) {
|
||||||
$('#existingSeries').html(data);
|
$('#existingSeriesTab').html(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,26 +5,23 @@
|
|||||||
@{
|
@{
|
||||||
Layout = null;
|
Layout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.existingSeries
|
.existingSeries
|
||||||
{
|
{
|
||||||
width: 548px;
|
|
||||||
border-color: #f2f2f2;
|
border-color: #f2f2f2;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
margin: 0px 10px 10px 0px;
|
margin: 0px 10px 10px 0px;
|
||||||
padding-left: 10px;
|
padding: 5px;
|
||||||
padding-right: 10px;
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.masterQualitySelector
|
.masterQualitySelector
|
||||||
{
|
{
|
||||||
left: 202px;
|
left: 415px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.seriesPathValue
|
.seriesPathValue
|
||||||
{
|
{
|
||||||
display: block;
|
display: block;
|
||||||
@ -35,7 +32,6 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@if (Model.ExistingSeries.Count == 0)
|
@if (Model.ExistingSeries.Count == 0)
|
||||||
{
|
{
|
||||||
<h3 style="color: tomato">
|
<h3 style="color: tomato">
|
||||||
@ -44,18 +40,10 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<h3>
|
@Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector masterQualitySelector" })
|
||||||
Series Ready to be added.
|
|
||||||
@Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector masterQualitySelector" })
|
|
||||||
</h3>
|
|
||||||
<div>
|
|
||||||
|
|
||||||
</div>
|
foreach (var series in Model.ExistingSeries)
|
||||||
|
{
|
||||||
}
|
|
||||||
|
|
||||||
@foreach (var series in Model.ExistingSeries)
|
|
||||||
{
|
|
||||||
<div class="existingSeries">
|
<div class="existingSeries">
|
||||||
<span class="seriesPathValue">
|
<span class="seriesPathValue">
|
||||||
@Html.Label(series.Item1)
|
@Html.Label(series.Item1)
|
||||||
@ -64,8 +52,9 @@ else
|
|||||||
<input class="seriesLookup" type="text" style="width: 400px;" value="@series.Item2" />
|
<input class="seriesLookup" type="text" style="width: 400px;" value="@series.Item2" />
|
||||||
@Html.Hidden("seriesId", series.Item3, new { @class = "seriesId" })
|
@Html.Hidden("seriesId", series.Item3, new { @class = "seriesId" })
|
||||||
@Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector" })
|
@Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector" })
|
||||||
|
<button class="addExistingButton">
|
||||||
<button class="addExistingButton">Add</button>
|
Add</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,17 +5,28 @@ Add Series
|
|||||||
{
|
{
|
||||||
<script type="text/javascript" src="../../Scripts/NzbDrone/addSeries.js"></script>
|
<script type="text/javascript" src="../../Scripts/NzbDrone/addSeries.js"></script>
|
||||||
}
|
}
|
||||||
<h2>
|
|
||||||
Add New Series</h2>
|
|
||||||
<div id="addNewSeries">
|
|
||||||
@{ Html.RenderAction("AddNew", "AddSeries"); }
|
|
||||||
</div>
|
|
||||||
<h2>
|
|
||||||
Add Series Already on Disk</h2>
|
|
||||||
<h3>
|
|
||||||
Manage Root Folders
|
|
||||||
</h3>
|
|
||||||
@{Html.RenderAction("RootDir");}
|
@{Html.RenderAction("RootDir");}
|
||||||
<div id="existingSeries">
|
<div class="jquery-accordion">
|
||||||
@{ Html.RenderAction("ExistingSeries", "AddSeries"); }
|
<h3>
|
||||||
|
<a href="#">Add New Series</a></h3>
|
||||||
|
<div>
|
||||||
|
@{ Html.RenderAction("AddNew", "AddSeries"); }
|
||||||
|
</div>
|
||||||
|
<h3>
|
||||||
|
<a href="#">Add Series Already on Disk</a></h3>
|
||||||
|
<div>
|
||||||
|
@{ Html.RenderAction("ExistingSeries", "AddSeries"); }
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@*<div class="jquery-tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#newSeriesTab">Add New Series</a></li>
|
||||||
|
<li><a href="#existingSeriesTab">Add Series Already on Disk</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="newSeriesTab" style="min-height: 200px">
|
||||||
|
@{ Html.RenderAction("AddNew", "AddSeries"); }
|
||||||
|
</div>
|
||||||
|
<div id="existingSeriesTab">
|
||||||
|
@{ Html.RenderAction("ExistingSeries", "AddSeries"); }
|
||||||
|
</div>
|
||||||
|
</div>*@
|
@ -1,6 +1,6 @@
|
|||||||
<style>
|
<h2>
|
||||||
</style>
|
Manage Root Folders
|
||||||
|
</h2>
|
||||||
<span>
|
<span>
|
||||||
<input id="rootDirInput" class="folderLookup" type="text" style="width: 400px" />
|
<input id="rootDirInput" class="folderLookup" type="text" style="width: 400px" />
|
||||||
<button id="saveDir">
|
<button id="saveDir">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@model IEnumerable<String>
|
@model IEnumerable<String>
|
||||||
@if (Model.Count() == 0)
|
@if (!Model.Any())
|
||||||
{
|
{
|
||||||
<div class="actionButton delete">
|
<div class="actionButton delete">
|
||||||
<span>You have no root folders added.</span>
|
<span>You have no root folders added.</span>
|
||||||
|
@ -2,15 +2,8 @@
|
|||||||
{
|
{
|
||||||
Settings
|
Settings
|
||||||
}
|
}
|
||||||
@section Scripts
|
|
||||||
{
|
<div class="jquery-tabs">
|
||||||
<script type="text/javascript">
|
|
||||||
$(function () {
|
|
||||||
$("#tabs222").tabs();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
}
|
|
||||||
<div id="tabs222">
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>@Html.ActionLink("Naming", "Naming", "Settings")</li>
|
<li>@Html.ActionLink("Naming", "Naming", "Settings")</li>
|
||||||
<li>@Html.ActionLink("Indexers", "Indexers", "Settings")</li>
|
<li>@Html.ActionLink("Indexers", "Indexers", "Settings")</li>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" }))
|
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "IndexersForm", name = "IndexersForm", @class = "settingsForm" }))
|
||||||
{
|
{
|
||||||
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
|
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
|
||||||
<div id="accordion">
|
<div class="jquery-accordion">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="#">NZBs.org</a></h3>
|
<a href="#">NZBs.org</a></h3>
|
||||||
<div class="indexerPanel">
|
<div class="indexerPanel">
|
||||||
@ -111,7 +111,6 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@section Scripts{
|
@section Scripts{
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#addItem").live('click', function () {
|
$("#addItem").live('click', function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -124,14 +123,6 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$(function () {
|
|
||||||
$("#accordion").accordion({
|
|
||||||
autoHeight: false
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var deleteNewznabProviderUrl = '@Url.Action("DeleteNewznabProvider", "Settings")';
|
var deleteNewznabProviderUrl = '@Url.Action("DeleteNewznabProvider", "Settings")';
|
||||||
|
|
||||||
function deleteProvider(id) {
|
function deleteProvider(id) {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<div id="stylized">
|
<div id="stylized">
|
||||||
@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "NotificationForm", name = "NotificationForm", @class = "settingsForm" }))
|
@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "NotificationForm", name = "NotificationForm", @class = "settingsForm" }))
|
||||||
{
|
{
|
||||||
<div id="accordion2">
|
<div class="jquery-accordion">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="#">XBMC</a></h3>
|
<a href="#">XBMC</a></h3>
|
||||||
@{Html.RenderPartial("Xbmc", Model);}
|
@{Html.RenderPartial("Xbmc", Model);}
|
||||||
@ -55,14 +55,7 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@section Scripts{
|
@section Scripts{
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
|
||||||
$("#accordion2").accordion({
|
|
||||||
autoHeight: false
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
//Twitter
|
//Twitter
|
||||||
getAuthorizationUrl = '../Command/GetTwitterAuthorization';
|
getAuthorizationUrl = '../Command/GetTwitterAuthorization';
|
||||||
verifyAuthorizationUrl = '../Command/VerifyTwitterAuthorization';
|
verifyAuthorizationUrl = '../Command/VerifyTwitterAuthorization';
|
||||||
|
Loading…
Reference in New Issue
Block a user