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

pjax: Fixup sub navigation changes

parent 4320e049
Branches
Tags
No related merge requests found
......@@ -280,4 +280,5 @@ $(function() {
};
findRichtextBoxes();
$(document).ajaxStop(findRichtextBoxes);
$(document).on('pjax:success', findRichtextBoxes);
});
......@@ -623,8 +623,20 @@ getConfig = (function() {
dataType: 'json',
success: function (json_config) {
dfd.resolve(json_config);
},
error: function() {
requested = null;
}
});
return dfd;
}
})();
$(document).on('pjax:start', function() { clearInterval(window.ticket_refresh); });
$(document).on('click', 'a', function() {
var ul = $(this).closest('ul');
if (ul.is('#sub_nav')) {
$('a.active', ul).removeClass('active');
$(this).addClass('active');
}
});
......@@ -617,8 +617,7 @@ if($ticket) {
//set refresh rate if the user has it configured
if(!$_POST && !$_REQUEST['a'] && ($min=$thisstaff->getRefreshRate()))
$ost->addExtraHeader('',
"clearInterval(window.ticket_refresh);
window.ticket_refresh = setTimeout(function() { $.pjax({url: document.location.href, container:'#content'});},"
"window.ticket_refresh = setTimeout(function() { $.pjax({url: document.location.href, container:'#content'});},"
.($min*60000).");");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment