Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postmessage: added message to collapse / extend notebookbar #7556

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions browser/html/framed.doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}
Expand Down Expand Up @@ -361,6 +367,8 @@ <h3>UI modification</h3>
<p>
<button onclick="ShowNotebookbar(false); return false;">Compact Toolbar</button>
<button onclick="ShowNotebookbar(true); return false;">Tabbed Toolbar</button>
<button onclick="CollapseNotebookbar(true); return false;">Collapse Tabbed Toolbar</button>
<button onclick="CollapseNotebookbar(false); return false;">Extend Tabbed Toolbar</button>
</form>

<h3>Send UNO Commands</h3>
Expand Down
8 changes: 8 additions & 0 deletions browser/src/map/handler/Map.WOPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Loading