From 6155284c4dff199ba5d6b2e7c16cad0826a03b3e Mon Sep 17 00:00:00 2001 From: Ludovic Dubost Date: Thu, 2 Jan 2020 11:09:12 +0100 Subject: [PATCH] Merged initial patches for image upload, partially working --- www/common/onlyoffice/inner.js | 74 ++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 4 deletions(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 60bc2c79e..649c2086f 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -18,6 +18,7 @@ define([ '/common/outer/worker-channel.js', '/bower_components/file-saver/FileSaver.min.js', + '/common/sframe-common-file.js', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'less!/bower_components/components-font-awesome/css/font-awesome.min.css', @@ -39,9 +40,11 @@ define([ EmptyCell, EmptyDoc, EmptySlide, - Channel) + Channel, + SFCFile) { var saveAs = window.saveAs; + var Nacl = window.nacl; var APP = window.APP = { $: $ @@ -224,6 +227,10 @@ define([ // loadable by users joining after the checkpoint var fixSheets = function () { try { + // if we are not in the sheet app + // we should not call this code + if (!editor.GetSheets) + return; var editor = window.frames[0].editor; var s = editor.GetSheets(); if (s.length === 0) { return; } @@ -697,9 +704,9 @@ define([ '#fm-btn-save { display: none !important; }' + '#panel-settings-general tr.autosave { display: none !important; }' + '#panel-settings-general tr.coauth { display: none !important; }' + - '#header { display: none !important; }' + - '#id-toolbar-full-placeholder-btn-insertimage { display: none; }' + - '#id-toolbar-full-placeholder-btn-insertequation { display: none; }'; + '#header { display: none !important; }'; + // + '#id-toolbar-full-placeholder-btn-insertimage { display: none; }' + + // '#id-toolbar-full-placeholder-btn-insertequation { display: none; }'; $('