Skip to content
Snippets Groups Projects
Commit 1c80902b authored by Peter Rotich's avatar Peter Rotich
Browse files

Remove tool tips on pjax click

parent fe1daca2
Branches
Tags
No related merge requests found
...@@ -639,12 +639,20 @@ $(document).on('pjax:click', function(options) { ...@@ -639,12 +639,20 @@ $(document).on('pjax:click', function(options) {
$.autoLock.releaseLock(); $.autoLock.releaseLock();
// Stop all animations // Stop all animations
$(document).stop(false, true); $(document).stop(false, true);
// Remove tips and clear any pending timer
$('.tip, .help-tips, .userPreview, .ticketPreview, .previewfaq').each(function() {
if ($(this).data('timer'))
clearTimeout($(this).data('timer'));
});
$('.tip_box').remove();
}); });
$(document).on('pjax:start', function() { $(document).on('pjax:start', function() {
// Cancel save-changes warning banner // Cancel save-changes warning banner
$(document).unbind('pjax:beforeSend.changed'); $(document).unbind('pjax:beforeSend.changed');
$(window).unbind('beforeunload'); $(window).unbind('beforeunload');
$('.tip_box').remove();
}); });
$(document).on('pjax:send', function(event) { $(document).on('pjax:send', function(event) {
...@@ -666,13 +674,16 @@ $(document).on('pjax:complete', function() { ...@@ -666,13 +674,16 @@ $(document).on('pjax:complete', function() {
$("#loadingbar").width("101%").delay(200).fadeOut(400, function() { $("#loadingbar").width("101%").delay(200).fadeOut(400, function() {
$(this).remove(); $(this).remove();
}); });
$('.tip_box').remove();
$('.dialog .body').empty().parent().hide();
$('#overlay').stop(false, true).hide().removeAttr('style'); $('#overlay').stop(false, true).hide().removeAttr('style');
}); });
$(document).on('pjax:end', function() { $(document).on('pjax:end', function() {
// Close popups // Close popups
// Close tooltips // Close tooltips
$('.tip_box').empty().hide(); $('.tip_box').remove();
$('.dialog .body').empty().parent().hide(); $('.dialog .body').empty().parent().hide();
$('#overlay').hide(); $('#overlay').hide();
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment