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

Henry Castro hcastro at collabora.com
Wed Nov 29 13:44:55 UTC 2017


 loleaflet/src/control/Control.Menubar.js |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 18ae59ba846e615f0bfc7503683592838aa18e22
Author: Henry Castro <hcastro at collabora.com>
Date:   Thu Nov 16 22:22:40 2017 -0400

    loleaflet: fix when the language menu item is selected
    
    The languages are translated and ordered.
    
    Change-Id: Id1fd8eec622f3b3ecb5e8da73a386a201b6cee9f
    Reviewed-on: https://gerrit.libreoffice.org/45115
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index d94ce7c4..fda37f4b 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -494,8 +494,8 @@ L.Control.Menubar = L.Control.extend({
 					}
 					if (unoCommand.indexOf('.uno:LanguageStatus') !== -1) {
 						var lang = map['stateChangeHandler'].getItemValue('.uno:LanguageStatus');
-						var label = $(aItem).html();
-						if (label === lang) {
+						var data = decodeURIComponent($(aItem).data('uno'));
+						if (data.indexOf(lang) !== -1) {
 							$(aItem).addClass('lo-menu-item-checked');
 						} else {
 							$(aItem).removeClass('lo-menu-item-checked');


More information about the Libreoffice-commits mailing list