mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Updated Add Series
This commit is contained in:
parent
68321c98d0
commit
b4fb3002a4
38 changed files with 1339 additions and 867 deletions
|
@ -1,26 +1,18 @@
|
|||
<span>
|
||||
<input id="rootDirInput" type="text" style="width: 400px" />
|
||||
<input id="rootDirInput" class="folderLookup" type="text" style="width: 400px" />
|
||||
<button id="saveDir">
|
||||
Add</button>
|
||||
</span>
|
||||
<span id="rootDirs">
|
||||
</span><span id="rootDirs">
|
||||
@{Html.RenderAction("RootList");}
|
||||
</span>
|
||||
<script type="text/javascript">
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
$.ajaxSetup({
|
||||
cache: false
|
||||
});
|
||||
|
||||
bindFolderAutoComplete('#rootDirInput');
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
$('#rootDirInput').watermark('Start typing to add new root folder...');
|
||||
|
||||
$('#rootDirs .actionButton img').live('click',
|
||||
function(image) {
|
||||
function (image) {
|
||||
var path = $(image.target).attr('id');
|
||||
$.post('@Url.Action("DeleteRootDir", "AddSeries")', { Path: path }, function() {
|
||||
$.post('@Url.Action("DeleteRootDir", "AddSeries")', { Path: path }, function () {
|
||||
refreshRoot();
|
||||
});
|
||||
});
|
||||
|
@ -29,18 +21,20 @@
|
|||
|
||||
function saveRootDir() {
|
||||
var path = $("#rootDirInput").val();
|
||||
$.post('@Url.Action("SaveRootDir", "AddSeries")', { Path: path }, function() {
|
||||
refreshRoot();
|
||||
$("#rootDirInput").val('');
|
||||
});
|
||||
|
||||
if (path) {
|
||||
$.post('@Url.Action("SaveRootDir", "AddSeries")', { Path: path }, function () {
|
||||
refreshRoot();
|
||||
$("#rootDirInput").val('');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function refreshRoot() {
|
||||
$.get('@Url.Action("RootList", "AddSeries")', function(data) {
|
||||
$.get('@Url.Action("RootList", "AddSeries")', function (data) {
|
||||
$('#rootDirs').html(data);
|
||||
});
|
||||
reloadExistingSeries();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue