mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
fixed the no ability to add mentions for anonymous users
This commit is contained in:
@ -396,19 +396,6 @@
|
||||
docEditor.setMailMergeRecipients(<?php echo json_encode($dataMailMergeRecipients) ?>); // insert recipient data for mail merge into the file
|
||||
};
|
||||
|
||||
var onRequestUsers = function () {
|
||||
docEditor.setUsers({
|
||||
"users": <?php echo json_encode($usersForMentions) ?>
|
||||
});
|
||||
};
|
||||
|
||||
var onRequestSendNotify = function (event) {
|
||||
var actionLink = JSON.stringify(event.data.actionLink);
|
||||
console.log("onRequestSendNotify:");
|
||||
console.log(event.data);
|
||||
console.log("Link to comment: " + replaceActionLink(location.href, actionLink));
|
||||
};
|
||||
|
||||
var сonnectEditor = function () {
|
||||
|
||||
<?php
|
||||
@ -433,8 +420,6 @@
|
||||
'onRequestInsertImage': onRequestInsertImage,
|
||||
'onRequestCompareFile': onRequestCompareFile,
|
||||
'onRequestMailMergeRecipients': onRequestMailMergeRecipients,
|
||||
"onRequestUsers": onRequestUsers,
|
||||
"onRequestSendNotify": onRequestSendNotify,
|
||||
};
|
||||
|
||||
<?php
|
||||
@ -459,6 +444,21 @@
|
||||
};
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($usersForMentions != null): ?>
|
||||
// add mentions for not anonymous users
|
||||
config.events['onRequestUsers'] = function () {
|
||||
docEditor.setUsers({
|
||||
"users": <?php echo json_encode($usersForMentions) ?>
|
||||
});
|
||||
};
|
||||
config.events['onRequestSendNotify'] = function (event) {
|
||||
var actionLink = JSON.stringify(event.data.actionLink);
|
||||
console.log("onRequestSendNotify:");
|
||||
console.log(event.data);
|
||||
console.log("Link to comment: " + replaceActionLink(location.href, actionLink));
|
||||
};
|
||||
<?php endif; ?>
|
||||
|
||||
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user