Skip to content

Commit

Permalink
js/loader: disable click handler block on refresh
Browse files Browse the repository at this point in the history
This used to be ways too slow when many elements where involved. Left
the old code there as a reminder. In case we really need it we should
use something faster like an overlay or so.
  • Loading branch information
Thomas-Gelf committed Nov 1, 2014
1 parent f095489 commit f25f4f0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions public/js/icinga/loader.js
Expand Up @@ -691,11 +691,12 @@
var $content = $('<div>' + content + '</div>');

// Disable all click events while rendering
$('*').click(function (event) {
event.stopImmediatePropagation();
event.stopPropagation();
event.preventDefault();
});
// (Disabling disabled, was ways too slow)
// $('*').click(function (event) {
// event.stopImmediatePropagation();
// event.stopPropagation();
// event.preventDefault();
// });

$('.container', $container).each(function() {
self.stopPendingRequestsFor($(this));
Expand Down Expand Up @@ -738,8 +739,8 @@
icinga.ui.initializeControls($container);
icinga.ui.fixControls();

// Re-enable all click events
$('*').off('click');
// Re-enable all click events (disabled as of performance reasons)
// $('*').off('click');
},

/**
Expand Down

0 comments on commit f25f4f0

Please sign in to comment.