[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loleaflet/dist
Henry Castro
hcastro at collabora.com
Wed Jun 27 08:20:08 UTC 2018
loleaflet/dist/toolbar/toolbar.js | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
New commits:
commit 27211947af41cf81ffbc072b13a4b15451dd4fde
Author: Henry Castro <hcastro at collabora.com>
Date: Mon Jun 25 17:28:26 2018 -0400
lolefalet: mobile mode, hide tooltips
Change-Id: I0bc1f10184f63318c483b590139d570380a47222
Reviewed-on: https://gerrit.libreoffice.org/56421
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 39fa31a21..a4abf76e2 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -378,6 +378,15 @@ function onColorPick(id, color) {
map.focus();
}
+function hideTooltip(toolbar, id) {
+ if (toolbar.touchStarted) {
+ setTimeout(function() {
+ toolbar.tooltipHide(id, {});
+ }, 5000)
+ toolbar.touchStarted = false;
+ }
+}
+
var stylesSelectValue;
var fontsSelectValue;
var fontsizesSelectValue;
@@ -448,6 +457,7 @@ $(function () {
],
onClick: function (e) {
onClick(e, e.target);
+ hideTooltip(this, e.target);
},
onRefresh: function() {
if (map.getDocType() === 'presentation') {
@@ -475,6 +485,9 @@ $(function () {
}
});
toolbar.contextmenu(function() { return false; });
+ toolbar.bind('touchstart', function() {
+ w2ui['toolbar-up'].touchStarted = true;
+ });
toolbar = $('#formulabar');
toolbar.w2toolbar({
@@ -492,6 +505,7 @@ $(function () {
],
onClick: function (e) {
onClick(e, e.target);
+ hideTooltip(this, e.target);
},
onRefresh: function(e) {
$('#addressInput').off('keyup', onAddressInput).on('keyup', onAddressInput);
@@ -501,6 +515,10 @@ $(function () {
}
});
toolbar.contextmenu(function() { return false; });
+ toolbar.bind('touchstart', function() {
+ w2ui['formulabar'].touchStarted = true;
+ });
+
$(w2ui.formulabar.box).find('.w2ui-scroll-left, .w2ui-scroll-right').hide();
w2ui.formulabar.on('resize', function(target, e) {
e.isCancelled = true;
@@ -519,9 +537,13 @@ $(function () {
],
onClick: function (e) {
onClick(e, e.target);
+ hideTooltip(this, e.target);
}
});
toolbar.contextmenu(function() { return false; });
+ toolbar.bind('touchstart', function() {
+ w2ui['spreadsheet-toolbar'].touchStarted = true;
+ });
toolbar = $('#presentation-toolbar');
toolbar.w2toolbar({
@@ -538,9 +560,13 @@ $(function () {
],
onClick: function (e) {
onClick(e, e.target);
+ hideTooltip(this, e.target);
}
});
toolbar.contextmenu(function() { return false; });
+ toolbar.bind('touchstart', function() {
+ w2ui['presentation-toolbar'].touchStarted = true;
+ });
toolbar = $('#toolbar-down');
toolbar.w2toolbar({
@@ -581,6 +607,7 @@ $(function () {
{type: 'button', id: 'zoomin', img: 'zoomin', hint: _UNO('.uno:ZoomPlus')}
],
onClick: function (e) {
+ hideTooltip(this, e.target);
if (e.item.id === 'userlist') {
setTimeout(function() {
var cBox = $('#follow-checkbox')[0];
@@ -606,6 +633,9 @@ $(function () {
}
});
toolbar.contextmenu(function() { return false; });
+ toolbar.bind('touchstart', function() {
+ w2ui['toolbar-down'].touchStarted = true;
+ });
});
var userJoinedPopupMessage = '<div>' + _('%user has joined') + '</div>';
More information about the Libreoffice-commits
mailing list