changes based on review
This commit is contained in:
parent
c5cd31142b
commit
101c37085f
4 changed files with 13 additions and 13 deletions
|
@ -1,9 +1,9 @@
|
|||
export default () => {
|
||||
const { protocol, host, pathname } = location;
|
||||
const shareBtn = document.querySelector('#share-btn');
|
||||
const embedBtn = document.querySelector('#embed-btn');
|
||||
const snippetUrlArea = document.querySelector('#snippet-url-area');
|
||||
const embedAction = document.querySelector('#embed-action');
|
||||
const shareBtn = document.querySelector('.js-share-btn');
|
||||
const embedBtn = document.querySelector('.js-embed-btn');
|
||||
const snippetUrlArea = document.querySelector('.js-snippet-url-area');
|
||||
const embedAction = document.querySelector('.js-embed-action');
|
||||
const url = `${protocol}//${host + pathname}`;
|
||||
|
||||
shareBtn.addEventListener('click', () => {
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
height: 16px;
|
||||
background-size: cover;
|
||||
|
||||
&.gl-snippet-icon-doc_code { background-position: -0 -0; }
|
||||
&.gl-snippet-icon-doc_text { background-position: -0 -16px; }
|
||||
&.gl-snippet-icon-download { background-position: -0 -32px; }
|
||||
&.gl-snippet-icon-doc_code { background-position: 0 0; }
|
||||
&.gl-snippet-icon-doc_text { background-position: 0 -16px; }
|
||||
&.gl-snippet-icon-download { background-position: 0 -32px; }
|
||||
}
|
||||
|
||||
.blob-viewer {
|
||||
|
|
|
@ -116,7 +116,7 @@ module SnippetsHelper
|
|||
raw_project_snippet_url(@snippet.project, @snippet)
|
||||
end
|
||||
|
||||
link_to external_snippet_icon('doc_code'), snippet_raw_url, class: 'btn', target: '_blank', rel: 'noopener noreferrer', title: 'Open raw', data: { container: 'body' }
|
||||
link_to external_snippet_icon('doc_code'), snippet_raw_url, class: 'btn', target: '_blank', rel: 'noopener noreferrer', title: 'Open raw'
|
||||
end
|
||||
|
||||
def embedded_snippet_download_button
|
||||
|
|
|
@ -34,17 +34,17 @@
|
|||
.input-group
|
||||
.input-group-btn
|
||||
%button.btn.embed-toggle{ 'data-toggle': 'dropdown', type: 'button' }
|
||||
%span#embed-action= _("Embed")
|
||||
%span.js-embed-action= _("Embed")
|
||||
= sprite_icon('angle-down', size: 12)
|
||||
%ul.dropdown-menu.dropdown-menu-selectable.embed-toggle-list
|
||||
%li
|
||||
%button#embed-btn.btn.btn-transparent.is-active{ type: 'button' }
|
||||
%button.js-embed-btn.btn.btn-transparent.is-active{ type: 'button' }
|
||||
%strong.embed-toggle-list-item= _("Embed")
|
||||
%li
|
||||
%button#share-btn.btn.btn-transparent{ type: 'button' }
|
||||
%button.js-share-btn.btn.btn-transparent{ type: 'button' }
|
||||
%strong.embed-toggle-list-item= _("Share")
|
||||
%input#snippet-url-area.snippet-embed-input.form-control{ type: "text", autocomplete: 'off', value: snippet_embed }
|
||||
%input.js-snippet-url-area.snippet-embed-input.form-control{ type: "text", autocomplete: 'off', value: snippet_embed }
|
||||
.input-group-btn
|
||||
%button#clipboard-btn.btn.btn-default{ title: "Copy to clipboard", type: "button", data: { toggle: "tooltip", placement: "bottom", title: "Copy source to clipboard", container: "body", clipboard_target: '#snippet-url-area' } }
|
||||
%button.js-clipboard-btn.btn.btn-default.has-tooltip{ title: "Copy to clipboard", 'data-clipboard-target': '#snippet-url-area' }
|
||||
= sprite_icon('duplicate', size: 16)
|
||||
.clearfix
|
||||
|
|
Loading…
Reference in a new issue