OSDN Git Service

fix scenario tab
[pettanr/pettanr.git] / app / assets / javascripts / editor / panel_editor / dock.js.coffee
1 class Editor.PanelEditor.Dock extends Editor.EditorModule.DockBase\r
2   tagName: 'div'\r
3   className: 'dock'\r
4   \r
5   initialize: (options) ->\r
6     super(options)\r
7     @root_bay = new Editor.EditorModule.DockModule.RootBay({\r
8       parent: this, index: 0, name: 'panel'\r
9     })\r
10     @add_tab(\r
11       @root_bay, \r
12       new Editor.EditorModule.DockModule.TabModule.RootBayLabel({\r
13         parent: @root_bay, caption: 'panel'\r
14       }), \r
15       new Editor.EditorModule.DockModule.TabModule.RootBayBody({\r
16         parent: @root_bay\r
17       })\r
18     )\r
19     @element_bay = new Editor.EditorModule.DockModule.ElementBay({\r
20       parent: this, index: 1, name: 'elements'\r
21     })\r
22     @add_tab(\r
23       @element_bay, \r
24       new Editor.EditorModule.DockModule.TabModule.ElementBayLabel({\r
25         parent: @element_bay, caption: 'elements'\r
26       }), \r
27       new Editor.EditorModule.DockModule.TabModule.ElementBayBody({\r
28         parent: @element_bay\r
29       })\r
30     )\r
31     @scenario_bay = new Editor.EditorModule.DockModule.ScenarioBay({\r
32       parent: this, index: 2, name: 'scenario'\r
33     })\r
34     @add_tab(\r
35       @scenario_bay, \r
36       new Editor.EditorModule.DockModule.TabModule.ScenarioBayLabel({\r
37         parent: @scenario_bay, caption: 'scenario'\r
38       }), \r
39       new Editor.EditorModule.DockModule.TabModule.ScenarioBayBody({\r
40         parent: @scenario_bay\r
41       })\r
42     )\r
43     @listenTo(@root_bay.body, 'put', @put)\r
44   \r
45   render: () ->\r
46     this.$el.html('')\r
47     l = _.map @tabs, (tab) ->\r
48       tab.label\r
49     labels = new Tag.Ul({contents: l, class_name: @dom_labels_class()})\r
50     this.$el.append(labels.render().el)\r
51     _.each @tabs, (tab) =>\r
52       this.$el.append(tab.render().el)\r
53     this\r
54   \r
55   init_tabs: () ->\r
56     this.$el.tabs({\r
57       activate: (e, ui) ->\r
58         ui.newPanel.trigger('activate')\r
59     })\r
60   \r
61   add_element_to_element_tab: (element) ->\r
62     @element_bay.add_element(element)\r
63   \r
64   add_element_to_scenario_tab: (element) ->\r
65     @scenario_bay.add_element(element)\r
66   \r
67   editor: () ->\r
68     @parent\r
69   \r
70   dom_id: () ->\r
71     @editor().dom_id() + '-dock'\r
72   \r
73   dom_class: () ->\r
74     @editor().dom_class() + '-dock'\r
75   \r
76   dom_labels_class: () ->\r
77     @dom_class() + '-labels'\r
78   \r
79   put: () ->\r
80     @trigger('put')\r
81     false\r
82   \r
83   save: (options) ->\r
84     attrs = @save_data()\r
85     @root_bay.body.form.save(attrs, options)\r
86   \r
87   save_data: () ->\r
88     attrs = @root_bay.save_data()\r
89     _.extend(attrs, @element_bay.save_data())\r
90     attrs\r
91   \r
92   valid: () ->\r
93     @root_bay.body.form.valid()\r
94   \r
95   invalid: () ->\r
96     @root_bay.body.form.invalid()\r
97   \r
98 class Editor.EditorModule.DockModule.RootBay extends Editor.EditorModule.DockModule.SimpleBay\r
99   \r
100   render: () ->\r
101     @body.render()\r
102   \r
103   save_data: () ->\r
104     @body.form.save_data()\r
105   \r
106 class Editor.EditorModule.DockModule.TabModule.RootBayLabel extends Editor.EditorModule.DockModule.TabModule.BayLabel\r
107   \r
108 class Editor.EditorModule.DockModule.TabModule.RootBayBody extends Editor.EditorModule.DockModule.TabModule.BayBody\r
109   \r
110   initialize: (options) ->\r
111     super(options)\r
112     @form = Locmare.Form.factory({\r
113       form_name: @root_item().item_name(), \r
114       use_name: 'default' \r
115       item: @root_item(), \r
116       mounted: @mounted(), \r
117       submit: 'default' \r
118       operators: @dock().editor().operators,\r
119       action: '/' + @root_item().table_name() + '/' + Pettanr.to_s(@root_item().get('id'))\r
120     })\r
121     @listenTo(@form, 'put', @put)\r
122   \r
123   render: () ->\r
124     super()\r
125     @el.className = @bay().body.dom_class()\r
126     this.$el.html(@form.render().el)\r
127     this\r
128   \r
129   mounted: () ->\r
130     true\r
131   \r
132   dock: () ->\r
133     @parent.dock()\r
134   \r
135   root_item: () ->\r
136     @dock().root_item()\r
137   \r
138   put: () ->\r
139     @trigger('put')\r
140     false\r
141   \r
142 class Editor.EditorModule.DockModule.ElementBay extends Editor.EditorModule.DockModule.BoardBay\r
143   \r
144   initialize: (options) ->\r
145     super(options)\r
146     @elements_tabs = new Editor.EditorModule.DockModule.ElementBay.ElementsTabs({\r
147     })\r
148     @listenTo(@elements_tabs, 'sorted', @sorted)\r
149   \r
150   add_element: (element) ->\r
151     index = element.get('z') - 1\r
152     tab = new Editor.EditorModule.DockModule.ElementBoard({\r
153       parent: this, index: index, name: element.item_name(), element: element\r
154     })\r
155     bb = new Editor.EditorModule.DockModule.TabModule.ElementBoardBody({parent: tab})\r
156     @add_tab(\r
157       tab, \r
158       new Editor.EditorModule.DockModule.TabModule.ElementBoardLabel({parent: tab, name: element.item_name()}), \r
159       bb\r
160     )\r
161     @elements_tabs.add_element_tab(tab)\r
162     @elements_tabs.$el.tabs('refresh')\r
163     bb.form\r
164   \r
165   add_new_tab: () ->\r
166     tab = new Editor.EditorModule.DockModule.NewElementBoard({\r
167       parent: this, index: 0, name: 'new'\r
168     })\r
169     bb = new Editor.EditorModule.DockModule.TabModule.NewElementBoardBody({parent: tab})\r
170     @add_tab(\r
171       tab, \r
172       new Editor.EditorModule.DockModule.TabModule.NewElementBoardLabel({parent: tab}), \r
173       bb\r
174     )\r
175     @elements_tabs.add_element_tab(tab)\r
176   \r
177   render: () ->\r
178     this.$el.html('')\r
179     @delegateEvents({'activate': 'activate'})\r
180     this.$el.attr('id', @body.dom_id())\r
181     this.$el.append(@elements_tabs.render().el)\r
182     _this = this\r
183     @elements_tabs.$el.tabs({\r
184       activate: (e, ui) ->\r
185         ui.newPanel.trigger('activate')\r
186     })\r
187     this\r
188   \r
189   activate: () ->\r
190     _.each @tabs, (tab) ->\r
191       return if not tab.element  # without new element tab\r
192       console.log(tab.body.$el.css('display'))\r
193       if tab.body.$el.css('display') != 'none'\r
194         tab.body.refresh()\r
195   \r
196   sorted: () ->\r
197     # data-z copy to model\r
198     _.each @tabs, (tab) ->\r
199       if tab.element   # without new_tab\r
200         z = parseInt(tab.label.$el.attr('data-z'))\r
201         tab.element.set({\r
202           z: z\r
203         }, {silent: true})\r
204         tab.element.trigger('sort')\r
205   \r
206   panel_body: () ->\r
207     @dock().editor().body\r
208   \r
209   save_data: () ->\r
210     attrs = {}\r
211     _.each @tabs, (tab) ->\r
212       return if not tab.element  # without new element tab\r
213       form = tab.body.form\r
214       name = form.item.table_name() + '_attributes'\r
215       attrs[name] ||= []\r
216       attrs[name].push(form.save_data())\r
217     attrs\r
218   \r
219 class Editor.EditorModule.DockModule.ElementBay.ElementsTabs extends Backbone.View\r
220   tagName: 'div'\r
221   className: 'elements_tabs ui-tabs-vertical ui-helper-clearfix'\r
222   \r
223   initialize: (options) ->\r
224     super(options)\r
225     @inner_elements_tabs = new Editor.EditorModule.DockModule.ElementBay.InnerElementsTabs({\r
226     })\r
227     @listenTo(@inner_elements_tabs, 'sorted', @sorted)\r
228   \r
229   render: () ->\r
230     this.$el.html('')\r
231     this.$el.append(@inner_elements_tabs.render().$el)\r
232     this\r
233   \r
234   add_element_tab: (tab) ->\r
235     @inner_elements_tabs.add_label(tab.label)\r
236     this.$el.append(tab.body.render().$el)\r
237   \r
238   sorted: () ->\r
239     # data-z copy to model\r
240     @trigger('sorted')\r
241   \r
242 class Editor.EditorModule.DockModule.ElementBay.InnerElementsTabs extends Backbone.View\r
243   tagName: 'ul'\r
244   \r
245   initialize: (options) ->\r
246     super(options)\r
247     @labels = []\r
248   \r
249   render: () ->\r
250     this.$el.html('')\r
251     this.$el.addClass('inner-elements-tabs')\r
252     _.each @zorderd_labels(), (label) =>\r
253       this.$el.append(label.render().$el)\r
254     _this = this\r
255     this.$el.sortable {\r
256       update: (event, ui) ->\r
257         z = 1\r
258         $('.z-label', $(@)).map ->\r
259           $(@).attr('data-z', z)\r
260           z++\r
261         _this.trigger('sorted')\r
262     }\r
263     this\r
264   \r
265   zorderd_labels: () ->\r
266     res = []\r
267     _.each @labels, (label) =>\r
268       res[label.z()] = label\r
269     res\r
270   \r
271   add_label: (label) ->\r
272     #z = label.z()\r
273     @labels.push(label) # insert array\r
274     @render()\r
275     label.add_label()\r
276   \r
277 class Editor.EditorModule.DockModule.TabModule.ElementBayLabel extends Editor.EditorModule.DockModule.TabModule.BayLabel\r
278   \r
279 class Editor.EditorModule.DockModule.TabModule.ElementBayBody extends Editor.EditorModule.DockModule.TabModule.BayBody\r
280   \r
281   render: () ->\r
282     @body.render()\r
283 class Editor.EditorModule.DockModule.ElementBoard extends Editor.EditorModule.DockModule.Board\r
284   \r
285   initialize: (options) ->\r
286     super(options)\r
287     @element = options.element\r
288   \r
289   dom_id: () ->\r
290     super() + '-' + @element.get('id')  # use tab index\r
291   \r
292 class Editor.EditorModule.DockModule.TabModule.ElementBoardLabel extends Editor.EditorModule.DockModule.TabModule.BoardLabel\r
293   \r
294   render: () ->\r
295     super()\r
296     this.$el.attr('data-z', @z())\r
297     this.$el.removeClass('ui-corner-top')\r
298     this.$el.addClass('ui-corner-left z-label')\r
299     _this = this\r
300     this.$el.mouseover -> \r
301       _this.element().trigger('active')\r
302     this.$el.mouseout -> \r
303       _this.element().trigger('inactive')\r
304     this\r
305   \r
306   z: () ->\r
307     @element().get('z')\r
308   \r
309   add_label: () ->\r
310     this.$el.attr('id', @dom_id())\r
311   \r
312 class Editor.EditorModule.DockModule.TabModule.ElementBoardBody extends Editor.EditorModule.DockModule.TabModule.BoardBody\r
313   \r
314   initialize: (options) ->\r
315     super(options)\r
316     @form = Locmare.Form.factory({\r
317       form_name: @element().item_name(), \r
318       use_name: 'default' \r
319       item: @element(), \r
320       mounted: @mounted(), \r
321       submit: null, \r
322       operators: @dock().editor().operators,\r
323       action: '/' + @element().table_name() + '/' + Pettanr.to_s(@element().get('id'))\r
324     })\r
325   \r
326   render: () ->\r
327     @delegateEvents({'activate': 'activate'})\r
328     this.$el.attr('id', @dom_id())\r
329     this.$el.html(@form.render().el)\r
330     this\r
331   \r
332   add_element: (element) ->\r
333     @form.add_element(element)\r
334   \r
335   activate: () ->\r
336     @refresh()\r
337   \r
338   refresh: () ->\r
339     @form.refresh()\r
340   \r
341   mounted: () ->\r
342     true\r
343   \r
344   element: () ->\r
345     @parent.element\r
346   \r
347 class Editor.EditorModule.DockModule.NewElementBoard extends Editor.EditorModule.DockModule.Board\r
348   \r
349   initialize: (options) ->\r
350     super(options)\r
351     @panel = @parent.dock().editor().panel\r
352   \r
353 class Editor.EditorModule.DockModule.TabModule.NewElementBoardLabel extends Editor.EditorModule.DockModule.TabModule.BoardLabel\r
354   \r
355   render: () ->\r
356     super()\r
357     this.$el.attr('data-z', @z())\r
358     this.$el.removeClass('ui-corner-top')\r
359     this.$el.addClass('ui-corner-left')\r
360     this\r
361   \r
362   face: () ->\r
363     this.$el.append()\r
364     icon = new Pettanr.Image.SymbolImg({attr: {src: '/images/new.gif'}})\r
365     linked_elements_tab = new Tag.A({\r
366       attr: {href: '#' + @board().body.dom_id() },\r
367       content: icon.render().el\r
368     })\r
369     this.$el.append(linked_elements_tab.render().el)\r
370   \r
371   z: () ->\r
372     0\r
373   \r
374   add_label: () ->\r
375     this.$el.attr('id', @dom_id())\r
376   \r
377 class Editor.EditorModule.DockModule.TabModule.NewElementBoardBody extends Editor.EditorModule.DockModule.TabModule.BoardBody\r
378   className: 'new-element-board-body'\r
379   \r
380   initialize: (options) ->\r
381     super(options)\r
382   \r
383   render: () ->\r
384     this.$el.attr('id', @dom_id())\r
385     @buttons = new Editor.EditorModule.DockModule.NewElementButtons({\r
386       parent: this, element_models: @element_models()\r
387     })\r
388     @form_wrapper = new Editor.EditorModule.DockModule.NewElementFormWrapper({\r
389       parent: this\r
390     })\r
391     this.$el.append(@buttons.render().el)\r
392     this.$el.append(@form_wrapper.clear().el)\r
393     this\r
394   \r
395   panel: () ->\r
396     @parent.panel\r
397   \r
398   element_models: () ->\r
399     @panel().my_class().child_models()\r
400   \r
401 class Editor.EditorModule.DockModule.NewElementButtons extends Backbone.View\r
402   tagName: 'div'\r
403   className: 'new-element-buttons'\r
404   \r
405   initialize: (options) ->\r
406     super(options)\r
407     @parent = options.parent\r
408     @element_models = options.element_models\r
409   \r
410   render: () ->\r
411     _.each @element_models, (model) =>\r
412       button = new Editor.EditorModule.DockModule.NewElementButton({\r
413         parent: this, model: model\r
414       })\r
415       this.$el.append(button.render().el)\r
416     this\r
417   \r
418 class Editor.EditorModule.DockModule.NewElementButton extends Backbone.View\r
419   tagName: 'div'\r
420   \r
421   initialize: (options) ->\r
422     super(options)\r
423     @parent = options.parent\r
424     @model = options.model\r
425   \r
426   render: () ->\r
427     this.$el.html('')\r
428     icon = new Pettanr.Image.Icon({item: @model})\r
429     linked_icon = new Editor.EditorModule.DockModule.NewElementLinkedButton({\r
430       attr: {href: '#event' },\r
431       content: icon.render().el,\r
432       handler_name: 'click'\r
433     })\r
434     @listenTo(linked_icon, 'click', @click)\r
435     this.$el.append(linked_icon.render().el)\r
436     this\r
437   \r
438   click: () ->\r
439     @set_dialog()\r
440     @set_form()\r
441     @dialog().$el.dialog('open')\r
442   \r
443   set_dialog: () ->\r
444     @params = {\r
445       controller: @model.path_name(), action: 'index',\r
446       page_size: 6\r
447     }\r
448     @list = Locmare.ListGroup.list(\r
449       @model.path_name(), 'index', @operators(), @params\r
450     )\r
451     @list.open(() =>\r
452       pager = Locmare.ListGroupModule.LibModule.Pager.factory(@list.page_status, @params)\r
453       f = new Locmare.Filer({\r
454         el: @dialog().$el,\r
455         item_name: @model.item_name(), \r
456         items: @list.items(), \r
457         pager: pager, \r
458         operators: @operators()\r
459       })\r
460     )\r
461     this\r
462   \r
463   set_form: () ->\r
464     @form_wrapper().select(@model)\r
465   \r
466   operators: () ->\r
467     @editor().operators\r
468   \r
469   form_wrapper: () ->\r
470     @parent.parent.form_wrapper\r
471   \r
472   dock: () ->\r
473     @parent.parent.dock()\r
474   \r
475   dialog: () ->\r
476     @editor().dialog\r
477   \r
478   editor: () ->\r
479     @dock().parent\r
480   \r
481 class Editor.EditorModule.DockModule.NewElementLinkedButton extends Tag.A\r
482   \r
483   click: () ->\r
484     @trigger('click')\r
485     return false\r
486   \r
487 class Editor.EditorModule.DockModule.NewElementFormWrapper extends Backbone.View\r
488   tagName: 'div'\r
489   \r
490   initialize: (options) ->\r
491     super(options)\r
492     @parent = options.parent\r
493   \r
494   clear: () ->\r
495     this.$el.html('new form')\r
496     this\r
497   \r
498   render: () ->\r
499     this.$el.html(@model.item_name())\r
500   \r
501   select: (model) ->\r
502     @model = model\r
503     @render()\r
504   \r
505 class Editor.EditorModule.DockModule.ScenarioBay extends Editor.EditorModule.DockModule.SimpleBay\r
506   \r
507   render: () ->\r
508     @body.render()\r
509   \r
510   add_element: (element) ->\r
511     element_li = @body.add_element(element)\r
512     element_li.body.form\r
513   \r
514   save_data: () ->\r
515     @body.form.save_data()\r
516   \r
517 class Editor.EditorModule.DockModule.TabModule.ScenarioBayLabel extends Editor.EditorModule.DockModule.TabModule.BayLabel\r
518   \r
519 class Editor.EditorModule.DockModule.TabModule.ScenarioBayBody extends Editor.EditorModule.DockModule.TabModule.BayBody\r
520   \r
521   initialize: (options) ->\r
522     super(options)\r
523     @elements = new Editor.EditorModule.DockModule.ScenarioBay.Elements({\r
524       parent: this, \r
525     })\r
526     @listenTo(@elements, 'sorted', @sorted)\r
527   \r
528   add_element: (element) ->\r
529     element_li = @elements.add_element(element)\r
530   \r
531   render: () ->\r
532     super()\r
533     this.$el.append(@elements.render().el)\r
534     @delegateEvents({'activate': 'activate'})\r
535     this\r
536   \r
537   activate: () ->\r
538     @elements.refresh()\r
539   \r
540   sorted: () ->\r
541     # data-t copy to model\r
542     _.each @elements.element_lis, (element_li) =>\r
543       t = parseInt(element_li.$el.attr('data-t'))\r
544       element_li.element.set({\r
545         t: t\r
546       }, {silent: true})\r
547       element_li.element.trigger('sort')\r
548   \r
549   panel_body: () ->\r
550     @dock().editor().body\r
551   \r
552   save_data: () ->\r
553     attrs = {}\r
554     _.each @tabs, (tab) ->\r
555       return if not tab.element  # without new element tab\r
556       form = tab.body.form\r
557       name = form.item.table_name() + '_attributes'\r
558       attrs[name] ||= []\r
559       attrs[name].push(form.save_data())\r
560     attrs\r
561   \r
562 class Editor.EditorModule.DockModule.ScenarioBay.Elements extends Backbone.View\r
563   tagName: 'ul'\r
564   className: 'scenarios_elements'\r
565   \r
566   initialize: (options) ->\r
567     super(options)\r
568     @parent = options.parent\r
569     @element_lis = []\r
570   \r
571   render: () ->\r
572     this.$el.html('')\r
573     _.each @scenario_elements(), (element_li) =>\r
574       this.$el.append(element_li.render().$el)\r
575     _this = this\r
576     this.$el.sortable {\r
577       update: (event, ui) ->\r
578         t = 0\r
579         $('.t-label', $(@)).map ->\r
580           $(@).attr('data-t', t)\r
581           t++\r
582         _this.trigger('sorted')\r
583     }\r
584     this\r
585   \r
586   refresh: () ->\r
587     _.each @element_lis, (element_li) =>\r
588       element_li.refresh()\r
589   \r
590   scenario_elements: () ->\r
591     res = []\r
592     _.each @element_lis, (element_li) =>\r
593       res[element_li.t()] = element_li\r
594     res\r
595   \r
596   add_element: (element) ->\r
597     e = new Editor.EditorModule.DockModule.ScenarioBay.Element({\r
598       parent: this, \r
599       element: element\r
600     })\r
601     @element_lis.push(e) # insert array\r
602     @render()\r
603     e\r
604   \r
605   sorted: () ->\r
606     # data-t copy to model\r
607     @trigger('sorted')\r
608   \r
609 class Editor.EditorModule.DockModule.ScenarioBay.Element extends Backbone.View\r
610   tagName: 'li'\r
611   className: 't-label'\r
612   \r
613   initialize: (options) ->\r
614     super(options)\r
615     @parent = options.parent\r
616     @element = options.element\r
617   \r
618   render: () ->\r
619     this.$el.html('')\r
620     this.$el.attr('data-t', @t())\r
621     @label = new Editor.EditorModule.DockModule.ScenarioBay.ElementLabel({\r
622       parent: this, \r
623     })\r
624     @body = new Editor.EditorModule.DockModule.ScenarioBay.ElementBody({\r
625       parent: this, \r
626     })\r
627     this.$el.append(@label.render().$el)\r
628     this.$el.append(@body.render().$el)\r
629     rb = new Tag.RowBreak()\r
630     this.$el.append(rb.render().el)\r
631     this\r
632   \r
633   refresh: () ->\r
634     @body.form.refresh()\r
635   \r
636   t: () ->\r
637     @element.get('t')\r
638   \r
639   dom_id: () ->\r
640     super() + '-' + @element.get('id')  # use tab index\r
641   \r
642 class Editor.EditorModule.DockModule.ScenarioBay.ElementLabel extends Backbone.View\r
643   className: 'scenario-label'\r
644   \r
645   initialize: (options) ->\r
646     super(options)\r
647     @parent = options.parent\r
648   \r
649   render: () ->\r
650     this.$el.append(@element().element_face().render().el)\r
651     _this = this\r
652     this.$el.mouseover -> \r
653       _this.element().trigger('active')\r
654     this.$el.mouseout -> \r
655       _this.element().trigger('inactive')\r
656     this\r
657   \r
658   element: () ->\r
659     @parent.element\r
660   \r
661   elements: () ->\r
662     @parent.parent\r
663   \r
664   bay: () ->\r
665     @elements().parent\r
666   \r
667   dock: () ->\r
668     @bay().dock()\r
669   \r
670 class Editor.EditorModule.DockModule.ScenarioBay.ElementBody extends Backbone.View\r
671   \r
672   initialize: (options) ->\r
673     super(options)\r
674     @parent = options.parent\r
675     @form = Locmare.Form.factory({\r
676       form_name: @element().item_name(), \r
677       use_name: 'scenario' \r
678       item: @element(), \r
679       mounted: @mounted(), \r
680       submit: null, \r
681       operators: @dock().editor().operators,\r
682       action: '/' + @element().table_name() + '/' + Pettanr.to_s(@element().get('id'))\r
683     })\r
684   \r
685   render: () ->\r
686     this.$el.html(@form.render().el)\r
687     this\r
688   \r
689   element: () ->\r
690     @parent.element\r
691   \r
692   elements: () ->\r
693     @parent.parent\r
694   \r
695   bay: () ->\r
696     @elements().parent\r
697   \r
698   dock: () ->\r
699     @bay().dock()\r
700   \r
701   mounted: () ->\r
702     true\r
703   \r
704   element: () ->\r
705     @parent.element\r
706   \r
707 class Editor.EditorModule.DockModule.NewBay extends Editor.EditorModule.DockModule.BoardBay\r
708   \r
709 \r
710 class Editor.EditorModule.DockModule.TabModule.NewBayLabel extends Editor.EditorModule.DockModule.TabModule.BayLabel\r
711   \r
712 \r
713 class Editor.EditorModule.DockModule.TabModule.NewBayBody extends Editor.EditorModule.DockModule.TabModule.BayBody\r
714   \r
715   initialize: (options) ->\r
716     super(options)\r
717   \r
718 class Editor.EditorModule.DockModule.NewBoard extends Editor.EditorModule.DockModule.Board\r
719   \r
720 class Editor.EditorModule.DockModule.TabModule.NewBoardLabel extends Editor.EditorModule.DockModule.TabModule.BoardLabel\r
721   \r
722 class Editor.EditorModule.DockModule.TabModule.NewBoardBody extends Editor.EditorModule.DockModule.TabModule.BoardBody\r
723   \r
724   initialize: (options) ->\r
725     super(options)\r
726 #    form_manager = Pettanr::Application::manifest.form_managers[self.root_item.form_name]\r
727 #    form = form_manager.open self.root_item, @dock_body.dock.editor.operators, mounted\r
728 #    bucket = Bucket.new self,form\r
729   \r