summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2017-08-30 09:58:05 -0500
committerClement Ho <ClemMakesApps@gmail.com>2017-08-30 09:58:05 -0500
commit4a21adcc1582ef2791554efeac4e9f8bb82267f3 (patch)
tree7803d328b1c1d096f5d9b7f352c097a67af80e55
parent1ba19afd872243b19c38d2bbbe34960d46b81919 (diff)
downloadgitlab-ce-4a21adcc1582ef2791554efeac4e9f8bb82267f3.tar.gz
Improve JS
-rw-r--r--app/assets/javascripts/feature_highlight/feature_highlight.js2
-rw-r--r--app/assets/javascripts/feature_highlight/feature_highlight_helper.js6
2 files changed, 3 insertions, 5 deletions
diff --git a/app/assets/javascripts/feature_highlight/feature_highlight.js b/app/assets/javascripts/feature_highlight/feature_highlight.js
index f70f2e5f1a1..02d3e216510 100644
--- a/app/assets/javascripts/feature_highlight/feature_highlight.js
+++ b/app/assets/javascripts/feature_highlight/feature_highlight.js
@@ -16,7 +16,7 @@ export const setupFeatureHighlightPopover = (id) => {
$selector
// Setup popover
- .data('content', $popoverContent[0].outerHTML)
+ .data('content', $popoverContent.prop('outerHTML'))
.popover({
html: true,
// Override the existing template to add custom CSS classes
diff --git a/app/assets/javascripts/feature_highlight/feature_highlight_helper.js b/app/assets/javascripts/feature_highlight/feature_highlight_helper.js
index 0dd18405e86..c9e0fbfa133 100644
--- a/app/assets/javascripts/feature_highlight/feature_highlight_helper.js
+++ b/app/assets/javascripts/feature_highlight/feature_highlight_helper.js
@@ -8,8 +8,7 @@ export const showPopover = function showPopover() {
return false;
}
this.popover('show');
- this.addClass('disable-animation');
- this.addClass('js-popover-show');
+ this.addClass('disable-animation js-popover-show');
return true;
};
@@ -19,8 +18,7 @@ export const hidePopover = function hidePopover() {
return false;
}
this.popover('hide');
- this.removeClass('disable-animation');
- this.removeClass('js-popover-show');
+ this.removeClass('disable-animation js-popover-show');
return true;
};