1 class Pettanr.Views.GroundColor.Symbol extends Backbone.View
\r
4 initialize: (options) ->
\r
6 @class_name = options.class_name || 'face'
\r
9 @trigger('ready:symbol', symbol_picture)
\r
13 this.$el.addClass(@class_name)
\r
14 linked_caption = new Tag.A({
\r
15 attr: {href: '/' + @item.show_url()},
\r
16 content: @bg_color()
\r
18 @listenTo(linked_caption, 'click', @click)
\r
19 this.$el.html(linked_caption.render().el)
\r
21 style: Pettanr.to_style(@style())
\r
27 c = @item.get('code') ^ 0xffffff
\r
28 ('000000' + c.toString(16)).slice(-6)
\r
31 c = @item.get('code')
\r
32 ('000000' + c.toString(16)).slice(-6)
\r
34 style: (spot = null, opacity = 20) ->
\r
35 width = Manifest.manifest().magic_numbers['thumbnail_width']
\r
36 height = Manifest.manifest().magic_numbers['thumbnail_height']
\r
38 width: Pettanr.to_s(width) + 'px',
\r
39 height: Pettanr.to_s(height) + 'px',
\r
40 color: '#' + @fore_color()
\r
41 'background-color': '#' + @bg_color()
\r