You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/NzbDrone.Web/Views/AddSeries/RootDir.cshtml

45 lines
1.4 KiB

14 years ago
@using NzbDrone.Web.Models
@model IEnumerable<String>
@{
Layout = null;
}
14 years ago
<div id="rootDirs">
@foreach (var root in Model)
{
<div class="actionButton delete">
<img src="/Content/Images/x_16.png" alt="delete" id='@root'/>
<span>@root</span>
</div>
}
</div>
<br />
<label for="ac-input">
Enter a GitHub username:</label>
<input id="rootDirInput" type="text" style="width: 100px" />
<button id="saveDir">
Save</button>
@(Html.Telerik().ScriptRegistrar().DefaultGroup(c => c.Add("http://ajax.googleapis.com/ajax/libs/yui/3.3.0/build/yui/yui-min.js")
.Add("AutoComplete.js")
).OnDocumentReady("bindFolderAutoComplete('#rootDirInput')"))
<script type="text/javascript">
14 years ago
$(document).ready(function () {
$('#saveDir').click(saveRootDir);
14 years ago
function saveRootDir() {
var path = $("#rootDirInput").val();
$.post("/AddSeries/SaveRootDir", { Path: path });
}
});
14 years ago
$(document).ready(function () {
$('#rootDirs .actionButton img').live('click',
function (image) {
var path = $(image.srcElement).attr('id');
$.post("/AddSeries/DeleteRootDir", { Path: path });
});
});
</script>