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
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
Show 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 @@
...
@@ -60,7 +60,7 @@
},
},
mounted
()
{
mounted
()
{
/*
/*
GLForm class handles all the toolbar buttons
etc.
GLForm class handles all the toolbar buttons
*/
*/
return
new
gl
.
GLForm
(
$
(
this
.
$refs
[
'
gl-form
'
]));
return
new
gl
.
GLForm
(
$
(
this
.
$refs
[
'
gl-form
'
]));
},
},
...
...
app/assets/javascripts/vue_shared/components/markdown/header.vue
View file @
9b93a3f2
<
script
>
<
script
>
import
tooltipMixin
from
'
../../mixins/tooltip
'
;
import
toolbarButton
from
'
./toolbar_button.vue
'
;
import
toolbarButton
from
'
./toolbar_button.vue
'
;
export
default
{
export
default
{
mixins
:
[
tooltipMixin
,
],
props
:
{
props
:
{
previewMarkdown
:
{
previewMarkdown
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -82,9 +86,9 @@
...
@@ -82,9 +86,9 @@
class=
"toolbar-btn js-zen-enter"
class=
"toolbar-btn js-zen-enter"
data-container=
"body"
data-container=
"body"
tabindex=
"-1"
tabindex=
"-1"
data-toggle=
"tooltip"
title=
"Go full screen"
title=
"Go full screen"
type=
"button"
>
type=
"button"
ref=
"tooltip"
>
<i
<i
aria-hidden=
"true"
aria-hidden=
"true"
class=
"fa fa-arrows-alt fa-fw"
>
class=
"fa fa-arrows-alt fa-fw"
>
...
...
app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue
View file @
9b93a3f2
<
script
>
<
script
>
import
tooltipMixin
from
'
../../mixins/tooltip
'
;
export
default
{
export
default
{
mixins
:
[
tooltipMixin
,
],
props
:
{
props
:
{
buttonTitle
:
{
buttonTitle
:
{
type
:
String
,
type
:
String
,
...
@@ -24,6 +29,11 @@
...
@@ -24,6 +29,11 @@
default
:
false
,
default
:
false
,
},
},
},
},
computed
:
{
iconClass
()
{
return
`fa-
${
this
.
icon
}
`
;
},
},
};
};
</
script
>
</
script
>
...
@@ -32,17 +42,17 @@
...
@@ -32,17 +42,17 @@
type=
"button"
type=
"button"
class=
"toolbar-btn js-md hidden-xs"
class=
"toolbar-btn js-md hidden-xs"
tabindex=
"-1"
tabindex=
"-1"
ref=
"tooltip"
data-container=
"body"
:data-md-tag=
"tag"
:data-md-tag=
"tag"
:data-md-block=
"tagBlock"
:data-md-block=
"tagBlock"
:data-md-prepend=
"prepend"
:data-md-prepend=
"prepend"
data-container=
"body"
data-toggle=
"tooltip"
:title=
"buttonTitle"
:title=
"buttonTitle"
:aria-label=
"buttonTitle"
>
:aria-label=
"buttonTitle"
>
<i
<i
aria-hidden=
"true"
aria-hidden=
"true"
class=
"fa fa-fw"
class=
"fa fa-fw"
:class=
"
'fa-' + icon
"
>
:class=
"
iconClass
"
>
</i>
</i>
</button>
</button>
</
template
>
</
template
>
app/assets/javascripts/vue_shared/mixins/tooltip.js
View file @
9b93a3f2
export
default
{
export
default
{
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
$
(
this
.
$refs
.
tooltip
).
tooltip
();
$
(
this
.
$refs
.
tooltip
).
tooltip
();
});
},
},
updated
()
{
updated
()
{
this
.
$nextTick
(()
=>
{
$
(
this
.
$refs
.
tooltip
).
tooltip
(
'
fixTitle
'
);
$
(
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