From 9ca7d504d2364b6ecfed58251c077f2ab0723bfa Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 28 Jan 2019 11:31:57 +0100 Subject: [PATCH] Display help box in oo apps --- www/common/onlyoffice/app-oo.less | 7 +++++++ www/common/onlyoffice/inner.js | 6 +++++- www/common/translations/messages.js | 7 +++++++ www/sheet/inner.html | 6 ++++-- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/www/common/onlyoffice/app-oo.less b/www/common/onlyoffice/app-oo.less index 0f464bf89..1d420a179 100644 --- a/www/common/onlyoffice/app-oo.less +++ b/www/common/onlyoffice/app-oo.less @@ -41,6 +41,13 @@ body.cp-app-sheet, body.cp-app-oodoc, body.cp-app-ooslide { background-color: lightgrey; display: flex; } + #cp-app-oo-editor { + flex: 1; + height: 100%; + background-color: lightgrey; + display: flex; + flex-flow: column; + } #ooframe { flex: 1; border:none; diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index a1b7d0c95..cfd8528c8 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -548,7 +548,7 @@ define([ var makeChannel = function () { var msgEv = Util.mkEvent(); - var iframe = $('#cp-app-oo-container > iframe')[0].contentWindow; + var iframe = $('#cp-app-oo-editor > iframe')[0].contentWindow; window.addEventListener('message', function (msg) { if (msg.source !== iframe) { return; } msgEv.fire(msg); @@ -813,6 +813,10 @@ define([ setEditable(false); }); $rightside.append($forget); + + var helpMenu = common.createHelpMenu(['sheet']); + $('#cp-app-oo-editor').prepend(helpMenu.menu); + toolbar.$drawer.append(helpMenu.button); }; config.onReady = function (info) { diff --git a/www/common/translations/messages.js b/www/common/translations/messages.js index ec9de1bce..9ea452767 100644 --- a/www/common/translations/messages.js +++ b/www/common/translations/messages.js @@ -1151,6 +1151,13 @@ define(function () { modes: 'Use the dropdown menus in the submenu to change syntax highlighting modes or color themes', }; + out.help.oo = { + + }; + out.help.sheet = { + + }; + out.help.slide = { markdown: 'Write slides in Markdown and separate them with a line containing ---', present: 'Start the presentation using the button', diff --git a/www/sheet/inner.html b/www/sheet/inner.html index 6bb9eb3bf..20df7c679 100644 --- a/www/sheet/inner.html +++ b/www/sheet/inner.html @@ -10,8 +10,10 @@
-
- +
+
+ +