[Libreoffice-commits] online.git: loleaflet/dist

Henry Castro hcastro at collabora.com
Thu Dec 7 18:16:24 UTC 2017


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

New commits:
commit 595f28c067194602e27c209c3268a8976c1ec250
Author: Henry Castro <hcastro at 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 <hcastro at collabora.com>
    Tested-by: Henry Castro <hcastro at collabora.com>

diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 865a6efe..8012efa9 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1314,6 +1314,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').parent().html());
 	}
+	else if (commandName === '.uno:DocumentRepair') {
+		if (state === 'true') {
+			toolbar.enable('repair');
+		} else {
+			toolbar.disable('repair');
+		}
+	}
 
 	var id = unoCmdToToolbarId(commandName);
 	if (state === 'true') {
@@ -1340,12 +1347,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) {


More information about the Libreoffice-commits mailing list