-class Pettanr.Views.SpeechBalloon.ElementSymbol extends Backbone.View\r
+class Pettanr.Views.SpeechBalloon.ElementSymbol extends Pettanr.View\r
tagName: 'div'\r
className: 'elements-tab-face-icon'\r
\r
@element = options.element\r
\r
render: () ->\r
- speech_balloon_template = @element.speech_balloon_template()\r
- _this = this\r
- speech_balloon_template.fetch({cache: true}).done ->\r
- system_picture = speech_balloon_template.system_picture()\r
- system_picture.fetch({cache: true}).done ->\r
- img = system_picture.tmb_opt_img_tag()\r
- _this.$el.html(img.render().el)\r
+ this.$el.html('')\r
+ @element.get_parent('speech_balloon_template', this, {\r
+ success: (@speech_balloon_template) =>\r
+ @speech_balloon_template.get_parent('system_picture', this, {\r
+ success: (@system_picture) =>\r
+ icon = new Pettanr.View.Icon(@system_picture.symbol_file())\r
+ this.$el.html(icon.render().el)\r
+ })\r
+ })\r
this\r
\r
-class Pettanr.Views.SpeechBalloon.ElementFace extends Backbone.View\r
+class Pettanr.Views.SpeechBalloon.ElementFace extends Pettanr.View\r
tagName: 'div'\r
className: 'elements-tab'\r
\r
this.$el.html('')\r
symbol = new Pettanr.Views.SpeechBalloon.ElementSymbol({element: @element})\r
this.$el.append(symbol.render().el)\r
- speech = @element.get('speech')\r
- name = Pettanr.truncate(speech.get('content'), 15)\r
- caption = new Tag.Span({class_name: 'elements-tab-face-caption', content: name})\r
- this.$el.append(caption.render().el)\r
- fe = new Tag.Div({class_name: 'elements-tab-face-end'})\r
- this.$el.append(fe.render().el)\r
+ @append_rb()\r
this\r
\r