From 5149515f13c017d6b31823625b3bcd6c63dd6368 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 22 Jul 2019 11:52:16 +0300 Subject: [PATCH] Fix Bug 42147 --- apps/documenteditor/main/app/view/Statusbar.js | 9 +++++---- apps/presentationeditor/main/app/view/Statusbar.js | 10 +++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apps/documenteditor/main/app/view/Statusbar.js b/apps/documenteditor/main/app/view/Statusbar.js index 346af6733..c62d7310f 100644 --- a/apps/documenteditor/main/app/view/Statusbar.js +++ b/apps/documenteditor/main/app/view/Statusbar.js @@ -364,12 +364,13 @@ define([ this.langMenu.prevTip = info.value; - var index = $parent.find('ul li a:contains("'+info.displayValue+'")').parent().index(); - if (index < 0) { + var lang = this.langMenu.items.find(function(item){ return item.caption == info.displayValue; }); + if (lang) + lang.setChecked(true); + else { this.langMenu.saved = info.displayValue; this.langMenu.clearAll(); - } else - this.langMenu.items[index].setChecked(true); + } } }, diff --git a/apps/presentationeditor/main/app/view/Statusbar.js b/apps/presentationeditor/main/app/view/Statusbar.js index 9dd58ce2d..2af687127 100644 --- a/apps/presentationeditor/main/app/view/Statusbar.js +++ b/apps/presentationeditor/main/app/view/Statusbar.js @@ -351,13 +351,13 @@ define([ $parent.find('#status-label-lang').text(info.displayValue); this.langMenu.prevTip = info.value; - - var index = $parent.find('ul li a:contains("'+info.displayValue+'")').parent().index(); - if (index < 0) { + var lang = this.langMenu.items.find(function(item){ return item.caption == info.displayValue; }); + if (lang) + lang.setChecked(true); + else { this.langMenu.saved = info.displayValue; this.langMenu.clearAll(); - } else - this.langMenu.items[index].setChecked(true); + } } },