From f9b451fefcac0fe255a2e6a4a441dde80bc0154f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 17 Jan 2025 17:33:54 +0300 Subject: [PATCH] Fix Bug 71647 --- apps/common/main/lib/view/ReviewPopover.js | 12 +++++++++++- .../main/app/view/ProtectedRangesEditDlg.js | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/view/ReviewPopover.js b/apps/common/main/lib/view/ReviewPopover.js index ebd70a226a..adc90a529f 100644 --- a/apps/common/main/lib/view/ReviewPopover.js +++ b/apps/common/main/lib/view/ReviewPopover.js @@ -1266,7 +1266,17 @@ define([ str = str.toLowerCase(); if (str.length>0) { users = _.filter(users, function(item) { - return (item.email && 0 === item.email.toLowerCase().indexOf(str) || item.name && 0 === item.name.toLowerCase().indexOf(str)) + if (item.email && 0 === item.email.toLowerCase().indexOf(str)) return true; + + let arr = item.name ? item.name.toLowerCase().split(' ') : [], + inName = false; + for (let i=0; i' + diff --git a/apps/spreadsheeteditor/main/app/view/ProtectedRangesEditDlg.js b/apps/spreadsheeteditor/main/app/view/ProtectedRangesEditDlg.js index 119a475d85..2fa24216cb 100644 --- a/apps/spreadsheeteditor/main/app/view/ProtectedRangesEditDlg.js +++ b/apps/spreadsheeteditor/main/app/view/ProtectedRangesEditDlg.js @@ -428,8 +428,18 @@ define([], function () { if (users && users.length>0) { var strlc = str.toLowerCase(); users = _.filter(users, function(item) { - return (item.id !== undefined && item.id !== null) && - (!strlc || item.email && 0 === item.email.toLowerCase().indexOf(strlc) || item.name && 0 === item.name.toLowerCase().indexOf(strlc)); + if ((item.id !== undefined && item.id !== null) && + (!strlc || item.email && 0 === item.email.toLowerCase().indexOf(strlc))) return true; + + let arr = item.name ? item.name.toLowerCase().split(' ') : [], + inName = false; + for (let i=0; i