[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src

Jan Holesovsky kendy at collabora.com
Mon Apr 24 18:17:08 UTC 2017


 loleaflet/src/layer/marker/Annotation.js |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d07c706e443fa804450ae62e427d37d3b90f573b
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Apr 24 20:09:47 2017 +0200

    loleaflet: Disable the Accept / Reject if the document is read only.
    
    Change-Id: I8d3f312d9d2dd75b44e5a779875688da1a31e123

diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index 7a9ae2a9..6f580cab 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -155,7 +155,7 @@ L.Annotation = L.Layer.extend({
 		this._contentAuthor = L.DomUtil.create(tagDiv, 'loleaflet-annotation-content-author', tdAuthor);
 		this._contentDate = L.DomUtil.create(tagDiv, 'loleaflet-annotation-date', tdAuthor);
 
-		if (this._data.trackchange) {
+		if (this._data.trackchange && this._map._permission !== 'readonly') {
 			var tdAccept = L.DomUtil.create(tagTd, 'loleaflet-annotation-menubar', tr);
 			var acceptButton = L.DomUtil.create('button', 'loleaflet-redline-accept-button', tdAccept);
 			var tdReject = L.DomUtil.create(tagTd, 'loleaflet-annotation-menubar', tr);


More information about the Libreoffice-commits mailing list