[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - loleaflet/dist

Henry Castro hcastro at collabora.com
Mon Jan 22 15:07:23 UTC 2018


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

New commits:
commit 178de645040524f54454d6c3ab9f32f9309c0bf4
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>
    Reviewed-on: https://gerrit.libreoffice.org/47916
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at 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').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) {


More information about the Libreoffice-commits mailing list