From 5e2da97e65ee3eff1c46506626bf1a36817441fa Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 23 Nov 2021 13:43:57 +0100 Subject: [PATCH] Reenable OO charts and tables --- www/common/onlyoffice/inner.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index d2d6e8c07..dd085a9dc 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -1586,10 +1586,6 @@ define([ var $tb = $iframe.find('head'); var css = // Old OO //'#id-toolbar-full .toolbar-group:nth-child(2), #id-toolbar-full .separator:nth-child(3) { display: none; }' + - '#slot-btn-inschart { display: none !important; }' + // XXX XXX - '#slot-btn-insertchart { display: none !important; }' + // XXX XXX - '#slot-btn-instable { display: none !important; }' + // XXX XXX - '#slot-btn-inserttable { display: none !important; }' + // XXX XXX //'#fm-btn-save { display: none !important; }' + //'#panel-settings-general tr.autosave { display: none !important; }' + //'#panel-settings-general tr.coauth { display: none !important; }' + @@ -1634,29 +1630,6 @@ define([ } }, "onDocumentReady": function () { - // XXX remove the following block - try { - var app = common.getMetadataMgr().getPrivateData().ooType; - var d, hasChart; - if (app === 'doc') { - d = getEditor().GetDocument(); - hasChart = d.GetAllCharts().length || d.Document.Content.some(function (obj) { - return obj instanceof getWindow().AscCommonWord.CTable; - }); - if (hasChart) { Feedback.send('OO_DOC_CHART', true); } - } else if (app === 'presentation') { - d = getEditor().GetPresentation().Presentation; - hasChart = d.Slides.some(function (slide) { - return slide.getDrawingObjects().some(function (obj) { - return obj instanceof getWindow().AscFormat.CChartSpace || obj instanceof getWindow().AscFormat.CGraphicFrame; - }); - }); - if (hasChart) { Feedback.send('OO_SLIDE_CHART', true); } - } - } catch (e) {} - - - evOnSync.fire(); var onMigrateRdy = Util.mkEvent(); onMigrateRdy.reg(function () {