From 5095d30a3c45db5669ae6601d5ab944d140a4690 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 25 Feb 2017 22:52:28 +0000 Subject: [PATCH] Fixed a slight issue where we could click the change folders button rather than the dropdown arrow #1189 --- Ombi.UI/Content/requests.js | 9 +++++++-- Ombi.UI/Views/Requests/Index.cshtml | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Ombi.UI/Content/requests.js b/Ombi.UI/Content/requests.js index 132bb7232..b902c1560 100644 --- a/Ombi.UI/Content/requests.js +++ b/Ombi.UI/Content/requests.js @@ -567,16 +567,21 @@ $(document).on("click", ".change-root-folder", function (e) { e.preventDefault(); var $this = $(this); var $button = $this.parents('.btn-split').children('.change').first(); - var rootFolderId = e.target.id + var rootFolderId = e.target.id; var $form = $this.parents('form').first(); + var requestId = $button.attr('id'); + if ($button.text() === " Loading...") { return; } - loadingButton($button.attr('id'), "success"); + loadingButton(requestId, "success"); changeRootFolder($form, rootFolderId, function () { + if ($('#' + requestId + "rootPathMain").length) { + $('#' + requestId + "currentRootPath").text($this.text); + } }); }); diff --git a/Ombi.UI/Views/Requests/Index.cshtml b/Ombi.UI/Views/Requests/Index.cshtml index e94decd85..710339fe4 100644 --- a/Ombi.UI/Views/Requests/Index.cshtml +++ b/Ombi.UI/Views/Requests/Index.cshtml @@ -245,7 +245,7 @@
@UI.Requests_RequestedDate: {{requestedDate}}
{{#if admin}} {{#if currentRootPath}} -
Root Path: {{currentRootPath}}
+
Root Path: {{currentRootPath}}
{{/if}} {{/if}}
@@ -285,14 +285,14 @@ {{#if_eq hasRootFolders true}}
- +