Added jquery tab, accordion to autobind.

made add series page more awsome.
pull/4/head
kay.one 13 years ago
parent becd8e2dac
commit 5e386a2bc7

@ -26,6 +26,11 @@
color: #065EFE;
}
.jquery-tabs
{
margin-top: 10px;
}
/*MiniProfiler*/
.profiler-button

@ -16,10 +16,30 @@
$(this).removeAttr('disabled');
});
//All buttons are jQueryUI buttons
$('button, input[type="button"], input[type="submit"], input[type="reset"]').livequery(function () {
$(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 () {
var profileId = $(this).val();
$("#existingSeries").find(".qualitySelector").each(function () {
$("#existingSeriesTab").find(".qualitySelector").each(function () {
$(this).val(profileId);
});
});
@ -45,7 +45,7 @@ $(".addExistingButton").live('click', function () {
function reloadExistingSeries() {
$.get(existingSeriesUrl, function (data) {
$('#existingSeries').html(data);
$('#existingSeriesTab').html(data);
});
}

@ -5,26 +5,23 @@
@{
Layout = null;
}
<style>
.existingSeries
{
width: 548px;
border-color: #f2f2f2;
border-width: 1px;
border-style: solid;
background-color: #f2f2f2;
margin: 0px 10px 10px 0px;
padding-left: 10px;
padding-right: 10px;
padding: 5px;
display: block;
}
.masterQualitySelector
{
left: 202px;
position: relative;
left: 415px;
position: relative;
}
.seriesPathValue
{
display: block;
@ -35,7 +32,6 @@
position: relative;
}
</style>
@if (Model.ExistingSeries.Count == 0)
{
<h3 style="color: tomato">
@ -44,18 +40,10 @@
}
else
{
<h3>
Series Ready to be added.
@Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector masterQualitySelector" })
</h3>
<div>
</div>
}
@Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector masterQualitySelector" })
@foreach (var series in Model.ExistingSeries)
{
foreach (var series in Model.ExistingSeries)
{
<div class="existingSeries">
<span class="seriesPathValue">
@Html.Label(series.Item1)
@ -64,8 +52,9 @@ else
<input class="seriesLookup" type="text" style="width: 400px;" value="@series.Item2" />
@Html.Hidden("seriesId", series.Item3, new { @class = "seriesId" })
@Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector" })
<button class="addExistingButton">Add</button>
<button class="addExistingButton">
Add</button>
</div>
</div>
}
}

@ -5,17 +5,28 @@ Add Series
{
<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");}
<div id="existingSeries">
@{ Html.RenderAction("ExistingSeries", "AddSeries"); }
<div class="jquery-accordion">
<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 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>
</style>
<h2>
Manage Root Folders
</h2>
<span>
<input id="rootDirInput" class="folderLookup" type="text" style="width: 400px" />
<button id="saveDir">

@ -1,5 +1,5 @@
@model IEnumerable<String>
@if (Model.Count() == 0)
@if (!Model.Any())
{
<div class="actionButton delete">
<span>You have no root folders added.</span>

@ -2,15 +2,8 @@
{
Settings
}
@section Scripts
{
<script type="text/javascript">
$(function () {
$("#tabs222").tabs();
});
</script>
}
<div id="tabs222">
<div class="jquery-tabs">
<ul>
<li>@Html.ActionLink("Naming", "Naming", "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" }))
{
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
<div id="accordion">
<div class="jquery-accordion">
<h3>
<a href="#">NZBs.org</a></h3>
<div class="indexerPanel">
@ -111,7 +111,6 @@
}
</div>
@section Scripts{
<script type="text/javascript">
$("#addItem").live('click', function () {
$.ajax({
@ -124,14 +123,6 @@
return false;
});
$(function () {
$("#accordion").accordion({
autoHeight: false
});
});
var deleteNewznabProviderUrl = '@Url.Action("DeleteNewznabProvider", "Settings")';
function deleteProvider(id) {

@ -32,7 +32,7 @@
<div id="stylized">
@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new { id = "NotificationForm", name = "NotificationForm", @class = "settingsForm" }))
{
<div id="accordion2">
<div class="jquery-accordion">
<h3>
<a href="#">XBMC</a></h3>
@{Html.RenderPartial("Xbmc", Model);}
@ -55,14 +55,7 @@
}
</div>
@section Scripts{
<script type="text/javascript">
$(function () {
$("#accordion2").accordion({
autoHeight: false
});
});
//Twitter
getAuthorizationUrl = '../Command/GetTwitterAuthorization';
verifyAuthorizationUrl = '../Command/VerifyTwitterAuthorization';

Loading…
Cancel
Save