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

New commits:
commit d07e5cb5a1ae4bec648c7b9bb2b7b68a8597f828
Author: Henry Castro <hcas...@collabora.com>
Date:   Mon Apr 24 09:45:00 2017 -0400

    loleaflet: disable the annotation menu if the document is read only
    
    Change-Id: Ic5973e582e56d2452672219bdd443ec8dd551dab
    Reviewed-on: https://gerrit.libreoffice.org/36890
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/loleaflet/src/layer/marker/Annotation.js 
b/loleaflet/src/layer/marker/Annotation.js
index 8a4c7001..7a9ae2a9 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -172,7 +172,7 @@ L.Annotation = L.Layer.extend({
                        }, this);
                }
 
-               if (this.options.noMenu !== true) {
+               if (this.options.noMenu !== true && this._map._permission !== 
'readonly') {
                        var tdMenu = L.DomUtil.create(tagTd, 
'loleaflet-annotation-menubar', tr);
                        var divMenu = L.DomUtil.create(tagDiv, 
this._data.trackchange ? 'loleaflet-annotation-menu-redline' : 
'loleaflet-annotation-menu', tdMenu);
                        divMenu.title = _('Open menu');
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to