1 class Pettanr.PanelPicture extends Peta.Element
\r
2 url: '/panel_pictures/'
\r
15 new Pettanr.Picture({id: @get('picture_id')})
\r
17 panel: (options = {}) ->
\r
18 new Pettanr.Panel({id: @get('panel_id')}, options)
\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: @escape('caption')
\r
52 symbol_option: () ->
\r
54 i.fetch({cache: true}).done =>
\r
55 @symbol_picture = i.tmb_opt_img_tag()
\r
56 @trigger('ready:symbol')
\r
59 new Pettanr.Views.PanelPicture.ElementFace({element: this})
\r