[Libreoffice-commits] online.git: loleaflet/src
Aditya Dewan
iit2015097 at iiita.ac.in
Tue Jun 6 11:23:12 UTC 2017
loleaflet/src/control/Control.Menubar.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 3c121dad3765f3de68390d160210075701cde9b7
Author: Aditya Dewan <iit2015097 at 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 <pranavk at collabora.co.uk>
Tested-by: pranavk <pranavk at collabora.co.uk>
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 87d224e7..a480f15e 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: [
@@ -452,6 +456,7 @@ L.Control.Menubar = L.Control.extend({
</tr>\
</table>\
';
+ var mouseMoveFunc;
vex.dialog.open({
showCloseButton: true,
escapeButtonCloses: true,
@@ -505,7 +510,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) {
@@ -518,7 +523,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) {
$vexContent = $(this).parent();
More information about the Libreoffice-commits
mailing list