[Libreoffice-commits] online.git: loleaflet/src
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 1 16:34:36 UTC 2020
loleaflet/src/control/Control.Notebookbar.js | 30 ++++++++++++++++++++
loleaflet/src/control/Control.NotebookbarBuilder.js | 7 ++++
2 files changed, 37 insertions(+)
New commits:
commit b60009ed2b8f507111920c893dd5ea01d2b8d66b
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Apr 28 08:46:49 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri May 1 18:34:18 2020 +0200
notebookbar: override visible tabs
Change-Id: Ib71a8d75e3b6355d9ffa0a6be1eb695c01f0b1ff
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93284
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/src/control/Control.Notebookbar.js b/loleaflet/src/control/Control.Notebookbar.js
index 087823cce..c2c9b4049 100644
--- a/loleaflet/src/control/Control.Notebookbar.js
+++ b/loleaflet/src/control/Control.Notebookbar.js
@@ -63,6 +63,36 @@ L.Control.Notebookbar = L.Control.extend({
break;
}
},
+
+ getTabs: function() {
+ return [
+ {
+ 'text': '~Home',
+ 'id': '2',
+ 'name': 'HomeLabel'
+ },
+ {
+ 'text': '~Insert',
+ 'id': '3',
+ 'name': 'InsertLabel'
+ },
+ {
+ 'text': '~Layout',
+ 'id': '4',
+ 'name': 'LayoutLabel'
+ },
+ {
+ 'text': 'Reference~s',
+ 'id': '5',
+ 'name': 'ReferencesLabel'
+ },
+ {
+ 'text': '~Table',
+ 'id': '8',
+ 'name': 'TableLabel'
+ }
+ ];
+ },
// required, called by builder, not needed in this container
setCurrentScrollPosition: function() {},
diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js b/loleaflet/src/control/Control.NotebookbarBuilder.js
index 40c8ecc7d..34e08d834 100644
--- a/loleaflet/src/control/Control.NotebookbarBuilder.js
+++ b/loleaflet/src/control/Control.NotebookbarBuilder.js
@@ -14,6 +14,8 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({
_overrideHandlers: function() {
this._controlHandlers['combobox'] = this._comboboxControl;
this._controlHandlers['listbox'] = this._comboboxControl;
+ this._controlHandlers['tabcontrol'] = this._overridenTabsControlHandler;
+
this._controlHandlers['pushbutton'] = function() { return false; };
this._controlHandlers['spinfield'] = function() { return false; };
@@ -107,6 +109,11 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({
return false;
},
+ _overridenTabsControlHandler: function(parentContainer, data, builder) {
+ data.tabs = builder.wizard.getTabs();
+ return builder._tabsControlHandler(parentContainer, data, builder);
+ },
+
_colorControl: function(parentContainer, data, builder) {
var commandOverride = data.command === '.uno:Color';
if (commandOverride)
More information about the Libreoffice-commits
mailing list