mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-25 09:18:34 +00:00
fixed some css issues. added quality to each add existing item
This commit is contained in:
parent
dd9032348e
commit
7a16a907a4
4 changed files with 47 additions and 36 deletions
|
@ -8,12 +8,19 @@ body
|
||||||
{
|
{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: #191919 url(images/img07.jpg) no-repeat right top;
|
background: #191919 url(images/img07.jpg) no-repeat right top;
|
||||||
font-family: "Segoe UI" , Tahoma, Geneva, sans-serif;
|
font-family: "Segoe UI" , "Segoe UI Light" , Tahoma, Geneva, sans-serif;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #3C3C3C;
|
color: #3C3C3C;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fieldset
|
||||||
|
{
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #065EFE;
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
h1
|
h1
|
||||||
{
|
{
|
||||||
font-size: 52px;
|
font-size: 52px;
|
||||||
|
@ -138,7 +145,8 @@ hr
|
||||||
|
|
||||||
#logo
|
#logo
|
||||||
{
|
{
|
||||||
font-family: Segoe UI Light, Tahoma, Geneva, sans-serif;
|
font-family: "Segoe UI Light" , "Segoe UI" , Tahoma, Geneva, sans-serif;
|
||||||
|
font-weight: 100;
|
||||||
height: 135px;
|
height: 135px;
|
||||||
background: url(images/img03.jpg) no-repeat left top;
|
background: url(images/img03.jpg) no-repeat left top;
|
||||||
font-size: 90px;
|
font-size: 90px;
|
||||||
|
@ -161,6 +169,11 @@ hr
|
||||||
border-color: #EEEEEE;
|
border-color: #EEEEEE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.t-combobox, .t-dropdown
|
||||||
|
{
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
/* Footer */
|
/* Footer */
|
||||||
.timer
|
.timer
|
||||||
{
|
{
|
||||||
|
@ -216,7 +229,7 @@ hr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button
|
button, input[type="button"], input[type="submit"], input[type="reset"]
|
||||||
{
|
{
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #065EFE;
|
background-color: #065EFE;
|
||||||
|
@ -228,7 +241,8 @@ input[type="button"], input[type="submit"], input[type="reset"], input[type="fil
|
||||||
|
|
||||||
.listButton
|
.listButton
|
||||||
{
|
{
|
||||||
padding: 1px 10px 2px 10px;
|
padding: 2px 10px 2px 10px;
|
||||||
|
vertical-align: middle;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,13 +60,6 @@ namespace NzbDrone.Web.Controllers
|
||||||
|
|
||||||
public ActionResult AddExisting()
|
public ActionResult AddExisting()
|
||||||
{
|
{
|
||||||
var defaultQuality = _configProvider.DefaultQualityProfile;
|
|
||||||
var profiles = _qualityProvider.GetAllProfiles();
|
|
||||||
var selectList = new SelectList(profiles, "QualityProfileId", "Name");
|
|
||||||
|
|
||||||
ViewData["QualityProfileId"] = defaultQuality;
|
|
||||||
ViewData["QualitySelectList"] = selectList;
|
|
||||||
|
|
||||||
var unmappedList = new List<String>();
|
var unmappedList = new List<String>();
|
||||||
|
|
||||||
foreach (var folder in _rootFolderProvider.GetAll())
|
foreach (var folder in _rootFolderProvider.GetAll())
|
||||||
|
@ -85,6 +78,14 @@ namespace NzbDrone.Web.Controllers
|
||||||
ViewData["guid"] = Guid.NewGuid();
|
ViewData["guid"] = Guid.NewGuid();
|
||||||
ViewData["path"] = path;
|
ViewData["path"] = path;
|
||||||
ViewData["javaPath"] = path.Replace(Path.DirectorySeparatorChar, '|').Replace(Path.VolumeSeparatorChar, '^');
|
ViewData["javaPath"] = path.Replace(Path.DirectorySeparatorChar, '|').Replace(Path.VolumeSeparatorChar, '^');
|
||||||
|
|
||||||
|
var qualityProfiles = _qualityProvider.GetAllProfiles();
|
||||||
|
ViewData["quality"] = new SelectList(
|
||||||
|
qualityProfiles,
|
||||||
|
"QualityProfileId",
|
||||||
|
"Name",
|
||||||
|
"HD");
|
||||||
|
|
||||||
return PartialView("AddSeriesItem", suggestions);
|
return PartialView("AddSeriesItem", suggestions);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -111,7 +112,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
Data = suggestions
|
Data = suggestions
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public SelectList GetSuggestionList(string searchString)
|
public SelectList GetSuggestionList(string searchString)
|
||||||
{
|
{
|
||||||
var dataVal = _tvDbProvider.SearchSeries(searchString);
|
var dataVal = _tvDbProvider.SearchSeries(searchString);
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
Add Existing Series
|
Add Existing Series
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||||||
<%: Html.DropDownList("qualityProfileId", (SelectList)ViewData["QualitySelectList"], ViewData["QualityProfileId"])%>
|
|
||||||
<%
|
<%
|
||||||
foreach (var path in Model)
|
foreach (var path in Model)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,34 +1,31 @@
|
||||||
@model SelectList
|
@using NzbDrone.Core.Repository.Quality
|
||||||
<div style="position: relative; padding: 10px" id="div_ @ViewData["guid"]">
|
@model SelectList
|
||||||
<div style="position: relative; left: 0; width: 50%;">
|
<div padding: 10px" id="div_@(ViewData["guid"])">
|
||||||
@ViewData["path"].ToString()
|
<fieldset>
|
||||||
</div>
|
<legend>@ViewData["path"].ToString()</legend>
|
||||||
<div style="position: relative; right: 0; width: 50%;">
|
<div>
|
||||||
@(Html.Telerik().ComboBox()
|
@{Html.Telerik().ComboBox()
|
||||||
.Name(ViewData["guid"].ToString())
|
.Name("seriesList_" + ViewData["guid"].ToString())
|
||||||
// .AutoFill(true)
|
|
||||||
.BindTo(Model)
|
.BindTo(Model)
|
||||||
// .DataBinding(b => b.Ajax().Select("TvDbLookup", "AddSeries"))
|
.DataBinding(binding => binding.Ajax().Select("_textLookUp", "AddSeries").Delay(400).Cache(false))
|
||||||
.DataBinding(binding => binding.Ajax().Select("_textLookUp", "AddSeries").Delay(400).Cache(false))
|
|
||||||
|
|
||||||
.Filterable(f => f.FilterMode(AutoCompleteFilterMode.Contains))
|
.Filterable(f => f.FilterMode(AutoCompleteFilterMode.Contains))
|
||||||
.HighlightFirstMatch(true)
|
.HighlightFirstMatch(true)
|
||||||
.HtmlAttributes(new { style = "width:70%; align:right" })
|
.HtmlAttributes(new { style = "width: 300px;" })
|
||||||
.SelectedIndex(0))
|
.SelectedIndex(0).Render();}
|
||||||
<button class="listButton" onclick="addSeries('@ViewData["guid"]','@ViewData["javaPath"].ToString()' )">
|
@Html.Telerik().DropDownList().Name("qualityList_" + ViewData["guid"].ToString()).BindTo((SelectList)ViewData["quality"]).HtmlAttributes(new { style = "width: 100px;" })
|
||||||
Add</button>
|
<button class="listButton" onclick="addSeries('@ViewData["guid"]','@ViewData["javaPath"].ToString()' )">
|
||||||
</div>
|
Add</button>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
|
|
||||||
|
|
||||||
var addSeriesUrl = '@Url.Action("AddSeries", "AddSeries")';
|
var addSeriesUrl = '@Url.Action("AddSeries", "AddSeries")';
|
||||||
|
|
||||||
|
|
||||||
function addSeries(guid, path) {
|
function addSeries(guid, path) {
|
||||||
var qualityProfileId = $("#qualityProfileId").val();
|
var seriesComboBox = $("#seriesList_" + guid).data("tComboBox");
|
||||||
var comboBox = $("#" + guid).data("tComboBox");
|
var qualityComboBox = $("#qualityList_" + guid).data("tDropDownList");
|
||||||
sendToServer(comboBox.value(), path, qualityProfileId);
|
sendToServer(seriesComboBox.value(), path, qualityComboBox.value());
|
||||||
$("#div_" + guid).hide();
|
$("#div_" + guid).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +35,7 @@
|
||||||
url: addSeriesUrl,
|
url: addSeriesUrl,
|
||||||
data: jQuery.param({ path: path, seriesId: id, qualityProfileId: quality }),
|
data: jQuery.param({ path: path, seriesId: id, qualityProfileId: quality }),
|
||||||
error: function (req, status, error) {
|
error: function (req, status, error) {
|
||||||
alert("Sorry! We could not add " + this.name + "at this time. " + error);
|
alert("Sorry! We could not add " + path + " at this time. " + error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue