loleaflet/css/toolbar.css                          |    2 +-
 loleaflet/src/control/Control.DocumentNameInput.js |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit e6face35a9de1152e19122adf417e17ffca2b210
Author:     Pedro Pinto Silva <pedro.si...@collabora.com>
AuthorDate: Thu Jun 25 16:10:49 2020 +0200
Commit:     Marco Cecchetti <marco.cecche...@collabora.com>
CommitDate: Tue Jul 28 20:56:22 2020 +0200

    Desktop: document name: center icon (pencil) & loading time
    
    * be sure to wait from either the menu or the doc to appear to show the 
icon by adding the "editable" class on after onDocLayerInit and onWopiProps
    * remove if (this.UserCanNotWriteRelative === false) as at that moment we 
still have no clue of its status
    
    Change-Id: Icaaa921452b09d747be4fffab90bf1c93283718e
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97128
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Pedro Silva <pedro.si...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98647
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index ff228e7eb..604120e54 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -154,7 +154,7 @@ w2ui-toolbar {
        width: 24px;
        height: 18px;
        position: absolute;
-       left: 87%;
+       right: 10px;
        background: url('images/baseline-edit.svg') right center no-repeat, 
radial-gradient(circle, #fff 20%, #fff0 100%);
 }
 
diff --git a/loleaflet/src/control/Control.DocumentNameInput.js 
b/loleaflet/src/control/Control.DocumentNameInput.js
index cfc4e5998..a01a974f1 100644
--- a/loleaflet/src/control/Control.DocumentNameInput.js
+++ b/loleaflet/src/control/Control.DocumentNameInput.js
@@ -11,6 +11,7 @@ L.Control.DocumentNameInput = L.Control.extend({
 
                map.on('doclayerinit', this.onDocLayerInit, this);
                map.on('wopiprops', this.onWopiProps, this);
+               $('#document-title-pencil').addClass('editable');
        },
 
        documentNameConfirm: function() {
@@ -100,12 +101,10 @@ L.Control.DocumentNameInput = L.Control.extend({
                if (e.BaseFileName !== null)
                        // set the document name into the name field
                        $('#document-name-input').val(e.BreadcrumbDocName !== 
undefined ? e.BreadcrumbDocName : e.BaseFileName);
-
                if (e.UserCanNotWriteRelative === false) {
                        // Save As allowed
                        $('#document-name-input').prop('disabled', false);
                        $('#document-name-input').addClass('editable');
-                       $('#document-title-pencil').addClass('editable');
                        $('#document-name-input').off('keypress', 
this.onDocumentNameKeyPress).on('keypress', 
this.onDocumentNameKeyPress.bind(this));
                        $('#document-name-input').off('focus', 
this.onDocumentNameFocus).on('focus', this.onDocumentNameFocus.bind(this));
                        $('#document-name-input').off('blur', 
this.documentNameCancel).on('blur', this.documentNameCancel.bind(this));
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to