OSDN Git Service

fix:replace row break
[pettanr/pettanr.git] / app / assets / javascripts / views / speech_balloons / element_face.js.coffee
1 class Pettanr.Views.SpeechBalloon.ElementSymbol extends Pettanr.View\r
2   tagName: 'div'\r
3   className: 'elements-tab-face-icon'\r
4   \r
5   initialize: (options) ->\r
6     @element = options.element\r
7   \r
8   render: () ->\r
9     this.$el.html('')\r
10     retriever = @element.speech_balloon_template()\r
11     @listenTo(retriever, 'retrieve', @retrieve_speech_balloon_template)\r
12     retriever.retrieve()\r
13     this\r
14   \r
15   retrieve_speech_balloon_template: (@speech_balloon_template) ->\r
16     retriever = @speech_balloon_template.system_picture()\r
17     @listenTo(retriever, 'retrieve', @retrieve_system_picture)\r
18     retriever.retrieve()\r
19   \r
20   retrieve_system_picture: (@system_picture) ->\r
21     img = @system_picture.tmb_opt_img_tag()\r
22     this.$el.html(img.render().el)\r
23   \r
24 class Pettanr.Views.SpeechBalloon.ElementFace extends Pettanr.View\r
25   tagName: 'div'\r
26   className: 'elements-tab'\r
27   \r
28   initialize: (options) ->\r
29     @element = options.element\r
30   \r
31   render: () ->\r
32     this.$el.html('')\r
33     symbol = new Pettanr.Views.SpeechBalloon.ElementSymbol({element: @element})\r
34     this.$el.append(symbol.render().el)\r
35     @rb()\r
36     this\r
37   \r