[Libreoffice-commits] online.git: 2 commits - loleaflet/css loleaflet/src
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 1 09:55:24 UTC 2020
loleaflet/css/loleaflet.css | 4 ++--
loleaflet/src/control/Control.LokDialog.js | 14 ++++++++++++++
loleaflet/src/control/Toolbar.js | 10 +++-------
3 files changed, 19 insertions(+), 9 deletions(-)
New commits:
commit 19363ce72702977817527582c2de040684ee6aa0
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Aug 12 15:49:43 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Sep 1 11:55:08 2020 +0200
Make dialogs modal, block sidebar actions when opened
This change prevents user from creating multiple instances
of dialogs eg. by using sidebar. Dialogs are modal now.
Child dialogs still can be created from existing dialog and used.
Change-Id: I388006d8857d0196d2884598e150f7bf5948ed47
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100598
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101821
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 0d594414d..c1abe867f 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -144,6 +144,14 @@ L.Control.LokDialog = L.Control.extend({
return Object.keys(this._dialogs).length > nonDialogEntries;
},
+ // method used to warn user about dialog modality
+ blinkOpenDialog: function() {
+ $('.lokdialog_container').addClass('lokblink');
+ setTimeout(function () {
+ $('.lokdialog_container').removeClass('lokblink');
+ }, 600);
+ },
+
_docLoaded: function(e) {
if (!e.status) {
$('.lokdialog_container').remove();
@@ -1164,6 +1172,12 @@ L.Control.LokDialog = L.Control.extend({
L.DomEvent.on(canvas, 'mousedown mouseup', function(e) {
L.DomEvent.stop(e);
+
+ if ((this._isSidebar(id) || this.isCalcInputBar(id)) && this.hasOpenedDialog()) {
+ this.blinkOpenDialog();
+ return;
+ }
+
if (this._isSelectionHandleDragged() && e.type === 'mouseup') {
this._onSelectionHandleDrag(e);
return;
diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index c62704634..0f476d57f 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -178,13 +178,9 @@ L.Map.include({
}
}
- var hasOpenedDialog = this.dialog.hasOpenedDialog();
- if (hasOpenedDialog) {
- $('.lokdialog_container').addClass('lokblink');
- setTimeout(function () {
- $('.lokdialog_container').removeClass('lokblink');
- }, 600);
- } else if (this.isPermissionEdit() || isAllowedInReadOnly) {
+ if (this.dialog.hasOpenedDialog())
+ this.dialog.blinkOpenDialog();
+ else if (this.isPermissionEdit() || isAllowedInReadOnly) {
if (!this.messageNeedsToBeRedirected(command))
this._socket.sendMessage('uno ' + command + (json ? ' ' + JSON.stringify(json) : ''));
}
commit ab53fcbca16efb5764f23356c611280119b17573
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Aug 31 14:35:26 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Sep 1 11:55:04 2020 +0200
Fix blinking cursor
Change-Id: I723dcfc06e07d3d5a83e64eee812d3084dc8378c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101728
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101822
Tested-by: Jenkins
diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index 887ba4f18..a85f43a6b 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -578,10 +578,10 @@ body {
}
.lokblink {
- animation: blink 150ms infinite alternate;
+ animation: lokblink 150ms infinite alternate;
}
- at keyframes blink {
+ at keyframes lokblink {
from { opacity:1; }
to { opacity:0; }
}
More information about the Libreoffice-commits
mailing list