[Libreoffice-commits] online.git: loleaflet/src
Pranav Kant
pranavk at collabora.co.uk
Thu Mar 9 11:51:40 UTC 2017
loleaflet/src/layer/marker/Annotation.js | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 8b3267e32edda7ee3904fd1f2509fb62b749b1e9
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Thu Mar 9 17:20:13 2017 +0530
loleaflet: Add change tracking captions
Use the redline descriptions, such as, "Insert 'text'" etc. as captions
in change tracking sidebar objects.
Change-Id: I6c99f3b45725620b8888da77b0b8b4ebcdda10d2
diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index 2c55b57..5580715 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -94,6 +94,10 @@ L.Annotation = L.Layer.extend({
this._contentDate = L.DomUtil.create('div', 'loleaflet-annotation-date', tdAuthor);
var divMenu = L.DomUtil.create('div', this._data.trackchange ? 'loleaflet-annotation-menu-redline' : 'loleaflet-annotation-menu', tdMenu);
divMenu.annotation = this;
+ if (this._data.trackchange) {
+ this._captionNode = L.DomUtil.create('div', 'lolefalet-annotation-caption', wrapper);
+ this._captionText = L.DomUtil.create('div', '', this._captionNode);
+ }
this._contentNode = L.DomUtil.create('div', 'loleaflet-annotation-content', wrapper);
this._editNode = L.DomUtil.create('div', 'loleaflet-annotation-edit', wrapper);
this._contentText = L.DomUtil.create('div', '', this._contentNode);
@@ -174,6 +178,9 @@ L.Annotation = L.Layer.extend({
this._contentText.innerHTML = this._editText.innerHTML = this._data.text;
this._contentAuthor.innerHTML = this._data.author;
this._contentDate.innerHTML = this._data.dateTime;
+ if (this._data.trackchange) {
+ this._captionText.innerHTML = this._data.description;
+ }
},
_updatePosition: function () {
More information about the Libreoffice-commits
mailing list