[Libreoffice-commits] online.git: loleaflet/js
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 30 10:34:42 UTC 2018
loleaflet/js/toolbar.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit c57a1fbef0c846c01abc5bbbedcae81acad891c3
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Nov 30 11:58:00 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Nov 30 11:34:24 2018 +0100
Don't show the user indicator if there is nobody else
Especially in the mobile app it was silly to show it as there is by
definition always just one user editing a document, but it is a good
idea to simplify the UI in this case also for the web-based online.
Change-Id: I67533ffe62734dce6ca96e2a72d9ba4386fc9b74
Reviewed-on: https://gerrit.libreoffice.org/64330
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index d3fce4866..9f5818a63 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -711,7 +711,7 @@ function initMobileToolbar(toolItems) {
{type: 'button', id: 'undo', img: 'undo', hint: _UNO('.uno:Undo'), uno: 'Undo', disabled: true},
{type: 'button', id: 'redo', img: 'redo', hint: _UNO('.uno:Redo'), uno: 'Redo', disabled: true},
{type: 'button', id: 'fullscreen', img: 'fullscreen', hint: _UNO('.uno:FullScreen', 'text')},
- {type: 'drop', id: 'userlist', img: 'users', html: '<div id="userlist_container"><table id="userlist_table"><tbody></tbody></table>' +
+ {type: 'drop', id: 'userlist', img: 'users', hidden: true, html: '<div id="userlist_container"><table id="userlist_table"><tbody></tbody></table>' +
'<hr><table class="loleaflet-font" id="editor-btn">' +
'<tr>' +
'<td><input type="checkbox" name="alwaysFollow" id="follow-checkbox" onclick="editorUpdate(event)"></td>' +
@@ -1034,7 +1034,7 @@ function initNormalToolbar(toolItems) {
{type: 'html', id: 'right'},
{type: 'html', id: 'modifiedstatuslabel', html: '<div id="modifiedstatuslabel" class="loleaflet-font"></div>', mobile:false},
{type: 'break', id: 'modifiedstatuslabelbreak', mobile:false},
- {type: 'drop', id: 'userlist', text: _('No users'), html: '<div id="userlist_container"><table id="userlist_table"><tbody></tbody></table>' +
+ {type: 'drop', id: 'userlist', hidden: true, text: _('No users'), html: '<div id="userlist_container"><table id="userlist_table"><tbody></tbody></table>' +
'<hr><table class="loleaflet-font" id="editor-btn">' +
'<tr>' +
'<td><input type="checkbox" name="alwaysFollow" id="follow-checkbox" onclick="editorUpdate(event)"></td>' +
@@ -2131,6 +2131,12 @@ function updateUserListCount() {
var zoomlevel = $('#zoomlevel').html();
w2ui['toolbar-down'].refresh();
$('#zoomlevel').html(zoomlevel);
+
+ if (count > 1) {
+ $('#tb_toolbar-down_item_userlist').show();
+ } else {
+ $('#tb_toolbar-down_item_userlist').hide();
+ }
}
function onAddView(e) {
More information about the Libreoffice-commits
mailing list