1 class Pettanr.View.Credits extends Pettanr.View
\r
5 constructor: (@parent, options) ->
\r
8 initialize: (@options) ->
\r
9 @licensed_pictures = {}
\r
15 push: (retrievers) ->
\r
16 _.each retrievers, (retriever, pid) =>
\r
17 Pettanr.Picture.retrieve(pid, this, {
\r
18 success: (picture) =>
\r
19 pid = picture.get('id')
\r
20 return if @licensed_pictures[pid]
\r
21 @licensed_pictures[pid] = picture
\r
22 credit = new Pettanr.View.Credit(picture, @options)
\r
23 @listenTo(credit, 'click:icon', @click_credit_icon)
\r
24 this.$el.append(credit.render().el)
\r
25 fail: (response, opt) =>
\r
26 @open_error_dialog(response, opt)
\r
29 click_credit_icon: (item) ->
\r
30 @trigger('click:credit:icon', item)
\r