[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/js
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 25 12:35:49 UTC 2019
loleaflet/js/toolbar.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit df2632e6e11db2ff3e4568ac81737799ef13147c
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Tue Feb 5 22:45:59 2019 -0500
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Feb 25 13:35:28 2019 +0100
leaflet: check for disabled commands when editing only
Change-Id: Iaad2ec7084579f4b4b1f9303258ecb651245b738
Reviewed-on: https://gerrit.libreoffice.org/67997
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 98f780a1a..8197c5d1e 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -2129,9 +2129,9 @@ function onUpdatePermission(e) {
var found = enabledButtons.filter(function(id) { return id === items[idx].id });
var alwaysEnable = found.length !== 0;
- var unoCmd = map.getDocType() === 'spreadsheet' ? items[idx].unosheet : items[idx].uno;
- var keepDisabled = map['stateChangeHandler'].getItemValue(unoCmd) === 'disabled';
if (e.perm === 'edit') {
+ var unoCmd = map.getDocType() === 'spreadsheet' ? items[idx].unosheet : items[idx].uno;
+ var keepDisabled = map['stateChangeHandler'].getItemValue(unoCmd) === 'disabled';
if (!keepDisabled || alwaysEnable) {
toolbar.enable(items[idx].id);
}
More information about the Libreoffice-commits
mailing list