1 class Pettanr.PanelPicture extends Peta.Element
\r
2 url: '/panel_pictures/'
\r
15 new Pettanr.Picture({id: @get('picture_id')})
\r
18 new Pettanr.Panel({id: @get('panel_id')})
\r
24 v = if @get('height') > 0
\r
28 h = if @get('width') > 0
\r
33 res = res # format of /1.png?subdir=v
\r
34 # res += '/' unless res.empty? # format of /v/1.png
\r
37 filename: (picture) ->
\r
38 picture.filename() + '?subdir=' + @flip()
\r
41 '/pictures/' + @filename(picture)
\r
43 tmb_opt_img_tag: (picture) ->
\r
44 new Pettanr.Image.SymbolPicture({
\r
46 src: picture.r_url(),
\r
47 alt: @get('caption')
\r
52 symbol_option: (cb) ->
\r
55 i.fetch({cache: true}).done ->
\r
56 cb(_this.tmb_opt_img_tag(i))
\r
62 class Pettanr.PanelPictures extends Backbone.Collection
\r
63 model: Pettanr.PanelPicture
\r
64 url: '/panel_pictures/'
\r