mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
Merge pull request #105 from ONLYOFFICE/feature/favorite
Feature/favorite
This commit is contained in:
@ -141,7 +141,7 @@ def edit(request):
|
||||
'author': 'Me',
|
||||
'created': datetime.today().strftime('%d.%m.%Y %H:%M:%S')
|
||||
}
|
||||
|
||||
infObj['favorite'] = request.COOKIES.get('uid') == 'uid-2' if request.COOKIES.get('uid') else None
|
||||
edConfig = {
|
||||
'type': edType,
|
||||
'documentType': fileType,
|
||||
|
||||
@ -99,6 +99,13 @@
|
||||
docEditor.setActionLink(replaceActionLink(location.href, linkParam));
|
||||
};
|
||||
|
||||
var onMetaChange = function (event) {
|
||||
var favorite = !!event.data.favorite;
|
||||
var title = document.title.replace(/^\☆/g, "");
|
||||
document.title = (favorite ? "☆" : "") + title;
|
||||
docEditor.setFavorite(favorite);
|
||||
};
|
||||
|
||||
var connectEditor = function () {
|
||||
|
||||
config = {{ cfg | safe }}
|
||||
@ -111,6 +118,7 @@
|
||||
'onError': onError,
|
||||
'onOutdatedVersion': onOutdatedVersion,
|
||||
'onMakeActionLink': onMakeActionLink,
|
||||
'onMetaChange': onMetaChange,
|
||||
};
|
||||
|
||||
{% if history and historyData %}
|
||||
|
||||
Reference in New Issue
Block a user