mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
All Sln changes
This commit is contained in:
parent
b5855f2644
commit
796f0fc188
615 changed files with 68 additions and 747 deletions
70
Ombi.UI/Content/issue-details.js
Normal file
70
Ombi.UI/Content/issue-details.js
Normal file
|
@ -0,0 +1,70 @@
|
|||
var base = $('#baseUrl').text();
|
||||
|
||||
|
||||
// Note Modal click
|
||||
$(".theNoteSaveButton").click(function (e) {
|
||||
var comment = $("#noteArea").val();
|
||||
e.preventDefault();
|
||||
|
||||
var $form = $("#noteForm");
|
||||
var data = $form.serialize();
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: $form.prop("action"),
|
||||
data: data,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (checkJsonResponse(response)) {
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
// 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
|
||||
|
||||
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");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue