loleaflet/src/control/Control.NotebookbarBuilder.js | 15 +++++++++++++++ loleaflet/src/layer/tile/TileLayer.js | 1 - 2 files changed, 15 insertions(+), 1 deletion(-)
New commits: commit 64fba4f3afd6ffb68222a531dbb3bcabbcef1eac Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Thu Aug 6 08:37:26 2020 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Thu Aug 6 09:33:16 2020 +0200 notebookbar: working insert header/footer Change-Id: Ib5419669bdcb3ce05b10e0093d87bcea9ffeb905 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100194 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/loleaflet/src/control/Control.NotebookbarBuilder.js b/loleaflet/src/control/Control.NotebookbarBuilder.js index 40e3320cc..cc42143e2 100644 --- a/loleaflet/src/control/Control.NotebookbarBuilder.js +++ b/loleaflet/src/control/Control.NotebookbarBuilder.js @@ -48,6 +48,8 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ this._toolitemHandlers['.uno:Presentation'] = this._startPresentationControl; this._toolitemHandlers['.uno:Save'] = this._saveControl; this._toolitemHandlers['.uno:Menubar'] = this._menubarControl; + this._toolitemHandlers['.uno:InsertPageHeader'] = this._headerFooterControl; + this._toolitemHandlers['.uno:InsertPageFooter'] = this._headerFooterControl; this._toolitemHandlers['up'] = this._toolbarItemControl; this._toolitemHandlers['down'] = this._toolbarItemControl; @@ -422,6 +424,19 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ }); }, + _headerFooterControl: function(parentContainer, data, builder) { + var control = builder._unoToolButton(parentContainer, data, builder); + + $(control.container).unbind('click'); + $(control.container).click(function () { + if (!$(control.container).hasClass('disabled')) { + builder.refreshSidebar = true; + var command = data.command + '?On:bool=true'; + builder.callback('toolbutton', 'click', control.button, command, builder); + } + }); + }, + _insertTableControl: function(parentContainer, data, builder) { var options = {hasDropdownArrow: true}; var control = builder._unoToolButton(parentContainer, data, builder, options); diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index ad3d0a598..e0f1b8d37 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -1010,7 +1010,6 @@ L.TileLayer = L.GridLayer.extend({ }, _onJSDialogMsg: function (textMsg) { - console.log(textMsg); if (window.mode.isMobile()) { var msgData = JSON.parse(textMsg.substring('jsdialog:'.length + 1)); if (msgData.type == 'borderwindow') _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits