loleaflet/src/control/Control.Toolbar.js  |   40 +++++++++++++++---------------
 loleaflet/src/layer/tile/CalcTileLayer.js |    2 -
 2 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 1cf5bde981941f2ac2920819e93fb55a7ca3bac1
Author:     Michael Meeks <michael.me...@collabora.com>
AuthorDate: Mon Jan 13 17:57:22 2020 +0000
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Mon Jan 13 20:01:37 2020 +0100

    Toolbar color buttons should track transparent state as well as colors.
    
    Change-Id: I727ff4f942b7059da4f17216fe523dd1bbb04cd2
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86710
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>

diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 0d1daef7b..0074e9585 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1818,13 +1818,13 @@ function onCommandStateChanged(e) {
                        color = 'transparent';
                }
                else {
-
                        color = color.toString(16);
                        color = '#' + Array(7 - color.length).join('0') + color;
-                       $('#tb_editbar_item_fontcolor 
.w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + 
color);
-                       $('#tb_editbar_item_fontcolor 
.w2ui-tb-down').css('display', 'none');
-                       $('#tb_editbar_item_fontcolor 
.w2ui-tb-caption').css('display', 'none');
                }
+               $('#tb_editbar_item_fontcolor 
.w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + 
color);
+               $('#tb_editbar_item_fontcolor .w2ui-tb-down').css('display', 
'none');
+               $('#tb_editbar_item_fontcolor .w2ui-tb-caption').css('display', 
'none');
+
                div = L.DomUtil.get('fontcolorindicator');
                if (div) {
                        L.DomUtil.setStyle(div, 'background', color);
@@ -1839,15 +1839,16 @@ function onCommandStateChanged(e) {
                else {
                        color = color.toString(16);
                        color = '#' + Array(7 - color.length).join('0') + color;
-                       //writer
-                       $('#tb_editbar_item_backcolor 
.w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + 
color);
-                       $('#tb_editbar_item_backcolor 
.w2ui-tb-down').css('display', 'none');
-                       $('#tb_editbar_item_backcolor 
.w2ui-tb-caption').css('display', 'none');
-                       //calc?
-                       $('#tb_editbar_item_backgroundcolor 
.w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + 
color);
-                       $('#tb_editbar_item_backgroundcolor 
.w2ui-tb-down').css('display', 'none');
-                       $('#tb_editbar_item_backgroundcolor 
.w2ui-tb-caption').css('display', 'none');
                }
+               //writer
+               $('#tb_editbar_item_backcolor 
.w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + 
color);
+               $('#tb_editbar_item_backcolor .w2ui-tb-down').css('display', 
'none');
+               $('#tb_editbar_item_backcolor .w2ui-tb-caption').css('display', 
'none');
+               //calc?
+               $('#tb_editbar_item_backgroundcolor 
.w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + 
color);
+               $('#tb_editbar_item_backgroundcolor 
.w2ui-tb-down').css('display', 'none');
+               $('#tb_editbar_item_backgroundcolor 
.w2ui-tb-caption').css('display', 'none');
+
                div = L.DomUtil.get('backcolorindicator');
                if (div) {
                        L.DomUtil.setStyle(div, 'background', color);
commit f5d159b80bcda4493cd1086b879df83851e5f751
Author:     Michael Meeks <michael.me...@collabora.com>
AuthorDate: Mon Jan 13 17:56:48 2020 +0000
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Mon Jan 13 20:01:28 2020 +0100

    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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>

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'},
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to