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
34 new Pettanr.Cache.Retriever(Pettanr.Panel, @get('panel_id'))
\r
37 new Pettanr.Cache.Retriever(Pettanr.Picture, @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
52 retriever = @picture()
\r
53 @listenTo(retriever, 'retrieve', @retrieve_symbol)
\r
54 retriever.retrieve()
\r
56 retrieve_symbol: (picture) ->
\r
57 @trigger('ready:symbol', picture.tmb_opt_img_tag())
\r
60 Pettanr.GroundPicture.repeat_texts()[@get('repeat')]
\r
63 new Pettanr.Views.GroundPicture.ElementFace({element: this})
\r
65 initialize: (attr, options) ->
\r
66 super(attr, options)
\r