loleaflet/images/sc_defaultcharstyle.svg | 1 + loleaflet/src/control/Control.JSDialogBuilder.js | 3 ++- loleaflet/src/control/Control.NotebookbarBuilder.js | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit cc15dafe3441ba3159ba3976ccf044ff1032caff Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Apr 29 08:47:19 2020 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Fri May 1 21:38:23 2020 +0200 notebookbar: insert annotation control Change-Id: I07adf35f49b5d2d5b8c51d98ab082d984d948fe2 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93291 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 3751ec75f..e2fb923d5 100644 --- a/loleaflet/src/control/Control.NotebookbarBuilder.js +++ b/loleaflet/src/control/Control.NotebookbarBuilder.js @@ -30,6 +30,7 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ this._toolitemHandlers['.uno:InsertTable'] = this._insertTableControl; this._toolitemHandlers['.uno:InsertGraphic'] = this._insertGraphicControl; + this._toolitemHandlers['.uno:InsertAnnotation'] = this._insertAnnotationControl; this._toolitemHandlers['.uno:SelectWidth'] = function() {}; @@ -221,6 +222,13 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({ }); }, + _insertAnnotationControl: function(parentContainer, data, builder) { + var control = builder._unoToolButton(parentContainer, data, builder); + + $(control.container).unbind('click'); + $(control.container).click(function () {builder.map.insertComment();}); + }, + build: function(parent, data, hasVerticalParent, parentHasManyChildren) { this._amendJSDialogData(data); commit 6cbc982df60c9926cac08459ee17fa4f2bd1c774 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Apr 29 12:20:28 2020 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Fri May 1 21:38:12 2020 +0200 notebookbar: encode buttons ids to allow applying css styles - encode also img path to avoid invalid chars Change-Id: Ie10d3249fec65ac955b556f6d3206701282ca0b7 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93294 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/loleaflet/images/sc_defaultcharstyle.svg b/loleaflet/images/sc_defaultcharstyle.svg new file mode 100644 index 000000000..877355484 --- /dev/null +++ b/loleaflet/images/sc_defaultcharstyle.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m6.8984375.00390625-5.8984375 15.99999975h1.6875c.1834758 0 .3391615-.05267.4667969-.158203.1356125-.10553.2275273-.227232.2753906-.365234l1.328125-3.835938h6.4843745l1.339844 3.847657c.06382.146119.151991.267821.263672.365234.119658.09741.275344.146484.466797.146484h1.6875l-5.8867187-15.99999975zm1.1015625 2.09374995 2.691406 7.9648438h-5.3828122l2.2246094-6.4296875c.0717949-.1948249.1467904-.421874.2265624-.6816406.0797722-.2597666.1604623-.5450427.2402344-.8535157z" fill="#696969"/></svg> diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index 2c1536b09..459172901 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -1492,6 +1492,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ var prefixLength = '.uno:'.length; if (name.substr(0, prefixLength) == '.uno:') cleanName = name.substr(prefixLength); + cleanName = encodeURIComponent(cleanName).replace(/\%/g, ''); return 'images/lc_' + cleanName.toLowerCase() + '.svg'; }, @@ -1521,7 +1522,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ controls['container'] = div; if (data.command) { - var id = data.command.substr('.uno:'.length); + var id = encodeURIComponent(data.command.substr('.uno:'.length)).replace(/\%/g, ''); div.id = id; var icon = builder._createIconPath(data.command); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits