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
9b93a3f2
Commit
9b93a3f2
authored
May 16, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the tooltip mixin
[ci skip]
parent
f53d703f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
8 deletions
+30
-8
app/assets/javascripts/vue_shared/components/markdown/field.vue
...sets/javascripts/vue_shared/components/markdown/field.vue
+1
-1
app/assets/javascripts/vue_shared/components/markdown/header.vue
...ets/javascripts/vue_shared/components/markdown/header.vue
+6
-2
app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue
...scripts/vue_shared/components/markdown/toolbar_button.vue
+13
-3
app/assets/javascripts/vue_shared/mixins/tooltip.js
app/assets/javascripts/vue_shared/mixins/tooltip.js
+10
-2
No files found.
app/assets/javascripts/vue_shared/components/markdown/field.vue
View file @
9b93a3f2
...
...
@@ -60,7 +60,7 @@
},
mounted
()
{
/*
GLForm class handles all the toolbar buttons
etc.
GLForm class handles all the toolbar buttons
*/
return
new
gl
.
GLForm
(
$
(
this
.
$refs
[
'
gl-form
'
]));
},
...
...
app/assets/javascripts/vue_shared/components/markdown/header.vue
View file @
9b93a3f2
<
script
>
import
tooltipMixin
from
'
../../mixins/tooltip
'
;
import
toolbarButton
from
'
./toolbar_button.vue
'
;
export
default
{
mixins
:
[
tooltipMixin
,
],
props
:
{
previewMarkdown
:
{
type
:
Boolean
,
...
...
@@ -82,9 +86,9 @@
class=
"toolbar-btn js-zen-enter"
data-container=
"body"
tabindex=
"-1"
data-toggle=
"tooltip"
title=
"Go full screen"
type=
"button"
>
type=
"button"
ref=
"tooltip"
>
<i
aria-hidden=
"true"
class=
"fa fa-arrows-alt fa-fw"
>
...
...
app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue
View file @
9b93a3f2
<
script
>
import
tooltipMixin
from
'
../../mixins/tooltip
'
;
export
default
{
mixins
:
[
tooltipMixin
,
],
props
:
{
buttonTitle
:
{
type
:
String
,
...
...
@@ -24,6 +29,11 @@
default
:
false
,
},
},
computed
:
{
iconClass
()
{
return
`fa-
${
this
.
icon
}
`
;
},
},
};
</
script
>
...
...
@@ -32,17 +42,17 @@
type=
"button"
class=
"toolbar-btn js-md hidden-xs"
tabindex=
"-1"
ref=
"tooltip"
data-container=
"body"
:data-md-tag=
"tag"
:data-md-block=
"tagBlock"
:data-md-prepend=
"prepend"
data-container=
"body"
data-toggle=
"tooltip"
:title=
"buttonTitle"
:aria-label=
"buttonTitle"
>
<i
aria-hidden=
"true"
class=
"fa fa-fw"
:class=
"
'fa-' + icon
"
>
:class=
"
iconClass
"
>
</i>
</button>
</
template
>
app/assets/javascripts/vue_shared/mixins/tooltip.js
View file @
9b93a3f2
export
default
{
mounted
()
{
$
(
this
.
$refs
.
tooltip
).
tooltip
();
this
.
$nextTick
(()
=>
{
$
(
this
.
$refs
.
tooltip
).
tooltip
();
});
},
updated
()
{
$
(
this
.
$refs
.
tooltip
).
tooltip
(
'
fixTitle
'
);
this
.
$nextTick
(()
=>
{
$
(
this
.
$refs
.
tooltip
).
tooltip
(
'
fixTitle
'
);
});
},
beforeDestroy
()
{
$
(
this
.
$refs
.
tooltip
).
tooltip
(
'
destroy
'
);
},
};
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