1 class Locmare.Profiler extends Pettanr.View
\r
3 className: 'profiler'
\r
5 initialize: (options) ->
\r
6 @item_name = options.item_name
\r
8 # feasible show parsed extend data
\r
10 @profiler_manifest = LocalManifest.manifest().profilers[@item_name]
\r
11 @header = new Locmare.ProfilerModule.Header({profiler: this})
\r
12 @columns = new Locmare.ProfilerModule.Column({profiler: this})
\r
13 @associations = new Locmare.ProfilerModule.Association({'profiler': this, association_manifest: @profiler_manifest.associations})
\r
14 @listenTo(@header, 'http_get', @http_get)
\r
15 @listenTo(@associations, 'http_get', @http_get)
\r
16 @listenTo(@associations, 'pick', @click_pick)
\r
20 this.$el.append(@header.render().el)
\r
21 this.$el.append(@columns.render().el)
\r
22 this.$el.append(@associations.render().el)
\r
26 Manifest.manifest().items[@item_name]
\r
29 Manifest.item_name_to_model @item_name
\r
37 add_pick: (target_model) ->
\r
38 @header.add_pick(target_model)
\r
39 @associations.add_pick(target_model)
\r
42 @trigger('http_get', url)
\r
44 click_pick: (item) ->
\r
45 @trigger('pick', item)
\r
47 class Locmare.ProfilerModule
\r