loleaflet/css/mobilewizard.css | 9 +++++++++ loleaflet/css/notebookbar.css | 2 +- loleaflet/src/control/Control.ContextMenu.js | 2 +- loleaflet/src/control/Control.JSDialogBuilder.js | 12 ++++++++++-- loleaflet/src/unocommands.js | 1 + 5 files changed, 22 insertions(+), 4 deletions(-)
New commits: commit 656190a74acd9e0812e887d0f095834bec4f28a1 Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Fri May 8 14:12:41 2020 +0530 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sun May 10 20:05:20 2020 +0200 leaflet: clear formatting option enabled for impress mobile Change-Id: I8be2baa555174d22bb9ff7836ad452a4fa8d24b9 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93704 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93930 diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js index 3a429464d..82bd501c5 100644 --- a/loleaflet/src/control/Control.ContextMenu.js +++ b/loleaflet/src/control/Control.ContextMenu.js @@ -53,7 +53,7 @@ L.Control.ContextMenu = L.Control.extend({ spreadsheet: ['MergeCells', 'SplitCell', 'RecalcPivotTable', 'FormatCellDialog', 'ShowNote', 'DeleteNote', 'SetAnchorToCell', 'SetAnchorToCellResize'], - presentation: [], + presentation: ['SetDefault'], drawing: [] }, // UNOCOMMANDS_EXTRACT_END <- don't remove this line, it's used by unocommands.py diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index c5a952ce5..b58169a08 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -172,6 +172,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ this._toolitemHandlers['.uno:Color'] = this._colorControl; this._toolitemHandlers['.uno:FillColor'] = this._colorControl; this._toolitemHandlers['.uno:ResetAttributes'] = this._clearFormattingControl; + this._toolitemHandlers['.uno:SetDefault'] = this._clearFormattingControl; this._currentDepth = 0; }, diff --git a/loleaflet/src/unocommands.js b/loleaflet/src/unocommands.js index 2149e8d9c..608dfd997 100644 --- a/loleaflet/src/unocommands.js +++ b/loleaflet/src/unocommands.js @@ -266,6 +266,7 @@ var unoCommandsArray = { SetAnchorToFrame:{text:{menu:_('To ~Frame'),},}, SetAnchorToPage:{spreadsheet:{menu:_('To P~age'),},text:{menu:_('To P~age'),},}, SetAnchorToPara:{text:{menu:_('To ~Paragraph'),},}, + SetDefault:{global:{menu:_('Clear ~Direct Formatting'),},}, SetLanguageAllTextMenu:{global:{menu:_('For All Text'),},}, SetLanguageParagraphMenu:{global:{menu:_('For Paragraph'),},}, SetLanguageSelectionMenu:{global:{menu:_('For Selection'),},}, commit a661bef91267280d3555510b47b141182d195020 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Thu May 7 15:26:53 2020 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sun May 10 20:05:09 2020 +0200 jsdialog: introduce disabled state for unobutton Change-Id: I5b81cbdda56acc64aac8516e3b97697a0c11395c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93654 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93929 Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/css/mobilewizard.css b/loleaflet/css/mobilewizard.css index 33f770257..d62cf279b 100644 --- a/loleaflet/css/mobilewizard.css +++ b/loleaflet/css/mobilewizard.css @@ -348,6 +348,15 @@ p.mobile-wizard.ui-combobox-text.selected { background-color: #e6e6e640; } +.unotoolbutton.disabled { + color: #707070; +} + +.unotoolbutton.disabled img { + -webkit-filter: grayscale(90%); + filter: grayscale(90%); +} + #mobile-wizard-content .ui-content > table > tr > td > table > table > tr:first-child > td > img{ margin-top: 0px !important; } diff --git a/loleaflet/css/notebookbar.css b/loleaflet/css/notebookbar.css index 22065a7f5..4788d22fe 100644 --- a/loleaflet/css/notebookbar.css +++ b/loleaflet/css/notebookbar.css @@ -66,7 +66,7 @@ div[id*='Row'].notebookbar, div[id*='Column'].notebookbar, #SendToBack.notebookb box-shadow: 0 0 0px 4px #e6e6e640 !important; } -.unotoolbutton.notebookbar:hover, #clearFormatting.notebookbar div img:hover { +.unotoolbutton.notebookbar:not(.disabled):hover, #clearFormatting.notebookbar div img:hover { box-shadow: 0 0 0px 4px #e6e6e6b0; border-radius: 0.1px; background-color: #e6e6e6b0; diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index b5705601b..c5a952ce5 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -1587,6 +1587,11 @@ L.Control.JSDialogBuilder = L.Control.extend({ $(button).addClass('selected'); else $(button).removeClass('selected'); + + if (state && state === 'disabled') + $(div).addClass('disabled'); + else + $(div).removeClass('disabled'); }; updateFunction(); @@ -1603,8 +1608,10 @@ L.Control.JSDialogBuilder = L.Control.extend({ } $(div).click(function () { - builder.refreshSidebar = true; - builder.callback('toolbutton', 'click', button, data.command, builder); + if (!$(div).hasClass('disabled')) { + builder.refreshSidebar = true; + builder.callback('toolbutton', 'click', button, data.command, builder); + } }); if (data.enabled == 'false') _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits