From 649e610f90f62e657f02c13664e272f4d62a6f7b Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 23 Jul 2014 14:23:24 +0200 Subject: [PATCH] Add filtering by name on watchers lightbox. --- app/coffee/modules/common/lightboxes.coffee | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/coffee/modules/common/lightboxes.coffee b/app/coffee/modules/common/lightboxes.coffee index 6bdc5010..ecf97c58 100644 --- a/app/coffee/modules/common/lightboxes.coffee +++ b/app/coffee/modules/common/lightboxes.coffee @@ -358,6 +358,13 @@ WatchersLightboxDirective = ($repo) -> $el.removeClass("hidden") + $scope.$watch "usersSearch", (searchingText) -> + if not searchingText? + return + + users = getFilteredUsers(searchingText) + render(users) + $el.on "click", ".watcher-single", (event) -> $el.addClass("hidden")