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.
45 lines
1.4 KiB
45 lines
1.4 KiB
@using NzbDrone.Web.Models
|
|
@model IEnumerable<String>
|
|
@{
|
|
Layout = null;
|
|
}
|
|
<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">
|
|
|
|
$(document).ready(function () {
|
|
$('#saveDir').click(saveRootDir);
|
|
|
|
function saveRootDir() {
|
|
var path = $("#rootDirInput").val();
|
|
$.post("/AddSeries/SaveRootDir", { Path: path });
|
|
}
|
|
});
|
|
|
|
|
|
$(document).ready(function () {
|
|
$('#rootDirs .actionButton img').live('click',
|
|
function (image) {
|
|
var path = $(image.srcElement).attr('id');
|
|
$.post("/AddSeries/DeleteRootDir", { Path: path });
|
|
});
|
|
});
|
|
|
|
</script>
|