|
|
@ -795,8 +795,6 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var noOthers = icons.length === 0 ? '.cp-usergrid-empty' : '';
|
|
|
|
var noOthers = icons.length === 0 ? '.cp-usergrid-empty' : '';
|
|
|
|
|
|
|
|
|
|
|
|
var buttonSelect = h('button', Messages.share_selectAll);
|
|
|
|
|
|
|
|
var buttonDeselect = h('button', Messages.share_deselectAll);
|
|
|
|
|
|
|
|
var inputFilter = h('input', {
|
|
|
|
var inputFilter = h('input', {
|
|
|
|
placeholder: Messages.share_filterFriend
|
|
|
|
placeholder: Messages.share_filterFriend
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -817,23 +815,8 @@ define([
|
|
|
|
$div.find('.cp-usergrid-user:not(.cp-selected):not([data-name*="'+name+'"])').hide();
|
|
|
|
$div.find('.cp-usergrid-user:not(.cp-selected):not([data-name*="'+name+'"])').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$(inputFilter).on('keydown keyup change', redraw);
|
|
|
|
$(inputFilter).on('keydown keyup change', redraw);
|
|
|
|
|
|
|
|
|
|
|
|
$(buttonSelect).click(function () {
|
|
|
|
|
|
|
|
$div.find('.cp-usergrid-user:not(.cp-selected):visible').addClass('cp-selected');
|
|
|
|
|
|
|
|
onSelect();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$(buttonDeselect).click(function () {
|
|
|
|
|
|
|
|
$div.find('.cp-usergrid-user.cp-selected').removeClass('cp-selected').each(function (i, el) {
|
|
|
|
|
|
|
|
var order = $(el).attr('data-order');
|
|
|
|
|
|
|
|
if (!order) { return; }
|
|
|
|
|
|
|
|
$(el).attr('style', 'order:'+order);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
redraw();
|
|
|
|
|
|
|
|
onSelect();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(div).append(h('div.cp-usergrid-grid', icons));
|
|
|
|
$(div).append(h('div.cp-usergrid-grid', icons));
|
|
|
|
if (!config.noSelect) {
|
|
|
|
if (!config.noSelect) {
|
|
|
|
$div.on('click', '.cp-usergrid-user', function () {
|
|
|
|
$div.on('click', '.cp-usergrid-user', function () {
|
|
|
@ -1035,7 +1018,7 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var makeFaqLink = function () {
|
|
|
|
var makeFaqLink = function () {
|
|
|
|
var link = h('span', [
|
|
|
|
var link = h('span', [
|
|
|
|
h('i.fa.fa-question-circle'), ' ',
|
|
|
|
h('i.fa.fa-question-circle'), ' ', // XXX remove and make it a margin
|
|
|
|
h('a', {href: '#'}, Messages.passwordFaqLink)
|
|
|
|
h('a', {href: '#'}, Messages.passwordFaqLink)
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
$(link).click(function () {
|
|
|
|
$(link).click(function () {
|
|
|
@ -1098,13 +1081,13 @@ define([
|
|
|
|
] : [
|
|
|
|
] : [
|
|
|
|
UI.createCheckbox('cp-share-embed', Messages.share_linkEmbed, false, { mark: {tabindex:1} }),
|
|
|
|
UI.createCheckbox('cp-share-embed', Messages.share_linkEmbed, false, { mark: {tabindex:1} }),
|
|
|
|
];
|
|
|
|
];
|
|
|
|
linkContent.push(h('div.cp-spacer'))
|
|
|
|
linkContent.push(h('div.cp-spacer'));
|
|
|
|
linkContent.push(UI.dialog.selectableArea('', { id: 'cp-share-link-preview', tabindex: 1, rows:3}));
|
|
|
|
linkContent.push(UI.dialog.selectableArea('', { id: 'cp-share-link-preview', tabindex: 1, rows:3}));
|
|
|
|
|
|
|
|
|
|
|
|
// Show alert if the pad is password protected
|
|
|
|
// Show alert if the pad is password protected
|
|
|
|
if (hasPassword) {
|
|
|
|
if (hasPassword) {
|
|
|
|
linkContent.push(h('div.alert.alert-primary', [
|
|
|
|
linkContent.push(h('div.alert.alert-primary', [
|
|
|
|
h('i.fa.fa-lock'), ' ',
|
|
|
|
h('i.fa.fa-lock'), ' ', // XXX remove and make it a margin
|
|
|
|
Messages.share_linkPasswordAlert, h('br'),
|
|
|
|
Messages.share_linkPasswordAlert, h('br'),
|
|
|
|
makeFaqLink()
|
|
|
|
makeFaqLink()
|
|
|
|
]));
|
|
|
|
]));
|
|
|
@ -1187,7 +1170,7 @@ define([
|
|
|
|
// Show alert if the pad is password protected
|
|
|
|
// Show alert if the pad is password protected
|
|
|
|
if (hasPassword) {
|
|
|
|
if (hasPassword) {
|
|
|
|
$contactsContent.append(h('div.alert.alert-primary', [
|
|
|
|
$contactsContent.append(h('div.alert.alert-primary', [
|
|
|
|
h('i.fa.fa-unlock'), ' ',
|
|
|
|
h('i.fa.fa-unlock'), ' ', // XXX remove and make it a margin
|
|
|
|
Messages.share_contactPasswordAlert, h('br'),
|
|
|
|
Messages.share_contactPasswordAlert, h('br'),
|
|
|
|
makeFaqLink()
|
|
|
|
makeFaqLink()
|
|
|
|
]));
|
|
|
|
]));
|
|
|
@ -1317,6 +1300,7 @@ define([
|
|
|
|
return modal;
|
|
|
|
return modal;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// XXX add password messages to file share
|
|
|
|
UIElements.createFileShareModal = function (config) {
|
|
|
|
UIElements.createFileShareModal = function (config) {
|
|
|
|
var origin = config.origin;
|
|
|
|
var origin = config.origin;
|
|
|
|
var pathname = config.pathname;
|
|
|
|
var pathname = config.pathname;
|
|
|
@ -1387,10 +1371,8 @@ define([
|
|
|
|
// Embed tab
|
|
|
|
// Embed tab
|
|
|
|
var embed = h('div.cp-share-modal', [
|
|
|
|
var embed = h('div.cp-share-modal', [
|
|
|
|
h('p', Messages.fileEmbedScript),
|
|
|
|
h('p', Messages.fileEmbedScript),
|
|
|
|
h('br'),
|
|
|
|
|
|
|
|
UI.dialog.selectable(common.getMediatagScript()),
|
|
|
|
UI.dialog.selectable(common.getMediatagScript()),
|
|
|
|
h('p', Messages.fileEmbedTag),
|
|
|
|
h('p', Messages.fileEmbedTag),
|
|
|
|
h('br'),
|
|
|
|
|
|
|
|
UI.dialog.selectable(common.getMediatagFromHref(fileData)),
|
|
|
|
UI.dialog.selectable(common.getMediatagFromHref(fileData)),
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
var embedButtons = [{
|
|
|
|
var embedButtons = [{
|
|
|
|