OSDN Git Service

1ffef846414ef370f46052617f82898e6c4d3e4f
[pettanr/pettanr.git] / app / assets / javascripts / manifest / work / forms.js.coffee.erb
1 #マニフェスト\r
2 @elements = [\r
3   {\r
4     name: 'panel_picture',\r
5     path_name: 'panel_pictures', \r
6     parts: []\r
7   },\r
8   {\r
9     name: 'speech_balloon',\r
10     path_name: 'circle_speech_balloon/speech_balloons', \r
11     parts: ['balloon', 'speech']\r
12   },\r
13   {\r
14     name: 'ground_picture',\r
15     path_name: 'ground_pictures', \r
16     parts: []\r
17   },\r
18   {\r
19     name: 'ground_color',\r
20     path_name: 'ground_colors', \r
21     parts: []\r
22   },\r
23 ]\r
24 @forms = {\r
25   Panel: 'panel',\r
26   panel: {\r
27     fields: {\r
28       caption: {\r
29         column: 'caption',\r
30         label: {\r
31         },\r
32         field: {\r
33           type: 'text',\r
34         },\r
35         row_break: true,\r
36       },\r
37       width: {\r
38         column: 'width',\r
39         label: {\r
40         },\r
41         field: {\r
42           type: 'number',\r
43           options: {\r
44             size: 5, \r
45           },\r
46         },\r
47       },\r
48       height: {\r
49         column: 'height',\r
50         label: {\r
51         },\r
52         field: {\r
53           type: 'number',\r
54           options: {\r
55             size: 5, \r
56           }, \r
57         },\r
58         row_break: true, \r
59       },\r
60       border: {\r
61         column: 'border',\r
62         label: {\r
63         },\r
64         field: {\r
65           type: 'number',\r
66           options: {\r
67             size: 5, \r
68           },\r
69         },\r
70       },\r
71       publish: {\r
72         column: 'publish',\r
73         label: {\r
74         },\r
75         field: {\r
76           type: 'select',\r
77         },\r
78         row_break: true,\r
79       },\r
80       id: {\r
81         column: 'id',\r
82         label: {\r
83           type: 'hidden',\r
84         },\r
85         field: {\r
86           type: 'hidden',\r
87         },\r
88       },\r
89       author_id: {\r
90         column: 'author_id',\r
91         label: {\r
92           type: 'hidden',\r
93         },\r
94         field: {\r
95           type: 'hidden',\r
96         },\r
97       },\r
98     },\r
99     field_names: [\r
100       'caption',\r
101       'width',\r
102       'height',\r
103       'border',\r
104       'publish',\r
105       'id',\r
106       'author_id',\r
107     ]\r
108   },\r
109   PanelPicture: 'panel_picture',\r
110   panel_picture: {\r
111     fields: {\r
112       caption: {\r
113         column: 'caption',\r
114         label: {\r
115         },\r
116         field: {\r
117           type: 'text',\r
118         },\r
119         row_break: true,\r
120       },\r
121       x: {\r
122         column: 'x',\r
123         label: {\r
124         },\r
125         field: {\r
126           type: 'number',\r
127           options: {\r
128             size: 5, \r
129           },\r
130         },\r
131       },\r
132       y: {\r
133         column: 'y',\r
134         label: {\r
135         },\r
136         field: {\r
137           type: 'number',\r
138           options: {\r
139             size: 5, \r
140           },\r
141         },\r
142         row_break: true,\r
143       },\r
144       width: {\r
145         column: 'width',\r
146         label: {\r
147         },\r
148         field: {\r
149           type: 'number',\r
150           options: {\r
151             size: 5, \r
152           },\r
153         },\r
154         helpers: {\r
155           size: {\r
156             path: 'panels/size_helper',\r
157             options: {\r
158               class: 'panel_picture_width_tool', \r
159             },\r
160           },\r
161         },\r
162         row_break: true,\r
163       },\r
164       height: {\r
165         column: 'height',\r
166         label: {\r
167         },\r
168         field: {\r
169           type: 'number',\r
170           options: {\r
171             size: 5, \r
172           }, \r
173         },\r
174         helpers: {\r
175           size: {\r
176             path: 'panels/size_helper',\r
177             options: {\r
178               class: 'panel_picture_height_tool', \r
179             },\r
180           },\r
181         },\r
182         row_break: true,\r
183       },\r
184       link: {\r
185         column: 'link',\r
186         label: {\r
187         },\r
188         field: {\r
189           type: 'text',\r
190         },\r
191         row_break: true,\r
192       },\r
193       id: {\r
194         column: 'id',\r
195         label: {\r
196           type: 'hidden',\r
197         },\r
198         field: {\r
199           type: 'hidden',\r
200         },\r
201       },\r
202       panel_id: {\r
203         column: 'panel_id',\r
204         label: {\r
205           type: 'hidden',\r
206         },\r
207         field: {\r
208           type: 'hidden',\r
209         },\r
210       },\r
211       picture_id: {\r
212         column: 'picture_id',\r
213         label: {\r
214         },\r
215         field: {\r
216           type: 'hidden',\r
217         },\r
218         helpers: {\r
219           popup: {\r
220             path: 'panels/popup_helper',\r
221             source: 'pictures',\r
222             options: {\r
223             },\r
224           },\r
225         },\r
226       },\r
227       z: {\r
228         column: 'z',\r
229         label: {\r
230           type: 'hidden',\r
231         },\r
232         field: {\r
233           type: 'hidden',\r
234         },\r
235       },\r
236       t: {\r
237         column: 't',\r
238         label: {\r
239           type: 'hidden',\r
240         },\r
241         field: {\r
242           type: 'hidden',\r
243         },\r
244       },\r
245     },\r
246     field_names: [\r
247       'caption',\r
248       'x',\r
249       'y',\r
250       'width',\r
251       'height',\r
252       'link',\r
253       'id',\r
254       'panel_id',\r
255       'picture_id',\r
256       'z',\r
257       't',\r
258     ]\r
259   },\r
260   speech_balloon: {\r
261     fields: {\r
262       'speech_balloon.id': {\r
263         column: 'id',\r
264         label: {\r
265           type: 'hidden',\r
266         },\r
267         field: {\r
268           type: 'hidden',\r
269         },\r
270       },\r
271       'speech_balloon.panel_id': {\r
272         column: 'panel_id',\r
273         label: {\r
274           type: 'hidden',\r
275         },\r
276         field: {\r
277           type: 'hidden',\r
278         },\r
279       },\r
280       'speech_balloon.speech_balloon_template_id': {\r
281         column: 'speech_balloon_template_id',\r
282         label: {\r
283           type: 'hidden',\r
284         },\r
285         field: {\r
286           type: 'hidden',\r
287         },\r
288       },\r
289       'speech_balloon.caption': {\r
290         column: 'caption',\r
291         label: {\r
292         },\r
293         field: {\r
294           type: 'text',\r
295         },\r
296         row_break: true,\r
297       },\r
298       'speech_balloon.z': {\r
299         column: 'z',\r
300         label: {\r
301           type: 'hidden',\r
302         },\r
303         field: {\r
304           type: 'hidden',\r
305         },\r
306       },\r
307       'speech_balloon.t': {\r
308         column: 't',\r
309         label: {\r
310           type: 'hidden',\r
311         },\r
312         field: {\r
313           type: 'hidden',\r
314         },\r
315       },\r
316       'speech_balloon.classname': {\r
317         column: 'classname',\r
318         label: {\r
319           type: 'hidden',\r
320         },\r
321         field: {\r
322           type: 'hidden',\r
323         },\r
324       },\r
325       'speech_balloon.settings': {\r
326         column: 'settings',\r
327         label: {\r
328           type: 'hidden',\r
329         },\r
330         field: {\r
331           type: 'hidden',\r
332         },\r
333       },\r
334       'balloon.id': {\r
335         model: 'balloon',\r
336         part: 'balloon',\r
337         column: 'id',\r
338         label: {\r
339           type: 'hidden',\r
340         },\r
341         field: {\r
342           type: 'hidden',\r
343         },\r
344       },\r
345       'balloon.speech_balloon_id': {\r
346         model: 'balloon',\r
347         part: 'balloon',\r
348         column: 'speech_balloon_id',\r
349         label: {\r
350           type: 'hidden',\r
351         },\r
352         field: {\r
353           type: 'hidden',\r
354         },\r
355       },\r
356       'balloon.system_picture_id': {\r
357         model: 'balloon',\r
358         part: 'balloon',\r
359         column: 'system_picture_id',\r
360         label: {\r
361           type: 'hidden',\r
362         },\r
363         field: {\r
364           type: 'hidden',\r
365         },\r
366       },\r
367       'balloon.r': {\r
368         model: 'balloon',\r
369         part: 'balloon',\r
370         column: 'r',\r
371         label: {\r
372         },\r
373         field: {\r
374           type: 'number',\r
375           options: {\r
376             size: 5, \r
377           },\r
378         },\r
379         helpers: {\r
380           tail_angle: {\r
381             path: 'panels/tail_angle_helper',\r
382             options: {\r
383             },\r
384           },\r
385         },\r
386         row_break: true,\r
387       },\r
388       'balloon.x': {\r
389         model: 'balloon',\r
390         part: 'balloon',\r
391         column: 'x',\r
392         label: {\r
393         },\r
394         field: {\r
395           type: 'number',\r
396           options: {\r
397             size: 5, \r
398           },\r
399         },\r
400       },\r
401       'balloon.y': {\r
402         model: 'balloon',\r
403         part: 'balloon',\r
404         column: 'y',\r
405         label: {\r
406         },\r
407         field: {\r
408           type: 'number',\r
409           options: {\r
410             size: 5, \r
411           },\r
412         },\r
413         row_break: true,\r
414       },\r
415       'balloon.width': {\r
416         model: 'balloon',\r
417         part: 'balloon',\r
418         column: 'width',\r
419         label: {\r
420         },\r
421         field: {\r
422           type: 'number',\r
423           options: {\r
424             size: 5, \r
425           },\r
426         },\r
427       },\r
428       'balloon.height': {\r
429         model: 'balloon',\r
430         part: 'balloon',\r
431         column: 'height',\r
432         label: {\r
433         },\r
434         field: {\r
435           type: 'number',\r
436           options: {\r
437             size: 5, \r
438           },\r
439         },\r
440         row_break: true,\r
441       },\r
442       'balloon.settings': {\r
443         model: 'balloon',\r
444         part: 'balloon',\r
445         column: 'settings',\r
446         label: {\r
447           type: 'hidden',\r
448         },\r
449         field: {\r
450           type: 'hidden',\r
451         },\r
452       },\r
453       'speech.id': {\r
454         model: 'speech',\r
455         part: 'speech',\r
456         column: 'id',\r
457         label: {\r
458           type: 'hidden',\r
459         },\r
460         field: {\r
461           type: 'hidden',\r
462         },\r
463       },\r
464       'speech.speech_balloon_id': {\r
465         model: 'speech',\r
466         part: 'speech',\r
467         column: 'speech_balloon_id',\r
468         label: {\r
469           type: 'hidden',\r
470         },\r
471         field: {\r
472           type: 'hidden',\r
473         },\r
474       },\r
475       'speech.x': {\r
476         model: 'speech',\r
477         part: 'speech',\r
478         column: 'x',\r
479         label: {\r
480           type: 'hidden',\r
481         },\r
482         field: {\r
483           type: 'hidden',\r
484         },\r
485       },\r
486       'speech.y': {\r
487         model: 'speech',\r
488         part: 'speech',\r
489         column: 'y',\r
490         label: {\r
491           type: 'hidden',\r
492         },\r
493         field: {\r
494           type: 'hidden',\r
495         },\r
496       },\r
497       'speech.width': {\r
498         model: 'speech',\r
499         part: 'speech',\r
500         column: 'width',\r
501         label: {\r
502           type: 'hidden',\r
503         },\r
504         field: {\r
505           type: 'hidden',\r
506         },\r
507       },\r
508       'speech.height': {\r
509         model: 'speech',\r
510         part: 'speech',\r
511         column: 'height',\r
512         label: {\r
513           type: 'hidden',\r
514         },\r
515         field: {\r
516           type: 'hidden',\r
517         },\r
518       },\r
519       'speech.writing_format_id': {\r
520         model: 'speech',\r
521         part: 'speech',\r
522         column: 'writing_format_id',\r
523         label: {\r
524         },\r
525         field: {\r
526           type: 'select',\r
527         },\r
528       },\r
529       'speech.font_size': {\r
530         model: 'speech',\r
531         part: 'speech',\r
532         column: 'font_size',\r
533         label: {\r
534         },\r
535         field: {\r
536           type: 'select',\r
537         },\r
538         row_break: true,\r
539       },\r
540       'speech.text_align': {\r
541         model: 'speech',\r
542         part: 'speech',\r
543         column: 'text_align',\r
544         label: {\r
545         },\r
546         field: {\r
547           type: 'select',\r
548         },\r
549       },\r
550       'speech.quotes': {\r
551         model: 'speech',\r
552         part: 'speech',\r
553         column: 'quotes',\r
554         label: {\r
555         },\r
556         field: {\r
557           type: 'text',\r
558           options: {\r
559             size: 5, \r
560           },\r
561         },\r
562       },\r
563       'speech.content': {\r
564         model: 'speech',\r
565         part: 'speech',\r
566         column: 'content',\r
567         label: {\r
568           row_break: true,\r
569         },\r
570         field: {\r
571           type: 'text_area',\r
572           options: {\r
573             size: '45x5', \r
574           },\r
575         },\r
576       },\r
577       'speech.fore_color': {\r
578         model: 'speech',\r
579         part: 'speech',\r
580         column: 'fore_color',\r
581         label: {\r
582           row_break: true,\r
583         },\r
584         field: {\r
585           type: 'hidden',\r
586         },\r
587         helpers: {\r
588           color: {\r
589             path: 'panels/color_helper',\r
590             options: {\r
591             },\r
592             wrapper: 'speech-fore_color-wrap',\r
593           },\r
594         },\r
595       },\r
596       'speech.settings': {\r
597         model: 'speech',\r
598         part: 'speech',\r
599         column: 'settings',\r
600         label: {\r
601           type: 'hidden',\r
602         },\r
603         field: {\r
604           type: 'hidden',\r
605         },\r
606       },\r
607     },\r
608   },\r
609   CircleSpeechBalloon: 'circle_speech_balloon',\r
610   circle_speech_balloon: {\r
611     base: 'speech_balloon',\r
612     fields: {\r
613     },\r
614     field_names: [\r
615       'speech_balloon.caption',\r
616       'balloon.r',\r
617       'balloon.x',\r
618       'balloon.y',\r
619       'balloon.width',\r
620       'balloon.height',\r
621       'balloon.id',\r
622       'balloon.speech_balloon_id',\r
623       'balloon.system_picture_id',\r
624       'balloon.settings',\r
625       'speech.writing_format_id',\r
626       'speech.font_size',\r
627       'speech.text_align',\r
628       'speech.quotes',\r
629       'speech.content',\r
630       'speech.fore_color',\r
631       'speech.id',\r
632       'speech.speech_balloon_id',\r
633       'speech.x',\r
634       'speech.y',\r
635       'speech.width',\r
636       'speech.height',\r
637       'speech.settings',\r
638       'speech_balloon.id',\r
639       'speech_balloon.panel_id',\r
640       'speech_balloon.speech_balloon_template_id',\r
641       'speech_balloon.classname',\r
642       'speech_balloon.z',\r
643       'speech_balloon.t',\r
644       'speech_balloon.settings',\r
645     ]\r
646   },\r
647   PlainSpeechBalloon: 'plain_speech_balloon',\r
648   plain_speech_balloon: {\r
649     base: 'speech_balloon',\r
650     fields: {\r
651       'balloon.r': {\r
652         model: 'balloon',\r
653         part: 'balloon',\r
654         column: 'r',\r
655         label: {\r
656           type: 'hidden',\r
657         },\r
658         field: {\r
659           type: 'hidden',\r
660         },\r
661       },\r
662     },\r
663     field_names: [\r
664       'speech_balloon.caption',\r
665       'balloon.r',\r
666       'balloon.x',\r
667       'balloon.y',\r
668       'balloon.width',\r
669       'balloon.height',\r
670       'balloon.id',\r
671       'balloon.speech_balloon_id',\r
672       'balloon.system_picture_id',\r
673       'balloon.settings',\r
674       'speech.writing_format_id',\r
675       'speech.font_size',\r
676       'speech.text_align',\r
677       'speech.quotes',\r
678       'speech.content',\r
679       'speech.fore_color',\r
680       'speech.id',\r
681       'speech.speech_balloon_id',\r
682       'speech.x',\r
683       'speech.y',\r
684       'speech.width',\r
685       'speech.height',\r
686       'speech.settings',\r
687       'speech_balloon.id',\r
688       'speech_balloon.panel_id',\r
689       'speech_balloon.speech_balloon_template_id',\r
690       'speech_balloon.classname',\r
691       'speech_balloon.z',\r
692       'speech_balloon.t',\r
693       'speech_balloon.settings',\r
694     ]\r
695   },\r
696   SquareSpeechBalloon: 'square_speech_balloon',\r
697   square_speech_balloon: {\r
698     base: 'speech_balloon',\r
699     fields: {\r
700       'balloon.r': {\r
701         model: 'balloon',\r
702         part: 'balloon',\r
703         column: 'r',\r
704         label: {\r
705           type: 'hidden',\r
706         },\r
707         field: {\r
708           type: 'hidden',\r
709         },\r
710       },\r
711     },\r
712     field_names: [\r
713       'speech_balloon.caption',\r
714       'balloon.r',\r
715       'balloon.x',\r
716       'balloon.y',\r
717       'balloon.width',\r
718       'balloon.height',\r
719       'balloon.id',\r
720       'balloon.speech_balloon_id',\r
721       'balloon.system_picture_id',\r
722       'balloon.settings',\r
723       'speech.writing_format_id',\r
724       'speech.font_size',\r
725       'speech.text_align',\r
726       'speech.quotes',\r
727       'speech.content',\r
728       'speech.fore_color',\r
729       'speech.id',\r
730       'speech.speech_balloon_id',\r
731       'speech.x',\r
732       'speech.y',\r
733       'speech.width',\r
734       'speech.height',\r
735       'speech.settings',\r
736       'speech_balloon.id',\r
737       'speech_balloon.panel_id',\r
738       'speech_balloon.speech_balloon_template_id',\r
739       'speech_balloon.classname',\r
740       'speech_balloon.z',\r
741       'speech_balloon.t',\r
742       'speech_balloon.settings',\r
743     ]\r
744   },\r
745   GroundPicture: 'ground_picture',\r
746   ground_picture: {\r
747     fields: {\r
748       id: {\r
749         column: 'id',\r
750         label: {\r
751           type: 'hidden',\r
752         },\r
753         field: {\r
754           type: 'hidden',\r
755         },\r
756       },\r
757       panel_id: {\r
758         column: 'panel_id',\r
759         label: {\r
760           type: 'hidden',\r
761         },\r
762         field: {\r
763           type: 'hidden',\r
764         },\r
765       },\r
766       picture_id: {\r
767         column: 'picture_id',\r
768         label: {\r
769           type: 'hidden',\r
770         },\r
771         field: {\r
772           type: 'hidden',\r
773         },\r
774       },\r
775       caption: {\r
776         column: 'caption',\r
777         label: {\r
778         },\r
779         field: {\r
780           type: 'text',\r
781         },\r
782         row_break: true,\r
783       },\r
784       repeat: {\r
785         column: 'repeat',\r
786         label: {\r
787         },\r
788         field: {\r
789           type: 'select',\r
790           options: {\r
791             source: 'magic_number',\r
792             key: 'ground_picture_repeat_items',\r
793           },\r
794         },\r
795         row_break: true,\r
796       },\r
797       x: {\r
798         column: 'x',\r
799         label: {\r
800         },\r
801         field: {\r
802           type: 'number',\r
803           options: {\r
804             size: 5, \r
805           },\r
806         },\r
807       },\r
808       y: {\r
809         column: 'y',\r
810         label: {\r
811         },\r
812         field: {\r
813           type: 'number',\r
814           options: {\r
815             size: 5, \r
816           },\r
817         },\r
818         row_break: true,\r
819       },\r
820       z: {\r
821         column: 'z',\r
822         label: {\r
823           type: 'hidden',\r
824         },\r
825         field: {\r
826           type: 'hidden',\r
827         },\r
828       },\r
829       t: {\r
830         column: 't',\r
831         label: {\r
832           type: 'hidden',\r
833         },\r
834         field: {\r
835           type: 'hidden',\r
836         },\r
837       },\r
838     },\r
839     field_names: [\r
840       'caption',\r
841       'repeat',\r
842       'x',\r
843       'y',\r
844       'z',\r
845       't',\r
846       'id',\r
847       'panel_id',\r
848       'picture_id',\r
849     ]\r
850   },\r
851   GroundColor: 'ground_color',\r
852   ground_color: {\r
853     fields: {\r
854       id: {\r
855         column: 'id',\r
856         label: {\r
857           type: 'hidden',\r
858         },\r
859         field: {\r
860           type: 'hidden',\r
861         },\r
862       },\r
863       panel_id: {\r
864         column: 'panel_id',\r
865         label: {\r
866           type: 'hidden',\r
867         },\r
868         field: {\r
869           type: 'hidden',\r
870         },\r
871       },\r
872       caption: {\r
873         column: 'caption',\r
874         label: {\r
875         },\r
876         field: {\r
877           type: 'text',\r
878         },\r
879         row_break: true,\r
880       },\r
881       code: {\r
882         column: 'code',\r
883         label: {\r
884           row_break: true,\r
885         },\r
886         field: {\r
887           type: 'hidden',\r
888         },\r
889         helpers: {\r
890           color: {\r
891             path: 'panels/color_helper',\r
892             options: {\r
893             },\r
894             wrapper: 'ground_color-code-wrap'\r
895           }\r
896         },\r
897         row_break: true,\r
898       },\r
899       orientation: {\r
900         column: 'orientation',\r
901         label: {\r
902         },\r
903         field: {\r
904           type: 'select',\r
905         },\r
906         row_break: true,\r
907       },\r
908       xy: {\r
909         column: 'xy',\r
910         label: {\r
911         },\r
912         field: {\r
913           type: 'number',\r
914           options: {\r
915             size: 5, \r
916           },\r
917         },\r
918       },\r
919       wh: {\r
920         column: 'wh',\r
921         label: {\r
922         },\r
923         field: {\r
924           type: 'number',\r
925           options: {\r
926             size: 5, \r
927           }\r
928         },\r
929         row_break: true,\r
930       },\r
931       z: {\r
932         column: 'z',\r
933         label: {\r
934           type: 'hidden',\r
935         },\r
936         field: {\r
937           type: 'hidden',\r
938         },\r
939       },\r
940       t: {\r
941         column: 't',\r
942         label: {\r
943           type: 'hidden',\r
944         },\r
945         field: {\r
946           type: 'hidden',\r
947         },\r
948       },\r
949     },\r
950     field_names: [\r
951       'id',\r
952       'panel_id',\r
953       'caption',\r
954       'code',\r
955       'orientation',\r
956       'xy',\r
957       'wh',\r
958       'z',\r
959       't',\r
960     ]\r
961   }\r
962 }\r
963 @repeat_texts = ['repeat', 'repeat-x', 'repeat-y', 'no-repeat']\r
964 \r
965 @text_align_texts = ['left', 'left', 'right', 'center']\r
966 \r