[Libreoffice-commits] online.git: loleaflet/js
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Dec 15 15:13:54 UTC 2018
loleaflet/js/toolbar.js | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
New commits:
commit 982777ec3812395145681b36c3980ddc6d5c063d
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Sat Dec 15 16:11:00 2018 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Dec 15 16:11:00 2018 +0100
loleaflet: two missing functions: deselectUser, onRemoveView
Change-Id: I99354e1667baba5f0f1ce10d64e597364057d46c
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 9ed53ec2a..3991ae1be 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -2336,6 +2336,15 @@ function selectUser(viewId) {
$('#tb_actionbar_item_userlist').w2overlay('');
}
+function deselectUser(e) {
+ var userlistItem = w2ui['actionbar'].get('userlist');
+ if (userlistItem === null) {
+ return;
+ }
+
+ userlistItem.html = $(userlistItem.html).find('#user-' + e.viewId).removeClass('selected-user').parent().parent().parent()[0].outerHTML;
+}
+
function getUserItem(viewId, userName, extraInfo, color) {
var className = 'useritem';
if (extraInfo !== undefined && extraInfo.avatar !== undefined) {
@@ -2416,6 +2425,32 @@ function onAddView(e) {
}
}
+function onRemoveView(e) {
+ $('#tb_actionbar_item_userlist')
+ .w2overlay({
+ class: 'loleaflet-font',
+ html: userLeftPopupMessage.replace('%user', e.username),
+ style: 'padding: 5px'
+ });
+ clearTimeout(userPopupTimeout);
+ userPopupTimeout = setTimeout(function() {
+ $('#tb_actionbar_item_userlist').w2overlay('');
+ clearTimeout(userPopupTimeout);
+ userPopupTimeout = null;
+ }, 3000);
+
+ if (e.viewId === map._docLayer._followThis) {
+ map._docLayer._followThis = -1;
+ map._docLayer._followUser = false;
+ }
+
+ var userlistItem = w2ui['actionbar'].get('userlist');
+ if (userlistItem !== null) {
+ userlistItem.html = $(userlistItem.html).find('#user-' + e.viewId).remove().end()[0].outerHTML;
+ updateUserListCount();
+ }
+}
+
$(window).resize(function() {
resizeToolbar();
});
More information about the Libreoffice-commits
mailing list