lolefalet: mobile mode, hide tooltips
Change-Id: I0bc1f10184f63318c483b590139d570380a47222 Reviewed-on: https://gerrit.libreoffice.org/56421 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
This commit is contained in:
parent
276e367977
commit
43a7b465bf
1 changed files with 31 additions and 0 deletions
|
@ -573,6 +573,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;
|
||||
|
@ -657,6 +666,7 @@ function createToolbar() {
|
|||
],
|
||||
onClick: function (e) {
|
||||
onClick(e, e.target);
|
||||
hideTooltip(this, e.target);
|
||||
},
|
||||
onRefresh: function() {
|
||||
if (map.getDocType() === 'presentation') {
|
||||
|
@ -686,6 +696,9 @@ function createToolbar() {
|
|||
}
|
||||
});
|
||||
toolbar.contextmenu(function() { return false; });
|
||||
toolbar.bind('touchstart', function() {
|
||||
w2ui['toolbar-up'].touchStarted = true;
|
||||
});
|
||||
|
||||
toolbar = $('#formulabar');
|
||||
toolbar.w2toolbar({
|
||||
|
@ -703,6 +716,7 @@ function createToolbar() {
|
|||
],
|
||||
onClick: function (e) {
|
||||
onClick(e, e.target);
|
||||
hideTooltip(this, e.target);
|
||||
},
|
||||
onRefresh: function() {
|
||||
$('#addressInput').off('keyup', onAddressInput).on('keyup', onAddressInput);
|
||||
|
@ -712,6 +726,10 @@ function createToolbar() {
|
|||
}
|
||||
});
|
||||
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;
|
||||
|
@ -730,9 +748,13 @@ function createToolbar() {
|
|||
],
|
||||
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({
|
||||
|
@ -749,9 +771,13 @@ function createToolbar() {
|
|||
],
|
||||
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({
|
||||
|
@ -792,6 +818,7 @@ function createToolbar() {
|
|||
{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];
|
||||
|
@ -816,6 +843,10 @@ function createToolbar() {
|
|||
$('#search-input').off('keydown', onSearchKeyDown).on('keydown', onSearchKeyDown);
|
||||
}
|
||||
});
|
||||
toolbar.contextmenu(function() { return false; });
|
||||
toolbar.bind('touchstart', function() {
|
||||
w2ui['toolbar-down'].touchStarted = true;
|
||||
});
|
||||
}
|
||||
|
||||
var userJoinedPopupMessage = '<div>' + _('%user has joined') + '</div>';
|
||||
|
|
Loading…
Reference in a new issue