display share link in textarea

pull/1/head
David Benqué 5 years ago
parent 1ba03dee45
commit ee35c1d151

@ -233,6 +233,13 @@
}
}
textarea {
overflow: hidden;
&[readonly] {
resize: none;
}
}
span.cp-password-container {
display: flex;
align-items: center;

@ -127,6 +127,18 @@ define([
return input;
};
dialog.selectableArea = function (value, opt) {
var attrs = merge({
readonly: 'readonly',
}, opt);
var input = h('textarea', attrs);
$(input).val(value).click(function () {
input.select();
});
return input;
};
dialog.okButton = function (content, classString) {
var sel = typeof(classString) === 'string'? 'button.ok.' + classString:'button.ok.primary';
return h(sel, { tabindex: '2', }, content || Messages.okButton);

@ -1088,7 +1088,7 @@ define([
h('br'),
];
linkContent.push(UI.dialog.selectable('', { id: 'cp-share-link-preview', tabindex: 1 }));
linkContent.push(UI.dialog.selectableArea('', { id: 'cp-share-link-preview', tabindex: 1, rows:3}));
// Show alert if the pad is password protected
if (hasPassword) {

Loading…
Cancel
Save