mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07: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:
parent
fb9c2b6d9e
commit
88525a0b7c
7 changed files with 152 additions and 127 deletions
|
@ -5,37 +5,3 @@
|
|||
</span><span id="rootDirs">
|
||||
@{Html.RenderAction("RootList");}
|
||||
</span>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
$('#rootDirInput').watermark('Start typing to add new root folder...');
|
||||
|
||||
$('#rootDirs .actionButton img').live('click',
|
||||
function (image) {
|
||||
var path = $(image.target).attr('id');
|
||||
$.post('@Url.Action("DeleteRootDir", "AddSeries")', { Path: path }, function () {
|
||||
refreshRoot();
|
||||
});
|
||||
});
|
||||
|
||||
$('#saveDir').click(saveRootDir);
|
||||
|
||||
function saveRootDir() {
|
||||
var path = $("#rootDirInput").val();
|
||||
if (path) {
|
||||
$.post('@Url.Action("SaveRootDir", "AddSeries")', { Path: path }, function () {
|
||||
refreshRoot();
|
||||
$("#rootDirInput").val('');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function refreshRoot() {
|
||||
$.get('@Url.Action("RootList", "AddSeries")', function (data) {
|
||||
$('#rootDirs').html(data);
|
||||
});
|
||||
reloadExistingSeries();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue