mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Implimented the features #218
This commit is contained in:
parent
4cf01fb9c4
commit
00cd6969e0
11 changed files with 277 additions and 150 deletions
41
PlexRequests.UI/Content/search.js
vendored
41
PlexRequests.UI/Content/search.js
vendored
|
@ -51,21 +51,6 @@ $(function () {
|
|||
});
|
||||
focusSearch($('li.active a', '#nav-tabs').first().attr('href'));
|
||||
|
||||
// Get the user notification setting
|
||||
var url = createBaseUrl(base, '/search/notifyuser/');
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
$('#notifyUser').prop("checked", response);
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
|
||||
// Type in movie search
|
||||
$("#movieSearchContent").on("input", function () {
|
||||
if (searchTimer) {
|
||||
|
@ -184,32 +169,6 @@ $(function () {
|
|||
sendRequestAjax(data, type, url, buttonId);
|
||||
});
|
||||
|
||||
// Enable/Disable user notifications
|
||||
$('#saveNotificationSettings')
|
||||
.click(function (e) {
|
||||
e.preventDefault();
|
||||
var url = createBaseUrl(base, '/search/notifyuser/');
|
||||
var checked = $('#notifyUser').prop('checked');
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
data: { notify: checked },
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.result === true) {
|
||||
generateNotify(response.message || "Success!", "success");
|
||||
} else {
|
||||
generateNotify(response.message, "warning");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Report Issue
|
||||
$(document).on("click", ".dropdownIssue", function (e) {
|
||||
var issue = $(this).attr("issue-select");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue