mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
parent
ffc0ec34c4
commit
7b57e3fffc
6 changed files with 433 additions and 429 deletions
40
PlexRequests.UI/Content/issue-details.js
vendored
40
PlexRequests.UI/Content/issue-details.js
vendored
|
@ -27,19 +27,43 @@ $(".theNoteSaveButton").click(function (e) {
|
|||
});
|
||||
});
|
||||
// Update the note modal
|
||||
$('#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
|
||||
$('#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 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");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue