[Libreoffice-commits] online.git: 2 commits - loleaflet/css loleaflet/src
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 1 09:54:44 UTC 2020
loleaflet/css/loleaflet.css | 9 +++++++++
loleaflet/src/control/Control.LokDialog.js | 10 ++++++++++
loleaflet/src/control/Toolbar.js | 8 +++++++-
loleaflet/src/layer/tile/CalcTileLayer.js | 3 +++
4 files changed, 29 insertions(+), 1 deletion(-)
New commits:
commit d4bec9e6e151a0b6812f2505fb3f287491e60527
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Aug 12 10:16:54 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Sep 1 11:54:40 2020 +0200
Show avatar for newly inserted comments in calc
Change-Id: If602901982e8084856ca5361ab256a93e1045e45
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100581
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101819
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index 534c307ab..a178a59da 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -327,6 +327,9 @@ L.CalcTileLayer = (L.Browser.mobile ? L.TileLayer : L.CanvasTileLayer).extend({
var obj = JSON.parse(textMsg.substring('comment:'.length + 1));
obj.comment.tab = parseInt(obj.comment.tab);
if (obj.comment.action === 'Add') {
+ if (obj.comment.author in this._map._viewInfoByUserName) {
+ obj.comment.avatar = this._map._viewInfoByUserName[obj.comment.author].userextrainfo.avatar;
+ }
var cellPos = L.LOUtil.stringToBounds(obj.comment.cellPos);
obj.comment.cellPos = this._convertToTileTwipsSheetArea(cellPos);
obj.comment.cellPos = L.latLngBounds(this._twipsToLatLng(obj.comment.cellPos.getBottomLeft()),
commit bb015fe41e662f7613338cc8bed0d5394c4783a3
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Aug 11 07:56:26 2020 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Sep 1 11:54:25 2020 +0200
Don't allow to open multiple dialogs
and blink active dialog to inform user that he needs
to close dialog first...
Change-Id: I6c9ee662ae2ab935f03ee8fdd0cf7327703e2170
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100457
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101820
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index 28161c6c4..887ba4f18 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -577,6 +577,15 @@ body {
-o-user-select: none;
}
+.lokblink {
+ animation: blink 150ms infinite alternate;
+}
+
+ at keyframes blink {
+ from { opacity:1; }
+ to { opacity:0; }
+}
+
.form-field-frame {
border: 1px solid;
position: absolute;
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 337acfa5d..0d594414d 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -134,6 +134,16 @@ L.Control.LokDialog = L.Control.extend({
_currentDeck: null, // The sidebar.
_calcInputBar: null, // The Formula-Bar.
+ hasOpenedDialog: function() {
+ var nonDialogEntries = 0;
+ for (var index in this._dialogs) {
+ if (this._dialogs[index].isSidebar || this._dialogs[index].isCalcInputBar)
+ nonDialogEntries++;
+ }
+
+ return Object.keys(this._dialogs).length > nonDialogEntries;
+ },
+
_docLoaded: function(e) {
if (!e.status) {
$('.lokdialog_container').remove();
diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 2af30b3ed..c62704634 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -178,7 +178,13 @@ L.Map.include({
}
}
- if (this.isPermissionEdit() || isAllowedInReadOnly) {
+ 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.messageNeedsToBeRedirected(command))
this._socket.sendMessage('uno ' + command + (json ? ' ' + JSON.stringify(json) : ''));
}
More information about the Libreoffice-commits
mailing list