From 7fba53177b10544c6165f0966dde626b4764c67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Wed, 27 Aug 2014 12:32:36 +0200 Subject: [PATCH] Fixed bug #775: Now assigned_to isn't sensitive to acuted characters --- app/coffee/modules/common/lightboxes.coffee | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/coffee/modules/common/lightboxes.coffee b/app/coffee/modules/common/lightboxes.coffee index 1e65717a..2118d100 100644 --- a/app/coffee/modules/common/lightboxes.coffee +++ b/app/coffee/modules/common/lightboxes.coffee @@ -343,9 +343,20 @@ AssignedToLightboxDirective = (lightboxService, lightboxListNavigationService) - selectedUser = null selectedItem = null + normalizeString = (string) -> + normalizedString = string + normalizedString = normalizedString.replace("Á", "A").replace("Ä", "A").replace("À", "A") + normalizedString = normalizedString.replace("É", "E").replace("Ë", "E").replace("È", "E") + normalizedString = normalizedString.replace("Í", "I").replace("Ï", "I").replace("Ì", "I") + normalizedString = normalizedString.replace("Ó", "O").replace("Ö", "O").replace("Ò", "O") + normalizedString = normalizedString.replace("Ú", "U").replace("Ü", "U").replace("Ù", "U") + return normalizedString + filterUsers = (text, user) -> username = user.full_name_display.toUpperCase() + username = normalizeString(username) text = text.toUpperCase() + text = normalizeString(text) return _.contains(username, text) render = (selected, text) ->