From f5d159b80bcda4493cd1086b879df83851e5f751 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Mon, 13 Jan 2020 17:56:48 +0000 Subject: [PATCH] mobile: restore calc background quick-toolbar button & fix typo. Change-Id: Ieae15188113cd646bb3fe9be7747308a95857569 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86709 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks --- loleaflet/src/control/Control.Toolbar.js | 15 +++++++-------- loleaflet/src/layer/tile/CalcTileLayer.js | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js index 11614f543..0d1daef7b 100644 --- a/loleaflet/src/control/Control.Toolbar.js +++ b/loleaflet/src/control/Control.Toolbar.js @@ -720,15 +720,14 @@ function insertShapes(mobile) { function getColorPickerData(type) { var uno; if (type === 'Font Color') { - if (map.getDocType() === 'spreadsheet') - uno = '.uno:Color'; - else if (map.getDocType() === 'presentation') + if (map.getDocType() === 'spreadsheet' || + map.getDocType() === 'presentation') uno = '.uno:Color'; else uno = '.uno:FontColor'; } else if (type === 'Highlight Color') { if (map.getDocType() === 'spreadsheet') - uno = '.uno:BacgroundColor'; + uno = '.uno:BackgroundColor'; else if (map.getDocType() === 'presentation') uno = '.uno:CharBackColor'; else @@ -768,8 +767,8 @@ function onColorPick(id, color) { var fontcolor, backcolor; if (id === 'fontcolor') { fontcolor = {'text': 'FontColor', - 'spreadsheet': 'Color', - 'presentation': 'Color'}[map.getDocType()]; + 'spreadsheet': 'Color', + 'presentation': 'Color'}[map.getDocType()]; command[fontcolor] = {}; command[fontcolor].type = 'long'; command[fontcolor].value = color; @@ -779,7 +778,7 @@ function onColorPick(id, color) { // "backgroundcolor" can be used in Writer and Calc and translates to "Background color". else if (id === 'backcolor') { backcolor = {'text': 'BackColor', - 'presentation': 'CharBackColor'}[map.getDocType()]; + 'presentation': 'CharBackColor'}[map.getDocType()]; command[backcolor] = {}; command[backcolor].type = 'long'; command[backcolor].value = color; @@ -787,7 +786,7 @@ function onColorPick(id, color) { } else if (id === 'backgroundcolor') { backcolor = {'text': 'BackgroundColor', - 'spreadsheet': 'BackgroundColor'}[map.getDocType()]; + 'spreadsheet': 'BackgroundColor'}[map.getDocType()]; command[backcolor] = {}; command[backcolor].type = 'long'; command[backcolor].value = color; diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index f753d1a51..a1847dd8e 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -80,7 +80,7 @@ L.CalcTileLayer = L.TileLayer.extend({ {type: 'button', id: 'strikeout', img: 'strikeout', hint: _UNO('.uno:Strikeout'), uno: 'Strikeout'}, {type: 'break'}, {type: 'button', id: 'fontcolor', img: 'textcolor', hint: _UNO('.uno:FontColor')}, -// {type: 'color', id: 'backcolor', img: 'backcolor', hint: _UNO('.uno:BackgroundColor')}, + {type: 'button', id: 'backcolor', img: 'backcolor', hint: _UNO('.uno:BackgroundColor')}, {type: 'button', id: 'togglemergecells', img: 'togglemergecells', hint: _UNO('.uno:ToggleMergeCells', 'spreadsheet', true), uno: 'ToggleMergeCells', disabled: true}, // {type: 'break', id: 'breakmergecells'}, {type: 'break'},