class Pettanr.PanelPicture extends Peta.Element\r
+ url: '/panel_pictures/'\r
+ \r
@singular: () ->\r
'PanelPicture'\r
\r
id: null\r
} \r
\r
+ picture: () ->\r
+ new Pettanr.Picture({id: @get('picture_id')})\r
+ \r
@has_picture: () ->\r
true\r
\r
style: "#{o}"\r
})\r
\r
- tmb_opt_img_tag: () ->\r
+ tmb_opt_img_tag: (picture) ->\r
wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height'))\r
- {src: @r_url(), width: Math.abs(wh[0]), height: Math.abs(wh[1]), alt: @get('caption')}\r
+ new Pettanr.AppHelperImg({src: picture.r_url(), size: Math.abs(wh[0]), alt: @get('caption')})\r
\r
- symbol_option: () ->\r
- @picture().symbol_option()\r
+ symbol_option: (cb) ->\r
+ i = @picture()\r
+ _this = this\r
+ i.fetch().done ->\r
+ cb(_this.tmb_opt_img_tag(i))\r
\r
initialize: () ->\r
if @id\r