mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 08:42:57 -07:00
parent
ffc0ec34c4
commit
7b57e3fffc
6 changed files with 433 additions and 429 deletions
|
@ -57,10 +57,6 @@ namespace PlexRequests.Core
|
|||
var version = CheckSchema();
|
||||
if (version > 0)
|
||||
{
|
||||
if (version > 1700 && version <= 1799)
|
||||
{
|
||||
MigrateToVersion1700();
|
||||
}
|
||||
if (version > 1799 && version <= 1800)
|
||||
{
|
||||
MigrateToVersion1800();
|
||||
|
|
26
PlexRequests.UI/Content/issue-details.js
vendored
26
PlexRequests.UI/Content/issue-details.js
vendored
|
@ -30,17 +30,41 @@ $(".theNoteSaveButton").click(function (e) {
|
|||
$('#noteModal').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget); // Button that triggered the modal
|
||||
var id = button.data('identifier'); // Extract info from data-* attributes
|
||||
|
||||
var issue = button.data('issue');
|
||||
var modal = $(this);
|
||||
modal.find('.theNoteSaveButton').val(id); // Add ID to the button
|
||||
var requestField = modal.find('.noteId');
|
||||
requestField.val(id); // Add ID to the hidden field
|
||||
|
||||
var noteType = modal.find('.issue');
|
||||
|
||||
noteType.val(issue);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('.delete').click(function(e) {
|
||||
e.preventDefault();
|
||||
var url = createBaseUrl(base, "/issues");
|
||||
var $form = $("#removeForm");
|
||||
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: $form.prop("action"),
|
||||
data: $form.serialize(),
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (checkJsonResponse(response)) {
window.location.replace(url);
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace PlexRequests.UI.Modules
|
|||
Get["/issuecount", true] = async (x, ct) => await IssueCount();
|
||||
Get["/tabCount", true] = async (x, ct) => await TabCount();
|
||||
|
||||
Post["/issuecomment", true] = async (x, ct) => await ReportRequestIssue((int)Request.Form.provierId, IssueState.Other, (string)Request.Form.commentArea);
|
||||
Post["/issuecomment", true] = async (x, ct) => await ReportRequestIssue((int)Request.Form.providerId, IssueState.Other, (string)Request.Form.commentArea);
|
||||
|
||||
Post["/nonrequestissue", true] = async (x, ct) => await ReportNonRequestIssue((int)Request.Form.providerId, (string)Request.Form.type, (IssueState)(int)Request.Form.issue, null);
|
||||
|
||||
|
@ -369,7 +369,8 @@ namespace PlexRequests.UI.Modules
|
|||
this.RequiresClaims(UserClaims.Admin);
|
||||
var issue = await IssuesService.GetAsync(issueId);
|
||||
var request = await RequestService.GetAsync(issue.RequestId);
|
||||
|
||||
if (request.Id > 0)
|
||||
{
|
||||
request.IssueId = 0; // No issue;
|
||||
|
||||
var result = await RequestService.UpdateRequestAsync(request);
|
||||
|
@ -377,8 +378,13 @@ namespace PlexRequests.UI.Modules
|
|||
{
|
||||
await IssuesService.DeleteIssueAsync(issueId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await IssuesService.DeleteIssueAsync(issueId);
|
||||
}
|
||||
|
||||
return Response.AsJson(new JsonResponseModel() { Result = true });
|
||||
return Response.AsJson(new JsonResponseModel { Result = true });
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
}
|
||||
@if (Model.IssueStatus == IssueStatus.ResolvedIssue)
|
||||
{
|
||||
<form action="@formAction/issues/remove" method="post">
|
||||
<form action="@formAction/issues/remove" method="post" id="removeForm">
|
||||
<input id="issueId" name="issueId" value="@Model.Id" hidden="hidden" />
|
||||
<button type="submit" id="@Model.Id" class="btn btn-sm btn-danger-outline dropdown-toggle delete">Remove</button>
|
||||
</form>
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
|
||||
@using PlexRequests.UI.Helpers
|
||||
@inherits PlexRequests.UI.Helpers.EmptyViewBase<PlexRequests.UI.Models.LandingPageViewModel>
|
||||
|
||||
<img class="landing-header" src="~/Content/images/logo.png" width="300" />
|
||||
@{
|
||||
var baseUrl = Html.GetBaseUrl();
|
||||
var formAction = string.Empty;
|
||||
if (!string.IsNullOrEmpty(baseUrl.ToHtmlString()))
|
||||
{
|
||||
formAction = "/" + baseUrl.ToHtmlString();
|
||||
}
|
||||
}
|
||||
<img class="landing-header" src="@formAction/Content/images/logo.png" width="300" />
|
||||
<div id="area" class="landing-block">
|
||||
@if (Model.NoticeEnable && (!Model.EnabledNoticeTime || Model.NoticeActive))
|
||||
{
|
||||
|
|
|
@ -239,10 +239,6 @@
|
|||
<li><a id="{{requestId}}" issue-select="2" class="dropdownIssue" href="#">Wrong Content</a></li>
|
||||
<li><a id="{{requestId}}" issue-select="3" class="dropdownIssue" href="#">Playback Issues</a></li>
|
||||
<li><a id="{{requestId}}" issue-select="4" class="dropdownIssue" data-identifier="{{requestId}}" href="#" data-toggle="modal" data-target="#myModal">Other</a></li>
|
||||
|
||||
{{#if_eq admin true}}
|
||||
<li><a id="{{requestId}}" issue-select="4" class="note" data-identifier="{{requestId}}" href="#" data-toggle="modal" data-target="#noteModal">Add Note</a></li>
|
||||
{{/if_eq}}
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -347,10 +343,6 @@
|
|||
<li><a id="{{requestId}}" issue-select="2" class="dropdownIssue" href="#">Wrong Content</a></li>
|
||||
<li><a id="{{requestId}}" issue-select="3" class="dropdownIssue" href="#">Playback Issues</a></li>
|
||||
<li><a id="{{requestId}}" issue-select="4" class="dropdownIssue" data-identifier="{{requestId}}" href="#" data-toggle="modal" data-target="#myModal">Other</a></li>
|
||||
|
||||
{{#if_eq admin true}}
|
||||
<li><a id="{{requestId}}" issue-select="4" class="note" data-identifier="{{requestId}}" href="#" data-toggle="modal" data-target="#noteModal">Add Note</a></li>
|
||||
{{/if_eq}}
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -370,7 +362,7 @@
|
|||
</div>
|
||||
<form method="POST" action="@formAction/issues/issuecomment" id="commentForm">
|
||||
<div class="modal-body">
|
||||
<input name="requestId" class="requestId" type="text" hidden="hidden" value="" />
|
||||
<input name="providerId" class="providerId" type="text" hidden="hidden" value="" />
|
||||
<textarea class="form-control form-control-custom" rows="3" id="commentArea" name="commentArea"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
@ -382,27 +374,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="noteModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button>
|
||||
<h4 class="modal-title">Add a note</h4>
|
||||
</div>
|
||||
<form method="POST" action="@formAction/requests/addnote" id="noteForm">
|
||||
<div class="modal-body">
|
||||
<input name="requestId" class="noteId" type="text" hidden="hidden" value="" />
|
||||
<textarea class="form-control form-control-custom" rows="3" id="noteArea" name="noteArea"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger-outline" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary-outline theNoteSaveButton" data-dismiss="modal">Save changes</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.LoadRequestAssets()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue