mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 04:49:33 -07:00
Fixed a slight issue where we could click the change folders button rather than the dropdown arrow #1189
This commit is contained in:
parent
e420d03a77
commit
5095d30a3c
2 changed files with 10 additions and 5 deletions
9
Ombi.UI/Content/requests.js
vendored
9
Ombi.UI/Content/requests.js
vendored
|
@ -567,16 +567,21 @@ $(document).on("click", ".change-root-folder", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var $button = $this.parents('.btn-split').children('.change').first();
|
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 $form = $this.parents('form').first();
|
||||||
|
|
||||||
|
var requestId = $button.attr('id');
|
||||||
|
|
||||||
if ($button.text() === " Loading...") {
|
if ($button.text() === " Loading...") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadingButton($button.attr('id'), "success");
|
loadingButton(requestId, "success");
|
||||||
|
|
||||||
changeRootFolder($form, rootFolderId, function () {
|
changeRootFolder($form, rootFolderId, function () {
|
||||||
|
if ($('#' + requestId + "rootPathMain").length) {
|
||||||
|
$('#' + requestId + "currentRootPath").text($this.text);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -245,7 +245,7 @@
|
||||||
<div>@UI.Requests_RequestedDate: {{requestedDate}}</div>
|
<div>@UI.Requests_RequestedDate: {{requestedDate}}</div>
|
||||||
{{#if admin}}
|
{{#if admin}}
|
||||||
{{#if currentRootPath}}
|
{{#if currentRootPath}}
|
||||||
<div>Root Path: {{currentRootPath}}</div>
|
<div class="{{requestId}}rootPathMain">Root Path: <span id="{{requestId}}currentRootPath">{{currentRootPath}}</span></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div>
|
<div>
|
||||||
|
@ -285,14 +285,14 @@
|
||||||
<input name="requestId" type="text" value="{{requestId}}" hidden="hidden" />
|
<input name="requestId" type="text" value="{{requestId}}" hidden="hidden" />
|
||||||
{{#if_eq hasRootFolders true}}
|
{{#if_eq hasRootFolders true}}
|
||||||
<div class="btn-group btn-split">
|
<div class="btn-group btn-split">
|
||||||
<button type="button" class="btn btn-sm btn-success-outline approve" id="{{requestId}}" custom-button="{{requestId}}">@*<i class="fa fa-plus"></i>*@ Change Root Folder</button>
|
<button type="button" class="btn btn-sm btn-success-outline" id="changeRootFolderBtn{{requestId}}" custom-button="{{requestId}}">@*<i class="fa fa-plus"></i>*@ Change Root Folder</button>
|
||||||
<button type="button" class="btn btn-success-outline dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button type="button" class="btn btn-success-outline dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
<span class="sr-only">@UI.Requests_ToggleDropdown</span>
|
<span class="sr-only">@UI.Requests_ToggleDropdown</span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
{{#each rootFolders}}
|
{{#each rootFolders}}
|
||||||
<li><a href="#" class="change-root-folder" id="{{id}}">{{path}}</a></li>
|
<li><a href="#" class="change-root-folder" id="{{id}}" requestId="{{requestId}}">{{path}}</a></li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue