[Libreoffice-commits] online.git: loleaflet/src
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 28 09:45:01 UTC 2020
loleaflet/src/control/Control.JSDialogBuilder.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 0ec16cf344d302c1148695931fcdd80232596575
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Mar 17 15:17:57 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Apr 28 11:44:42 2020 +0200
jsdialog: textarea without cursor is a paragraph
Change-Id: Ida85000fb93ebad5c871ccb20ea69ed86a03b645
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93043
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 85dcf5a48..96decadca 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1198,8 +1198,17 @@ L.Control.JSDialogBuilder = L.Control.extend({
},
_multiLineEditControl: function(parentContainer, data, builder, callback) {
- var edit = L.DomUtil.create('textarea', '', parentContainer);
- edit.value = builder._cleanText(data.text);
+ var controlType = 'textarea';
+ if (data.cursor && data.cursor === 'false')
+ controlType = 'p';
+
+ var edit = L.DomUtil.create(controlType, '', parentContainer);
+
+ if (controlType === 'textarea')
+ edit.value = builder._cleanText(data.text);
+ else
+ edit.innerHTML = builder._cleanText(data.text);
+
edit.id = data.id;
if (data.enabled == 'false')
More information about the Libreoffice-commits
mailing list