From 2f415cc1fd4b59eef63d5d966b68de8fd6a11f9a Mon Sep 17 00:00:00 2001 From: tidusjar Date: Tue, 30 Aug 2016 14:46:18 +0100 Subject: [PATCH] Sorted out some of the UI for #18 --- PlexRequests.UI/Content/requests.js | 7 ++++++- PlexRequests.UI/Views/Requests/Index.cshtml | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/PlexRequests.UI/Content/requests.js b/PlexRequests.UI/Content/requests.js index 4287f875e..838039910 100644 --- a/PlexRequests.UI/Content/requests.js +++ b/PlexRequests.UI/Content/requests.js @@ -425,6 +425,7 @@ $(document).on("click", ".approve", function (e) { approveRequest($form, null, function () { $("#" + $self.attr('id') + "notapproved").prop("class", "fa fa-check"); + var $group = $self.parent('.btn-split'); if ($group.length > 0) { @@ -448,7 +449,11 @@ $(document).on("click", ".deny", function (e) { loadingButton($self.attr('id')+"deny", "success"); denyRequest($form, function () { - //$("#" + $self.attr('id') + "notapproved").prop("class", "fa fa-check"); + // Remove the form + $("#" + "deny" + $self.attr('id')).remove(); + // remove the approve button + var id = $self.attr("custom-button"); + $("#" + id).remove(); var $group = $self.parent('.btn-split'); if ($group.length > 0) { diff --git a/PlexRequests.UI/Views/Requests/Index.cshtml b/PlexRequests.UI/Views/Requests/Index.cshtml index 242163ed0..8865450d0 100644 --- a/PlexRequests.UI/Views/Requests/Index.cshtml +++ b/PlexRequests.UI/Views/Requests/Index.cshtml @@ -227,7 +227,7 @@
{{#if_eq admin true}} - {{#unless denied}} + {{#if_eq approved false}}
@@ -248,12 +248,13 @@ {{/if_eq}}
+ {{#unless denied}}
- @@ -262,8 +263,8 @@
- {{/if_eq}} {{/unless}} + {{/if_eq}}