mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
commit
3c6321f699
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();
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
<div>@UI.Requests_RequestedDate: {{requestedDate}}</div>
|
||||
{{#if admin}}
|
||||
{{#if currentRootPath}}
|
||||
<div>Root Path: {{currentRootPath}}</div>
|
||||
<div class="{{requestId}}rootPathMain">Root Path: <span id="{{requestId}}currentRootPath">{{currentRootPath}}</span></div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
<div>
|
||||
|
@ -285,14 +285,14 @@
|
|||
<input name="requestId" type="text" value="{{requestId}}" hidden="hidden" />
|
||||
{{#if_eq hasRootFolders true}}
|
||||
<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">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">@UI.Requests_ToggleDropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{{#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}}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue