Merge branch 'soon' into main

pull/1/head
ansuz 4 years ago
commit 6e2c02e1e2

@ -1035,6 +1035,7 @@
&.fa-download { order: 30; }
&.fa-print { order: 35; }
&.fa-trash { order: 40; }
&.cp-toolbar-icon-pad-settings { order: 75; }
&.fa-info-circle { order: 100; }
&.cp-toolbar-icon-help { order: 150; }

@ -1674,7 +1674,9 @@ define([
if (padData && padData.validateKey && store.messenger) {
store.messenger.storeValidateKey(data.channel, padData.validateKey);
}
postMessage(clientId, "PAD_READY", pad.noCache);
onReadyEvt.reg(function () {
postMessage(clientId, "PAD_READY", pad.noCache);
});
},
onMessage: function (m, user, validateKey, isCp, hash) {
channel.lastHash = hash;

@ -335,7 +335,7 @@ define([
var $settingsButton = framework._.sfCommon.createButton('', true, {
drawer: true,
text: Messages.pad_settings_title,
name: 'pad_settings',
name: 'pad-settings',
icon: 'fa-cog',
}, function () {
UI.alert(getSettings());
@ -655,6 +655,7 @@ define([
var documentBody = ifrWindow.document.body;
var inner = window.inner = documentBody;
var $inner = $(inner);
$inner.attr('contenteditable', 'false');
var observer = new MutationObserver(function(muts) {
muts.forEach(function(mut) {
@ -712,7 +713,6 @@ define([
if (!privateData.isEmbed) {
mkHelpMenu(framework);
}
mkSettingsMenu(framework);
framework._.sfCommon.getAttribute(['pad', 'width'], function(err, data) {
var active = data || typeof(data) === "undefined";
@ -1033,6 +1033,12 @@ define([
$inner.attr('contenteditable', 'false');
}
common.getPadMetadata(null, function (md) {
if (md && md.error) { return; }
if (!common.isOwned(md.owners)) { return; }
mkSettingsMenu(framework);
});
var fmConfig = {
ckeditor: editor,
dropArea: $inner,

Loading…
Cancel
Save