loleaflet/src/layer/marker/Annotation.js |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 563b90a20a8c4e318504579ca3a6568d95072fd4
Author: Henry Castro <hcas...@collabora.com>
Date:   Sun Mar 26 10:19:10 2017 -0400

    loleaflet: remove save button of the annotation object
    
    Change-Id: I1aa19e3620d1bbd3a76fae32e97c4c32adcf0fe6

diff --git a/loleaflet/src/layer/marker/Annotation.js 
b/loleaflet/src/layer/marker/Annotation.js
index 0dc4c135..28c099f0 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -156,7 +156,7 @@ L.Annotation = L.Layer.extend({
                this._nodeReplyText = L.DomUtil.create(tagTextArea, 
classTextArea, this._nodeReply);
 
                buttons = L.DomUtil.create(tagDiv, empty, this._nodeModify);
-               this._createButton(buttons, _(' Save '), this._onSaveClick);
+               L.DomEvent.on(this._nodeModifyText, 'blur', this._onLostFocus, 
this);
                this._createButton(buttons, cancel, this._onCancelClick);
                buttons = L.DomUtil.create(tagDiv, empty, this._nodeReply);
                this._createButton(buttons, _('Reply'), this._onReplyClick);
@@ -182,6 +182,13 @@ L.Annotation = L.Layer.extend({
                this._map.fire('AnnotationCancel', {annotation: this});
        },
 
+       _onLostFocus: function (e) {
+               L.DomEvent.stopPropagation(e);
+               this._data.text = this._contentText.innerHTML = 
this._nodeModifyText.value;
+               this.show();
+               this._map.fire('AnnotationSave', {annotation: this});
+       },
+
        _onMouseClick: function (e) {
                var target = e.target || e.srcElement;
                L.DomEvent.stopPropagation(e);
@@ -215,13 +222,6 @@ L.Annotation = L.Layer.extend({
                this._map.fire('AnnotationReply', {annotation: this});
        },
 
-       _onSaveClick: function (e) {
-               L.DomEvent.stopPropagation(e);
-               this._data.text = this._contentText.innerHTML = 
this._nodeModifyText.value;
-               this.show();
-               this._map.fire('AnnotationSave', {annotation: this});
-       },
-
        _updateLayout: function () {
                var style = this._wrapper.style;
                style.width = '';
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to