Display help box in oo apps

pull/1/head
yflory 6 years ago
parent e78fc2abcb
commit 9ca7d504d2

@ -41,6 +41,13 @@ body.cp-app-sheet, body.cp-app-oodoc, body.cp-app-ooslide {
background-color: lightgrey; background-color: lightgrey;
display: flex; display: flex;
} }
#cp-app-oo-editor {
flex: 1;
height: 100%;
background-color: lightgrey;
display: flex;
flex-flow: column;
}
#ooframe { #ooframe {
flex: 1; flex: 1;
border:none; border:none;

@ -548,7 +548,7 @@ define([
var makeChannel = function () { var makeChannel = function () {
var msgEv = Util.mkEvent(); 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) { window.addEventListener('message', function (msg) {
if (msg.source !== iframe) { return; } if (msg.source !== iframe) { return; }
msgEv.fire(msg); msgEv.fire(msg);
@ -813,6 +813,10 @@ define([
setEditable(false); setEditable(false);
}); });
$rightside.append($forget); $rightside.append($forget);
var helpMenu = common.createHelpMenu(['sheet']);
$('#cp-app-oo-editor').prepend(helpMenu.menu);
toolbar.$drawer.append(helpMenu.button);
}; };
config.onReady = function (info) { config.onReady = function (info) {

@ -1151,6 +1151,13 @@ define(function () {
modes: 'Use the dropdown menus in the <span class="fa fa-ellipsis-h"></span> submenu to change syntax highlighting modes or color themes', modes: 'Use the dropdown menus in the <span class="fa fa-ellipsis-h"></span> submenu to change syntax highlighting modes or color themes',
}; };
out.help.oo = {
};
out.help.sheet = {
};
out.help.slide = { out.help.slide = {
markdown: 'Write slides in <a href="http://www.markdowntutorial.com/">Markdown</a> and separate them with a line containing <code>---</code>', markdown: 'Write slides in <a href="http://www.markdowntutorial.com/">Markdown</a> and separate them with a line containing <code>---</code>',
present: 'Start the presentation using the <span class="fa fa-play-circle"></span> button', present: 'Start the presentation using the <span class="fa fa-play-circle"></span> button',

@ -10,8 +10,10 @@
<body class="cp-app-sheet"> <body class="cp-app-sheet">
<div id="cp-toolbar" class="cp-toolbar-container"></div> <div id="cp-toolbar" class="cp-toolbar-container"></div>
<div id="cp-app-oo-container"> <div id="cp-app-oo-container">
<div id="cp-app-oo-placeholder"></div> <div id="cp-app-oo-editor">
<script type="text/javascript" src="/common/onlyoffice/web-apps/apps/api/documents/api.js"></script> <div id="cp-app-oo-placeholder"></div>
<script type="text/javascript" src="/common/onlyoffice/web-apps/apps/api/documents/api.js"></script>
</div>
</div> </div>
</body> </body>

Loading…
Cancel
Save