class Pettanr.SpeechBalloon extends Peta.Element\r
- @single: () ->\r
+ url: '/speech_balloons/'\r
+ \r
+ @singular: () ->\r
'SpeechBalloon'\r
\r
@plural: () ->\r
'SpeechBalloons'\r
\r
- @colum_structures: ->\r
- {}\r
- \r
defaults: {\r
- x: 11\r
+ id: null,\r
+ z: null,\r
+ t: null\r
} \r
\r
- initialize: () ->\r
- confirm("Welcome to this world")\r
+ @pick_item_name: () ->\r
+ 'speech_balloon_template'\r
+ \r
+ @traceable_item_names: () ->\r
+ ['speech', 'balloon']\r
+ \r
+ trace_from_speech: () ->\r
+ \r
+ trace_from_balloon: () ->\r
+ \r
+ pick: (templates) ->\r
+ # \r
+ speech_balloon_template = templates.speech_balloon_template\r
+ {\r
+ speech_balloon_template_id: speech_balloon_template.get('id'),\r
+ speech_balloon_template_module_name: speech_balloon_template.get('module_name'),\r
+ speech_balloon_template_settings: speech_balloon_template.get('settings')\r
+ }\r
+ \r
+ panel: (options = {}) ->\r
+ new Pettanr.Panel({id: @get('panel_id')}, options)\r
+ \r
+ speech_balloon_template: () ->\r
+ new Pettanr.SpeechBalloonTemplate({id: @get('speech_balloon_template_id')})\r
+ \r
+ @has_picture: () ->\r
+ false\r
+ \r
+ symbol_option: () ->\r
+ sbt = @speech_balloon_template()\r
+ sbt.fetch({cache: true}).done =>\r
+ sp = sbt.system_picture()\r
+ sp.fetch({cache: true}).done =>\r
+ @trigger('ready:symbol', sp.tmb_opt_img_tag())\r
+ \r
+ filer_caption: () ->\r
+ @fetch({cache: true}).done =>\r
+ caption = @escape('caption')\r
+ @trigger('ready:caption', caption)\r
+ \r
+ plain_scenario: () ->\r
+ @get('caption')\r
+ \r
+ element_face: () ->\r
+ new Pettanr.Views.SpeechBalloon.ElementFace({element: this})\r
+ \r
+ initialize: (attr, options) ->\r
+ super(attr, options)\r
+ if @id\r
+ @url = @url + @id\r
\r
-\r