Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b15dc7a3
Commit
b15dc7a3
authored
Apr 15, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert and fix
parent
0e2c1f1c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
app/assets/javascripts/shared/popover.js
app/assets/javascripts/shared/popover.js
+3
-4
spec/javascripts/feature_highlight/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 @
b15dc7a3
...
...
@@ -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 @
b15dc7a3
...
...
@@ -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