Unbreaking the groups page

This commit is contained in:
Will Marshall
2014-06-27 14:51:55 +10:00
parent e4c8c19fea
commit 8bd8d811b1
2 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
Darkswarm.filter "groups", (Matcher)->
(groups, text)->
groups ||= []
text ?= ""
groups.filter (group)=>
Matcher.match([
group.name, group.description, group.long_description
], text) || group.enterprises.some (e)->
Matcher.match [e.name], text

View File

@@ -20,7 +20,7 @@
"ng-debounce" => "150",
"ofn-disable-enter" => true}
.group{"ng-repeat" => "group in Groups.groups | filter:query | orderBy:order",
.group{"ng-repeat" => "group in Groups.groups | groups:query | orderBy:order",
name: "group{{group.id}}",
id: "group{{group.id}}"}
.row.pad-top{bindonce: true}