[Libreoffice-commits] online.git: loleaflet/src
Henry Castro
hcastro at collabora.com
Sat Mar 18 01:31:44 UTC 2017
loleaflet/src/layer/AnnotationManager.js | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit caf55527d10c1d524d11a1104ba99af1d9079131
Author: Henry Castro <hcastro at collabora.com>
Date: Fri Mar 17 21:31:53 2017 -0400
loleaflet: fix the date format of the annotation object
Change-Id: Idc323f51e610c784ddc2a4624c0ddf8881c8170c
diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js
index e6ccf3e9..bca8e15d 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -44,6 +44,7 @@ L.AnnotationManager = L.Class.extend({
for (var index in comments) {
comment = comments[index];
comment.anchorPos = L.LOUtil.stringToBounds(comment.anchorPos);
+ comment.dateTime = new Date(comment.dateTime.replace(/,.*/, 'Z')).toDateString();
comment.trackchange = false;
this._items.push(L.annotation(this._map.options.maxBounds.getSouthEast(), comment).addTo(this._map));
}
@@ -252,6 +253,7 @@ L.AnnotationManager = L.Class.extend({
this._map.focus();
} else {
obj.comment.anchorPos = L.LOUtil.stringToBounds(obj.comment.anchorPos);
+ obj.comment.dateTime = new Date(obj.comment.dateTime.replace(/,.*/, 'Z')).toDateString();
this.add(obj.comment);
this._map.focus();
}
@@ -275,6 +277,7 @@ L.AnnotationManager = L.Class.extend({
modifiedObj = obj.redline;
} else {
obj.comment.anchorPos = L.LOUtil.stringToBounds(obj.comment.anchorPos);
+ obj.comment.dateTime = new Date(obj.comment.dateTime.replace(/,.*/, 'Z')).toDateString();
modifiedObj = obj.comment;
}
modified._data = modifiedObj;
More information about the Libreoffice-commits
mailing list