\r
initialize: (options) ->\r
super(options)\r
- if @item[@method_name()]\r
- @item[@method_name()]()\r
\r
+ # no render\r
+ # get caption data and send message\r
render: () ->\r
- if Pettanr.is_blank(@item.caption_text)\r
- this.$el.html('empty')\r
- else\r
- this.$el.html(@item.caption_text)\r
+ if @item[@method_name()]\r
+ @item[@method_name()].call(@item, this, {\r
+ success: (caption) =>\r
+ @trigger('ready:caption', Pettanr.View.replace_empty(caption))\r
+ fail: (response, opt) =>\r
+ @trigger('ready:caption', I18n.t('yasapp.unresolved'))\r
+ })\r
this\r
\r
method_name: () ->\r