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
Boxiang Sun
gitlab-ce
Commits
978d553a
Commit
978d553a
authored
Mar 13, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Init deprecation message. Incomplete.
parent
607636b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
app/assets/javascripts/milestone.js
app/assets/javascripts/milestone.js
+34
-0
No files found.
app/assets/javascripts/milestone.js
View file @
978d553a
...
...
@@ -3,6 +3,7 @@ import flash from './flash';
export
default
class
Milestone
{
constructor
()
{
Milestone
.
initDeprecationMessage
();
this
.
bindTabsSwitching
();
// Load merge request tab if it is active
...
...
@@ -42,4 +43,37 @@ export default class Milestone {
.
catch
(()
=>
flash
(
'
Error loading milestone tab
'
));
}
}
static
initDeprecationMessage
()
{
const
deprecationMesssage
=
document
.
querySelector
(
'
.milestone-deprecation-message
'
);
if
(
!
deprecationMesssage
)
return
;
const
deprecationMesssageTemplate
=
deprecationMesssage
.
querySelector
(
'
.milestone-deprecation-message-template
'
);
const
popoverLink
=
deprecationMesssage
.
querySelector
(
'
.popover-link
'
);
const
$popoverLink
=
$
(
popoverLink
);
$popoverLink
.
popover
({
html
:
true
,
placement
:
'
bottom
'
,
content
:
deprecationMesssageTemplate
.
innerHTML
,
trigger
:
'
hover
'
,
})
.
on
(
'
inserted.bs.popover
'
,
()
=>
{
const
$popover
=
$popoverLink
.
siblings
(
'
.popover
'
).
first
();
const
$popoverContent
=
$
(
'
.popover-content
'
,
$popover
);
$popoverContent
.
on
(
'
mouseleave
'
,
()
=>
{
$popoverContent
.
off
(
'
mouseleave
'
);
$popoverLink
.
popover
(
'
hide
'
);
});
})
.
on
(
'
hidden.bs.popover
'
,
(
event
)
=>
{
$
(
event
.
target
).
data
(
'
bs.popover
'
).
inState
.
click
=
false
;
})
.
on
(
'
mouseleave
'
,
()
=>
{
});
}
}
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