OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[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       if tab.body.$el.css('display') != 'none'\r
193         tab.body.refresh()\r
194   \r
195   sorted: () ->\r
196     # data-z copy to model\r
197     _.each @tabs, (tab) ->\r
198       if tab.element   # without new_tab\r
199         z = parseInt(tab.label.$el.attr('data-z'))\r
200         tab.element.set({\r
201           z: z\r
202         }, {silent: true})\r
203         tab.element.trigger('sort')\r
204   \r
205   panel_body: () ->\r
206     @dock().editor().body\r
207   \r
208   save_data: () ->\r
209     attrs = {}\r
210     _.each @tabs, (tab) ->\r
211       return if not tab.element  # without new element tab\r
212       form = tab.body.form\r
213       name = form.item.table_name() + '_attributes'\r
214       attrs[name] ||= []\r
215       attrs[name].push(form.save_data())\r
216     attrs\r
217   \r
218 class Editor.EditorModule.DockModule.ElementBay.ElementsTabs extends Backbone.View\r
219   tagName: 'div'\r
220   className: 'elements_tabs ui-tabs-vertical ui-helper-clearfix'\r
221   \r
222   initialize: (options) ->\r
223     super(options)\r
224     @inner_elements_tabs = new Editor.EditorModule.DockModule.ElementBay.InnerElementsTabs({\r
225     })\r
226     @listenTo(@inner_elements_tabs, 'sorted', @sorted)\r
227   \r
228   render: () ->\r
229     this.$el.html('')\r
230     this.$el.append(@inner_elements_tabs.render().$el)\r
231     this\r
232   \r
233   add_element_tab: (tab) ->\r
234     @inner_elements_tabs.add_label(tab.label)\r
235     this.$el.append(tab.body.render().$el)\r
236   \r
237   sorted: () ->\r
238     # data-z copy to model\r
239     @trigger('sorted')\r
240   \r
241 class Editor.EditorModule.DockModule.ElementBay.InnerElementsTabs extends Backbone.View\r
242   tagName: 'ul'\r
243   \r
244   initialize: (options) ->\r
245     super(options)\r
246     @labels = []\r
247   \r
248   render: () ->\r
249     this.$el.html('')\r
250     this.$el.addClass('inner-elements-tabs')\r
251     _.each @zorderd_labels(), (label) =>\r
252       this.$el.append(label.render().$el)\r
253     _this = this\r
254     this.$el.sortable {\r
255       update: (event, ui) ->\r
256         z = 1\r
257         $('.z-label', $(@)).map ->\r
258           $(@).attr('data-z', z)\r
259           z++\r
260         _this.trigger('sorted')\r
261     }\r
262     this\r
263   \r
264   zorderd_labels: () ->\r
265     res = []\r
266     _.each @labels, (label) =>\r
267       res[label.z()] = label\r
268     res\r
269   \r
270   add_label: (label) ->\r
271     #z = label.z()\r
272     @labels.push(label) # insert array\r
273     @render()\r
274     label.add_label()\r
275   \r
276 class Editor.EditorModule.DockModule.TabModule.ElementBayLabel extends Editor.EditorModule.DockModule.TabModule.BayLabel\r
277   \r
278 class Editor.EditorModule.DockModule.TabModule.ElementBayBody extends Editor.EditorModule.DockModule.TabModule.BayBody\r
279   \r
280   render: () ->\r
281     @body.render()\r
282 class Editor.EditorModule.DockModule.ElementBoard extends Editor.EditorModule.DockModule.Board\r
283   \r
284   initialize: (options) ->\r
285     super(options)\r
286     @element = options.element\r
287   \r
288   dom_id: () ->\r
289     super() + '-' + @element.get('id')  # use tab index\r
290   \r
291 class Editor.EditorModule.DockModule.TabModule.ElementBoardLabel extends Editor.EditorModule.DockModule.TabModule.BoardLabel\r
292   \r
293   render: () ->\r
294     super()\r
295     this.$el.attr('data-z', @z())\r
296     this.$el.removeClass('ui-corner-top')\r
297     this.$el.addClass('ui-corner-left z-label')\r
298     _this = this\r
299     this.$el.mouseover -> \r
300       _this.element().trigger('active')\r
301     this.$el.mouseout -> \r
302       _this.element().trigger('inactive')\r
303     this\r
304   \r
305   z: () ->\r
306     @element().get('z')\r
307   \r
308   add_label: () ->\r
309     this.$el.attr('id', @dom_id())\r
310   \r
311 class Editor.EditorModule.DockModule.TabModule.ElementBoardBody extends Editor.EditorModule.DockModule.TabModule.BoardBody\r
312   \r
313   initialize: (options) ->\r
314     super(options)\r
315     @form = Locmare.Form.factory({\r
316       form_name: @element().item_name(), \r
317       use_name: 'default' \r
318       item: @element(), \r
319       mounted: @mounted(), \r
320       submit: null, \r
321       operators: @dock().editor().operators,\r
322       action: '/' + @element().table_name() + '/' + Pettanr.to_s(@element().get('id'))\r
323     })\r
324   \r
325   render: () ->\r
326     @delegateEvents({'activate': 'activate'})\r
327     this.$el.attr('id', @dom_id())\r
328     this.$el.html(@form.render().el)\r
329     this\r
330   \r
331   add_element: (element) ->\r
332     @form.add_element(element)\r
333   \r
334   activate: () ->\r
335     @refresh()\r
336   \r
337   refresh: () ->\r
338     @form.refresh()\r
339   \r
340   mounted: () ->\r
341     true\r
342   \r
343   element: () ->\r
344     @parent.element\r
345   \r
346 class Editor.EditorModule.DockModule.NewElementBoard extends Editor.EditorModule.DockModule.Board\r
347   \r
348   initialize: (options) ->\r
349     super(options)\r
350     @panel = @parent.dock().editor().panel\r
351   \r
352 class Editor.EditorModule.DockModule.TabModule.NewElementBoardLabel extends Editor.EditorModule.DockModule.TabModule.BoardLabel\r
353   \r
354   render: () ->\r
355     super()\r
356     this.$el.attr('data-z', @z())\r
357     this.$el.removeClass('ui-corner-top')\r
358     this.$el.addClass('ui-corner-left')\r
359     this\r
360   \r
361   face: () ->\r
362     this.$el.append()\r
363     icon = new Pettanr.Image.SymbolImg({attr: {src: '/images/new.gif'}})\r
364     linked_elements_tab = new Tag.A({\r
365       attr: {href: '#' + @board().body.dom_id() },\r
366       content: icon.render().el\r
367     })\r
368     this.$el.append(linked_elements_tab.render().el)\r
369   \r
370   z: () ->\r
371     0\r
372   \r
373   add_label: () ->\r
374     this.$el.attr('id', @dom_id())\r
375   \r
376 class Editor.EditorModule.DockModule.TabModule.NewElementBoardBody extends Editor.EditorModule.DockModule.TabModule.BoardBody\r
377   className: 'new-element-board-body'\r
378   \r
379   initialize: (options) ->\r
380     super(options)\r
381   \r
382   render: () ->\r
383     this.$el.attr('id', @dom_id())\r
384     @buttons = new Editor.EditorModule.DockModule.NewElementButtons({\r
385       parent: this, element_models: @element_models()\r
386     })\r
387     @form_wrapper = new Editor.EditorModule.DockModule.NewElementFormWrapper({\r
388       parent: this\r
389     })\r
390     this.$el.append(@buttons.render().el)\r
391     this.$el.append(@form_wrapper.clear().el)\r
392     this\r
393   \r
394   panel: () ->\r
395     @parent.panel\r
396   \r
397   element_models: () ->\r
398     @panel().my_class().child_models()\r
399   \r
400 class Editor.EditorModule.DockModule.NewElementButtons extends Backbone.View\r
401   tagName: 'div'\r
402   className: 'new-element-buttons'\r
403   \r
404   initialize: (options) ->\r
405     super(options)\r
406     @parent = options.parent\r
407     @element_models = options.element_models\r
408   \r
409   render: () ->\r
410     _.each @element_models, (model) =>\r
411       button = new Editor.EditorModule.DockModule.NewElementButton({\r
412         parent: this, model: model\r
413       })\r
414       this.$el.append(button.render().el)\r
415     this\r
416   \r
417 class Editor.EditorModule.DockModule.NewElementButton extends Backbone.View\r
418   tagName: 'div'\r
419   \r
420   initialize: (options) ->\r
421     super(options)\r
422     @parent = options.parent\r
423     @model = options.model\r
424   \r
425   render: () ->\r
426     this.$el.html('')\r
427     icon = new Pettanr.Image.Icon({item: @model})\r
428     linked_icon = new Editor.EditorModule.DockModule.NewElementLinkedButton({\r
429       attr: {href: '#event' },\r
430       content: icon.render().el,\r
431       handler_name: 'click'\r
432     })\r
433     @listenTo(linked_icon, 'click', @click)\r
434     this.$el.append(linked_icon.render().el)\r
435     this\r
436   \r
437   click: () ->\r
438     @set_dialog()\r
439     @set_form()\r
440     @dialog().$el.dialog('open')\r
441   \r
442   set_dialog: () ->\r
443     @params = {\r
444       controller: @model.path_name(), action: 'index',\r
445       page_size: 6\r
446     }\r
447     @list = Locmare.ListGroup.list(\r
448       @model.path_name(), 'index', @operators(), @params\r
449     )\r
450     @list.open(() =>\r
451       pager = Locmare.ListGroupModule.LibModule.Pager.factory(@list.page_status, @params)\r
452       f = new Locmare.Filer({\r
453         el: @dialog().$el,\r
454         item_name: @model.item_name(), \r
455         items: @list.items(), \r
456         pager: pager, \r
457         operators: @operators()\r
458       })\r
459     )\r
460     this\r
461   \r
462   set_form: () ->\r
463     @form_wrapper().select(@model)\r
464   \r
465   operators: () ->\r
466     @editor().operators\r
467   \r
468   form_wrapper: () ->\r
469     @parent.parent.form_wrapper\r
470   \r
471   dock: () ->\r
472     @parent.parent.dock()\r
473   \r
474   dialog: () ->\r
475     @editor().dialog\r
476   \r
477   editor: () ->\r
478     @dock().parent\r
479   \r
480 class Editor.EditorModule.DockModule.NewElementLinkedButton extends Tag.A\r
481   \r
482   click: () ->\r
483     @trigger('click')\r
484     return false\r
485   \r
486 class Editor.EditorModule.DockModule.NewElementFormWrapper extends Backbone.View\r
487   tagName: 'div'\r
488   \r
489   initialize: (options) ->\r
490     super(options)\r
491     @parent = options.parent\r
492   \r
493   clear: () ->\r
494     this.$el.html('new form')\r
495     this\r
496   \r
497   render: () ->\r
498     this.$el.html(@model.item_name())\r
499   \r
500   select: (model) ->\r
501     @model = model\r
502     @render()\r
503   \r
504 class Editor.EditorModule.DockModule.ScenarioBay extends Editor.EditorModule.DockModule.SimpleBay\r
505   \r
506   render: () ->\r
507     @body.render()\r
508   \r
509   add_element: (element) ->\r
510     element_li = @body.add_element(element)\r
511     element_li.body.form\r
512   \r
513   save_data: () ->\r
514     @body.form.save_data()\r
515   \r
516 class Editor.EditorModule.DockModule.TabModule.ScenarioBayLabel extends Editor.EditorModule.DockModule.TabModule.BayLabel\r
517   \r
518 class Editor.EditorModule.DockModule.TabModule.ScenarioBayBody extends Editor.EditorModule.DockModule.TabModule.BayBody\r
519   \r
520   initialize: (options) ->\r
521     super(options)\r
522     @elements = new Editor.EditorModule.DockModule.ScenarioBay.Elements({\r
523       parent: this, \r
524     })\r
525     @listenTo(@elements, 'sorted', @sorted)\r
526   \r
527   add_element: (element) ->\r
528     element_li = @elements.add_element(element)\r
529   \r
530   render: () ->\r
531     super()\r
532     this.$el.append(@elements.render().el)\r
533     @delegateEvents({'activate': 'activate'})\r
534     this\r
535   \r
536   activate: () ->\r
537     @elements.refresh()\r
538   \r
539   sorted: () ->\r
540     # data-t copy to model\r
541     _.each @elements.element_lis, (element_li) =>\r
542       t = parseInt(element_li.$el.attr('data-t'))\r
543       element_li.element.set({\r
544         t: t\r
545       }, {silent: true})\r
546       element_li.element.trigger('sort')\r
547   \r
548   panel_body: () ->\r
549     @dock().editor().body\r
550   \r
551   save_data: () ->\r
552     attrs = {}\r
553     _.each @tabs, (tab) ->\r
554       return if not tab.element  # without new element tab\r
555       form = tab.body.form\r
556       name = form.item.table_name() + '_attributes'\r
557       attrs[name] ||= []\r
558       attrs[name].push(form.save_data())\r
559     attrs\r
560   \r
561 class Editor.EditorModule.DockModule.ScenarioBay.Elements extends Backbone.View\r
562   tagName: 'ul'\r
563   className: 'scenarios_elements'\r
564   \r
565   initialize: (options) ->\r
566     super(options)\r
567     @parent = options.parent\r
568     @element_lis = []\r
569   \r
570   render: () ->\r
571     this.$el.html('')\r
572     _.each @scenario_elements(), (element_li) =>\r
573       this.$el.append(element_li.render().$el)\r
574     _this = this\r
575     this.$el.sortable {\r
576       update: (event, ui) ->\r
577         t = 0\r
578         $('.t-label', $(@)).map ->\r
579           $(@).attr('data-t', t)\r
580           t++\r
581         _this.trigger('sorted')\r
582     }\r
583     this\r
584   \r
585   refresh: () ->\r
586     _.each @element_lis, (element_li) =>\r
587       element_li.refresh()\r
588   \r
589   scenario_elements: () ->\r
590     res = []\r
591     _.each @element_lis, (element_li) =>\r
592       res[element_li.t()] = element_li\r
593     res\r
594   \r
595   add_element: (element) ->\r
596     e = new Editor.EditorModule.DockModule.ScenarioBay.Element({\r
597       parent: this, \r
598       element: element\r
599     })\r
600     @element_lis.push(e) # insert array\r
601     @render()\r
602     e\r
603   \r
604   sorted: () ->\r
605     # data-t copy to model\r
606     @trigger('sorted')\r
607   \r
608 class Editor.EditorModule.DockModule.ScenarioBay.Element extends Backbone.View\r
609   tagName: 'li'\r
610   className: 't-label'\r
611   \r
612   initialize: (options) ->\r
613     super(options)\r
614     @parent = options.parent\r
615     @element = options.element\r
616   \r
617   render: () ->\r
618     this.$el.html('')\r
619     this.$el.attr('data-t', @t())\r
620     @label = new Editor.EditorModule.DockModule.ScenarioBay.ElementLabel({\r
621       parent: this, \r
622     })\r
623     @body = new Editor.EditorModule.DockModule.ScenarioBay.ElementBody({\r
624       parent: this, \r
625     })\r
626     this.$el.append(@label.render().$el)\r
627     this.$el.append(@body.render().$el)\r
628     rb = new Tag.RowBreak()\r
629     this.$el.append(rb.render().el)\r
630     this\r
631   \r
632   refresh: () ->\r
633     @body.form.refresh()\r
634   \r
635   t: () ->\r
636     @element.get('t')\r
637   \r
638   dom_id: () ->\r
639     super() + '-' + @element.get('id')  # use tab index\r
640   \r
641 class Editor.EditorModule.DockModule.ScenarioBay.ElementLabel extends Backbone.View\r
642   className: 'scenario-label'\r
643   \r
644   initialize: (options) ->\r
645     super(options)\r
646     @parent = options.parent\r
647   \r
648   render: () ->\r
649     this.$el.append(@element().element_face().render().el)\r
650     _this = this\r
651     this.$el.mouseover -> \r
652       _this.element().trigger('active')\r
653     this.$el.mouseout -> \r
654       _this.element().trigger('inactive')\r
655     this\r
656   \r
657   element: () ->\r
658     @parent.element\r
659   \r
660   elements: () ->\r
661     @parent.parent\r
662   \r
663   bay: () ->\r
664     @elements().parent\r
665   \r
666   dock: () ->\r
667     @bay().dock()\r
668   \r
669 class Editor.EditorModule.DockModule.ScenarioBay.ElementBody extends Backbone.View\r
670   \r
671   initialize: (options) ->\r
672     super(options)\r
673     @parent = options.parent\r
674     @form = Locmare.Form.factory({\r
675       form_name: @element().item_name(), \r
676       use_name: 'scenario' \r
677       item: @element(), \r
678       mounted: @mounted(), \r
679       submit: null, \r
680       operators: @dock().editor().operators,\r
681       action: '/' + @element().table_name() + '/' + Pettanr.to_s(@element().get('id'))\r
682     })\r
683   \r
684   render: () ->\r
685     this.$el.html(@form.render().el)\r
686     this\r
687   \r
688   element: () ->\r
689     @parent.element\r
690   \r
691   elements: () ->\r
692     @parent.parent\r
693   \r
694   bay: () ->\r
695     @elements().parent\r
696   \r
697   dock: () ->\r
698     @bay().dock()\r
699   \r
700   mounted: () ->\r
701     true\r
702   \r
703   element: () ->\r
704     @parent.element\r
705   \r
706 class Editor.EditorModule.DockModule.NewBay extends Editor.EditorModule.DockModule.BoardBay\r
707   \r
708 \r
709 class Editor.EditorModule.DockModule.TabModule.NewBayLabel extends Editor.EditorModule.DockModule.TabModule.BayLabel\r
710   \r
711 \r
712 class Editor.EditorModule.DockModule.TabModule.NewBayBody extends Editor.EditorModule.DockModule.TabModule.BayBody\r
713   \r
714   initialize: (options) ->\r
715     super(options)\r
716   \r
717 class Editor.EditorModule.DockModule.NewBoard extends Editor.EditorModule.DockModule.Board\r
718   \r
719 class Editor.EditorModule.DockModule.TabModule.NewBoardLabel extends Editor.EditorModule.DockModule.TabModule.BoardLabel\r
720   \r
721 class Editor.EditorModule.DockModule.TabModule.NewBoardBody extends Editor.EditorModule.DockModule.TabModule.BoardBody\r
722   \r
723   initialize: (options) ->\r
724     super(options)\r
725 #    form_manager = Pettanr::Application::manifest.form_managers[self.root_item.form_name]\r
726 #    form = form_manager.open self.root_item, @dock_body.dock.editor.operators, mounted\r
727 #    bucket = Bucket.new self,form\r
728   \r