loleaflet/dist/toolbar/toolbar.js |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 178de645040524f54454d6c3ab9f32f9309c0bf4
Author: Henry Castro <hcas...@collabora.com>
Date:   Wed Jun 28 17:06:12 2017 -0400

    loleaflet: .uno:DocumentRepair state is reported by LOKit
    
    Change-Id: I457c607055bfde8ec68c81cf3b9b2f5a80a4b345
    Reviewed-on: https://gerrit.libreoffice.org/39376
    Reviewed-by: Henry Castro <hcas...@collabora.com>
    Tested-by: Henry Castro <hcas...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/47916
    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 683fa418..47b3ef88 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1307,6 +1307,13 @@ map.on('commandstatechanged', function (e) {
                state = toLocalePattern('Slide %1 of %2', 'Slide (\\d+) of 
(\\d+)', state, '%1', '%2');
                updateToolbarItem(statusbar, 'PageStatus', 
$('#PageStatus').html(state ? state : 
'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp').parent().html());
        }
+       else if (commandName === '.uno:DocumentRepair') {
+               if (state === 'true') {
+                       toolbar.enable('repair');
+               } else {
+                       toolbar.disable('repair');
+               }
+       }
 
        var id = unoCmdToToolbarId(commandName);
        if (state === 'true') {
@@ -1333,12 +1340,6 @@ map.on('commandstatechanged', function (e) {
                        toolbarUpMore.disable(id);
                }
        }
-
-       if (id === 'undo' || id === 'redo') {
-               if (!toolbar.get('undo').disabled || 
!toolbar.get('redo').disabled) {
-                       toolbar.enable('repair');
-               }
-       }
 });
 
 map.on('search', function (e) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to