OSDN Git Service

t#:
[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: {\r
610     base: 'speech_balloon',\r
611     fields: {\r
612     },\r
613     field_names: [\r
614       'speech_balloon.caption',\r
615       'balloon.r',\r
616       'balloon.x',\r
617       'balloon.y',\r
618       'balloon.width',\r
619       'balloon.height',\r
620       'balloon.id',\r
621       'balloon.speech_balloon_id',\r
622       'balloon.system_picture_id',\r
623       'balloon.settings',\r
624       'speech.writing_format_id',\r
625       'speech.font_size',\r
626       'speech.text_align',\r
627       'speech.quotes',\r
628       'speech.content',\r
629       'speech.fore_color',\r
630       'speech.id',\r
631       'speech.speech_balloon_id',\r
632       'speech.x',\r
633       'speech.y',\r
634       'speech.width',\r
635       'speech.height',\r
636       'speech.settings',\r
637       'speech_balloon.id',\r
638       'speech_balloon.panel_id',\r
639       'speech_balloon.speech_balloon_template_id',\r
640       'speech_balloon.classname',\r
641       'speech_balloon.z',\r
642       'speech_balloon.t',\r
643       'speech_balloon.settings',\r
644     ]\r
645   },\r
646   PlainSpeechBalloon: {\r
647     base: 'speech_balloon',\r
648     fields: {\r
649       'balloon.r': {\r
650         model: 'balloon',\r
651         part: 'balloon',\r
652         column: 'r',\r
653         label: {\r
654           type: 'hidden',\r
655         },\r
656         field: {\r
657           type: 'hidden',\r
658         },\r
659       },\r
660     },\r
661     field_names: [\r
662       'speech_balloon.caption',\r
663       'balloon.r',\r
664       'balloon.x',\r
665       'balloon.y',\r
666       'balloon.width',\r
667       'balloon.height',\r
668       'balloon.id',\r
669       'balloon.speech_balloon_id',\r
670       'balloon.system_picture_id',\r
671       'balloon.settings',\r
672       'speech.writing_format_id',\r
673       'speech.font_size',\r
674       'speech.text_align',\r
675       'speech.quotes',\r
676       'speech.content',\r
677       'speech.fore_color',\r
678       'speech.id',\r
679       'speech.speech_balloon_id',\r
680       'speech.x',\r
681       'speech.y',\r
682       'speech.width',\r
683       'speech.height',\r
684       'speech.settings',\r
685       'speech_balloon.id',\r
686       'speech_balloon.panel_id',\r
687       'speech_balloon.speech_balloon_template_id',\r
688       'speech_balloon.classname',\r
689       'speech_balloon.z',\r
690       'speech_balloon.t',\r
691       'speech_balloon.settings',\r
692     ]\r
693   },\r
694   SquareSpeechBalloon: {\r
695     base: 'speech_balloon',\r
696     fields: {\r
697       'balloon.r': {\r
698         model: 'balloon',\r
699         part: 'balloon',\r
700         column: 'r',\r
701         label: {\r
702           type: 'hidden',\r
703         },\r
704         field: {\r
705           type: 'hidden',\r
706         },\r
707       },\r
708     },\r
709     field_names: [\r
710       'speech_balloon.caption',\r
711       'balloon.r',\r
712       'balloon.x',\r
713       'balloon.y',\r
714       'balloon.width',\r
715       'balloon.height',\r
716       'balloon.id',\r
717       'balloon.speech_balloon_id',\r
718       'balloon.system_picture_id',\r
719       'balloon.settings',\r
720       'speech.writing_format_id',\r
721       'speech.font_size',\r
722       'speech.text_align',\r
723       'speech.quotes',\r
724       'speech.content',\r
725       'speech.fore_color',\r
726       'speech.id',\r
727       'speech.speech_balloon_id',\r
728       'speech.x',\r
729       'speech.y',\r
730       'speech.width',\r
731       'speech.height',\r
732       'speech.settings',\r
733       'speech_balloon.id',\r
734       'speech_balloon.panel_id',\r
735       'speech_balloon.speech_balloon_template_id',\r
736       'speech_balloon.classname',\r
737       'speech_balloon.z',\r
738       'speech_balloon.t',\r
739       'speech_balloon.settings',\r
740     ]\r
741   },\r
742   GroundPicture: 'ground_picture',\r
743   ground_picture: {\r
744     fields: {\r
745       id: {\r
746         column: 'id',\r
747         label: {\r
748           type: 'hidden',\r
749         },\r
750         field: {\r
751           type: 'hidden',\r
752         },\r
753       },\r
754       panel_id: {\r
755         column: 'panel_id',\r
756         label: {\r
757           type: 'hidden',\r
758         },\r
759         field: {\r
760           type: 'hidden',\r
761         },\r
762       },\r
763       picture_id: {\r
764         column: 'picture_id',\r
765         label: {\r
766           type: 'hidden',\r
767         },\r
768         field: {\r
769           type: 'hidden',\r
770         },\r
771       },\r
772       caption: {\r
773         column: 'caption',\r
774         label: {\r
775         },\r
776         field: {\r
777           type: 'text',\r
778         },\r
779         row_break: true,\r
780       },\r
781       repeat: {\r
782         column: 'repeat',\r
783         label: {\r
784         },\r
785         field: {\r
786           type: 'select',\r
787           options: {\r
788             source: 'magic_number',\r
789             key: 'ground_picture_repeat_items',\r
790           },\r
791         },\r
792         row_break: true,\r
793       },\r
794       x: {\r
795         column: 'x',\r
796         label: {\r
797         },\r
798         field: {\r
799           type: 'number',\r
800           options: {\r
801             size: 5, \r
802           },\r
803         },\r
804       },\r
805       y: {\r
806         column: 'y',\r
807         label: {\r
808         },\r
809         field: {\r
810           type: 'number',\r
811           options: {\r
812             size: 5, \r
813           },\r
814         },\r
815         row_break: true,\r
816       },\r
817       z: {\r
818         column: 'z',\r
819         label: {\r
820           type: 'hidden',\r
821         },\r
822         field: {\r
823           type: 'hidden',\r
824         },\r
825       },\r
826       t: {\r
827         column: 't',\r
828         label: {\r
829           type: 'hidden',\r
830         },\r
831         field: {\r
832           type: 'hidden',\r
833         },\r
834       },\r
835     },\r
836     field_names: [\r
837       'caption',\r
838       'repeat',\r
839       'x',\r
840       'y',\r
841       'z',\r
842       't',\r
843       'id',\r
844       'panel_id',\r
845       'picture_id',\r
846     ]\r
847   },\r
848   GroundColor: 'ground_color',\r
849   ground_color: {\r
850     fields: {\r
851       id: {\r
852         column: 'id',\r
853         label: {\r
854           type: 'hidden',\r
855         },\r
856         field: {\r
857           type: 'hidden',\r
858         },\r
859       },\r
860       panel_id: {\r
861         column: 'panel_id',\r
862         label: {\r
863           type: 'hidden',\r
864         },\r
865         field: {\r
866           type: 'hidden',\r
867         },\r
868       },\r
869       caption: {\r
870         column: 'caption',\r
871         label: {\r
872         },\r
873         field: {\r
874           type: 'text',\r
875         },\r
876         row_break: true,\r
877       },\r
878       code: {\r
879         column: 'code',\r
880         label: {\r
881           row_break: true,\r
882         },\r
883         field: {\r
884           type: 'hidden',\r
885         },\r
886         helpers: {\r
887           color: {\r
888             path: 'panels/color_helper',\r
889             options: {\r
890             },\r
891             wrapper: 'ground_color-code-wrap'\r
892           }\r
893         },\r
894         row_break: true,\r
895       },\r
896       orientation: {\r
897         column: 'orientation',\r
898         label: {\r
899         },\r
900         field: {\r
901           type: 'select',\r
902         },\r
903         row_break: true,\r
904       },\r
905       xy: {\r
906         column: 'xy',\r
907         label: {\r
908         },\r
909         field: {\r
910           type: 'number',\r
911           options: {\r
912             size: 5, \r
913           },\r
914         },\r
915       },\r
916       wh: {\r
917         column: 'wh',\r
918         label: {\r
919         },\r
920         field: {\r
921           type: 'number',\r
922           options: {\r
923             size: 5, \r
924           }\r
925         },\r
926         row_break: true,\r
927       },\r
928       z: {\r
929         column: 'z',\r
930         label: {\r
931           type: 'hidden',\r
932         },\r
933         field: {\r
934           type: 'hidden',\r
935         },\r
936       },\r
937       t: {\r
938         column: 't',\r
939         label: {\r
940           type: 'hidden',\r
941         },\r
942         field: {\r
943           type: 'hidden',\r
944         },\r
945       },\r
946     },\r
947     field_names: [\r
948       'id',\r
949       'panel_id',\r
950       'caption',\r
951       'code',\r
952       'orientation',\r
953       'xy',\r
954       'wh',\r
955       'z',\r
956       't',\r
957     ]\r
958   }\r
959 }\r
960 @repeat_texts = ['repeat', 'repeat-x', 'repeat-y', 'no-repeat']\r
961 \r
962 @text_align_texts = ['left', 'left', 'right', 'center']\r
963 \r