Fixes: U4-5694 When searching in a picker, the filtering rules are ignored

This commit is contained in:
Shannon
2014-10-28 15:23:05 +10:00
parent 67b9fcd295
commit cc8f07c0d8
4 changed files with 51 additions and 12 deletions

View File

@@ -459,7 +459,12 @@ namespace Umbraco.Web.Editors
//add additional data
foreach (var m in mapped)
{
m.Icon = "icon-user";
//if no icon could be mapped, it will be set to document, so change it to picture
if (m.Icon == "icon-document")
{
m.Icon = "icon-user";
}
var searchResult = results.First(x => x.Id.ToInvariantString() == m.Id.ToString());
if (searchResult.Fields.ContainsKey("email") && searchResult.Fields["email"] != null)
{
@@ -488,7 +493,11 @@ namespace Umbraco.Web.Editors
//add additional data
foreach (var m in mapped)
{
m.Icon = "icon-picture";
//if no icon could be mapped, it will be set to document, so change it to picture
if (m.Icon == "icon-document")
{
m.Icon = "icon-picture";
}
}
return mapped;
}