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

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Jun 19 05:25:44 UTC 2017


 loleaflet/dist/toolbar/toolbar.js |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 323e2789b9e82e0d600d39d0697d40f6014f54d7
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Mon Jun 19 01:20:34 2017 -0400

    loleaflet: Allow users to repair at all times
    
    Since during an edit conflict the undo/redo
    buttons are dissabled (for the user who can't
    undo/redo anymore) disabling the repair button
    robs them of the ability to repair the document
    to an earlier state (i.e. before the conflict).
    
    This enables the repair button as soon as either
    the undo or redo is enabled, whereupon it remains
    enabled for the duration of the session.
    
    Change-Id: Ibaf257155f721e2cef596e965d8812d381ab3a5b
    Reviewed-on: https://gerrit.libreoffice.org/38942
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 3344e8cc..cf79c558 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1239,9 +1239,7 @@ map.on('commandstatechanged', function (e) {
 	}
 
 	if (id === 'undo' || id === 'redo') {
-		if (toolbar.get('undo').disabled && toolbar.get('redo').disabled) {
-			toolbar.disable('repair');
-		} else {
+		if (!toolbar.get('undo').disabled || !toolbar.get('redo').disabled) {
 			toolbar.enable('repair');
 		}
 	}


More information about the Libreoffice-commits mailing list