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
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 @@
...
@@ -4,12 +4,16 @@
$
(
'
#share-btn
'
).
click
((
event
)
=>
{
$
(
'
#share-btn
'
).
click
((
event
)
=>
{
event
.
preventDefault
();
event
.
preventDefault
();
$
(
'
#share-btn
'
).
addClass
(
'
is-active
'
);
$
(
'
#embed-btn
'
).
removeClass
(
'
is-active
'
);
$
(
'
#snippet-url-area
'
).
val
(
`
${
protocol
}
//
${
host
+
pathname
}
`
);
$
(
'
#snippet-url-area
'
).
val
(
`
${
protocol
}
//
${
host
+
pathname
}
`
);
$
(
'
#embed-action
'
).
html
(
'
Share
'
);
$
(
'
#embed-action
'
).
html
(
'
Share
'
);
});
});
$
(
'
#embed-btn
'
).
click
((
event
)
=>
{
$
(
'
#embed-btn
'
).
click
((
event
)
=>
{
event
.
preventDefault
();
event
.
preventDefault
();
$
(
'
#embed-btn
'
).
addClass
(
'
is-active
'
);
$
(
'
#share-btn
'
).
removeClass
(
'
is-active
'
);
const
scriptTag
=
`<script src="
${
protocol
}
//
${
host
+
pathname
}
.js"></script>`
;
const
scriptTag
=
`<script src="
${
protocol
}
//
${
host
+
pathname
}
.js"></script>`
;
$
(
'
#snippet-url-area
'
).
val
(
scriptTag
);
$
(
'
#snippet-url-area
'
).
val
(
scriptTag
);
$
(
'
#embed-action
'
).
html
(
'
Embed
'
);
$
(
'
#embed-action
'
).
html
(
'
Embed
'
);
...
...
app/assets/stylesheets/framework/snippets.scss
View file @
3bed273d
...
@@ -60,7 +60,11 @@
...
@@ -60,7 +60,11 @@
.form-control
{
.form-control
{
cursor
:
auto
;
cursor
:
auto
;
width
:
101%
;
width
:
101%
;
margin-left
:
-1
;
margin-left
:
-1px
;
}
.embed-toggle-list
li
a
{
padding
:
8px
40px
;
}
}
.embed-toggle
{
.embed-toggle
{
...
...
app/views/shared/snippets/_header.html.haml
View file @
3bed273d
...
@@ -33,17 +33,19 @@
...
@@ -33,17 +33,19 @@
=
edited_time_ago_with_tooltip
(
@snippet
,
placement:
'bottom'
,
html_class:
'snippet-edited-ago'
,
exclude_author:
true
)
=
edited_time_ago_with_tooltip
(
@snippet
,
placement:
'bottom'
,
html_class:
'snippet-edited-ago'
,
exclude_author:
true
)
-
if
public_snippet?
-
if
public_snippet?
.embed-snippet
.pull-right.col-md-6
.embed-snippet
.input-group
.input-group
.input-group-btn
.input-group-btn
%a
.btn.embed-toggle
{
'data-toggle'
:
'dropdown'
}
%a
.btn.embed-toggle
{
'data-toggle'
:
'dropdown'
}
%span
#embed-action
Embed
%span
#embed-action
Embed
=
sprite_icon
(
'angle-down'
,
size:
12
)
=
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
%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
%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
#snippet-url-area
.snippet-embed-input.form-control
{
type:
"text"
,
autocomplete:
'off'
,
value:
snippet_embed
}
.input-group-btn
.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'
}
}
%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