mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
AddSeries javascript fixes.
Add new series now has a drop box for rootdir. Moved add series javascript to addSeries.js.
This commit is contained in:
@@ -5,41 +5,10 @@
|
||||
<div>
|
||||
<input id="newSeriesLookup" class="seriesLookup" type="text" style="width: 400px" />
|
||||
</div>
|
||||
<input id="newSeriesPath" class="folderLookup" type="text" style="width: 400px" />
|
||||
@*<input id="newSeriesPath" class="folderLookup" type="text" style="width: 400px" />*@
|
||||
@Html.DropDownList("newSeriesPath", new SelectList((IList)ViewData["RootDirs"]), new { style = "width: 406px; margin-left: 0px;" })
|
||||
@Html.DropDownList("qualityList", new SelectList((IList)ViewData["QualityList"], "QualityProfileId", "Name"), new { @class = "qualitySelector" })
|
||||
<button id="saveNewSeries">
|
||||
Add</button>
|
||||
</div>
|
||||
<br />
|
||||
<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
$('#newSeriesPath').watermark('Path for the new series...');
|
||||
$('#newSeriesLookup').watermark('Title of the series you want to add...');
|
||||
|
||||
$('#saveNewSeries').click(function () {
|
||||
|
||||
var addSeriesUrl = '@Url.Action("AddNewSeries", "AddSeries")';
|
||||
var seriesTitle = $("#newSeriesLookup").val();
|
||||
var qualityId = $("#qualityList").val();
|
||||
var path = $('#newSeriesPath').val();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: addSeriesUrl,
|
||||
data: jQuery.param({ path: path, seriesName: seriesTitle, qualityProfileId: qualityId }),
|
||||
error: function (req, status, error) {
|
||||
alert("Sorry! We could not add " + path + " at this time. " + error);
|
||||
},
|
||||
success: function () {
|
||||
$("#newSeriesLookup").val("");
|
||||
$('#newSeriesPath').val("");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user