summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/shared
diff options
context:
space:
mode:
authorLuke Bennett <lukeeeebennettplus@gmail.com>2018-04-15 16:35:32 +0100
committerLuke Bennett <lukeeeebennettplus@gmail.com>2018-04-15 16:35:32 +0100
commit3f66736fa9998174b883fa61c28550bfe80f0ad0 (patch)
tree1e847a17b243d0285d286277e34a47860b2349fb /app/assets/javascripts/shared
parent3283386a1eefd20f28382199efc5b45530ff5d79 (diff)
downloadgitlab-ce-3f66736fa9998174b883fa61c28550bfe80f0ad0.tar.gz
Revert and fix
Diffstat (limited to 'app/assets/javascripts/shared')
-rw-r--r--app/assets/javascripts/shared/popover.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/assets/javascripts/shared/popover.js b/app/assets/javascripts/shared/popover.js
index 2eb0eff11d1..3fc03553bdd 100644
--- a/app/assets/javascripts/shared/popover.js
+++ b/app/assets/javascripts/shared/popover.js
@@ -2,13 +2,12 @@ import $ from 'jquery';
import _ from 'underscore';
export function togglePopover(show) {
- const $popover = $(this);
- const isAlreadyShown = $popover.hasClass('js-popover-show');
+ const isAlreadyShown = this.hasClass('js-popover-show');
if ((show && isAlreadyShown) || (!show && !isAlreadyShown)) {
return false;
}
- $popover.popover(show ? 'show' : 'hide');
- $popover.toggleClass('disable-animation js-popover-show', show);
+ this.popover(show ? 'show' : 'hide');
+ this.toggleClass('disable-animation js-popover-show', show);
return true;
}