diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2017-08-29 14:18:45 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-08-29 14:21:38 -0500 |
commit | 9e04beb6141c9774c1aa0cd767f1b5982dd6ea57 (patch) | |
tree | a89a33e2cd8a242128849e66a35db9c2a1aed7be | |
parent | 408012fa38518f4bc549371e0ce6b0c994f9b316 (diff) | |
download | gitlab-ce-9e04beb6141c9774c1aa0cd767f1b5982dd6ea57.tar.gz |
[skip ci] chain jquery
-rw-r--r-- | app/assets/javascripts/feature_highlight/feature_highlight_manager.js | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/app/assets/javascripts/feature_highlight/feature_highlight_manager.js b/app/assets/javascripts/feature_highlight/feature_highlight_manager.js index d5588d2c52b..4f3fecccfe8 100644 --- a/app/assets/javascripts/feature_highlight/feature_highlight_manager.js +++ b/app/assets/javascripts/feature_highlight/feature_highlight_manager.js @@ -37,24 +37,23 @@ export default class FeatureHighlightManager { const $parent = $selector.parent(); const $popoverContent = $parent.siblings('.feature-highlight-popover-content'); - // Setup popover - $selector.data('content', $popoverContent[0].outerHTML); - $selector.popover({ - html: true, - // Override the existing template to add custom CSS classes - template: ` - <div class="popover feature-highlight-popover" role="tooltip"> - <div class="arrow"></div> - <div class="popover-content"></div> - </div> - `, - }); - - $selector.on('mouseenter', mouseenter); - $selector.on('mouseleave', mouseleave); - $selector.on('inserted.bs.popover', setupDismissButton); - - // Display feature highlight - $selector.removeAttr('disabled'); + $selector + // Setup popover + .data('content', $popoverContent[0].outerHTML) + .popover({ + html: true, + // Override the existing template to add custom CSS classes + template: ` + <div class="popover feature-highlight-popover" role="tooltip"> + <div class="arrow"></div> + <div class="popover-content"></div> + </div> + `, + }) + .on('mouseenter', mouseenter) + .on('mouseleave', mouseleave) + .on('inserted.bs.popover', setupDismissButton) + // Display feature highlight + .removeAttr('disabled'); } } |