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 <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
This commit is contained in:
Michael Meeks 2020-01-13 17:56:48 +00:00
parent 84ef6bd6fb
commit f5d159b80b
2 changed files with 8 additions and 9 deletions

View file

@ -720,15 +720,14 @@ function insertShapes(mobile) {
function getColorPickerData(type) { function getColorPickerData(type) {
var uno; var uno;
if (type === 'Font Color') { if (type === 'Font Color') {
if (map.getDocType() === 'spreadsheet') if (map.getDocType() === 'spreadsheet' ||
uno = '.uno:Color'; map.getDocType() === 'presentation')
else if (map.getDocType() === 'presentation')
uno = '.uno:Color'; uno = '.uno:Color';
else else
uno = '.uno:FontColor'; uno = '.uno:FontColor';
} else if (type === 'Highlight Color') { } else if (type === 'Highlight Color') {
if (map.getDocType() === 'spreadsheet') if (map.getDocType() === 'spreadsheet')
uno = '.uno:BacgroundColor'; uno = '.uno:BackgroundColor';
else if (map.getDocType() === 'presentation') else if (map.getDocType() === 'presentation')
uno = '.uno:CharBackColor'; uno = '.uno:CharBackColor';
else else
@ -768,8 +767,8 @@ function onColorPick(id, color) {
var fontcolor, backcolor; var fontcolor, backcolor;
if (id === 'fontcolor') { if (id === 'fontcolor') {
fontcolor = {'text': 'FontColor', fontcolor = {'text': 'FontColor',
'spreadsheet': 'Color', 'spreadsheet': 'Color',
'presentation': 'Color'}[map.getDocType()]; 'presentation': 'Color'}[map.getDocType()];
command[fontcolor] = {}; command[fontcolor] = {};
command[fontcolor].type = 'long'; command[fontcolor].type = 'long';
command[fontcolor].value = color; 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". // "backgroundcolor" can be used in Writer and Calc and translates to "Background color".
else if (id === 'backcolor') { else if (id === 'backcolor') {
backcolor = {'text': 'BackColor', backcolor = {'text': 'BackColor',
'presentation': 'CharBackColor'}[map.getDocType()]; 'presentation': 'CharBackColor'}[map.getDocType()];
command[backcolor] = {}; command[backcolor] = {};
command[backcolor].type = 'long'; command[backcolor].type = 'long';
command[backcolor].value = color; command[backcolor].value = color;
@ -787,7 +786,7 @@ function onColorPick(id, color) {
} }
else if (id === 'backgroundcolor') { else if (id === 'backgroundcolor') {
backcolor = {'text': 'BackgroundColor', backcolor = {'text': 'BackgroundColor',
'spreadsheet': 'BackgroundColor'}[map.getDocType()]; 'spreadsheet': 'BackgroundColor'}[map.getDocType()];
command[backcolor] = {}; command[backcolor] = {};
command[backcolor].type = 'long'; command[backcolor].type = 'long';
command[backcolor].value = color; command[backcolor].value = color;

View file

@ -80,7 +80,7 @@ L.CalcTileLayer = L.TileLayer.extend({
{type: 'button', id: 'strikeout', img: 'strikeout', hint: _UNO('.uno:Strikeout'), uno: 'Strikeout'}, {type: 'button', id: 'strikeout', img: 'strikeout', hint: _UNO('.uno:Strikeout'), uno: 'Strikeout'},
{type: 'break'}, {type: 'break'},
{type: 'button', id: 'fontcolor', img: 'textcolor', hint: _UNO('.uno:FontColor')}, {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: 'button', id: 'togglemergecells', img: 'togglemergecells', hint: _UNO('.uno:ToggleMergeCells', 'spreadsheet', true), uno: 'ToggleMergeCells', disabled: true},
// {type: 'break', id: 'breakmergecells'}, // {type: 'break', id: 'breakmergecells'},
{type: 'break'}, {type: 'break'},