mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 05:16:34 +02:00
Ajax Links are all handled by jQuery now, no more MvcAjax handlers.
This commit is contained in:
@@ -42,4 +42,21 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//Make .ajaxLink use jQuery Ajax for the request
|
||||
|
||||
$(document).on('click', '.ajaxLink', function (event) {
|
||||
event.preventDefault();
|
||||
var onSuccess = $(this).attr('onsuccess');
|
||||
$.ajax({
|
||||
url: this.href,
|
||||
cache: false,
|
||||
success: function () {
|
||||
if (onSuccess) {
|
||||
window[onSuccess]();
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
@@ -1,6 +1,6 @@
|
||||
/* Click on row, show details */
|
||||
$('.seriesTable a, .dataTable a').live('click', function (event) {
|
||||
if ($(this).attr('onclick'))
|
||||
$(document).on('click', '.seriesTable a, .dataTable a', function (event) {
|
||||
if ($(this).hasClass('ajaxLink') || $(this).attr('onclick'))
|
||||
return;
|
||||
|
||||
event.preventDefault();
|
||||
@@ -48,8 +48,8 @@ function fnFormatDetails(nTr) {
|
||||
|
||||
//Create Image
|
||||
function createImageAjaxLink(url, image, alt, title, classes) {
|
||||
var html = "<a onclick=\"Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace });\" href=\"" + url + "\">" +
|
||||
"<img class=\"" + classes + "\" src=\"" + image + "\" title=\"" + title + "\" alt=\"" + alt + "\"></a>";
|
||||
var html = '<a href="' + url + '" class="ajaxLink">' +
|
||||
'<img class="' + classes + '" src="' + image + '" title="' + title + '" alt="' + alt + '" /></a>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
Reference in New Issue
Block a user