Skip to content
Snippets Groups Projects
Commit a75eda1d authored by Jared Hancock's avatar Jared Hancock
Browse files

tickets: Fix refresh after navigation from listing

parent a0a4421e
No related branches found
No related tags found
No related merge requests found
......@@ -1004,8 +1004,6 @@ $(document).on('pjax:start', function() {
$.toggleOverlay(false);
// Close tooltips
$('.tip_box').remove();
// Cancel refreshes
clearInterval(window.ticket_refresh);
});
$(document).on('pjax:send', function(event) {
......
......@@ -279,8 +279,7 @@ $.showImagesInline = function(urls, thread_id) {
};
$.refreshTicketView = function(interval) {
var refresh =
window.ticket_refresh = setInterval(function() {
var refresh = setInterval(function() {
if ($('table.list input.ckb[name=tids\\[\\]]:checked').length)
// Skip the refresh b/c items are checked
return;
......@@ -291,6 +290,9 @@ $.refreshTicketView = function(interval) {
clearInterval(refresh);
$.pjax({url: document.location.href, container:'#pjax-container'});
}, interval);
$(document).on('pjax:start', function() {
clearInterval(refresh);
});
};
var ticket_onload = function($) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment