[Libreoffice-commits] online.git: loleaflet/js loleaflet/src

Pedro Pinto Silva (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 4 13:59:00 UTC 2019


 loleaflet/js/w2ui-1.5.rc1.js             |    8 +++++---
 loleaflet/src/control/Control.Toolbar.js |   11 +++++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 3aa715260d2f4c623f386a4ad9502cfe4af57ae6
Author:     Pedro Pinto Silva <pedro.silva at collabora.com>
AuthorDate: Wed Dec 4 14:56:36 2019 +0100
Commit:     Pedro Pinto da Silva <pedro.silva at collabora.com>
CommitDate: Wed Dec 4 14:58:41 2019 +0100

    Toolbar: background color and text color: Color appears now as a bottom stripe
    
    Change-Id: If338b10ce3e117a8f43b9bb920820c3d1de324af
    Reviewed-on: https://gerrit.libreoffice.org/84415
    Reviewed-by: Pedro Pinto da Silva <pedro.silva at collabora.com>
    Tested-by: Pedro Pinto da Silva <pedro.silva at collabora.com>

diff --git a/loleaflet/js/w2ui-1.5.rc1.js b/loleaflet/js/w2ui-1.5.rc1.js
index 9d6820e3d..fb5572b75 100644
--- a/loleaflet/js/w2ui-1.5.rc1.js
+++ b/loleaflet/js/w2ui-1.5.rc1.js
@@ -13842,16 +13842,18 @@ var w2prompt = function (label, title, callBack) {
                 case 'color':
                 case 'text-color':
                     if (typeof item.color == 'string' && item.color.substr(0,1) == '#') item.color = item.color.substr(1);
+                    /*
                     if (item.type == 'color') {
                         text = '<div style="height: 12px; width: 12px; margin-top: 1px; border: 1px solid #8A8A8A; border-radius: 1px; box-shadow: 0px 0px 1px #fff; '+
                                '        background-color: #'+ (item.color != null ? item.color : 'fff') +'; float: left;"></div>'+
                                (item.text ? '<div style="margin-left: 17px;">' + w2utils.lang(item.text) + '</div>' : '');
                     }
-                    if (item.type == 'text-color') {
+                    */
+                    /*if (item.type == 'text-color') {
                         text = '<div style="color: #'+ (item.color != null ? item.color : '444') +';">'+
                                     (item.text ? w2utils.lang(item.text) : '<b>Aa</b>') +
                                '</div>';
-                    }
+                    }*/
                 case 'menu':
                 case 'menu-check':
                 case 'menu-radio':
@@ -13879,7 +13881,7 @@ var w2prompt = function (label, title, callBack) {
                                         ? '<td class="w2ui-tb-count" nowrap="nowrap"><span>'+ item.count +'</span></td>'
                                         : ''
                                     ) +
-                                    (((['menu', 'menu-radio', 'menu-check', 'drop', 'color', 'text-color'].indexOf(item.type) != -1) && item.arrow !== false) ?
+                                    (((['menu', 'menu-radio', 'menu-check', 'drop'].indexOf(item.type) != -1) && item.arrow !== false) ?
                                         '<td class="w2ui-tb-down" nowrap="nowrap"><div></div></td>' : '') +
                             '  </tr></tbody></table>'+
                             '</td></tr></tbody></table>';
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 2f735f033..fc5fa8197 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1772,6 +1772,9 @@ function onCommandStateChanged(e) {
 
 			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');
 		}
 		div = L.DomUtil.get('fontcolorindicator');
 		if (div) {
@@ -1787,6 +1790,14 @@ 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');
 		}
 		div = L.DomUtil.get('backcolorindicator');
 		if (div) {


More information about the Libreoffice-commits mailing list