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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
3f66736f
Commit
3f66736f
authored
Apr 15, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert and fix
parent
3283386a
Changes
2
Hide 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 @
3f66736f
...
@@ -2,13 +2,12 @@ import $ from 'jquery';
...
@@ -2,13 +2,12 @@ import $ from 'jquery';
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
export
function
togglePopover
(
show
)
{
export
function
togglePopover
(
show
)
{
const
$popover
=
$
(
this
);
const
isAlreadyShown
=
this
.
hasClass
(
'
js-popover-show
'
);
const
isAlreadyShown
=
$popover
.
hasClass
(
'
js-popover-show
'
);
if
((
show
&&
isAlreadyShown
)
||
(
!
show
&&
!
isAlreadyShown
))
{
if
((
show
&&
isAlreadyShown
)
||
(
!
show
&&
!
isAlreadyShown
))
{
return
false
;
return
false
;
}
}
$popover
.
popover
(
show
?
'
show
'
:
'
hide
'
);
this
.
popover
(
show
?
'
show
'
:
'
hide
'
);
$popover
.
toggleClass
(
'
disable-animation js-popover-show
'
,
show
);
this
.
toggleClass
(
'
disable-animation js-popover-show
'
,
show
);
return
true
;
return
true
;
}
}
...
...
spec/javascripts/feature_highlight/feature_highlight_spec.js
View file @
3f66736f
...
@@ -29,7 +29,6 @@ describe('feature highlight', () => {
...
@@ -29,7 +29,6 @@ describe('feature highlight', () => {
mock
=
new
MockAdapter
(
axios
);
mock
=
new
MockAdapter
(
axios
);
mock
.
onGet
(
'
/test
'
).
reply
(
200
);
mock
.
onGet
(
'
/test
'
).
reply
(
200
);
spyOn
(
window
,
'
addEventListener
'
);
spyOn
(
window
,
'
addEventListener
'
);
spyOn
(
window
,
'
removeEventListener
'
);
featureHighlight
.
setupFeatureHighlightPopover
(
'
test
'
,
0
);
featureHighlight
.
setupFeatureHighlightPopover
(
'
test
'
,
0
);
});
});
...
@@ -64,12 +63,7 @@ describe('feature highlight', () => {
...
@@ -64,12 +63,7 @@ describe('feature highlight', () => {
it
(
'
setup show.bs.popover
'
,
()
=>
{
it
(
'
setup show.bs.popover
'
,
()
=>
{
$
(
selector
).
trigger
(
'
show.bs.popover
'
);
$
(
selector
).
trigger
(
'
show.bs.popover
'
);
expect
(
window
.
addEventListener
).
toHaveBeenCalledWith
(
'
scroll
'
,
jasmine
.
any
(
Function
));
expect
(
window
.
addEventListener
).
toHaveBeenCalledWith
(
'
scroll
'
,
jasmine
.
any
(
Function
),
{
once
:
true
});
});
it
(
'
setup hide.bs.popover
'
,
()
=>
{
$
(
selector
).
trigger
(
'
hide.bs.popover
'
);
expect
(
window
.
removeEventListener
).
toHaveBeenCalledWith
(
'
scroll
'
,
jasmine
.
any
(
Function
));
});
});
it
(
'
removes disabled attribute
'
,
()
=>
{
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