mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
Fixed a bug in the Login and added a unit test to cover that.
Added a button to approve an individual request. Fixed some minor bugs in the request screen
This commit is contained in:
parent
e6bd71a359
commit
452ad07ba0
17 changed files with 238 additions and 25 deletions
|
@ -13,6 +13,7 @@ var tvimer = 0;
|
|||
movieLoad();
|
||||
tvLoad();
|
||||
|
||||
// Approve all
|
||||
$('#approveAll').click(function () {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
|
@ -127,6 +128,34 @@ $(document).on("click", ".delete", function (e) {
|
|||
|
||||
});
|
||||
|
||||
// Approve single request
|
||||
$(document).on("click", ".approve", function (e) {
|
||||
e.preventDefault();
|
||||
var buttonId = e.target.id;
|
||||
var $form = $('#approve' + buttonId);
|
||||
|
||||
$.ajax({
|
||||
type: $form.prop('method'),
|
||||
url: $form.prop('action'),
|
||||
data: $form.serialize(),
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
|
||||
if (checkJsonResponse(response)) {
|
||||
generateNotify("Success! Request Approved.", "success");
|
||||
|
||||
$("button[custom-button='" + buttonId + "']").remove();
|
||||
$("#" + buttonId + "notapproved").prop("class", "fa fa-check");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Clear issues
|
||||
$(document).on("click", ".clear", function (e) {
|
||||
e.preventDefault();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue