OSDN Git Service

fix bucket
[pettanr/pettanr.git] / app / assets / javascripts / locmare / profiler.js.coffee
1 class Locmare.Profiler extends Backbone.View\r
2   tagName: 'div'\r
3   initialize: (options) ->\r
4     @item_name = options.item_name\r
5     @item = options.item\r
6     # feasible show parsed extend data\r
7     @operators = options.operators\r
8       \r
9     @profiler_manifest = LocalManifest.manifest().profilers[@item_name]\r
10     @template_dir = 'templates-profiler-'\r
11     _this = this\r
12     @item.fetch().done ->\r
13       _this.item.boosts 'post'\r
14       _this.header = new Locmare.ProfilerModule.Header({profiler: _this})\r
15       _this.columns = new Locmare.ProfilerModule.Column({profiler: _this})\r
16       _this.associations = new Locmare.ProfilerModule.Association({'profiler': _this, association_manifest: _this.profiler_manifest.associations})\r
17       _this.render()\r
18   \r
19   render: () ->\r
20     this.$el.html('')\r
21     this.$el.append(@header.render().el)\r
22     this.$el.append(@columns.render().el)\r
23     this.$el.append(@associations.render().el)\r
24     this\r
25   \r
26   peta: () ->\r
27     Manifest.manifest().items[@item_name]\r
28   \r
29   model: () ->\r
30     Manifest.item_name_to_model @item_name\r
31   \r
32   image_dir: () ->\r
33     '/images/'\r
34   \r
35 class Locmare.ProfilerModule\r
36 \r
37  \r