class Pettanr.SystemPicture extends Peta.SystemResource\r
url: '/system_pictures/'\r
+ \r
@singular: () ->\r
'SystemPicture'\r
\r
id: null\r
} \r
\r
+ picture: () ->\r
+ new Pettanr.Picture({id: @get('picture_id')})\r
+ \r
filename: () ->\r
@get('id') + '.' + @get('ext')\r
\r
{src: @r_url(), width: @get('width'), height: @get('height')}\r
\r
tmb_opt_img_tag: () ->\r
- wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height'))\r
- {src: @r_url(), width: wh[0], height: wh[1]}\r
+ new Pettanr.Image.SymbolPicture({\r
+ attr: {\r
+ src: @r_url()\r
+ },\r
+ picture: this\r
+ })\r
\r
symbol_option: () ->\r
- @tmb_opt_img_tag()\r
+ @fetch({cache: true}).done =>\r
+ @trigger('ready:symbol', @tmb_opt_img_tag())\r
\r
initialize: () ->\r
if @id\r
@url = @url + @id\r
\r
-class Pettanr.SystemPicture.Collection extends Backbone.Collection\r
- model: Pettanr.SystemPicture\r
- url: '/system_pictures'\r