[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 16 04:39:02 UTC 2020
loleaflet/src/layer/AnnotationManager.js | 10 ++++++++++
loleaflet/src/layer/tile/TileLayer.js | 6 ++++++
loleaflet/src/layer/tile/WriterTileLayer.js | 4 ++++
3 files changed, 20 insertions(+)
New commits:
commit 9749382a92c01eb5232133393f1f6efbc1c109c9
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Mon Sep 14 12:57:54 2020 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Sep 16 06:38:43 2020 +0200
leaflet: annotation: new option added to resolve thread
Change-Id: Iba14345c782a6e28003845d238debe2935c54be6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102781
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js
index d5d9f2264..7580884a8 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -647,6 +647,16 @@ L.AnnotationManager = L.Class.extend({
this._map.sendUnoCommand('.uno:ResolveComment', comment);
},
+ resolveThread: function (annotation) {
+ var comment = {
+ Id: {
+ type: 'string',
+ value: annotation._data.id
+ }
+ };
+ this._map.sendUnoCommand('.uno:ResolveCommentThread', comment);
+ },
+
updateResolvedState: function (annotation) {
var threadIndexFirst = this.getRootIndexOf(annotation._data.id);
if (this._items[threadIndexFirst]._data.resolved !== annotation._data.resolved) {
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index b5e4c0740..760620a1a 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -256,6 +256,12 @@ L.TileLayer = L.GridLayer.extend({
callback: function (key, options) {
that.onAnnotationResolve.call(that, options.$trigger.get(0).annotation);
}
+ },
+ resolveThread: this._docType !== 'text' ? undefined : {
+ name: _('Resolve Thread'),
+ callback: function (key, options) {
+ that.onAnnotationResolveThread.call(that, options.$trigger.get(0).annotation);
+ }
}
},
events: {
diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js
index b41b7e58d..53a15bea6 100644
--- a/loleaflet/src/layer/tile/WriterTileLayer.js
+++ b/loleaflet/src/layer/tile/WriterTileLayer.js
@@ -70,6 +70,10 @@ L.WriterTileLayer = L.TileLayer.extend({
this._annotations.resolve(annotation);
},
+ onAnnotationResolveThread: function (annotation) {
+ this._annotations.resolveThread(annotation);
+ },
+
onChangeAccept: function(id) {
this._annotations.acceptChange(id);
},
More information about the Libreoffice-commits
mailing list