- editor = new Editor.PanelEditor({root_item: @item, operators: @operators})\r
- $("#pettanr").html(editor.render().el)\r
+ @q = {}\r
+ _.each @item.my_class().child_models(), (element_model) =>\r
+ name = @item.my_class().my_manifest().associations.child_element_name(element_model)\r
+ if e = @item.get(name)\r
+ elm = new element_model(e)\r
+ @q[name + elm.dom_id()] = elm\r
+ @qf( )\r
+ \r
+ qf: ( ) ->\r
+ _.each @q, (e, name) =>\r
+ e.fetch({cache: true}).done =>\r
+ delete @q[name]\r
+ if _.isEmpty(@q)\r
+ @editor()\r
+ \r
+ editor: () ->\r
+ editor = new Editor.PanelEditor({root_item: @item, operators: @operators})\r
+ $("#pettanr").html(editor.render().el)\r