1 class Pettanr.PanelPicture extends Peta.Element
\r
2 url: '/panel_pictures/'
\r
15 new Pettanr.Picture({id: @get('picture_id')})
\r
21 v = if @get('height') > 0
\r
25 h = if @get('width') > 0
\r
30 res = res # format of /1.png?subdir=v
\r
31 # res += '/' unless res.empty? # format of /v/1.png
\r
35 @picture().filename() + '?subdir=' + @flip()
\r
38 '/pictures/' + @filename()
\r
40 tmb_opt_img_tag: (picture) ->
\r
41 new Pettanr.Image.SymbolPicture({
\r
43 src: picture.r_url(),
\r
44 alt: @get('caption')
\r
49 symbol_option: (cb) ->
\r
53 cb(_this.tmb_opt_img_tag(i))
\r
59 class Pettanr.PanelPicture.Collection extends Backbone.Collection
\r
60 model: Pettanr.PanelPicture
\r
61 url: '/panel_pictures/'
\r