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
Léo-Paul Géneau
gitlab-ce
Commits
e829c39d
Commit
e829c39d
authored
Mar 23, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tidy timeout and add jquery
parent
2bb3e4c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
app/assets/javascripts/shared/popover.js
app/assets/javascripts/shared/popover.js
+12
-8
No files found.
app/assets/javascripts/shared/popover.js
View file @
e829c39d
import
$
from
'
jquery
'
;
export
default
class
Popover
{
constructor
(
trigger
,
content
)
{
this
.
isOpen
=
false
;
...
...
@@ -41,13 +43,15 @@ export default class Popover {
}
closePopoverMouseleave
()
{
setTimeout
(()
=>
{
if
(
this
.
$popover
.
is
(
'
:hover
'
)
||
(
this
.
$popover
.
siblings
(
'
.popover
'
).
length
>
0
&&
this
.
$popover
.
siblings
(
'
.popover
'
).
is
(
'
:hover
'
)))
return
;
if
(
this
.
$popover
.
is
(
'
:hover
'
)
||
(
this
.
$popover
.
siblings
(
'
.popover
'
).
length
>
0
&&
this
.
$popover
.
siblings
(
'
.popover
'
).
is
(
'
:hover
'
)))
return
;
this
.
closePopover
();
}
this
.
closePopover
();
}
,
1500
);
closePopoverMouseleaveDelayed
()
{
setTimeout
(
this
.
closePopoverMouseleave
.
bind
(
this
)
,
1500
);
}
registerClickOpenListener
()
{
...
...
@@ -59,8 +63,8 @@ export default class Popover {
}
registerMouseleaveCloseListener
()
{
this
.
$popover
.
on
(
'
mouseleave.glPopover.close
'
,
this
.
closePopoverMouseleave
.
bind
(
this
));
this
.
$popover
.
siblings
(
'
.popover
'
).
on
(
'
mouseleave.glPopover.close
'
,
this
.
closePopoverMouseleave
.
bind
(
this
));
this
.
$popover
.
on
(
'
mouseleave.glPopover.close
'
,
this
.
closePopoverMouseleave
Delayed
.
bind
(
this
));
this
.
$popover
.
siblings
(
'
.popover
'
).
on
(
'
mouseleave.glPopover.close
'
,
this
.
closePopoverMouseleave
Delayed
.
bind
(
this
));
}
destroyMouseleaveCloseListener
()
{
...
...
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