Skip to content

Commit

Permalink
miq_ujs_bindings - fix wrong spacing of if body
Browse files Browse the repository at this point in the history
  • Loading branch information
himdel committed Oct 19, 2017
1 parent cfd0b18 commit 7a5787c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/assets/javascripts/miq_ujs_bindings.js
Expand Up @@ -41,13 +41,19 @@ $(document).ready(function () {
// Bind the MIQ spinning Q to configured links
$(document).on('ajax:beforeSend', 'a[data-miq_sparkle_on]', function () {
// Return only if data-miq_sparkle_on is set to false
if ($(this).data('miq_sparkle_on') === false) { return; }
if ($(this).data('miq_sparkle_on') === false) {
return;
}

// Call to miqSparkleOn since miqSparkle(true) checks XHR count, which is 0 before send
miqSparkleOn();
});
$(document).on('ajax:complete', 'a[data-miq_sparkle_off]', function () {
// Return only if data-miq_sparkle_off is set to false
if ($(this).data('miq_sparkle_off') === false) { return; }
if ($(this).data('miq_sparkle_off') === false) {
return;
}

miqSparkle(false);
});

Expand Down

0 comments on commit 7a5787c

Please sign in to comment.