From 60897d6d682864bcc8dcddbb1fc26c0aee823fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Fri, 27 Oct 2023 17:46:25 -0400 Subject: [PATCH] postmessage: added message to collapse / extend notebookbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new messages are: Collapse_Notebookbar and Extend_Notebookbar As a side effect they also hide the classic toolbar the same way Signed-off-by: Hubert Figuière Change-Id: Ic9d04876acb06f2885a6be1e171df7f87e513ed8 --- browser/html/framed.doc.html | 8 ++++++++ browser/src/map/handler/Map.WOPI.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/browser/html/framed.doc.html b/browser/html/framed.doc.html index 136026fc833c..f77da61d74b4 100644 --- a/browser/html/framed.doc.html +++ b/browser/html/framed.doc.html @@ -139,6 +139,12 @@ 'Values': {'Mode': value}}); } + function CollapseNotebookbar(collapse) { + post({'MessageId': collapse ? 'Collapse_Notebookbar' : 'Extend_Notebookbar', + 'Values': null + }); + } + function Execute(messageId, values) { post({'MessageId': messageId, 'Values': values}); } @@ -361,6 +367,8 @@

UI modification

+ +

Send UNO Commands

diff --git a/browser/src/map/handler/Map.WOPI.js b/browser/src/map/handler/Map.WOPI.js index 84d19994752e..fe9992d19931 100644 --- a/browser/src/map/handler/Map.WOPI.js +++ b/browser/src/map/handler/Map.WOPI.js @@ -306,6 +306,14 @@ L.Map.WOPI = L.Handler.extend({ this._map.uiManager.hideRuler(); return; } + else if (msg.MessageId === 'Collapse_Notebookbar') { + this._map.uiManager.collapseNotebookbar(); + return; + } + else if (msg.MessageId === 'Extend_Notebookbar') { + this._map.uiManager.extendNotebookbar(); + return; + } else if (msg.MessageId === 'Show_Menu_Item' || msg.MessageId === 'Hide_Menu_Item') { if (!msg.Values) { window.app.console.error('Property "Values" not set');