-class Pettanr.Views.Panel.Summary extends Backbone.View\r
+class Pettanr.Views.Panel.Summary extends Pettanr.Views.Common.Summary\r
\r
initialize: (options) ->\r
+ super(options)\r
@item = options.item\r
options['visible_t'] = 'panel_publish_items'\r
options['visible_column_name'] = 'publish'\r
@visible_t = options.visible_t\r
@visible_column_name = options.visible_column_name\r
+ @load()\r
+ \r
+ load: () ->\r
@visible = new Tag.Div({\r
content: Pettanr.AppHelper.t_selected_item(@visible_t, @item.get(@visible_column_name))\r
})\r
- _this = this\r
@author = @item.author()\r
- @author.fetch({cache: true}).done ->\r
- _this.author_icon_with_caption = _this.author.icon_with_caption_view(true, 'name', 12)\r
- _this.render()\r
+ @author.fetch({cache: true}).done =>\r
+ @author_icon_with_caption = @author.icon_with_caption_view(true, 'name', 12)\r
+ @trigger('ready')\r
\r
render: () ->\r
this.$el.html('')\r
this.$el.append(@visible.render().el)\r
- if @author_icon_with_caption\r
- this.$el.append(@author_icon_with_caption.render().el)\r
+ this.$el.append(@author_icon_with_caption.render().el)\r
this\r
\r