Skip to content

Commit

Permalink
postMessage in safari (Fixed #213)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinneyS committed Jan 23, 2020
1 parent 0616317 commit 17691dd
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
if (OCA.Onlyoffice.inframe) {
window.parent.postMessage({
method: "editorShowHeaderButton"
});
},
"*");
}
params.push("inframe=2");
} else {
Expand Down Expand Up @@ -178,7 +179,8 @@
window.parent.postMessage({
method: "editorRequestSaveAs",
param: saveData
});
},
"*");
} else {
OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Save as"),
function (fileDir) {
Expand Down Expand Up @@ -220,7 +222,8 @@
window.parent.postMessage({
method: "editorRequestInsertImage",
param: imageMimes
});
},
"*");
} else {
OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Insert image"), OCA.Onlyoffice.editorInsertImage, false, imageMimes);
}
Expand Down Expand Up @@ -253,7 +256,8 @@
window.parent.postMessage({
method: "editorRequestMailMergeRecipients",
param: recipientMimes
});
},
"*");
} else {
OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select recipients"), OCA.Onlyoffice.editorSetRecipient, false, recipientMimes);
}
Expand Down Expand Up @@ -285,13 +289,15 @@

window.parent.postMessage({
method: "editorRequestClose"
});
},
"*");
};

OCA.Onlyoffice.onRequestSharingSettings = function() {
window.parent.postMessage({
method: "editorRequestSharingSettings"
});
},
"*");
};

OCA.Onlyoffice.onRequestCompareFile = function() {
Expand All @@ -303,7 +309,8 @@
window.parent.postMessage({
method: "editorRequestCompareFile",
param: revisedMimes
});
},
"*");
} else {
OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select file to compare"), OCA.Onlyoffice.editorSetRevised, false, revisedMimes);
}
Expand Down

0 comments on commit 17691dd

Please sign in to comment.