Skip to content

Commit ca276f0

Browse files
committed
Update Share popup
1 parent ab0bbbc commit ca276f0

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

Diff for: static/sharing.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ function initShareButton(getLink, layout, noteNewState) {
123123
content: html,
124124
html: true,
125125
placement: 'bottom',
126-
trigger: 'manual',
127-
title: 'Share this page'
126+
trigger: 'manual'
128127
}).click(function () {
129128
getLink.popover('toggle');
130129
}).on('inserted.bs.popover', function () {
@@ -137,7 +136,7 @@ function initShareButton(getLink, layout, noteNewState) {
137136
var label = root.find('.current');
138137
var permalink = $(".permalink:visible");
139138
var urls = {};
140-
if (!currentNode) currentNode = $(root.find('.sources a')[0]);
139+
if (!currentNode) currentNode = $(root.find('.sources button')[0]);
141140
if (!currentBind) currentBind = currentNode.data().bind;
142141

143142
function setCurrent(node) {
@@ -197,7 +196,7 @@ function initShareButton(getLink, layout, noteNewState) {
197196
}
198197
}
199198

200-
root.find('.sources a').on('click', function () {
199+
root.find('.sources button').on('click', function () {
201200
setCurrent($(this));
202201
update();
203202
});

Diff for: views/templates.pug

+26-23
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
.gl_keep.template
22
.urls
3-
.input-group.urls-container
4-
.input-group-btn
5-
.btn-group.btn-group-sm
6-
button.btn.btn-light.btn-sm.dropdown-toggle(
7-
data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false")
8-
span.current Short
9-
span.caret
10-
ul.dropdown-menu.sources
11-
li: a(href="javascript:;" data-bind="Short") Short
12-
li: a(href="javascript:;" data-bind="Full") Full
13-
li: a(href="javascript:;" data-bind="Embed") Embed
14-
li: a(href="javascript:;" data-bind="Embed (RO)") Embed (read only)
15-
input.form-control.input-sm.permalink(
16-
type="text" placeholder="Loading" readonly size="1024")
17-
span.input-group-btn
18-
button.btn.btn-light.btn-sm.clippy(
19-
type="button" data-clipboard-target=".popover .permalink"
20-
title="Copy to clipboard")
21-
span.fa.fa-clipboard(style="width:13px")
22-
if sharingEnabled
23-
.socialsharing
3+
.card
4+
.card-body
5+
.urls-container
6+
.btn-group.btn-group-sm
7+
.input-group.input-group-sm
8+
.input-group-prepend
9+
button.btn.btn-outline-secondary.btn-sm.dropdown-toggle(data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false")
10+
span.current Short #[b.caret]
11+
ul.dropdown-menu.sources
12+
button.dropdown-item.btn.btn-light.btn-sm(data-bind="Short")
13+
| Short
14+
button.dropdown-item.btn.btn-light.btn-sm(data-bind="Full")
15+
| Full
16+
button.dropdown-item.btn.btn-light.btn-sm(data-bind="Embed")
17+
| Embed
18+
button.dropdown-item.btn.btn-light.btn-sm(data-bind="Embed (RO)")
19+
| Embed (read only)
20+
input.form-control.input-sm.permalink(type="text" placeholder="Loading" readonly size="1024" style="font-size: 10px")
21+
.input-group-append
22+
button.input-group-btn.btn.btn-outline-secondary.btn-sm.clippy(type="button" data-clipboard-target=".popover .permalink" title="Copy to clipboard")
23+
span.fa.fa-clipboard
24+
if sharingEnabled
25+
.card-footer
26+
.socialsharing
2427

2528
#codeEditor
2629
.top-bar.btn-toolbar.bg-light(role="toolbar" aria-label="Editor toolbar")
@@ -156,12 +159,12 @@
156159
.monaco-placeholder
157160

158161
#opt
159-
.top-bar.btn-toolbar(role="toolbar")
162+
.top-bar.btn-toolbar.bg-light(role="toolbar")
160163
include font-size.pug
161164
.monaco-placeholder
162165

163166
#ast
164-
.top-bar.btn-toolbar(role="toolbar")
167+
.top-bar.btn-toolbar.bg-light(role="toolbar")
165168
include font-size.pug
166169
.monaco-placeholder
167170

0 commit comments

Comments
 (0)