loleaflet/js/w2ui-1.5.rc1.js | 4 ++-- loleaflet/src/control/Control.FormulaBar.js | 3 ++- loleaflet/src/control/Control.MobileBottomBar.js | 2 +- loleaflet/src/control/Control.MobileTopBar.js | 2 +- loleaflet/src/control/Control.PresentationBar.js | 3 ++- loleaflet/src/control/Control.SearchBar.js | 2 +- loleaflet/src/control/Control.SheetsBar.js | 3 ++- loleaflet/src/control/Control.SigningBar.js | 3 ++- loleaflet/src/control/Control.StatusBar.js | 3 +-- loleaflet/src/control/Control.TopToolbar.js | 2 +- 10 files changed, 15 insertions(+), 12 deletions(-)
New commits: commit 89061cda512e5900280caef656a975364ff73e5d Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Wed Sep 9 01:30:07 2020 +0530 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Wed Sep 9 11:52:42 2020 +0200 leaflet: replaced w2ui tooltip with jquery tooltip makes UI more consistent with notebookbar some tooltip used to go out of screen on edges Change-Id: I306591146c21cc9d4f2d92361f411628a91f3d89 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102277 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/js/w2ui-1.5.rc1.js b/loleaflet/js/w2ui-1.5.rc1.js index 96a5320bd..d8226ea23 100644 --- a/loleaflet/js/w2ui-1.5.rc1.js +++ b/loleaflet/js/w2ui-1.5.rc1.js @@ -6067,7 +6067,7 @@ w2utils.event = { html += '<td width="100%" id="tb_'+ this.name +'_item_'+ it.id +'" align="right"></td>'; } else { html += '<td id="tb_'+ this.name + '_item_'+ it.id +'" style="'+ (it.hidden ? 'display: none' : '') +'" '+ - ' class="'+ (it.disabled ? 'disabled' : '') +'" valign="middle">'+ + ' class="'+ (it.disabled ? 'disabled' : '') +'" valign="middle" title="'+ (it.hint ? it.hint : "") + '">' '</td>'; } } @@ -6193,7 +6193,7 @@ w2utils.event = { var html = ''; if (item.caption != null && item.text == null) item.text = item.caption; // for backward compatibility if (item.text == null) item.text = ''; - if (item.tooltip == null && item.hint != null) item.tooltip = item.hint; // for backward compatibility + if (item.tooltip == null) item.tooltip = ''; var img = '<td> </td>'; var text = item.text; diff --git a/loleaflet/src/control/Control.FormulaBar.js b/loleaflet/src/control/Control.FormulaBar.js index 60fd848d9..b58353d82 100644 --- a/loleaflet/src/control/Control.FormulaBar.js +++ b/loleaflet/src/control/Control.FormulaBar.js @@ -26,7 +26,6 @@ L.Control.FormulaBar = L.Control.extend({ var toolbar = $('#formulabar'); toolbar.w2toolbar({ name: 'formulabar', - tooltip: 'bottom', hidden: true, items: [ {type: 'html', id: 'left'}, @@ -43,6 +42,8 @@ L.Control.FormulaBar = L.Control.extend({ $('#addressInput').off('keyup', that.onAddressInput.bind(that)).on('keyup', that.onAddressInput.bind(that)); } }); + toolbar.tooltip(); + toolbar.bind('touchstart', function(e) { w2ui['formulabar'].touchStarted = true; var touchEvent = e.originalEvent; diff --git a/loleaflet/src/control/Control.MobileBottomBar.js b/loleaflet/src/control/Control.MobileBottomBar.js index 340e8d1ab..be3dd0062 100644 --- a/loleaflet/src/control/Control.MobileBottomBar.js +++ b/loleaflet/src/control/Control.MobileBottomBar.js @@ -109,7 +109,6 @@ L.Control.MobileBottomBar = L.Control.extend({ var toolbar = $('#toolbar-down'); toolbar.w2toolbar({ name: 'editbar', - tooltip: 'top', items: toolItems, onClick: function (e) { // use global handler @@ -124,6 +123,7 @@ L.Control.MobileBottomBar = L.Control.extend({ window.insertShapes(); } }); + toolbar.bind('touchstart', function(e) { w2ui['editbar'].touchStarted = true; var touchEvent = e.originalEvent; diff --git a/loleaflet/src/control/Control.MobileTopBar.js b/loleaflet/src/control/Control.MobileTopBar.js index d754f0a19..05fd7c7ed 100644 --- a/loleaflet/src/control/Control.MobileTopBar.js +++ b/loleaflet/src/control/Control.MobileTopBar.js @@ -71,13 +71,13 @@ L.Control.MobileTopBar = L.Control.extend({ var toolbar = $('#toolbar-up'); toolbar.w2toolbar({ name: 'actionbar', - tooltip: 'bottom', items: toolItems, onClick: function (e) { that.onClick(e, e.target); window.hideTooltip(this, e.target); } }); + toolbar.bind('touchstart', function(e) { w2ui['actionbar'].touchStarted = true; var touchEvent = e.originalEvent; diff --git a/loleaflet/src/control/Control.PresentationBar.js b/loleaflet/src/control/Control.PresentationBar.js index f91fbcd6b..2adcf2eae 100644 --- a/loleaflet/src/control/Control.PresentationBar.js +++ b/loleaflet/src/control/Control.PresentationBar.js @@ -27,7 +27,6 @@ L.Control.PresentationBar = L.Control.extend({ var toolbar = $('#presentation-toolbar'); toolbar.w2toolbar({ name: 'presentation-toolbar', - tooltip: 'bottom', hidden: true, items: [ {type: 'html', id: 'left'}, @@ -43,6 +42,8 @@ L.Control.PresentationBar = L.Control.extend({ window.hideTooltip(this, e.target); } }); + toolbar.tooltip(); + toolbar.bind('touchstart', function() { w2ui['presentation-toolbar'].touchStarted = true; }); diff --git a/loleaflet/src/control/Control.SearchBar.js b/loleaflet/src/control/Control.SearchBar.js index 14f4ac944..1025d39cf 100644 --- a/loleaflet/src/control/Control.SearchBar.js +++ b/loleaflet/src/control/Control.SearchBar.js @@ -16,7 +16,6 @@ L.Control.SearchBar = L.Control.extend({ var toolbar = $('#toolbar-search'); toolbar.w2toolbar({ name: 'searchbar', - tooltip: 'top', items: [ { type: 'html', id: 'search', @@ -39,6 +38,7 @@ L.Control.SearchBar = L.Control.extend({ window.setupSearchInput(); } }); + toolbar.tooltip(); toolbar.bind('touchstart', function(e) { w2ui['searchbar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.SheetsBar.js b/loleaflet/src/control/Control.SheetsBar.js index eeddb0538..d3a6012e9 100644 --- a/loleaflet/src/control/Control.SheetsBar.js +++ b/loleaflet/src/control/Control.SheetsBar.js @@ -22,7 +22,6 @@ L.Control.SheetsBar = L.Control.extend({ var toolbar = $('#spreadsheet-toolbar'); toolbar.w2toolbar({ name: 'spreadsheet-toolbar', - tooltip: 'bottom', hidden: true, items: [ {type: 'button', hidden: !this.options.shownavigation, id: 'firstrecord', img: 'firstrecord', hint: _('Scroll to the first sheet')}, @@ -36,6 +35,8 @@ L.Control.SheetsBar = L.Control.extend({ window.hideTooltip(this, e.target); } }); + toolbar.tooltip(); + toolbar.bind('touchstart', function(e) { w2ui['spreadsheet-toolbar'].touchStarted = true; var touchEvent = e.originalEvent; diff --git a/loleaflet/src/control/Control.SigningBar.js b/loleaflet/src/control/Control.SigningBar.js index dbccc9114..c31d90ee4 100644 --- a/loleaflet/src/control/Control.SigningBar.js +++ b/loleaflet/src/control/Control.SigningBar.js @@ -19,7 +19,6 @@ L.Control.SigningBar = L.Control.extend({ var toolbar = $('#document-signing-bar'); toolbar.w2toolbar({ name: 'document-signing-bar', - tooltip: 'bottom', items: this.map.setupSigningToolbarItems(), onClick: function (e) { that.onClick(e, e.target); @@ -28,6 +27,8 @@ L.Control.SigningBar = L.Control.extend({ onRefresh: function() { } }); + toolbar.tooltip(); + toolbar.bind('touchstart', function() { w2ui['document-signing-bar'].touchStarted = true; }); diff --git a/loleaflet/src/control/Control.StatusBar.js b/loleaflet/src/control/Control.StatusBar.js index 08aa2fb3f..67752f432 100644 --- a/loleaflet/src/control/Control.StatusBar.js +++ b/loleaflet/src/control/Control.StatusBar.js @@ -183,7 +183,6 @@ L.Control.StatusBar = L.Control.extend({ if (!window.mode.isMobile()) { toolbar.w2toolbar({ name: 'actionbar', - tooltip: 'top', items: [ {type: 'html', id: 'search', html: '<div style="padding: 3px 5px 3px 10px;" class="loleaflet-font">' + @@ -239,7 +238,7 @@ L.Control.StatusBar = L.Control.extend({ window.setupSearchInput(); } }); - + toolbar.tooltip(); toolbar.show(); } diff --git a/loleaflet/src/control/Control.TopToolbar.js b/loleaflet/src/control/Control.TopToolbar.js index 2f896e778..a77cf23a1 100644 --- a/loleaflet/src/control/Control.TopToolbar.js +++ b/loleaflet/src/control/Control.TopToolbar.js @@ -235,7 +235,6 @@ L.Control.TopToolbar = L.Control.extend({ var toolbar = $('#toolbar-up'); toolbar.w2toolbar({ name: 'editbar', - tooltip: 'bottom', items: this.getToolItems(), onClick: function (e) { window.onClick(e, e.target); @@ -259,6 +258,7 @@ L.Control.TopToolbar = L.Control.extend({ window.insertShapes(); } }); + toolbar.tooltip(); toolbar.bind('touchstart', function() { w2ui['editbar'].touchStarted = true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits