loleaflet/dist/toolbar/toolbar.js | 27 ++++++++++++++++++++++----- loleaflet/src/control/Control.Menubar.js | 28 ++++++++++++++++++---------- loleaflet/src/layer/tile/TileLayer.js | 4 +++- 3 files changed, 43 insertions(+), 16 deletions(-)
New commits: commit f73acaa3a6512bc2e4eea18214dbdb8ee489256c Author: Aditya Dewan <iit2015...@iiita.ac.in> Date: Wed Jun 21 16:23:45 2017 +0530 fix js lint error Change-Id: I42183dc8865a6936de26e18459ab985e2f9bba1f Reviewed-on: https://gerrit.libreoffice.org/39046 Reviewed-by: pranavk <pran...@collabora.co.uk> Tested-by: pranavk <pran...@collabora.co.uk> diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 2d842761..c0ea64e9 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -748,7 +748,7 @@ function onSearch(e) { toolbar.hide('cancelsearch'); } else { - if(map.getDocType() === 'text') + if (map.getDocType() === 'text') map.search(L.DomUtil.get('search-input').value, false, '', 0, true /* expand search */); toolbar.enable('searchprev'); toolbar.enable('searchnext'); commit 361cdf8a916bc1bf01f8696631d3bb35cf7ac086 Author: Aditya Dewan <iit2015...@iiita.ac.in> Date: Sat Jun 17 08:48:13 2017 +0530 disable search as type from the dialog box for calc/impress Change-Id: I93fa810876c405ea29521ecd90d4cf70affc7994 Reviewed-on: https://gerrit.libreoffice.org/38904 Reviewed-by: pranavk <pran...@collabora.co.uk> Tested-by: pranavk <pran...@collabora.co.uk> diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index aa5e4cfe..2d842761 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -741,10 +741,19 @@ function selectItem(item, func) } function onSearch(e) { var toolbar = w2ui['toolbar-down']; - map.search(L.DomUtil.get('search-input').value, false, '', 0, true /* expand search */); - toolbar.enable('searchprev'); - toolbar.enable('searchnext'); - toolbar.show('cancelsearch'); + // conditionally disabling until, we find a solution for tdf#108577 + if (L.DomUtil.get('search-input').value === '') { + toolbar.disable('searchprev'); + toolbar.disable('searchnext'); + toolbar.hide('cancelsearch'); + } + else { + if(map.getDocType() === 'text') + map.search(L.DomUtil.get('search-input').value, false, '', 0, true /* expand search */); + toolbar.enable('searchprev'); + toolbar.enable('searchnext'); + toolbar.show('cancelsearch'); + } } function onSearchKeyPress(e) { diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 9fe98e3f..fdd63bcd 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -512,11 +512,13 @@ L.Control.Menubar = L.Control.extend({ var xElem = 0, yElem = 0; var maxH = window.innerHeight, maxW = window.innerWidth; - $('#findthis').on('input', function() { - if (this.value.length != 0) { - map.search(this.value, false, '', 0, true); - } - }); + if (map.getDocType() === 'text') { + $('#findthis').on('input', function() { + if (this.value.length != 0) { + map.search(this.value, false, '', 0, true); + } + }); + } $('.vex-content').on('mousedown', function(e) { selected = this; selected.style.cursor = 'move'; commit 822985a5ca4546bd5354b6d4ed50d3bb08e3f68d Author: Pranav Kant <pran...@collabora.co.uk> Date: Wed Jun 21 12:12:25 2017 +0530 Disable Copy from calc cells and formula bar ... of course only when DisableCopy is mentioned. (cherry picked from commit 6e46c760ce6928e5c2120499a44d79529e263e07) (cherry picked from commit 202b9974d74469355203f9e38400c7b6a6a50a7d) Change-Id: I843b7cab2e3fe2dd691396e4702281a6bc953947 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 94b17e42..aa5e4cfe 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -938,6 +938,14 @@ map.on('wopiprops', function(e) { w2ui['toolbar-up'].hide('save'); w2ui['toolbar-up'].hide('savebreak'); } + if (e.DisableCopy) { + $('input#formulaInput').bind('copy', function(evt) { + evt.preventDefault(); + }); + $('input#addressInput').bind('copy', function(evt) { + evt.preventDefault(); + }); + } }); map.on('doclayerinit', function () { @@ -1571,7 +1579,7 @@ function getUserItem(viewId, userName, extraInfo, color) { var html = '<tr class="' + className + '" id="user-' + viewId + '" onclick="onUseritemClicked(event)">' + '<td class=usercolor style="background-color: ' + color +';">'; if (extraInfo !== undefined && extraInfo.avatar !== undefined) { - html += '<img src="' + extraInfo.avatar + '" width="32" height="32" />' + html += '<img src="' + extraInfo.avatar + '" width="32" height="32" />'; } // TODO: Add mail and other links as sub-menu. diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 109569ce..187d26d1 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -509,7 +509,9 @@ L.TileLayer = L.GridLayer.extend({ _onCellFormulaMsg: function (textMsg) { var formula = textMsg.substring(13); - this._selectionTextContent = formula; + if (!this._map['wopi'].DisableCopy) { + this._selectionTextContent = formula; + } this._map.fire('cellformula', {formula: formula}); }, commit 5865b31ea5aef28666bf6eff36b333151c133e6d Author: Jan Holesovsky <ke...@collabora.com> Date: Wed Jun 7 17:36:40 2017 +0200 loleaflet: Position the Find & replace consistently, and in line with desktop. Change-Id: I5d9d93339d74f5a9cda304fba876c76cb5391408 diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index d29bd46c..9fe98e3f 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -25,7 +25,6 @@ L.Control.Menubar = L.Control.extend({ {name: _('Cut'), type: 'unocommand', uno: '.uno:Cut'}, {name: _('Copy'), type: 'unocommand', uno: '.uno:Copy'}, {name: _('Paste'), type: 'unocommand', uno: '.uno:Paste'}, - {type: 'separator'}, {name: _('Select all'), type: 'unocommand', uno: '.uno:SelectAll'}, {type: 'separator'}, {name: _('Find & Replace'), id: 'findandreplace', type: 'action'}, @@ -190,10 +189,9 @@ L.Control.Menubar = L.Control.extend({ {name: _('Cut'), type: 'unocommand', uno: '.uno:Cut'}, {name: _('Copy'), type: 'unocommand', uno: '.uno:Copy'}, {name: _('Paste'), type: 'unocommand', uno: '.uno:Paste'}, + {name: _('Select all'), type: 'unocommand', uno: '.uno:SelectAll'}, {type: 'separator'}, - {name: _('Find & Replace'), id: 'findandreplace', type: 'action'}, - {type: 'separator'}, - {name: _('Select all'), type: 'unocommand', uno: '.uno:SelectAll'}] + {name: _('Find & Replace'), id: 'findandreplace', type: 'action'}] }, {name: _('View'), id: 'view', type: 'menu', menu: [ {name: _('Full screen'), id: 'fullscreen', type: 'action'}, @@ -252,10 +250,9 @@ L.Control.Menubar = L.Control.extend({ {name: _('Cut'), type: 'unocommand', uno: '.uno:Cut'}, {name: _('Copy'), type: 'unocommand', uno: '.uno:Copy'}, {name: _('Paste'), type: 'unocommand', uno: '.uno:Paste'}, + {name: _('Select all'), type: 'unocommand', uno: '.uno:SelectAll'}, {type: 'separator'}, - {name: _('Find & Replace'), id: 'findandreplace', type: 'action'}, - {type: 'separator'}, - {name: _('Select all'), type: 'unocommand', uno: '.uno:SelectAll'}] + {name: _('Find & Replace'), id: 'findandreplace', type: 'action'}] }, {name: _('View'), id: 'view', type: 'menu', menu: [ {name: _('Full screen'), id: 'fullscreen', type: 'action'}] commit 7c9300f61cb18b0e01fb077db4f52ef4332d189b Author: Aditya Dewan <iit2015...@iiita.ac.in> Date: Mon Jun 5 18:05:04 2017 +0530 tdf#97020 follow up - Adding find&replace functionality added option for calc and impress draggable operation now smoother Change-Id: I46210689a1592478827271385da48a854aece766 Reviewed-on: https://gerrit.libreoffice.org/38405 Reviewed-by: pranavk <pran...@collabora.co.uk> Tested-by: pranavk <pran...@collabora.co.uk> (cherry picked from commit 3c121dad3765f3de68390d160210075701cde9b7) diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 0bf811d3..d29bd46c 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -191,6 +191,8 @@ L.Control.Menubar = L.Control.extend({ {name: _('Copy'), type: 'unocommand', uno: '.uno:Copy'}, {name: _('Paste'), type: 'unocommand', uno: '.uno:Paste'}, {type: 'separator'}, + {name: _('Find & Replace'), id: 'findandreplace', type: 'action'}, + {type: 'separator'}, {name: _('Select all'), type: 'unocommand', uno: '.uno:SelectAll'}] }, {name: _('View'), id: 'view', type: 'menu', menu: [ @@ -251,6 +253,8 @@ L.Control.Menubar = L.Control.extend({ {name: _('Copy'), type: 'unocommand', uno: '.uno:Copy'}, {name: _('Paste'), type: 'unocommand', uno: '.uno:Paste'}, {type: 'separator'}, + {name: _('Find & Replace'), id: 'findandreplace', type: 'action'}, + {type: 'separator'}, {name: _('Select all'), type: 'unocommand', uno: '.uno:SelectAll'}] }, {name: _('View'), id: 'view', type: 'menu', menu: [ @@ -472,6 +476,7 @@ L.Control.Menubar = L.Control.extend({ </tr>\ </table>\ '; + var mouseMoveFunc; vex.dialog.open({ showCloseButton: true, escapeButtonCloses: true, @@ -525,7 +530,7 @@ L.Control.Menubar = L.Control.extend({ selected.style.cursor = 'default'; selected = null; }); - $('.vex').on('mousemove', function(e) { + var mouseMoveFunc = function(e) { xPos = e.pageX; yPos = e.pageY; if (selected !== null) { @@ -538,7 +543,11 @@ L.Control.Menubar = L.Control.extend({ selected.style.top = (yPos - yElem) + 'px'; } } - }); + }; + $(document).on('mousemove', mouseMoveFunc); + }, + afterClose: function(e) { + $(document).off('mousemove', mouseMoveFunc); }, onSubmit: function(event) { var $vexContent = $(this).parent(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits