loleaflet/dist/toolbar/toolbar.js |   22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

New commits:
commit 074d5d1e5d8d7798def2e8ee4313e45ecdf1002c
Author: Henry Castro <hcas...@collabora.com>
Date:   Fri Jun 1 21:00:16 2018 -0400

    loleaflet: disable context menu on toolbar
    
    Change-Id: If1161ec2725ec1bb4d8dd1b497fc3f4662ba7cc9
    Reviewed-on: https://gerrit.libreoffice.org/55200
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 592afa242..eede37387 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -325,7 +325,8 @@ var fontsSelectValue;
 var fontsizesSelectValue;
 
 $(function () {
-       $('#toolbar-up').w2toolbar({
+       var toolbar = $('#toolbar-up');
+       toolbar.w2toolbar({
                name: 'toolbar-up',
                items: [
                        {type: 'button',  id: 'save', img: 'save', hint: 
_UNO('.uno:Save')},
@@ -405,8 +406,10 @@ $(function () {
                        insertTable();
                }
        });
+       toolbar.contextmenu(function() { return false; });
 
-       $('#formulabar').w2toolbar({
+       toolbar = $('#formulabar');
+       toolbar.w2toolbar({
                name: 'formulabar',
                items: [
                        {type: 'html',  id: 'left'},
@@ -428,7 +431,10 @@ $(function () {
                        $('#formulaInput').off('focus', 
onFormulaBarFocus).on('focus', onFormulaBarFocus);
                }
        });
-       $('#spreadsheet-toolbar').w2toolbar({
+       toolbar.contextmenu(function() { return false; });
+
+       toolbar = $('#spreadsheet-toolbar')
+       toolbar.w2toolbar({
                name: 'spreadsheet-toolbar',
                items: [
                        {type: 'button',  id: 'firstrecord',  img: 
'firstrecord', hidden: true, hint: _('First sheet')},
@@ -441,7 +447,10 @@ $(function () {
                        onClick(e, e.target);
                }
        });
-       $('#presentation-toolbar').w2toolbar({
+       toolbar.contextmenu(function() { return false; });
+
+       toolbar = $('#presentation-toolbar');
+       toolbar.w2toolbar({
                name: 'presentation-toolbar',
                items: [
                        {type: 'html',  id: 'left'},
@@ -456,8 +465,10 @@ $(function () {
                        onClick(e, e.target);
                }
        });
+       toolbar.contextmenu(function() { return false; });
 
-       $('#toolbar-down').w2toolbar({
+       toolbar = $('#toolbar-down');
+       toolbar.w2toolbar({
                name: 'toolbar-down',
                items: [
                        {type: 'html',  id: 'search',
@@ -518,6 +529,7 @@ $(function () {
                        $('#search-input').off('keydown', 
onSearchKeyDown).on('keydown', onSearchKeyDown);
                }
        });
+       toolbar.contextmenu(function() { return false; });
 });
 
 var userJoinedPopupMessage = '<div>' + _('%user has joined') + '</div>';
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to