initialize: (options) ->\r
@association = options.association\r
@belongs_to_manifest = options.belongs_to_manifest\r
- @filer = null\r
- m = new @parent_model({id: @parent_id()})\r
+ pm = @parent_model()\r
+ m = new pm({id: @parent_id()})\r
_this = this\r
m.fetch().done ->\r
- _this.filer = new Locmare.Filer(@parent_model.item_name, r, null, @profiler().operators)\r
+ _this.filer = new Locmare.Filer({\r
+ item_name: _this.parent_model().item_name(), \r
+ items: [m], \r
+ pager: null, \r
+ operators: _this.profiler().operators\r
+ })\r
_this.render()\r
\r
render: () ->\r
- this.$el.html('')\r
- if @filer\r
- this.$el.html(@filer.render().el)\r
+ this.$el.html(@filer.el) if @filer\r
this\r
\r
item: () ->\r
- @profiler.item\r
+ @profiler().item\r
\r
parent_model: () ->\r
@belongs_to_manifest.model()\r
\r
parent_id: () ->\r
- @item().get(@model_belongs_to_manifest().id_column)\r
+ c = @model_belongs_to_manifest().id_column\r
+ @item().get(c)\r
\r
model_manifest: () ->\r
- Manifest.manifest().models[@profiler.item_name]\r
+ Manifest.manifest().models[@profiler().item_name]\r
\r
model_belongs_to_manifest: () ->\r
@model_manifest().associations.belongs_to[@belongs_to_manifest.model_name]\r
\r
profiler: () ->\r
- @association.profiler()\r
+ @association.profiler\r
\r