loleaflet/dist/toolbar/toolbar.js | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 030ae3658799a3806ddde4dacece9a52b35acfc4 Author: Pranav Kant <[email protected]> Date: Fri Dec 16 20:15:40 2016 +0530 Handle enabled/disabled, true/false toolbar button states If we get a true/false, assume its enabled. Change-Id: I364c7cd611481757b674877ed44ac6ee0f6b0e58 Reviewed-on: https://gerrit.libreoffice.org/35470 Reviewed-by: pranavk <[email protected]> Tested-by: pranavk <[email protected]> diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 5865b001..9a233ba7 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1018,10 +1018,12 @@ map.on('commandstatechanged', function (e) { var id = commandName.toLowerCase().substr(5); if (typeof formatButtons[id] !== 'undefined') { if (state === 'true') { + toolbar.enable(id); toolbar.check(id); toolbarUpMore.check(id); } else if (state === 'false') { + toolbar.enable(id); toolbar.uncheck(id); toolbarUpMore.uncheck(id); } @@ -1045,6 +1047,7 @@ map.on('commandstatechanged', function (e) { toolbar.enable(id); toolbarUpMore.enable(id); } else { + toolbar.uncheck(id); toolbar.disable(id); toolbarUpMore.disable(id); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
