-class Pettanr.View.Summary.Binder extends Pettanr.View\r
+class Pettanr.View.Summary.Binder extends Pettanr.View.Summary\r
\r
initialize: (options) ->\r
super(options)\r
- @item = options.item\r
@visible_t = options.visible_t\r
@visible_column_name = options.visible_column_name\r
- @load()\r
\r
- load: () ->\r
+ render: () ->\r
+ super()\r
@visible = new Tag.Div({\r
content: Pettanr.AppHelper.t_selected_item(@visible_t, @item.get(@visible_column_name))\r
})\r
+ this.$el.html('')\r
+ this.$el.append(@visible.render().el)\r
@item.get_parent('author', this, {\r
success: (@author) =>\r
- @author_icon_with_caption = @author.icon_with_caption_view(true, 'name', 12)\r
- @listenTo(@author_icon_with_caption, 'click', @author_click)\r
- @trigger('ready')\r
+ @author_faced_label_button = @author.mini_faced_label_button({\r
+ shorten: true\r
+ }, {\r
+ context: @context,\r
+ click: () =>\r
+ @trigger('http_get', @author.show_url())\r
+ })\r
+ this.$el.append(@author_faced_label_button.render().el)\r
+ fail: (response, opt) =>\r
+ @author_faced_label_error = new Pettanr.View.MiniFacedLabelButton.Error({\r
+ })\r
+ this.$el.append(@author_faced_label_error.render().el)\r
})\r
- \r
- render: () ->\r
- this.$el.html('')\r
- this.$el.append(@visible.render().el)\r
- this.$el.append(@author_icon_with_caption.render().el)\r
this\r
\r
- author_click: () ->\r
- @trigger('http_get', @author_icon_with_caption.url())\r
- \r