OSDN Git Service

fix: fetch fail
[pettanr/pettanr.git] / app / assets / javascripts / views / ground_pictures / element_face.js.coffee
1 class Pettanr.Views.GroundPicture.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     @element.get_parent('picture', this, {\r
11       success: (@picture) =>\r
12         icon = new Pettanr.View.Icon(@picture.symbol_file())\r
13         this.$el.html(icon.render().el)\r
14     })\r
15     this\r
16   \r
17 class Pettanr.Views.GroundPicture.ElementFace extends Pettanr.View\r
18   tagName: 'div'\r
19   className: 'elements-tab'\r
20   \r
21   initialize: (options) ->\r
22     @element = options.element\r
23   \r
24   render: () ->\r
25     this.$el.html('')\r
26     symbol = new Pettanr.Views.GroundPicture.ElementSymbol({element: @element})\r
27     this.$el.append(symbol.render().el)\r
28     fe = new Tag.Div({class_name: 'elements-tab-face-end'})\r
29     this.$el.append(fe.render().el)\r
30     this\r
31   \r