BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3f66736f
Unverified
Commit
3f66736f
authored
Apr 15, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert and fix
parent
3283386a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
popover.js
app/assets/javascripts/shared/popover.js
+3
-4
feature_highlight_spec.js
spec/javascripts/feature_highlight/feature_highlight_spec.js
+1
-7
No files found.
app/assets/javascripts/shared/popover.js
View file @
3f66736f
...
...
@@ -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
;
}
...
...
spec/javascripts/feature_highlight/feature_highlight_spec.js
View file @
3f66736f
...
...
@@ -29,7 +29,6 @@ describe('feature highlight', () => {
mock
=
new
MockAdapter
(
axios
);
mock
.
onGet
(
'/test'
).
reply
(
200
);
spyOn
(
window
,
'addEventListener'
);
spyOn
(
window
,
'removeEventListener'
);
featureHighlight
.
setupFeatureHighlightPopover
(
'test'
,
0
);
});
...
...
@@ -64,12 +63,7 @@ describe('feature highlight', () => {
it
(
'setup show.bs.popover'
,
()
=>
{
$
(
selector
).
trigger
(
'show.bs.popover'
);
expect
(
window
.
addEventListener
).
toHaveBeenCalledWith
(
'scroll'
,
jasmine
.
any
(
Function
));
});
it
(
'setup hide.bs.popover'
,
()
=>
{
$
(
selector
).
trigger
(
'hide.bs.popover'
);
expect
(
window
.
removeEventListener
).
toHaveBeenCalledWith
(
'scroll'
,
jasmine
.
any
(
Function
));
expect
(
window
.
addEventListener
).
toHaveBeenCalledWith
(
'scroll'
,
jasmine
.
any
(
Function
),
{
once
:
true
});
});
it
(
'removes disabled attribute'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment