mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-02-10 18:05:10 +08:00
feat(csharp): refresh file config
This commit is contained in:
@ -199,6 +199,18 @@
|
||||
}
|
||||
};
|
||||
|
||||
var onRequestRefreshFile = function(event) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "webeditor.ashx?type=config&fileName=" + encodeURIComponent(config.document.title) +
|
||||
"&directUrl=" + !!config.document.directUrl +
|
||||
"&permissions=" + encodeURIComponent(JSON.stringify(config.document.permissions)));
|
||||
xhr.send();
|
||||
xhr.onload = function () {
|
||||
innerAlert(xhr.responseText);
|
||||
docEditor.refreshFile(JSON.parse(xhr.responseText));
|
||||
};
|
||||
};
|
||||
|
||||
var onRequestOpen = function (event) { // user open external data source
|
||||
innerAlert("onRequestOpen");
|
||||
var windowName = event.data.windowName;
|
||||
@ -337,7 +349,7 @@
|
||||
};
|
||||
|
||||
if (config.editorConfig.user.id) {
|
||||
|
||||
config.events['onRequestRefreshFile'] = onRequestRefreshFile;
|
||||
config.events['onRequestClose'] = onRequestClose;
|
||||
config.events['onRequestHistory'] = function (event) { // the user is trying to show the document version history
|
||||
|
||||
|
||||
Reference in New Issue
Block a user