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

New commits:
commit eedf7a8e004ce4bb08328fc782891e88bf49b185
Author: Pranav Kant <pran...@collabora.co.uk>
Date:   Mon Dec 5 22:04:06 2016 +0530

    tdf#106601 loleaflet: Disable calc toolbar items in readonly/view mode
    
    Change-Id: I2989de5f201eb7f52f5f47d98f9172c640e38fad
    Reviewed-on: https://gerrit.libreoffice.org/35361
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 159bcf58..7df233c0 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -528,7 +528,11 @@ var formatButtons = {
        'fontcolor': true, 'backcolor': true, 'bullet': true, 'numbering': true,
        'alignleft': true, 'alignhorizontal': true, 'alignright': true, 
'alignblock': true,
        'incrementindent': true, 'decrementindent': true, 'insertgraphic': true,
-       'insertfootnote': true, 'repair': true, 'specialcharacter': true
+       'insertfootnote': true, 'repair': true, 'specialcharacter': true,
+       'wraptext': true, 'togglemergecells': true, 'numberformatcurrency': 
true,
+       'numberformatpercent': true, 'numberformatdecimal': true, 
'numberformatdate': true,
+       'numberformatincdecimals': true, 'numberformatdecdecimals': true,
+       'sortascending': true, 'sortdescending': true
 };
 
 var userJoinedPopupMessage = '<div>' + _('%user has joined') + '</div>';
@@ -1011,20 +1015,6 @@ map.on('commandstatechanged', function (e) {
                state = toLocalePattern('Slide %1 of %2', 'Slide (\\d+) of 
(\\d+)', state, '%1', '%2');
                $('#PageStatus').html(state ? state : 
'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp');
        }
-       else if (commandName === '.uno:WrapText' ||
-                commandName === '.uno:ToggleMergeCells' ||
-                commandName === '.uno:NumberFormatCurrency' ||
-                commandName === '.uno:NumberFormatDecimal' ||
-                commandName === '.uno:NumberFormatPercent' ||
-                commandName === '.uno:NumberFormatDate') {
-               toggleButton(toolbar, state, commandName);
-               toggleButton(toolbarUpMore, state, commandName);
-       }
-       else if (commandName === '.uno:SortAscending' ||
-                commandName === '.uno:SortDescending') {
-               disableButton(toolbar, state, commandName);
-               disableButton(toolbarUpMore, state, commandName);
-       }
 
        var id = commandName.toLowerCase().substr(5);
        if (typeof formatButtons[id] !== 'undefined') {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to