[Libreoffice-commits] online.git: loleaflet/css loleaflet/src
Pedro Pinto Silva (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 10 07:58:49 UTC 2020
loleaflet/css/toolbar.css | 5 ++---
loleaflet/src/control/Control.DocumentNameInput.js | 3 +--
2 files changed, 3 insertions(+), 5 deletions(-)
New commits:
commit a84ff0ae46422c630b4a6e9587eda107ea1336fe
Author: Pedro Pinto Silva <pedro.silva at collabora.com>
AuthorDate: Thu Jun 25 16:10:49 2020 +0200
Commit: Pedro Silva <pedro.silva at collabora.com>
CommitDate: Fri Jul 10 09:58:30 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 <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Pedro Silva <pedro.silva at collabora.com>
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 807e1054b..297605e56 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -152,11 +152,10 @@ w2ui-toolbar {
#document-title-pencil.editable {
visibility: visible;
width: 24px;
- height: 22px;
+ 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%);
- border-top: solid 3px white;
}
#document-title-pencil:not(.editable){
diff --git a/loleaflet/src/control/Control.DocumentNameInput.js b/loleaflet/src/control/Control.DocumentNameInput.js
index 3ad053094..7ccc5993d 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));
More information about the Libreoffice-commits
mailing list