[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src
Pranav Kant
pranavk at collabora.co.uk
Thu May 18 09:04:55 UTC 2017
loleaflet/src/layer/marker/Annotation.js | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit eb6b7954397d7b98016173c394bbfd33fe69d097
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Wed May 17 23:30:20 2017 +0530
loleaflet: Use safer text assignment method
Change-Id: Idb0e5454f5d795132c762e22c596710bfed75770
(cherry picked from commit 827d3f63cb5b68b186bf76755eda05ea18f9491a)
Reviewed-on: https://gerrit.libreoffice.org/37731
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index af6503b1..bfcccb13 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -2,6 +2,8 @@
* L.Annotation
*/
+/* global $ Autolinker L */
+
L.Annotation = L.Layer.extend({
options: {
minWidth: 160,
@@ -282,13 +284,15 @@ L.Annotation = L.Layer.extend({
},
_updateContent: function () {
+ $(this._contentText).text(this._data.text);
+ $(this._nodeModifyText).text(this._data.text);
+ $(this._contentAuthor).text(this._data.author);
+
var d = new Date(this._data.dateTime.replace(/,.*/, 'Z'));
+ $(this._contentDate).text((isNaN(d.getTime()) || this._map.getDocType() === 'spreadsheet')? this._data.dateTime: d.toDateString());
- this._contentText.innerHTML = this._nodeModifyText.innerHTML = this._data.text;
- this._contentAuthor.innerHTML = this._data.author;
- this._contentDate.innerHTML = (isNaN(d.getTime()) || this._map.getDocType() === 'spreadsheet')? this._data.dateTime: d.toDateString();
if (this._data.trackchange) {
- this._captionText.innerHTML = this._data.description;
+ $(this._captionText).text(this._data.description);
}
},
More information about the Libreoffice-commits
mailing list