1 class Pettanr.GroundPicture extends Peta.Element
\r
2 url: '/ground_pictures/'
\r
17 @repeat_texts: () ->
\r
18 ['repeat', 'repeat-x', 'repeat-y', 'no-repeat']
\r
20 @pick_item_name: () ->
\r
23 @traceable_item_names: () ->
\r
24 ['panel_picture', 'picture']
\r
26 trace_from_panel_picture: () ->
\r
28 trace_from_picture: () ->
\r
30 pick: (picked_item) ->
\r
31 {picture_id: picked_item.get('picture_id')}
\r
33 panel: (options = {}) ->
\r
34 new Pettanr.Panel({id: @get('panel_id')}, options)
\r
37 new Pettanr.Picture({id: @get('picture_id')})
\r
42 tmb_opt_img_tag: (picture) ->
\r
43 new Pettanr.Image.SymbolPicture({
\r
45 src: picture.r_url(),
\r
46 alt: @escape('caption')
\r
51 symbol_option: () ->
\r
53 i.fetch({cache: true}).done =>
\r
54 @trigger('ready:symbol', i.tmb_opt_img_tag())
\r
57 Pettanr.GroundPicture.repeat_texts()[@get('repeat')]
\r
60 new Pettanr.Views.GroundPicture.ElementFace({element: this})
\r
62 initialize: (attr, options) ->
\r
63 super(attr, options)
\r