Radarr/NzbDrone.Web/Views/AddSeries/RootDir.cshtml

45 lines
1.4 KiB
Plaintext
Raw Normal View History

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