class Locmare.ProfilerModule.AssociationModule.HasMany extends Backbone.View tagName: 'div' initialize: (options) -> @association = options.association @has_many_manifest = options.has_many_manifest @filer = null controller = Manifest.manifest().controllers[@has_many_manifest.controller_name] action = controller.actions[@has_many_manifest.action_name] @list = Locmare.ListGroup.list( action.path_name(), action.name, @profiler().operators, {id: @item().get('id'), page: 1, page_size: 3} ) @list.open((page_status) => @filer = new Locmare.Filer({ item_name: @has_many_model().item_name(), items: @list.items(), pager: @pager, operators: @profiler().operators }) @listenTo(@filer, 'http_get', @http_get) @render() ) render: () -> this.$el.html(@filer.el) if @filer this item: () -> @profiler().item has_many_model: () -> @has_many_manifest.model() profiler: () -> @association.profiler http_get: (url) -> @trigger('http_get', url)