♻️🎨 connector: light cleanup, load (#525)

renaming logger, adding health endpoint, working with old API,
removing aggressive force save stuff, missing forgotten files etc,
documentation
This commit is contained in:
Eric Doughty-Papassideris
2024-07-10 01:41:00 +02:00
committed by ericlinagora
parent 16dbf8077b
commit 92aad866d5
17 changed files with 300 additions and 172 deletions
@@ -34,24 +34,6 @@
preview: <%= it.preview %>,
}
}
const documentChangeHandler = function (event) {
$.ajax({
url: `${window.baseURL}save?file_id=<%= it.file_id %>&company_id=<%= it.company_id %>&token=<%= it.token %>`,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
file_id: "<%= it.file_id %>",
key: "<%= it.file_version_id %>",
token: "<%= it.token %>"
}),
success: function() {
console.log('save success');
},
error: function() {
console.log('save error');
}
});
}
window.docEditor = new DocsAPI.DocEditor('onlyoffice_container_instance', {
scrollSensitivity: window.mode === 'text' ? 100 : 40,
@@ -80,11 +62,8 @@
},
},
},
events: {
onDocumentStateChange: documentChangeHandler,
}
});
});
</script>
</body>