mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Adding/Deleting QualityProfiles will now save/delete the profile from the database to make the process less hacky.
RootDir and UserProfileSection do not inherit the master layout automatically.
This commit is contained in:
@@ -49,11 +49,10 @@
|
||||
</div>
|
||||
|
||||
<div id="user-profiles">
|
||||
|
||||
@foreach (var item in Model.UserProfiles)
|
||||
{
|
||||
Html.RenderPartial("UserProfileSection", item);
|
||||
}
|
||||
@foreach (var item in Model.UserProfiles)
|
||||
{
|
||||
Html.RenderAction("GetQualityProfileView", item);
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -77,8 +76,27 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
$("a.deleteRow").live("click", function () {
|
||||
$(this).parents("div.userProfileSectionEditor:first").remove();
|
||||
return false;
|
||||
});
|
||||
// $("a.deleteRow").live("click", function () {
|
||||
// $(this).parents("div.userProfileSectionEditor:first").remove();
|
||||
// return false;
|
||||
// });
|
||||
|
||||
var deleteQualityProfileUrl = '@Url.Action("DeleteQualityProfile", "Settings")';
|
||||
|
||||
function deleteProfile(id) {
|
||||
//$(this).parents("div.userProfileSectionEditor:first").remove();
|
||||
sendToServer(id);
|
||||
$("#div_" + id).hide();
|
||||
}
|
||||
|
||||
function sendToServer(id) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: deleteQualityProfileUrl,
|
||||
data: jQuery.param({ profileId: id }),
|
||||
error: function (req, status, error) {
|
||||
alert("Sorry! We could not add " + path + " at this time. " + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user