1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-30 23:42:33 +01:00

fixed some css issues. added quality to each add existing item

This commit is contained in:
kay.one 2011-04-03 18:31:27 -07:00
parent dd9032348e
commit 7a16a907a4
4 changed files with 47 additions and 36 deletions

View File

@ -8,12 +8,19 @@ body
{
padding: 0;
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;
color: #3C3C3C;
background-attachment: fixed;
}
fieldset
{
border-style: solid;
border-color: #065EFE;
border-width: 1px;
}
h1
{
font-size: 52px;
@ -138,7 +145,8 @@ hr
#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;
background: url(images/img03.jpg) no-repeat left top;
font-size: 90px;
@ -161,6 +169,11 @@ hr
border-color: #EEEEEE;
}
.t-combobox, .t-dropdown
{
vertical-align: middle;
}
/* Footer */
.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;
background-color: #065EFE;
@ -228,7 +241,8 @@ input[type="button"], input[type="submit"], input[type="reset"], input[type="fil
.listButton
{
padding: 1px 10px 2px 10px;
padding: 2px 10px 2px 10px;
vertical-align: middle;
margin: 0px;
}

View File

@ -60,13 +60,6 @@ namespace NzbDrone.Web.Controllers
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>();
foreach (var folder in _rootFolderProvider.GetAll())
@ -85,6 +78,14 @@ namespace NzbDrone.Web.Controllers
ViewData["guid"] = Guid.NewGuid();
ViewData["path"] = path;
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);
}
@ -111,7 +112,7 @@ namespace NzbDrone.Web.Controllers
Data = suggestions
};
}
public SelectList GetSuggestionList(string searchString)
{
var dataVal = _tvDbProvider.SearchSeries(searchString);

View File

@ -6,7 +6,6 @@
Add Existing Series
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%: Html.DropDownList("qualityProfileId", (SelectList)ViewData["QualitySelectList"], ViewData["QualityProfileId"])%>
<%
foreach (var path in Model)
{

View File

@ -1,34 +1,31 @@
@model SelectList
<div style="position: relative; padding: 10px" id="div_ @ViewData["guid"]">
<div style="position: relative; left: 0; width: 50%;">
@ViewData["path"].ToString()
</div>
<div style="position: relative; right: 0; width: 50%;">
@(Html.Telerik().ComboBox()
.Name(ViewData["guid"].ToString())
// .AutoFill(true)
@using NzbDrone.Core.Repository.Quality
@model SelectList
<div padding: 10px" id="div_@(ViewData["guid"])">
<fieldset>
<legend>@ViewData["path"].ToString()</legend>
<div>
@{Html.Telerik().ComboBox()
.Name("seriesList_" + ViewData["guid"].ToString())
.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))
.HighlightFirstMatch(true)
.HtmlAttributes(new { style = "width:70%; align:right" })
.SelectedIndex(0))
<button class="listButton" onclick="addSeries('@ViewData["guid"]','@ViewData["javaPath"].ToString()' )">
Add</button>
</div>
.HtmlAttributes(new { style = "width: 300px;" })
.SelectedIndex(0).Render();}
@Html.Telerik().DropDownList().Name("qualityList_" + ViewData["guid"].ToString()).BindTo((SelectList)ViewData["quality"]).HtmlAttributes(new { style = "width: 100px;" })
<button class="listButton" onclick="addSeries('@ViewData["guid"]','@ViewData["javaPath"].ToString()' )">
Add</button>
</div>
</fieldset>
</div>
<script type="text/javascript" language="javascript">
var addSeriesUrl = '@Url.Action("AddSeries", "AddSeries")';
function addSeries(guid, path) {
var qualityProfileId = $("#qualityProfileId").val();
var comboBox = $("#" + guid).data("tComboBox");
sendToServer(comboBox.value(), path, qualityProfileId);
var seriesComboBox = $("#seriesList_" + guid).data("tComboBox");
var qualityComboBox = $("#qualityList_" + guid).data("tDropDownList");
sendToServer(seriesComboBox.value(), path, qualityComboBox.value());
$("#div_" + guid).hide();
}
@ -38,7 +35,7 @@
url: addSeriesUrl,
data: jQuery.param({ path: path, seriesId: id, qualityProfileId: quality }),
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);
}
});
}