|
|
@ -147,6 +147,7 @@ define([
|
|
|
|
: Messages.owner_removeText;
|
|
|
|
: Messages.owner_removeText;
|
|
|
|
var removeCol = UIElements.getUserGrid(msg, {
|
|
|
|
var removeCol = UIElements.getUserGrid(msg, {
|
|
|
|
common: common,
|
|
|
|
common: common,
|
|
|
|
|
|
|
|
large: true,
|
|
|
|
data: _owners,
|
|
|
|
data: _owners,
|
|
|
|
noFilter: true
|
|
|
|
noFilter: true
|
|
|
|
}, function () {
|
|
|
|
}, function () {
|
|
|
@ -238,6 +239,7 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
var addCol = UIElements.getUserGrid(Messages.owner_addText, {
|
|
|
|
var addCol = UIElements.getUserGrid(Messages.owner_addText, {
|
|
|
|
common: common,
|
|
|
|
common: common,
|
|
|
|
|
|
|
|
large: true,
|
|
|
|
data: _friends
|
|
|
|
data: _friends
|
|
|
|
}, function () {
|
|
|
|
}, function () {
|
|
|
|
//console.log(arguments);
|
|
|
|
//console.log(arguments);
|
|
|
@ -254,6 +256,7 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
var teamsList = UIElements.getUserGrid(Messages.owner_addTeamText, {
|
|
|
|
var teamsList = UIElements.getUserGrid(Messages.owner_addTeamText, {
|
|
|
|
common: common,
|
|
|
|
common: common,
|
|
|
|
|
|
|
|
large: true,
|
|
|
|
noFilter: true,
|
|
|
|
noFilter: true,
|
|
|
|
data: teamsData
|
|
|
|
data: teamsData
|
|
|
|
}, function () {});
|
|
|
|
}, function () {});
|
|
|
@ -737,12 +740,22 @@ define([
|
|
|
|
UIElements.getProperties = function (common, data, cb) {
|
|
|
|
UIElements.getProperties = function (common, data, cb) {
|
|
|
|
var c1;
|
|
|
|
var c1;
|
|
|
|
var c2;
|
|
|
|
var c2;
|
|
|
|
|
|
|
|
var button = [{
|
|
|
|
|
|
|
|
className: 'primary',
|
|
|
|
|
|
|
|
name: Messages.okButton,
|
|
|
|
|
|
|
|
onClick: function () {},
|
|
|
|
|
|
|
|
keys: [13]
|
|
|
|
|
|
|
|
}];
|
|
|
|
NThen(function (waitFor) {
|
|
|
|
NThen(function (waitFor) {
|
|
|
|
getPadProperties(common, data, waitFor(function (e, c) {
|
|
|
|
getPadProperties(common, data, waitFor(function (e, c) {
|
|
|
|
c1 = c[0];
|
|
|
|
c1 = UI.dialog.customModal(c[0], {
|
|
|
|
|
|
|
|
buttons: button
|
|
|
|
|
|
|
|
});
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
getRightsProperties(common, data, waitFor(function (e, c) {
|
|
|
|
getRightsProperties(common, data, waitFor(function (e, c) {
|
|
|
|
c2 = c[0];
|
|
|
|
c2 = UI.dialog.customModal(c[0], {
|
|
|
|
|
|
|
|
buttons: button
|
|
|
|
|
|
|
|
});
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
}).nThen(function () {
|
|
|
|
}).nThen(function () {
|
|
|
|
var tabs = UI.dialog.tabs([{
|
|
|
|
var tabs = UI.dialog.tabs([{
|
|
|
@ -782,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
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -791,9 +802,7 @@ define([
|
|
|
|
var div = h('div.cp-usergrid-container' + noOthers + (config.large?'.large':''), [
|
|
|
|
var div = h('div.cp-usergrid-container' + noOthers + (config.large?'.large':''), [
|
|
|
|
label ? h('label', label) : undefined,
|
|
|
|
label ? h('label', label) : undefined,
|
|
|
|
h('div.cp-usergrid-filter', (config.noFilter || config.noSelect) ? undefined : [
|
|
|
|
h('div.cp-usergrid-filter', (config.noFilter || config.noSelect) ? undefined : [
|
|
|
|
inputFilter,
|
|
|
|
inputFilter
|
|
|
|
buttonSelect,
|
|
|
|
|
|
|
|
buttonDeselect
|
|
|
|
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
var $div = $(div);
|
|
|
|
var $div = $(div);
|
|
|
@ -806,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 () {
|
|
|
@ -883,7 +877,8 @@ define([
|
|
|
|
var friendsList = UIElements.getUserGrid(null, {
|
|
|
|
var friendsList = UIElements.getUserGrid(null, {
|
|
|
|
common: common,
|
|
|
|
common: common,
|
|
|
|
data: friends,
|
|
|
|
data: friends,
|
|
|
|
noFilter: false
|
|
|
|
noFilter: false,
|
|
|
|
|
|
|
|
large: true
|
|
|
|
}, refreshButtons);
|
|
|
|
}, refreshButtons);
|
|
|
|
var friendDiv = friendsList.div;
|
|
|
|
var friendDiv = friendsList.div;
|
|
|
|
$div.append(friendDiv);
|
|
|
|
$div.append(friendDiv);
|
|
|
@ -909,6 +904,7 @@ define([
|
|
|
|
var teamsList = UIElements.getUserGrid(Messages.share_linkTeam, {
|
|
|
|
var teamsList = UIElements.getUserGrid(Messages.share_linkTeam, {
|
|
|
|
common: common,
|
|
|
|
common: common,
|
|
|
|
noFilter: true,
|
|
|
|
noFilter: true,
|
|
|
|
|
|
|
|
large: true,
|
|
|
|
data: teams
|
|
|
|
data: teams
|
|
|
|
}, refreshButtons);
|
|
|
|
}, refreshButtons);
|
|
|
|
$div.append(teamsList.div);
|
|
|
|
$div.append(teamsList.div);
|
|
|
@ -1014,12 +1010,29 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
if (!hashes || (!hashes.editHash && !hashes.viewHash)) { return; }
|
|
|
|
if (!hashes || (!hashes.editHash && !hashes.viewHash)) { return; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// check if the pad is password protected
|
|
|
|
|
|
|
|
var hash = hashes.editHash || hashes.viewHash;
|
|
|
|
|
|
|
|
var href = origin + pathname + '#' + hash;
|
|
|
|
|
|
|
|
var parsedHref = Hash.parsePadUrl(href);
|
|
|
|
|
|
|
|
var hasPassword = parsedHref.hashData.password;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var makeFaqLink = function () {
|
|
|
|
|
|
|
|
var link = h('span', [
|
|
|
|
|
|
|
|
h('i.fa.fa-question-circle'),
|
|
|
|
|
|
|
|
h('a', {href: '#'}, Messages.passwordFaqLink)
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
$(link).click(function () {
|
|
|
|
|
|
|
|
common.openURL(config.origin + "/faq.html#security-pad_password");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return link;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var parsed = Hash.parsePadUrl(pathname);
|
|
|
|
var parsed = Hash.parsePadUrl(pathname);
|
|
|
|
var canPresent = ['code', 'slide'].indexOf(parsed.type) !== -1;
|
|
|
|
var canPresent = ['code', 'slide'].indexOf(parsed.type) !== -1;
|
|
|
|
|
|
|
|
|
|
|
|
var rights = h('div.msg.cp-inline-radio-group', [
|
|
|
|
var rights = h('div.msg.cp-inline-radio-group', [
|
|
|
|
h('label', Messages.share_linkAccess),
|
|
|
|
h('label', Messages.share_linkAccess),
|
|
|
|
h('br'),
|
|
|
|
|
|
|
|
h('div.radio-group',[
|
|
|
|
h('div.radio-group',[
|
|
|
|
UI.createRadio('accessRights', 'cp-share-editable-false',
|
|
|
|
UI.createRadio('accessRights', 'cp-share-editable-false',
|
|
|
|
Messages.share_linkView, true, { mark: {tabindex:1} }),
|
|
|
|
Messages.share_linkView, true, { mark: {tabindex:1} }),
|
|
|
@ -1066,9 +1079,42 @@ define([
|
|
|
|
h('br'),
|
|
|
|
h('br'),
|
|
|
|
] : [
|
|
|
|
] : [
|
|
|
|
UI.createCheckbox('cp-share-embed', Messages.share_linkEmbed, false, { mark: {tabindex:1} }),
|
|
|
|
UI.createCheckbox('cp-share-embed', Messages.share_linkEmbed, false, { mark: {tabindex:1} }),
|
|
|
|
h('br'),
|
|
|
|
|
|
|
|
];
|
|
|
|
];
|
|
|
|
linkContent.push(UI.dialog.selectable('', { id: 'cp-share-link-preview', tabindex: 1 }));
|
|
|
|
linkContent.push(h('div.cp-spacer'));
|
|
|
|
|
|
|
|
linkContent.push(UI.dialog.selectableArea('', { id: 'cp-share-link-preview', tabindex: 1, rows:3}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Show alert if the pad is password protected
|
|
|
|
|
|
|
|
if (hasPassword) {
|
|
|
|
|
|
|
|
linkContent.push(h('div.alert.alert-primary', [
|
|
|
|
|
|
|
|
h('i.fa.fa-lock'),
|
|
|
|
|
|
|
|
Messages.share_linkPasswordAlert, h('br'),
|
|
|
|
|
|
|
|
makeFaqLink()
|
|
|
|
|
|
|
|
]));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// warning about sharing links
|
|
|
|
|
|
|
|
var localStore = window.cryptpadStore;
|
|
|
|
|
|
|
|
var dismissButton = h('span.fa.fa-times');
|
|
|
|
|
|
|
|
var shareLinkWarning = h('div.alert.alert-warning.dismissable',
|
|
|
|
|
|
|
|
{ style: 'display: none;' },
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
h('span.cp-inline-alert-text', Messages.share_linkWarning),
|
|
|
|
|
|
|
|
dismissButton
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
linkContent.push(shareLinkWarning);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
localStore.get('hide-alert-shareLinkWarning', function (val) {
|
|
|
|
|
|
|
|
if (val === '1') { return; }
|
|
|
|
|
|
|
|
$(shareLinkWarning).show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(dismissButton).on('click', function () {
|
|
|
|
|
|
|
|
localStore.put('hide-alert-shareLinkWarning', '1');
|
|
|
|
|
|
|
|
$(shareLinkWarning).remove();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var link = h('div.cp-share-modal', linkContent);
|
|
|
|
var link = h('div.cp-share-modal', linkContent);
|
|
|
|
var $link = $(link);
|
|
|
|
var $link = $(link);
|
|
|
@ -1135,7 +1181,19 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
// XXX Don't display access rights if no contacts
|
|
|
|
// XXX Don't display access rights if no contacts
|
|
|
|
var contactsContent = h('div.cp-share-modal');
|
|
|
|
var contactsContent = h('div.cp-share-modal');
|
|
|
|
$(contactsContent).append(friendsList);
|
|
|
|
var $contactsContent = $(contactsContent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$contactsContent.append(friendsList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Show alert if the pad is password protected
|
|
|
|
|
|
|
|
if (hasPassword) {
|
|
|
|
|
|
|
|
$contactsContent.append(h('div.alert.alert-primary', [
|
|
|
|
|
|
|
|
h('i.fa.fa-unlock'),
|
|
|
|
|
|
|
|
Messages.share_contactPasswordAlert, h('br'),
|
|
|
|
|
|
|
|
makeFaqLink()
|
|
|
|
|
|
|
|
]));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var contactButtons = [makeCancelButton(),
|
|
|
|
var contactButtons = [makeCancelButton(),
|
|
|
|
friendsObject.button];
|
|
|
|
friendsObject.button];
|
|
|
@ -1154,9 +1212,18 @@ define([
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var embedContent = [
|
|
|
|
var embedContent = [
|
|
|
|
h('p', Messages.viewEmbedTag),
|
|
|
|
h('p', Messages.viewEmbedTag),
|
|
|
|
h('br'),
|
|
|
|
UI.dialog.selectableArea(getEmbedValue(), { id: 'cp-embed-link-preview', tabindex: 1, rows: 3})
|
|
|
|
UI.dialog.selectable(getEmbedValue(), { id: 'cp-embed-link-preview', tabindex: 1 })
|
|
|
|
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Show alert if the pad is password protected
|
|
|
|
|
|
|
|
if (hasPassword) {
|
|
|
|
|
|
|
|
embedContent.push(h('div.alert.alert-primary', [
|
|
|
|
|
|
|
|
h('i.fa.fa-lock'), ' ',
|
|
|
|
|
|
|
|
Messages.share_embedPasswordAlert, h('br'),
|
|
|
|
|
|
|
|
makeFaqLink()
|
|
|
|
|
|
|
|
]));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var embedButtons = [
|
|
|
|
var embedButtons = [
|
|
|
|
makeCancelButton(), {
|
|
|
|
makeCancelButton(), {
|
|
|
|
className: 'primary',
|
|
|
|
className: 'primary',
|
|
|
@ -1261,6 +1328,21 @@ define([
|
|
|
|
if (!hashes.fileHash) { throw new Error("You must provide a file hash"); }
|
|
|
|
if (!hashes.fileHash) { throw new Error("You must provide a file hash"); }
|
|
|
|
var url = origin + pathname + '#' + hashes.fileHash;
|
|
|
|
var url = origin + pathname + '#' + hashes.fileHash;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// check if the file is password protected
|
|
|
|
|
|
|
|
var parsedHref = Hash.parsePadUrl(url);
|
|
|
|
|
|
|
|
var hasPassword = parsedHref.hashData.password;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var makeFaqLink = function () {
|
|
|
|
|
|
|
|
var link = h('span', [
|
|
|
|
|
|
|
|
h('i.fa.fa-question-circle'),
|
|
|
|
|
|
|
|
h('a', {href: '#'}, Messages.passwordFaqLink)
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
$(link).click(function () {
|
|
|
|
|
|
|
|
common.openURL(config.origin + "/faq.html#security-pad_password");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return link;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var getLinkValue = function () { return url; };
|
|
|
|
var getLinkValue = function () { return url; };
|
|
|
|
|
|
|
|
|
|
|
|
var makeCancelButton = function() {
|
|
|
|
var makeCancelButton = function() {
|
|
|
@ -1272,9 +1354,40 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
// Share link tab
|
|
|
|
// Share link tab
|
|
|
|
var linkContent = [
|
|
|
|
var linkContent = [
|
|
|
|
UI.dialog.selectable(getLinkValue(), { id: 'cp-share-link-preview', tabindex: 1 })
|
|
|
|
UI.dialog.selectableArea(getLinkValue(), { id: 'cp-share-link-preview', tabindex: 1, rows:2 })
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Show alert if the pad is password protected
|
|
|
|
|
|
|
|
if (hasPassword) {
|
|
|
|
|
|
|
|
linkContent.push(h('div.alert.alert-primary', [
|
|
|
|
|
|
|
|
h('i.fa.fa-lock'),
|
|
|
|
|
|
|
|
Messages.share_linkPasswordAlert, h('br'),
|
|
|
|
|
|
|
|
makeFaqLink()
|
|
|
|
|
|
|
|
]));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// warning about sharing links
|
|
|
|
|
|
|
|
var localStore = window.cryptpadStore;
|
|
|
|
|
|
|
|
var dismissButton = h('span.fa.fa-times');
|
|
|
|
|
|
|
|
var shareLinkWarning = h('div.alert.alert-warning.dismissable',
|
|
|
|
|
|
|
|
{ style: 'display: none;' },
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
h('span.cp-inline-alert-text', Messages.share_linkWarning),
|
|
|
|
|
|
|
|
dismissButton
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
linkContent.push(shareLinkWarning);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
localStore.get('hide-alert-shareLinkWarning', function (val) {
|
|
|
|
|
|
|
|
if (val === '1') { return; }
|
|
|
|
|
|
|
|
$(shareLinkWarning).show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(dismissButton).on('click', function () {
|
|
|
|
|
|
|
|
localStore.put('hide-alert-shareLinkWarning', '1');
|
|
|
|
|
|
|
|
$(shareLinkWarning).remove();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var link = h('div.cp-share-modal', linkContent);
|
|
|
|
var link = h('div.cp-share-modal', linkContent);
|
|
|
|
|
|
|
|
|
|
|
|
var linkButtons = [
|
|
|
|
var linkButtons = [
|
|
|
@ -1307,7 +1420,17 @@ define([
|
|
|
|
var friendsList = friendsObject.content;
|
|
|
|
var friendsList = friendsObject.content;
|
|
|
|
|
|
|
|
|
|
|
|
var contactsContent = h('div.cp-share-modal');
|
|
|
|
var contactsContent = h('div.cp-share-modal');
|
|
|
|
$(contactsContent).append(friendsList);
|
|
|
|
var $contactsContent = $(contactsContent);
|
|
|
|
|
|
|
|
$contactsContent.append(friendsList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Show alert if the pad is password protected
|
|
|
|
|
|
|
|
if (hasPassword) {
|
|
|
|
|
|
|
|
$contactsContent.append(h('div.alert.alert-primary', [
|
|
|
|
|
|
|
|
h('i.fa.fa-unlock'),
|
|
|
|
|
|
|
|
Messages.share_contactPasswordAlert, h('br'),
|
|
|
|
|
|
|
|
makeFaqLink()
|
|
|
|
|
|
|
|
]));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var contactButtons = [makeCancelButton(),
|
|
|
|
var contactButtons = [makeCancelButton(),
|
|
|
|
friendsObject.button];
|
|
|
|
friendsObject.button];
|
|
|
@ -1321,12 +1444,20 @@ 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)),
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Show alert if the pad is password protected
|
|
|
|
|
|
|
|
if (hasPassword) {
|
|
|
|
|
|
|
|
embed.append(h('div.alert.alert-primary', [
|
|
|
|
|
|
|
|
h('i.fa.fa-lock'), ' ',
|
|
|
|
|
|
|
|
Messages.share_embedPasswordAlert, h('br'),
|
|
|
|
|
|
|
|
makeFaqLink()
|
|
|
|
|
|
|
|
]));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var embedButtons = [{
|
|
|
|
var embedButtons = [{
|
|
|
|
className: 'cancel',
|
|
|
|
className: 'cancel',
|
|
|
|
name: Messages.cancel,
|
|
|
|
name: Messages.cancel,
|
|
|
@ -1761,7 +1892,7 @@ define([
|
|
|
|
if (e) { return void console.error(e); }
|
|
|
|
if (e) { return void console.error(e); }
|
|
|
|
UIElements.getProperties(common, data, function (e, $prop) {
|
|
|
|
UIElements.getProperties(common, data, function (e, $prop) {
|
|
|
|
if (e) { return void console.error(e); }
|
|
|
|
if (e) { return void console.error(e); }
|
|
|
|
UI.alert($prop[0], undefined, true);
|
|
|
|
UI.openCustomModal($prop[0]);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|