mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
python: get link to bookmark
This commit is contained in:
@ -128,6 +128,9 @@ def edit(request):
|
||||
meta = historyManager.getMeta(storagePath)
|
||||
infObj = None
|
||||
|
||||
actionData = request.GET.get('actionLink')
|
||||
actionLink = json.loads(actionData) if actionData else None
|
||||
|
||||
if (meta):
|
||||
infObj = {
|
||||
'author': meta['uname'],
|
||||
@ -159,6 +162,7 @@ def edit(request):
|
||||
}
|
||||
},
|
||||
'editorConfig': {
|
||||
'actionLink': actionLink,
|
||||
'mode': mode,
|
||||
'lang': lang,
|
||||
'callbackUrl': docManager.getCallbackUrl(filename, request),
|
||||
|
||||
@ -77,6 +77,13 @@
|
||||
location.reload(true);
|
||||
};
|
||||
|
||||
var onMakeActionLink = function (event) {
|
||||
var actionData = event.data;
|
||||
var linkParam = JSON.stringify(actionData);
|
||||
var link = location.href + "&actionLink=" + encodeURIComponent(linkParam);
|
||||
docEditor.setActionLink(link);
|
||||
};
|
||||
|
||||
var connectEditor = function () {
|
||||
|
||||
config = {{ cfg | safe }}
|
||||
@ -88,6 +95,7 @@
|
||||
'onRequestEditRights': onRequestEditRights,
|
||||
'onError': onError,
|
||||
'onOutdatedVersion': onOutdatedVersion,
|
||||
'onMakeActionLink': onMakeActionLink,
|
||||
};
|
||||
|
||||
{% if history and historyData %}
|
||||
|
||||
Reference in New Issue
Block a user