[Libreoffice-commits] online.git: loleaflet/css loleaflet/src
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 7 13:36:44 UTC 2020
loleaflet/css/notebookbar.css | 10
loleaflet/src/control/Control.NotebookbarBuilder.js | 17
loleaflet/src/control/Control.NotebookbarCalc.js | 260 ++++++++++
loleaflet/src/control/Control.NotebookbarImpress.js | 313 ++++++++++++
loleaflet/src/control/Control.NotebookbarWriter.js | 490 +++++++++++++++++++-
5 files changed, 1086 insertions(+), 4 deletions(-)
New commits:
commit 7895ab9a293ad304017043fcd7597738441e18c1
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Jul 6 09:42:30 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Jul 7 15:36:25 2020 +0200
notebookbar: add file & help tabs
Change-Id: Ie24b8ff6d541a95df61ff45a3a4ad1b26b08c596
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98254
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/css/notebookbar.css b/loleaflet/css/notebookbar.css
index db4444adb..94cff1fee 100644
--- a/loleaflet/css/notebookbar.css
+++ b/loleaflet/css/notebookbar.css
@@ -358,6 +358,16 @@ div[id*='Row'].notebookbar, div[id*='Column'].notebookbar, #SendToBack.notebookb
margin-top: 10px !important;
}
+/* Help tab */
+#table-Help-Section {
+ margin-top: 40px;
+}
+
+/* File tab */
+#table-File-Section {
+ margin-top: 20px;
+}
+
/* Calc */
/* Home tab */
diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js b/loleaflet/src/control/Control.NotebookbarBuilder.js
index 27857a375..36265b450 100644
--- a/loleaflet/src/control/Control.NotebookbarBuilder.js
+++ b/loleaflet/src/control/Control.NotebookbarBuilder.js
@@ -16,6 +16,7 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({
this._controlHandlers['combobox'] = this._comboboxControlHandler;
this._controlHandlers['listbox'] = this._comboboxControlHandler;
this._controlHandlers['tabcontrol'] = this._overridenTabsControlHandler;
+ this._controlHandlers['menubartoolitem'] = this._menubarToolItemHandler;
this._controlHandlers['pushbutton'] = function() { return false; };
this._controlHandlers['spinfield'] = function() { return false; };
@@ -240,6 +241,22 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({
return builder._tabsControlHandler(parentContainer, data, builder);
},
+ _menubarToolItemHandler: function(parentContainer, data, builder) {
+ var originalInLineState = builder.options.useInLineLabelsForUnoButtons;
+ builder.options.useInLineLabelsForUnoButtons = true;
+
+ data.command = data.id;
+ var control = builder._unoToolButton(parentContainer, data, builder);
+
+ builder.options.useInLineLabelsForUnoButtons = originalInLineState;
+
+ $(control.container).unbind('click');
+ $(control.container).click(function () {
+ console.log(builder.options.map);
+ L.control.menubar()._executeAction.bind({_map: builder.options.map})(undefined, {id: data.id});
+ });
+ },
+
_colorControl: function(parentContainer, data, builder) {
var commandOverride = data.command === '.uno:Color' && builder.map.getDocType() === 'text';
if (commandOverride)
diff --git a/loleaflet/src/control/Control.NotebookbarCalc.js b/loleaflet/src/control/Control.NotebookbarCalc.js
index b8709c2c2..b806bb4b8 100644
--- a/loleaflet/src/control/Control.NotebookbarCalc.js
+++ b/loleaflet/src/control/Control.NotebookbarCalc.js
@@ -3,11 +3,16 @@
* L.Control.NotebookbarCalc
*/
-/* global _ */
+/* global _ _UNO */
L.Control.NotebookbarCalc = L.Control.NotebookbarWriter.extend({
getTabs: function() {
return [
+ {
+ 'text': _('~File'),
+ 'id': '-1',
+ 'name': 'File',
+ },
{
'text': _('~Home'),
'id': '2',
@@ -23,10 +28,263 @@ L.Control.NotebookbarCalc = L.Control.NotebookbarWriter.extend({
'text': _('~Review'),
'id': '6',
'name': 'ReviewLabel'
+ },
+ {
+ 'text': _('~Help'),
+ 'id': '-2',
+ 'name': 'Help',
}
];
},
+ getFileTab: function() {
+ var hasRevisionHistory = L.Params.revHistoryEnabled;
+ var hasPrint = !this._map['wopi'].HidePrintOption;
+ var hasSaveAs = !this._map['wopi'].UserCanNotWriteRelative;
+ var hasShare = this._map['wopi'].EnableShare;
+
+
+ return {
+ 'id': '',
+ 'type': 'control',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': '',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'NotebookBar',
+ 'type': 'grid',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'box',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'ContextContainer',
+ 'type': 'tabcontrol',
+ 'text': '',
+ 'enabled': 'true',
+ 'selected': '-1',
+ 'children': [
+ {
+ 'id': '',
+ 'type': 'tabpage',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'File Tab',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'File',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'File-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ hasSaveAs ?
+ {
+ 'id': 'Section2',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'saveas',
+ 'type': 'menubartoolitem',
+ 'text': _UNO('.uno:SaveAs', 'spreadsheet'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ hasShare ?
+ {
+ 'id': 'Section3',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'shareas',
+ 'type': 'menubartoolitem',
+ 'text': _('Share...'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ hasPrint ?
+ {
+ 'id': 'Section4',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'print',
+ 'type': 'menubartoolitem',
+ 'text': _UNO('.uno:Print', 'spreadsheet'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ hasRevisionHistory ?
+ {
+ 'id': 'Section5',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'rev-history',
+ 'type': 'menubartoolitem',
+ 'text': _('See revision history'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ {
+ 'id': 'saveas-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'vertical': 'true',
+ 'children': [
+ {
+ 'id': 'saveas-Section1',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section7',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-ods',
+ 'type': 'menubartoolitem',
+ 'text': _('ODF spreadsheet (.ods)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section2',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section10',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-pdf',
+ 'type': 'menubartoolitem',
+ 'text': _('PDF Document (.pdf)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'vertical': 'true',
+ 'children': [
+ {
+ 'id': 'saveas-Section1',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section8',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-xls',
+ 'type': 'menubartoolitem',
+ 'text': _('Excel 2003 Spreadsheet (.xls)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section2',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section9',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-xlsx',
+ 'type': 'menubartoolitem',
+ 'text': _('Excel Spreadsheet (.xlsx)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ };
+ },
+
getHomeTab: function() {
return {
'id': '',
diff --git a/loleaflet/src/control/Control.NotebookbarImpress.js b/loleaflet/src/control/Control.NotebookbarImpress.js
index 077baf28e..43cff194f 100644
--- a/loleaflet/src/control/Control.NotebookbarImpress.js
+++ b/loleaflet/src/control/Control.NotebookbarImpress.js
@@ -3,7 +3,7 @@
* L.Control.NotebookbarImpress
*/
-/* global _ */
+/* global _ _UNO */
L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
getShortcutsBarData: function() {
@@ -31,14 +31,24 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
'type': 'toolitem',
'text': _('Redo'),
'command': '.uno:Redo'
+ },
+ {
+ 'text': _('~Help'),
+ 'id': '-2',
+ 'name': 'Help',
}
]
}
];
},
-
+
getTabs: function() {
return [
+ {
+ 'text': _('~File'),
+ 'id': '-1',
+ 'name': 'File',
+ },
{
'text': _('~Home'),
'id': '2',
@@ -64,6 +74,305 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
];
},
+ getFileTab: function() {
+ var hasRevisionHistory = L.Params.revHistoryEnabled;
+ var hasPrint = !this._map['wopi'].HidePrintOption;
+ var hasSaveAs = !this._map['wopi'].UserCanNotWriteRelative;
+ var hasShare = this._map['wopi'].EnableShare;
+
+ return {
+ 'id': '',
+ 'type': 'control',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': '',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'NotebookBar',
+ 'type': 'grid',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'box',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'ContextContainer',
+ 'type': 'tabcontrol',
+ 'text': '',
+ 'enabled': 'true',
+ 'selected': '-1',
+ 'children': [
+ {
+ 'id': '',
+ 'type': 'tabpage',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'File Tab',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'File',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'File-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ hasSaveAs ?
+ {
+ 'id': 'Section2',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'saveas',
+ 'type': 'menubartoolitem',
+ 'text': _UNO('.uno:SaveAs', 'presentation'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ hasShare ?
+ {
+ 'id': 'Section3',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'shareas',
+ 'type': 'menubartoolitem',
+ 'text': _('Share...'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ hasPrint ?
+ {
+ 'id': 'Section4',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'print',
+ 'type': 'menubartoolitem',
+ 'text': _UNO('.uno:Print', 'presentation'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ hasRevisionHistory ?
+ {
+ 'id': 'Section5',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'rev-history',
+ 'type': 'menubartoolitem',
+ 'text': _('See revision history'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ {
+ 'id': 'saveas-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'vertical': 'true',
+ 'children': [
+ {
+ 'id': 'saveas-Section1',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section7',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-odp',
+ 'type': 'menubartoolitem',
+ 'text': _('ODF presentation (.odp)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section2',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section10',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-odg',
+ 'type': 'menubartoolitem',
+ 'text': _('ODF Drawing (.odg)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'vertical': 'true',
+ 'children': [
+ {
+ 'id': 'saveas-Section1',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section8',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-ppt',
+ 'type': 'menubartoolitem',
+ 'text': _('PowerPoint 2003 Presentation (.ppt)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section2',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section9',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-pptx',
+ 'type': 'menubartoolitem',
+ 'text': _('PowerPoint Presentation (.pptx)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'vertical': 'true',
+ 'children': [
+ {
+ 'id': 'saveas-Section1',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section6',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-pdf',
+ 'type': 'menubartoolitem',
+ 'text': _('PDF Document (.pdf)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section2',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section11',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'type': 'menubartoolitem',
+ 'text': '',
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ };
+ },
+
getHomeTab: function() {
return {
'id': '',
diff --git a/loleaflet/src/control/Control.NotebookbarWriter.js b/loleaflet/src/control/Control.NotebookbarWriter.js
index c78f31c6f..726673b95 100644
--- a/loleaflet/src/control/Control.NotebookbarWriter.js
+++ b/loleaflet/src/control/Control.NotebookbarWriter.js
@@ -3,11 +3,16 @@
* L.Control.NotebookbarWriter
*/
-/* global _ */
+/* global _ _UNO */
L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
getTabs: function() {
return [
+ {
+ 'text': _('~File'),
+ 'id': '-1',
+ 'name': 'File',
+ },
{
'text': _('~Home'),
'id': '2',
@@ -39,10 +44,493 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
'id': '8',
'name': 'TableLabel',
'context': 'Table'
+ },
+ {
+ 'text': _('~Help'),
+ 'id': '-2',
+ 'name': 'Help',
}
];
},
+ selectedTab: function(tabName) {
+ switch (tabName) {
+ case 'File':
+ this.loadTab(this.getFileTab());
+ break;
+
+ case 'Help':
+ this.loadTab(this.getHelpTab());
+ break;
+ }
+ },
+
+ getFileTab: function() {
+ var hasSigning = L.DomUtil.get('document-signing-bar') !== null;
+ var hasRevisionHistory = L.Params.revHistoryEnabled;
+ var hasPrint = !this._map['wopi'].HidePrintOption;
+ var hasSaveAs = !this._map['wopi'].UserCanNotWriteRelative;
+ var hasShare = this._map['wopi'].EnableShare;
+
+
+ return {
+ 'id': '',
+ 'type': 'control',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': '',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'NotebookBar',
+ 'type': 'grid',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'box',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'ContextContainer',
+ 'type': 'tabcontrol',
+ 'text': '',
+ 'enabled': 'true',
+ 'selected': '-1',
+ 'children': [
+ {
+ 'id': '',
+ 'type': 'tabpage',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'File Tab',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'File',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'File-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ hasSaveAs ?
+ {
+ 'id': 'Section2',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'saveas',
+ 'type': 'menubartoolitem',
+ 'text': _UNO('.uno:SaveAs', 'text'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ hasShare ?
+ {
+ 'id': 'Section3',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'shareas',
+ 'type': 'menubartoolitem',
+ 'text': _('Share...'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ hasPrint ?
+ {
+ 'id': 'Section4',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'print',
+ 'type': 'menubartoolitem',
+ 'text': _UNO('.uno:Print', 'text'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ hasRevisionHistory ?
+ {
+ 'id': 'Section5',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'rev-history',
+ 'type': 'menubartoolitem',
+ 'text': _('See revision history'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ {
+ 'id': 'saveas-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'vertical': 'true',
+ 'children': [
+ {
+ 'id': 'saveas-Section1',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section7',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-odt',
+ 'type': 'menubartoolitem',
+ 'text': _('ODF text document (.odt)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section2',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section10',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-rtf',
+ 'type': 'menubartoolitem',
+ 'text': _('Rich Text (.rtf)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'vertical': 'true',
+ 'children': [
+ {
+ 'id': 'saveas-Section1',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section8',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-doc',
+ 'type': 'menubartoolitem',
+ 'text': _('Word 2003 Document (.doc)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section2',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section9',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-docx',
+ 'type': 'menubartoolitem',
+ 'text': _('Word Document (.docx)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'vertical': 'true',
+ 'children': [
+ {
+ 'id': 'saveas-Section1',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section6',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-pdf',
+ 'type': 'menubartoolitem',
+ 'text': _('PDF Document (.pdf)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ },
+ {
+ 'id': 'saveas-Section2',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section11',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'downloadas-epub',
+ 'type': 'menubartoolitem',
+ 'text': _('EPUB (.epub)'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ hasSigning ?
+ {
+ 'id': 'Section12',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'signdocument',
+ 'type': 'menubartoolitem',
+ 'text': _('Sign document'),
+ 'command': ''
+ }
+ ]
+ } : {}
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ };
+ },
+
+ getHelpTab: function() {
+ var hasLatestUpdates = window.enableWelcomeMessage;
+
+ return {
+ 'id': '',
+ 'type': 'control',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': '',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'NotebookBar',
+ 'type': 'grid',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'box',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'ContextContainer',
+ 'type': 'tabcontrol',
+ 'text': '',
+ 'enabled': 'true',
+ 'selected': '-2',
+ 'children': [
+ {
+ 'id': '',
+ 'type': 'tabpage',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Help Tab',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Help',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Help-Section',
+ 'type': 'container',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'Section1',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'online-help',
+ 'type': 'menubartoolitem',
+ 'text': _('Online Help'),
+ 'command': ''
+ }
+ ]
+ },
+ {
+ 'id': 'Section2',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'keyboard-shortcuts',
+ 'type': 'menubartoolitem',
+ 'text': _('Keyboard shortcuts'),
+ 'command': ''
+ }
+ ]
+ },
+ {
+ 'id': 'Section3',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'report-an-issue',
+ 'type': 'menubartoolitem',
+ 'text': _('Report an issue'),
+ 'command': ''
+ }
+ ]
+ },
+ hasLatestUpdates ?
+ {
+ 'id': 'Section4',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'latest-updates',
+ 'type': 'menubartoolitem',
+ 'text': _('Latest Updates'),
+ 'command': ''
+ }
+ ]
+ } : {},
+ {
+ 'id': 'Section5',
+ 'type': 'toolbox',
+ 'text': '',
+ 'enabled': 'true',
+ 'children': [
+ {
+ 'id': 'about',
+ 'type': 'menubartoolitem',
+ 'text': _('About'),
+ 'command': ''
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ };
+ },
+
getHomeTab: function() {
return {
'id': '',
More information about the Libreoffice-commits
mailing list