Ombi/PlexRequests.UI/Content/site.js
Jamie Rees 452ad07ba0 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
2016-03-10 19:58:32 +00:00

25 lines
570 B
JavaScript

function generateNotify(message, type) {
// type = danger, warning, info, successs
$.notify({
// options
message: message
}, {
// settings
type: type,
animate: {
enter: 'animated bounceInDown',
exit: 'animated bounceOutUp'
},
newest_on_top: true
});
}
function checkJsonResponse(response) {
if (response.result === true) {
return true;
} else {
generateNotify(response.message, "warning");
return false;
}
}