summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Pinto Silva <pedro.silva@collabora.com>2022-04-13 12:13:50 +0200
committerpedropintosilva <65948705+pedropintosilva@users.noreply.github.com>2022-04-25 09:20:40 +0200
commit5f7189d2cba1b71e7f1223fa056dc5ea68463361 (patch)
tree5d3726284d9ec6f9ef262d99de3b03870d5f2f85
parentjsdialog: use only one handler for selection (diff)
downloadonline-5f7189d2cba1b71e7f1223fa056dc5ea68463361.tar.gz
online-5f7189d2cba1b71e7f1223fa056dc5ea68463361.zip
Fix repair document item on notebookbar writer
Context: Repair document on the Notebookbar is currently always a small item https://archive.org/download/repairdoc-writer-smallitem/repairdoc-writer-smallitem.png ,it should be a bigtooltiem when the extra additional/optional item Sign document is not available: - Set it to small item and vertically stacked when hasSigning is true - Set it to bigmenubartoolitem when hasSigning is false Note: Make use of the newly added bigmenubartoolitem in 8d149d31dbd9f59e6df4a8bd99743b6b1a07cb0e Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com> Change-Id: I26a8e1b721bf2550127eff1ccfdc44ab4876db52
-rw-r--r--browser/src/control/Control.NotebookbarWriter.js41
1 files changed, 27 insertions, 14 deletions
diff --git a/browser/src/control/Control.NotebookbarWriter.js b/browser/src/control/Control.NotebookbarWriter.js
index 744d91d0d0..b545039a49 100644
--- a/browser/src/control/Control.NotebookbarWriter.js
+++ b/browser/src/control/Control.NotebookbarWriter.js
@@ -216,25 +216,38 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
]);
}
- content.push({
- 'type': 'container',
- 'children': [
- {
- 'id': 'repair',
- 'type': 'menubartoolitem',
- 'text': _('Repair'),
- 'command': _('Repair')
- },
- hasSigning ?
+ if (hasSigning === false) {
+ content.push({
+ 'type': 'container',
+ 'children': [
+ {
+ 'id': 'repair',
+ 'type': 'bigmenubartoolitem',
+ 'text': _('Repair'),
+ 'command': _('Repair')
+ }
+ ]
+ });
+ } else {
+ content.push({
+ 'type': 'container',
+ 'children': [
+ {
+ 'id': 'repair',
+ 'type': 'menubartoolitem',
+ 'text': _('Repair'),
+ 'command': _('Repair')
+ },
{
'id': 'signdocument',
'type': 'menubartoolitem',
'text': _('Sign document'),
'command': ''
- } : {},
- ],
- 'vertical': 'true'
- });
+ }
+ ],
+ 'vertical': 'true'
+ });
+ }
return this.getTabPage('File', content);
},