1 class Pettanr.Views.SpeechBalloon.ElementSymbol extends Backbone.View
\r
3 className: 'elements-tab-face-icon'
\r
5 initialize: (options) ->
\r
6 @element = options.element
\r
9 speech_balloon_template = @element.speech_balloon_template()
\r
10 speech_balloon_template.fetch({cache: true}).done =>
\r
11 system_picture = speech_balloon_template.system_picture()
\r
12 system_picture.fetch({cache: true}).done =>
\r
13 img = system_picture.tmb_opt_img_tag()
\r
14 this.$el.html(img.render().el)
\r
17 class Pettanr.Views.SpeechBalloon.ElementFace extends Backbone.View
\r
19 className: 'elements-tab'
\r
21 initialize: (options) ->
\r
22 @element = options.element
\r
26 symbol = new Pettanr.Views.SpeechBalloon.ElementSymbol({element: @element})
\r
27 this.$el.append(symbol.render().el)
\r
28 speech = @element.get('speech')
\r
29 name = Pettanr.truncate(speech.get('content'), 15)
\r
30 caption = new Tag.Span({class_name: 'elements-tab-face-caption', content: name})
\r
31 this.$el.append(caption.render().el)
\r
32 rb = new Tag.RowBreak()
\r
33 this.$el.append(rb.render().el)
\r