diff --git a/data/interfaces/default/info.html b/data/interfaces/default/info.html index 1c1e8f4b..f710532a 100644 --- a/data/interfaces/default/info.html +++ b/data/interfaces/default/info.html @@ -394,6 +394,25 @@ DOCUMENTATION :: END
+ % endif @@ -536,6 +555,31 @@ DOCUMENTATION :: END complete: function(xhr, status) { $("#search-results-list").html(xhr.responseText); } }); + $(document).on('click', '#search-results-list a', function (e) { + e.preventDefault(); + var new_rating_key = $(this).attr("id"); + var new_href = $(this).attr("href"); + + $('#new_title').text($(this).find('.item-children-instance-text-wrapper').text()); + + $('#confirm-modal').modal(); + $('#confirm-modal').one('click', '#confirm-update', function () { + var msg = " Updating database..." + showMsg(msg, false, false, 0) + + $.ajax({ + url: 'update_history_rating_key', + data: { old_rating_key: "${query['rating_key']}", + new_rating_key: new_rating_key, + media_type: "${query['media_type']}" + }, + async: false, + success: function (data) { + window.location.href = new_href; + } + }); + }); + }); % endif