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
3bed273d
Commit
3bed273d
authored
Feb 22, 2018
by
haseeb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dropdown style fixes
parent
174ee4e1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
app/assets/javascripts/snippet/snippet_embed.js
app/assets/javascripts/snippet/snippet_embed.js
+4
-0
app/assets/stylesheets/framework/snippets.scss
app/assets/stylesheets/framework/snippets.scss
+5
-1
app/views/shared/snippets/_header.html.haml
app/views/shared/snippets/_header.html.haml
+6
-4
No files found.
app/assets/javascripts/snippet/snippet_embed.js
View file @
3bed273d
...
...
@@ -4,12 +4,16 @@
$
(
'
#share-btn
'
).
click
((
event
)
=>
{
event
.
preventDefault
();
$
(
'
#share-btn
'
).
addClass
(
'
is-active
'
);
$
(
'
#embed-btn
'
).
removeClass
(
'
is-active
'
);
$
(
'
#snippet-url-area
'
).
val
(
`
${
protocol
}
//
${
host
+
pathname
}
`
);
$
(
'
#embed-action
'
).
html
(
'
Share
'
);
});
$
(
'
#embed-btn
'
).
click
((
event
)
=>
{
event
.
preventDefault
();
$
(
'
#embed-btn
'
).
addClass
(
'
is-active
'
);
$
(
'
#share-btn
'
).
removeClass
(
'
is-active
'
);
const
scriptTag
=
`<script src="
${
protocol
}
//
${
host
+
pathname
}
.js"></script>`
;
$
(
'
#snippet-url-area
'
).
val
(
scriptTag
);
$
(
'
#embed-action
'
).
html
(
'
Embed
'
);
...
...
app/assets/stylesheets/framework/snippets.scss
View file @
3bed273d
...
...
@@ -60,7 +60,11 @@
.form-control
{
cursor
:
auto
;
width
:
101%
;
margin-left
:
-1
;
margin-left
:
-1px
;
}
.embed-toggle-list
li
a
{
padding
:
8px
40px
;
}
.embed-toggle
{
...
...
app/views/shared/snippets/_header.html.haml
View file @
3bed273d
...
...
@@ -33,17 +33,19 @@
=
edited_time_ago_with_tooltip
(
@snippet
,
placement:
'bottom'
,
html_class:
'snippet-edited-ago'
,
exclude_author:
true
)
-
if
public_snippet?
.embed-snippet
.pull-right.col-md-6
.embed-snippet
.input-group
.input-group-btn
%a
.btn.embed-toggle
{
'data-toggle'
:
'dropdown'
}
%span
#embed-action
Embed
=
sprite_icon
(
'angle-down'
,
size:
12
)
%ul
.dropdown-menu.dropdown-menu-selectable.
dropdown-menu-righ
t
%ul
.dropdown-menu.dropdown-menu-selectable.
embed-toggle-lis
t
%li
%a
#embed-btn
.btn.btn-transparent
{
href:
"#"
}
Embed
%a
#embed-btn
.btn.btn-transparent.is-active
{
href:
"#"
}
%strong
.embed-toggle-list-item
Embed
%li
%a
#share-btn
.btn.btn-transparent
{
href:
"#"
}
Share
%a
#share-btn
.btn.btn-transparent
{
href:
"#"
}
%strong
.embed-toggle-list-item
Share
%input
#snippet-url-area
.snippet-embed-input.form-control
{
type:
"text"
,
autocomplete:
'off'
,
value:
snippet_embed
}
.input-group-btn
%a
#clipboard-btn
.btn.btn-default
{
title:
"Copy to clipboard"
,
data:
{
toggle:
"tooltip"
,
placement:
"bottom"
,
title:
"Copy source to clipboard"
,
container:
"body"
,
clipboard_target:
'#snippet-url-area'
}
}
...
...
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