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 q = if _.isEmpty(@flip())
\r
41 '?subdir=' + @flip()
\r
42 picture.filename() + q
\r
45 '/pictures/' + @filename(picture)
\r
47 tmb_opt_img_tag: (picture) ->
\r
48 new Pettanr.Image.SymbolPicture({
\r
50 src: picture.r_url(),
\r
51 alt: @escape('caption')
\r
56 symbol_option: () ->
\r
58 i.fetch({cache: true}).done =>
\r
59 @trigger('ready:symbol', i.tmb_opt_img_tag())
\r
62 new Pettanr.Views.PanelPicture.ElementFace({element: this})
\r
67 @bind('change:width', () ->
\r