Better meta attributes listing

This commit is contained in:
Vit Brunner
2014-12-28 14:02:48 +01:00
parent 230ad02df4
commit 02f3904cd1
3 changed files with 8 additions and 2 deletions
+1
View File
@@ -41,6 +41,7 @@ angular.module("sideBySide.controllers", [])
headingKey = poems.config.heading or "Author"
$scope.headings = (version[headingKey] for version in transformed.meta)
$scope.metaKeys = poems.getMetaKeys()
$scope.all = poems.all
scroll()
+5
View File
@@ -23,4 +23,9 @@ angular.module("sideBySide").service "poems", ->
@getInactive = ->
(poem for poem in @all when poem.meta.Active != true)
@getMetaKeys = ->
@all.reduce (all, one) ->
_.uniq all.concat (key for key of one.meta)
, []
@