Skip to content

Commit

Permalink
Merge pull request 'Fix Bug 71647' (#231) from fix/bugfix into releas…
Browse files Browse the repository at this point in the history
…e/v8.3.0
  • Loading branch information
Julia Radzhabova committed Jan 17, 2025
2 parents de96538 + f9b451f commit 249932b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
12 changes: 11 additions & 1 deletion apps/common/main/lib/view/ReviewPopover.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<arr.length; i++) {
if (0 === arr[i].indexOf(str)) {
inName = true;
break;
}
}
return inName;
});
}
var tpl = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem">' +
Expand Down
14 changes: 12 additions & 2 deletions apps/spreadsheeteditor/main/app/view/ProtectedRangesEditDlg.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<arr.length; i++) {
if (0 === arr[i].indexOf(strlc)) {
inName = true;
break;
}
}
return (item.id !== undefined && item.id !== null) && inName;
});
var divider = false;
_.each(users, function(item, index) {
Expand Down

0 comments on commit 249932b

Please sign in to comment.