From bda6903dea951288091338d01ff96b2c6ea106bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Wed, 25 Mar 2020 12:17:06 +0100 Subject: [PATCH] jsdialog: handle drawingarea MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia3bc01e76c71edc7ac59e3157e7de5700397c21d Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93466 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos --- loleaflet/css/mobilewizard.css | 5 +++++ loleaflet/src/control/Control.JSDialogBuilder.js | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/loleaflet/css/mobilewizard.css b/loleaflet/css/mobilewizard.css index 8b52fb3bd..aa462ddb7 100644 --- a/loleaflet/css/mobilewizard.css +++ b/loleaflet/css/mobilewizard.css @@ -856,3 +856,8 @@ input[type=checkbox][disabled] { #criteria.ui-tab, #inputhelp.ui-tab { width: 30% !important; } + +.mobile-wizard.ui-drawing-area { + margin: 10px 5% 10px 5% !important; + width: 90%; +} diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index 4263e6ce1..5084bf66a 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -152,6 +152,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ this._controlHandlers['colorlistbox'] = this._colorControl; this._controlHandlers['borderstyle'] = this._borderControl; this._controlHandlers['treelistbox'] = this._listboxControl; + this._controlHandlers['drawingarea'] = this._drawingAreaControl; this._controlHandlers['mainmenu'] = this._containerHandler; this._controlHandlers['submenu'] = this._subMenuHandler; @@ -1478,6 +1479,15 @@ L.Control.JSDialogBuilder = L.Control.extend({ return false; }, + _drawingAreaControl: function(parentContainer, data, builder) { + if (data.image) { + var image = L.DomUtil.create('img', builder.options.cssClass + ' ui-drawing-area', parentContainer); + image.src = data.image.replace('\\', ''); + image.id = data.id; + } + return false; + }, + _htmlControl: function(parentContainer, data, builder) { var container = L.DomUtil.create('div', builder.options.cssClass, parentContainer); container.appendChild(data.content);