1 class Locmare.ProfilerModule.AssociationModule.HasMany extends Backbone.View
\r
4 initialize: (options) ->
\r
5 @association = options.association
\r
6 @has_many_manifest = options.has_many_manifest
\r
8 controller = Manifest.manifest().controllers[@has_many_manifest.controller_name]
\r
9 action = controller.actions[@has_many_manifest.action_name]
\r
10 @list = Locmare.ListGroup.list(
\r
11 action.path_name(), action.name,
\r
12 @profiler().operators, {id: @item().get('id'), page: 1, page_size: 3}
\r
14 @list.open((page_status) =>
\r
15 @filer = new Locmare.Filer({
\r
16 item_name: @has_many_model().item_name(),
\r
17 items: @list.items(),
\r
19 operators: @profiler().operators
\r
21 @listenTo(@filer, 'http_get', @http_get)
\r
26 this.$el.html(@filer.el) if @filer
\r
32 has_many_model: () ->
\r
33 @has_many_manifest.model()
\r
36 @association.profiler
\r
39 @trigger('http_get', url)
\r