OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / helpers / application_helper.rb
1 module ApplicationHelper
2   def full_url filename
3     request.protocol + request.host_with_port + filename
4   end
5   
6   def t_m(label)
7     l = label.split('.')
8     if l.size > 2
9       label
10     else
11       if l.size == 1
12         label.constantize.model_name.human
13       else
14         l.first.constantize.human_attribute_name(l.last)
15       end
16     end
17   end
18   
19   def t_select_items(items)
20     items.map {|i| [t(i[0]), i[1]] }
21   end
22   
23   def t_selected_item(name, index)
24     t(MagicNumber[name][index][0])
25   end
26   
27   def item_tag 
28     tag :img, :src => asset_path('item.png'), :width => 35, :height => 35
29   end
30   
31   def icon_tag name, opt = {}
32     title = opt[:object] ? (name.to_s + ' ID:' + opt[:object].id.to_s) : name
33     size = opt[:size] ? opt[:size].to_i : 35
34     tag :img, :src => asset_path(name.to_s.underscore + '.gif'), :width => size, :height => size, :alt => name.to_s + ' Icon', :title => title
35   end
36   
37   def author_icon opt = {}
38     icon_tag :Author, opt
39   end
40   
41   def artist_icon opt = {}
42     icon_tag :Artist, opt
43   end
44   
45   def scroll_icon opt = {}
46     icon_tag :Scroll, opt
47   end
48   
49   def scroll_panel_icon opt = {}
50     icon_tag :ScrollPanel, opt
51   end
52   
53   def comic_icon opt = {}
54     icon_tag :Comic, opt
55   end
56   
57   def story_icon opt = {}
58     icon_tag :Story, opt
59   end
60   
61   def story_sheet_icon opt = {}
62     icon_tag :StorySheet, opt
63   end
64   
65   def sheet_icon opt = {}
66     icon_tag :Sheet, opt
67   end
68   
69   def sheet_panel_icon opt = {}
70     icon_tag :Sheet, opt
71   end
72   
73   def panel_icon opt = {}
74     icon_tag :Panel, opt
75   end
76   
77   def panel_editor_javascript_include_tags
78     WritingFormat.enable_list().map {|wf|
79 #      javascript_include_tag wf.engine_name
80       javascript_include_tag wf.engine_name + "/application"
81     }.join("\n") + 
82     SpeechBalloonTemplate.enable_list().map {|sbt|
83       stylesheet_link_tag sbt.engine_name + "/application"
84     }.join("\n") + 
85     SpeechBalloonTemplate.enable_list().map {|sbt|
86       javascript_include_tag sbt.engine_name + "/application"
87     }.join("\n")
88   end
89   
90   def configurations
91     JSON.parse(<<HD
92 {
93     "models": {
94         "Panel": "panel",
95         "panel": {
96             "class_name": "Panel",
97             "table_name": "panels",
98             "attributes": {
99                 "id": {
100                     "type": "number",
101                     "primary_key": 1,
102                     "rules": {
103                         "number": true
104                     }
105                 },
106                 "width": {
107                     "type": "number",
108                     "rules": {
109                         "required": true,
110                         "number": true,
111                         "min": 1
112                     }
113                 },
114                 "height": {
115                     "type": "number",
116                     "rules": {
117                         "required": true,
118                         "number": true,
119                         "min": 1
120                     }
121                 },
122                 "border": {
123                     "type": "number",
124                     "rules": {
125                         "required": true,
126                         "number": true,
127                         "min": 0
128                     }
129                 },
130                 "caption": {
131                     "type": "text",
132                     "rules": {}
133                 },
134                 "publish": {
135                     "type": "number",
136                     "rules": {
137                         "required": true,
138                         "number": true
139                     }
140                 },
141                 "author_id": {
142                     "type": "number",
143                     "rules": {
144                         "required": true,
145                         "number": true
146                     }
147                 },
148                 "created_at": {
149                     "type": "datetime"
150                 },
151                 "updated_at": {
152                     "type": "datetime"
153                 }
154             }
155         },
156         "PanelPicture": "panel_picture",
157         "panel_picture": {
158             "class_name": "PanelPicture",
159             "table_name": "panel_pictures",
160             "attributes": {
161                 "id": {
162                     "type": "number",
163                     "primary_key": 1,
164                     "rules": {
165                         "number": true
166                     }
167                 },
168                 "panel_id": {
169                     "type": "number",
170                     "rules": {
171                         "number": true
172                     }
173                 },
174                 "picture_id": {
175                     "type": "number",
176                     "rules": {
177                         "required": true,
178                         "number": true
179                     }
180                 },
181                 "caption": {
182                     "type": "text",
183                     "rules": {}
184                 },
185                 "x": {
186                     "type": "number",
187                     "rules": {
188                         "required": true,
189                         "number": true
190                     }
191                 },
192                 "y": {
193                     "type": "number",
194                     "rules": {
195                         "required": true,
196                         "number": true
197                     }
198                 },
199                 "width": {
200                     "type": "number",
201                     "rules": {
202                         "required": true,
203                         "number": true
204                     }
205                 },
206                 "height": {
207                     "type": "number",
208                     "rules": {
209                         "required": true,
210                         "number": true
211                     }
212                 },
213                 "link": {
214                     "type": "text",
215                     "rules": {
216                         "url": true
217                     }
218                 },
219                 "z": {
220                     "type": "number",
221                     "rules": {
222                         "required": true,
223                         "number": true,
224                         "min": 1
225                     }
226                 },
227                 "t": {
228                     "type": "number",
229                     "rules": {
230                         "required": true,
231                         "number": true,
232                         "min": 0
233                     }
234                 },
235                 "created_at": {
236                     "type": "datetime"
237                 },
238                 "updated_at": {
239                     "type": "datetime"
240                 }
241             }
242         },
243         "SpeechBalloon": "speech_balloon",
244         "speech_balloon": {
245             "class_name": "SpeechBalloon",
246             "table_name": "speech_balloons",
247             "extend": "classname",
248             "attributes": {
249                 "id": {
250                     "type": "number",
251                     "primary_key": 1,
252                     "rules": {
253                         "number": true
254                     }
255                 },
256                 "panel_id": {
257                     "type": "number",
258                     "rules": {
259                         "number": true
260                     }
261                 },
262                 "speech_balloon_template_id": {
263                     "type": "number",
264                     "rules": {
265                         "required": true,
266                         "number": true
267                     }
268                 },
269                 "classname": {
270                     "type": "text",
271                     "rules": {
272                         "required": true
273                     }
274                 },
275                 "z": {
276                     "type": "number",
277                     "rules": {
278                         "required": true,
279                         "number": true,
280                         "min": 1
281                     }
282                 },
283                 "t": {
284                     "type": "number",
285                     "rules": {
286                         "required": true,
287                         "number": true,
288                         "min": 0
289                     }
290                 },
291                 "settings": {
292                     "type": "text",
293                     "rules": {}
294                 },
295                 "caption": {
296                     "type": "text",
297                     "rules": {}
298                 },
299                 "created_at": {
300                     "type": "datetime"
301                 },
302                 "updated_at": {
303                     "type": "datetime"
304                 }
305             }
306         },
307         "Balloon": "balloon",
308         "balloon": {
309             "class_name": "Balloon",
310             "table_name": "balloons",
311             "attributes": {
312                 "id": {
313                     "type": "number",
314                     "primary_key": 1,
315                     "rules": {
316                         "number": true
317                     }
318                 },
319                 "speech_balloon_id": {
320                     "type": "number",
321                     "rules": {
322                         "number": true
323                     }
324                 },
325                 "system_picture_id": {
326                     "type": "number",
327                     "rules": {
328                         "required": true,
329                         "number": true
330                     }
331                 },
332                 "x": {
333                     "type": "number",
334                     "rules": {
335                         "required": true,
336                         "number": true
337                     }
338                 },
339                 "y": {
340                     "type": "number",
341                     "rules": {
342                         "required": true,
343                         "number": true
344                     }
345                 },
346                 "width": {
347                     "type": "number",
348                     "rules": {
349                         "required": true,
350                         "number": true,
351                         "min": 1
352                     }
353                 },
354                 "height": {
355                     "type": "number",
356                     "rules": {
357                         "required": true,
358                         "number": true,
359                         "min": 1
360                     }
361                 },
362                 "r": {
363                     "type": "number",
364                     "rules": {
365                         "required": true,
366                         "number": true
367                     }
368                 },
369                 "settings": {
370                     "type": "text",
371                     "rules": {}
372                 },
373                 "created_at": {
374                     "type": "datetime"
375                 },
376                 "updated_at": {
377                     "type": "datetime"
378                 }
379             }
380         },
381         "Speech": "speech",
382         "speech": {
383             "class_name": "Speech",
384             "table_name": "speeches",
385             "attributes": {
386                 "id": {
387                     "type": "number",
388                     "primary_key": 1,
389                     "rules": {
390                         "number": true
391                     }
392                 },
393                 "speech_balloon_id": {
394                     "type": "number",
395                     "rules": {
396                         "number": true
397                     }
398                 },
399                 "writing_format_id": {
400                     "type": "number",
401                     "rules": {
402                         "required": true,
403                         "number": true
404                     }
405                 },
406                 "content": {
407                     "type": "text",
408                     "rules": {}
409                 },
410                 "font_size": {
411                     "type": "float",
412                     "rules": {
413                         "required": true,
414                         "number": true,
415                         "min": 0
416                     }
417                 },
418                 "text_align": {
419                     "type": "number",
420                     "rules": {
421                         "required": true,
422                         "number": true,
423                         "range": [
424                             0,
425                             3
426                         ]
427                     }
428                 },
429                 "fore_color": {
430                     "type": "number",
431                     "rules": {
432                         "required": true,
433                         "number": true,
434                         "range": [
435                             0,
436                             16777215
437                         ]
438                     }
439                 },
440                 "x": {
441                     "type": "number",
442                     "rules": {
443                         "required": true,
444                         "number": true
445                     }
446                 },
447                 "y": {
448                     "type": "number",
449                     "rules": {
450                         "required": true,
451                         "number": true
452                     }
453                 },
454                 "width": {
455                     "type": "number",
456                     "rules": {
457                         "required": true,
458                         "number": true,
459                         "min": 1
460                     }
461                 },
462                 "height": {
463                     "type": "number",
464                     "rules": {
465                         "required": true,
466                         "number": true,
467                         "min": 1
468                     }
469                 },
470                 "quotes": {
471                     "type": "text",
472                     "rules": {}
473                 },
474                 "settings": {
475                     "type": "text",
476                     "rules": {}
477                 },
478                 "created_at": {
479                     "type": "datetime"
480                 },
481                 "updated_at": {
482                     "type": "datetime"
483                 }
484             }
485         },
486         "GroundPicture": "ground_picture",
487         "ground_picture": {
488             "class_name": "GroundPicture",
489             "table_name": "ground_pictures",
490             "attributes": {
491                 "id": {
492                     "type": "number",
493                     "primary_key": 1,
494                     "rules": {
495                         "number": true
496                     }
497                 },
498                 "panel_id": {
499                     "type": "number",
500                     "rules": {
501                         "number": true
502                     }
503                 },
504                 "picture_id": {
505                     "type": "number",
506                     "rules": {
507                         "required": true,
508                         "number": true
509                     }
510                 },
511                 "caption": {
512                     "type": "text",
513                     "rules": {}
514                 },
515                 "repeat": {
516                     "type": "number",
517                     "rules": {
518                         "required": true,
519                         "number": true,
520                         "range": [
521                             0,
522                             3
523                         ]
524                     }
525                 },
526                 "x": {
527                     "type": "number",
528                     "rules": {
529                         "required": true,
530                         "number": true
531                     }
532                 },
533                 "y": {
534                     "type": "number",
535                     "rules": {
536                         "required": true,
537                         "number": true
538                     }
539                 },
540                 "z": {
541                     "type": "number",
542                     "rules": {
543                         "required": true,
544                         "number": true,
545                         "min": 1
546                     }
547                 },
548                 "t": {
549                     "type": "number",
550                     "rules": {
551                         "required": true,
552                         "number": true,
553                         "min": 0
554                     }
555                 },
556                 "created_at": {
557                     "type": "datetime"
558                 },
559                 "updated_at": {
560                     "type": "datetime"
561                 }
562             }
563         },
564         "GroundColor": "ground_color",
565         "ground_color": {
566             "class_name": "GroundColor",
567             "table_name": "ground_colors",
568             "attributes": {
569                 "id": {
570                     "type": "number",
571                     "primary_key": 1,
572                     "rules": {
573                         "number": true
574                     }
575                 },
576                 "panel_id": {
577                     "type": "number",
578                     "rules": {
579                         "number": true
580                     }
581                 },
582                 "caption": {
583                     "type": "text",
584                     "rules": {}
585                 },
586                 "code": {
587                     "type": "number",
588                     "rules": {
589                         "required": true,
590                         "number": true,
591                         "range": [
592                             0,
593                             16777215
594                         ]
595                     }
596                 },
597                 "orientation": {
598                     "type": "number",
599                     "rules": {
600                         "required": true,
601                         "number": true,
602                         "range": [
603                             0,
604                             1
605                         ]
606                     }
607                 },
608                 "xy": {
609                     "type": "number",
610                     "rules": {
611                         "number": true
612                     }
613                 },
614                 "wh": {
615                     "type": "number",
616                     "rules": {
617                         "number": true
618                     }
619                 },
620                 "z": {
621                     "type": "number",
622                     "rules": {
623                         "required": true,
624                         "number": true,
625                         "min": 1
626                     }
627                 },
628                 "t": {
629                     "type": "number",
630                     "rules": {
631                         "required": true,
632                         "number": true,
633                         "min": 0
634                     }
635                 },
636                 "created_at": {
637                     "type": "datetime"
638                 },
639                 "updated_at": {
640                     "type": "datetime"
641                 }
642             }
643         },
644         "WritingFormat": "writing_format",
645         "writing_format": {
646             "class_name": "WritingFormat",
647             "table_name": "writing_formats",
648             "attributes": {
649                 "id": {
650                     "type": "number",
651                     "primary_key": 1,
652                     "rules": {
653                         "number": true
654                     }
655                 },
656                 "name": {
657                     "type": "text",
658                     "rules": {
659                         "required": true
660                     }
661                 },
662                 "classname": {
663                     "type": "text",
664                     "rules": {
665                         "required": true
666                     }
667                 },
668                 "caption": {
669                     "type": "text",
670                     "rules": {
671                         "required": true
672                     }
673                 },
674                 "system_picture_id": {
675                     "type": "number",
676                     "rules": {
677                         "required": true,
678                         "number": true
679                     }
680                 },
681                 "settings": {
682                     "type": "text",
683                     "rules": {
684                         "required": true
685                     }
686                 },
687                 "created_at": {
688                     "type": "datetime"
689                 },
690                 "updated_at": {
691                     "type": "datetime"
692                 }
693             }
694         }
695     },
696     "elements": [
697         {
698             "name": "panel_picture",
699             "path_name": "panel_pictures",
700             "parts": []
701         },
702         {
703             "name": "speech_balloon",
704             "path_name": "circle_speech_balloon/speech_balloons",
705             "parts": [
706                 "balloon",
707                 "speech"
708             ]
709         },
710         {
711             "name": "ground_picture",
712             "path_name": "ground_pictures",
713             "parts": []
714         },
715         {
716             "name": "ground_color",
717             "path_name": "ground_colors",
718             "parts": []
719         }
720     ],
721     "forms": {
722         "Panel": "panel",
723         "panel": {
724             "attributes": {
725                 "caption": {
726                     "column": "caption",
727                     "type": "text",
728                     "label": {},
729                     "options": {
730                         "row_break": true
731                     }
732                 },
733                 "width": {
734                     "column": "width",
735                     "type": "number",
736                     "label": {},
737                     "options": {
738                         "size": 5
739                     }
740                 },
741                 "height": {
742                     "column": "height",
743                     "type": "number",
744                     "label": {},
745                     "options": {
746                         "size": 5,
747                         "row_break": true
748                     }
749                 },
750                 "border": {
751                     "column": "border",
752                     "type": "number",
753                     "label": {},
754                     "options": {
755                         "size": 5
756                     }
757                 },
758                 "publish": {
759                     "column": "publish",
760                     "type": "select",
761                     "label": {},
762                     "options": {
763                         "source": "magic_number",
764                         "key": "comic_visible_items",
765                         "size": 5,
766                         "row_break": true
767                     }
768                 },
769                 "id": {
770                     "column": "id",
771                     "type": "hidden",
772                     "label": {
773                         "type": "hidden"
774                     },
775                     "options": {}
776                 },
777                 "author_id": {
778                     "column": "author_id",
779                     "type": "hidden",
780                     "label": {
781                         "type": "hidden"
782                     },
783                     "options": {}
784                 }
785             },
786             "fields": [
787                 "caption",
788                 "width",
789                 "height",
790                 "border",
791                 "publish",
792                 "id",
793                 "author_id"
794             ]
795         },
796         "PanelPicture": "panel_picture",
797         "panel_picture": {
798             "attributes": {
799                 "caption": {
800                     "column": "caption",
801                     "type": "text",
802                     "label": {},
803                     "options": {
804                         "row_break": true
805                     }
806                 },
807                 "x": {
808                     "column": "x",
809                     "type": "number",
810                     "label": {},
811                     "options": {
812                         "size": 5
813                     }
814                 },
815                 "y": {
816                     "column": "y",
817                     "type": "number",
818                     "label": {},
819                     "options": {
820                         "size": 5,
821                         "row_break": true
822                     }
823                 },
824                 "width": {
825                     "column": "width",
826                     "type": "number",
827                     "label": {},
828                     "options": {
829                         "size": 5,
830                         "row_break": true
831                     },
832                     "helpers": {
833                         "size": {
834                             "path": "panels/size_helper",
835                             "options": {
836                                 "class": "panel_picture_width_tool"
837                             }
838                         }
839                     }
840                 },
841                 "height": {
842                     "column": "height",
843                     "type": "number",
844                     "label": {},
845                     "options": {
846                         "size": 5,
847                         "row_break": true
848                     },
849                     "helpers": {
850                         "size": {
851                             "path": "panels/size_helper",
852                             "options": {
853                                 "class": "panel_picture_height_tool"
854                             }
855                         }
856                     }
857                 },
858                 "link": {
859                     "column": "link",
860                     "type": "text",
861                     "label": {},
862                     "options": {
863                         "row_break": true
864                     }
865                 },
866                 "id": {
867                     "column": "id",
868                     "type": "hidden",
869                     "label": {
870                         "type": "hidden"
871                     },
872                     "options": {}
873                 },
874                 "panel_id": {
875                     "column": "panel_id",
876                     "type": "hidden",
877                     "label": {
878                         "type": "hidden"
879                     },
880                     "options": {}
881                 },
882                 "picture_id": {
883                     "column": "picture_id",
884                     "type": "hidden",
885                     "label": {},
886                     "helpers": {
887                         "popup": {
888                             "path": "panels/popup_helper",
889                             "source": "pictures",
890                             "options": {}
891                         }
892                     },
893                     "options": {}
894                 },
895                 "z": {
896                     "column": "z",
897                     "type": "hidden",
898                     "label": {
899                         "type": "hidden"
900                     },
901                     "options": {}
902                 },
903                 "t": {
904                     "column": "t",
905                     "type": "hidden",
906                     "label": {
907                         "type": "hidden"
908                     },
909                     "options": {}
910                 }
911             },
912             "fields": [
913                 "caption",
914                 "x",
915                 "y",
916                 "width",
917                 "height",
918                 "link",
919                 "id",
920                 "panel_id",
921                 "picture_id",
922                 "z",
923                 "t"
924             ]
925         },
926         "speech_balloon": {
927             "attributes": {
928                 "speech_balloon.id": {
929                     "column": "id",
930                     "type": "hidden",
931                     "label": {
932                         "type": "hidden"
933                     },
934                     "options": {}
935                 },
936                 "speech_balloon.panel_id": {
937                     "column": "panel_id",
938                     "type": "hidden",
939                     "label": {
940                         "type": "hidden"
941                     },
942                     "options": {}
943                 },
944                 "speech_balloon.speech_balloon_template_id": {
945                     "column": "speech_balloon_template_id",
946                     "type": "hidden",
947                     "label": {
948                         "type": "hidden"
949                     },
950                     "options": {}
951                 },
952                 "speech_balloon.caption": {
953                     "column": "caption",
954                     "type": "text",
955                     "label": {},
956                     "options": {
957                         "row_break": true
958                     }
959                 },
960                 "speech_balloon.z": {
961                     "column": "z",
962                     "type": "hidden",
963                     "label": {
964                         "type": "hidden"
965                     },
966                     "options": {}
967                 },
968                 "speech_balloon.t": {
969                     "column": "t",
970                     "type": "hidden",
971                     "label": {
972                         "type": "hidden"
973                     },
974                     "options": {}
975                 },
976                 "speech_balloon.classname": {
977                     "column": "classname",
978                     "type": "hidden",
979                     "label": {
980                         "type": "hidden"
981                     },
982                     "options": {}
983                 },
984                 "speech_balloon.settings": {
985                     "column": "settings",
986                     "type": "hidden",
987                     "label": {
988                         "type": "hidden"
989                     },
990                     "options": {}
991                 },
992                 "balloon.id": {
993                     "model": "balloon",
994                     "part": "balloon",
995                     "column": "id",
996                     "type": "hidden",
997                     "label": {
998                         "type": "hidden"
999                     },
1000                     "options": {}
1001                 },
1002                 "balloon.speech_balloon_id": {
1003                     "model": "balloon",
1004                     "part": "balloon",
1005                     "column": "speech_balloon_id",
1006                     "type": "hidden",
1007                     "label": {
1008                         "type": "hidden"
1009                     },
1010                     "options": {}
1011                 },
1012                 "balloon.system_picture_id": {
1013                     "model": "balloon",
1014                     "part": "balloon",
1015                     "column": "system_picture_id",
1016                     "type": "hidden",
1017                     "label": {
1018                         "type": "hidden"
1019                     },
1020                     "options": {}
1021                 },
1022                 "balloon.r": {
1023                     "model": "balloon",
1024                     "part": "balloon",
1025                     "column": "r",
1026                     "type": "number",
1027                     "label": {},
1028                     "options": {
1029                         "size": 5,
1030                         "row_break": true
1031                     },
1032                     "helpers": {
1033                         "tail_angle": {
1034                             "path": "panels/tail_angle_helper",
1035                             "options": {}
1036                         }
1037                     }
1038                 },
1039                 "balloon.x": {
1040                     "model": "balloon",
1041                     "part": "balloon",
1042                     "column": "x",
1043                     "type": "number",
1044                     "label": {},
1045                     "options": {
1046                         "size": 5
1047                     }
1048                 },
1049                 "balloon.y": {
1050                     "model": "balloon",
1051                     "part": "balloon",
1052                     "column": "y",
1053                     "type": "number",
1054                     "label": {},
1055                     "options": {
1056                         "size": 5,
1057                         "row_break": true
1058                     }
1059                 },
1060                 "balloon.width": {
1061                     "model": "balloon",
1062                     "part": "balloon",
1063                     "column": "width",
1064                     "type": "number",
1065                     "label": {},
1066                     "options": {
1067                         "size": 5
1068                     }
1069                 },
1070                 "balloon.height": {
1071                     "model": "balloon",
1072                     "part": "balloon",
1073                     "column": "height",
1074                     "type": "number",
1075                     "label": {},
1076                     "options": {
1077                         "size": 5,
1078                         "row_break": true
1079                     }
1080                 },
1081                 "balloon.settings": {
1082                     "model": "balloon",
1083                     "part": "balloon",
1084                     "column": "settings",
1085                     "type": "hidden",
1086                     "label": {
1087                         "type": "hidden"
1088                     },
1089                     "options": {}
1090                 },
1091                 "speech.id": {
1092                     "model": "speech",
1093                     "part": "speech",
1094                     "column": "id",
1095                     "type": "hidden",
1096                     "label": {
1097                         "type": "hidden"
1098                     },
1099                     "options": {}
1100                 },
1101                 "speech.speech_balloon_id": {
1102                     "model": "speech",
1103                     "part": "speech",
1104                     "column": "speech_balloon_id",
1105                     "type": "hidden",
1106                     "label": {
1107                         "type": "hidden"
1108                     },
1109                     "options": {}
1110                 },
1111                 "speech.x": {
1112                     "model": "speech",
1113                     "part": "speech",
1114                     "column": "x",
1115                     "type": "hidden",
1116                     "label": {
1117                         "type": "hidden"
1118                     },
1119                     "options": {}
1120                 },
1121                 "speech.y": {
1122                     "model": "speech",
1123                     "part": "speech",
1124                     "column": "y",
1125                     "type": "hidden",
1126                     "label": {
1127                         "type": "hidden"
1128                     },
1129                     "options": {}
1130                 },
1131                 "speech.width": {
1132                     "model": "speech",
1133                     "part": "speech",
1134                     "column": "width",
1135                     "type": "hidden",
1136                     "label": {
1137                         "type": "hidden"
1138                     },
1139                     "options": {}
1140                 },
1141                 "speech.height": {
1142                     "model": "speech",
1143                     "part": "speech",
1144                     "column": "height",
1145                     "type": "hidden",
1146                     "label": {
1147                         "type": "hidden"
1148                     },
1149                     "options": {}
1150                 },
1151                 "speech.writing_format_id": {
1152                     "model": "speech",
1153                     "part": "speech",
1154                     "column": "writing_format_id",
1155                     "type": "select",
1156                     "label": {},
1157                     "options": {
1158                         "source": "model",
1159                         "model": "writing_format",
1160                         "method": "enable_list",
1161                         "caption": "caption"
1162                     }
1163                 },
1164                 "speech.font_size": {
1165                     "model": "speech",
1166                     "part": "speech",
1167                     "column": "font_size",
1168                     "type": "select",
1169                     "label": {},
1170                     "options": {
1171                         "source": "magic_number",
1172                         "key": "speech_font_size_items",
1173                         "row_break": true
1174                     }
1175                 },
1176                 "speech.text_align": {
1177                     "model": "speech",
1178                     "part": "speech",
1179                     "column": "text_align",
1180                     "type": "select",
1181                     "label": {},
1182                     "options": {
1183                         "source": "magic_number",
1184                         "key": "speech_text_align_items"
1185                     }
1186                 },
1187                 "speech.quotes": {
1188                     "model": "speech",
1189                     "part": "speech",
1190                     "column": "quotes",
1191                     "type": "text",
1192                     "label": {},
1193                     "options": {
1194                         "size": 5
1195                     }
1196                 },
1197                 "speech.content": {
1198                     "model": "speech",
1199                     "part": "speech",
1200                     "column": "content",
1201                     "type": "text_area",
1202                     "label": {
1203                         "row_break": true
1204                     },
1205                     "options": {
1206                         "size": "45x5"
1207                     }
1208                 },
1209                 "speech.fore_color": {
1210                     "model": "speech",
1211                     "part": "speech",
1212                     "column": "fore_color",
1213                     "type": "hidden",
1214                     "label": {
1215                         "row_break": true
1216                     },
1217                     "options": {},
1218                     "helpers": {
1219                         "color": {
1220                             "path": "panels/color_helper",
1221                             "options": {},
1222                             "wrapper": "speech-fore_color-wrap"
1223                         }
1224                     }
1225                 },
1226                 "speech.settings": {
1227                     "model": "speech",
1228                     "part": "speech",
1229                     "column": "settings",
1230                     "type": "hidden",
1231                     "label": {
1232                         "type": "hidden"
1233                     },
1234                     "options": {}
1235                 }
1236             }
1237         },
1238         "CircleSpeechBalloon": "circle_speech_balloon",
1239         "circle_speech_balloon": {
1240             "base": "speech_balloon",
1241             "attributes": {},
1242             "fields": [
1243                 "speech_balloon.caption",
1244                 "balloon.r",
1245                 "balloon.x",
1246                 "balloon.y",
1247                 "balloon.width",
1248                 "balloon.height",
1249                 "balloon.id",
1250                 "balloon.speech_balloon_id",
1251                 "balloon.system_picture_id",
1252                 "balloon.settings",
1253                 "speech.writing_format_id",
1254                 "speech.font_size",
1255                 "speech.text_align",
1256                 "speech.quotes",
1257                 "speech.content",
1258                 "speech.fore_color",
1259                 "speech.id",
1260                 "speech.speech_balloon_id",
1261                 "speech.x",
1262                 "speech.y",
1263                 "speech.width",
1264                 "speech.height",
1265                 "speech.settings",
1266                 "speech_balloon.id",
1267                 "speech_balloon.panel_id",
1268                 "speech_balloon.speech_balloon_template_id",
1269                 "speech_balloon.classname",
1270                 "speech_balloon.z",
1271                 "speech_balloon.t",
1272                 "speech_balloon.settings"
1273             ]
1274         },
1275         "PlainSpeechBalloon": "plain_speech_balloon",
1276         "plain_speech_balloon": {
1277             "base": "speech_balloon",
1278             "attributes": {
1279                 "balloon.r": {
1280                     "model": "balloon",
1281                     "part": "balloon",
1282                     "column": "r",
1283                     "type": "hidden",
1284                     "label": {
1285                         "type": "hidden"
1286                     },
1287                     "options": {}
1288                 }
1289             },
1290             "fields": [
1291                 "speech_balloon.caption",
1292                 "balloon.r",
1293                 "balloon.x",
1294                 "balloon.y",
1295                 "balloon.width",
1296                 "balloon.height",
1297                 "balloon.id",
1298                 "balloon.speech_balloon_id",
1299                 "balloon.system_picture_id",
1300                 "balloon.settings",
1301                 "speech.writing_format_id",
1302                 "speech.font_size",
1303                 "speech.text_align",
1304                 "speech.quotes",
1305                 "speech.content",
1306                 "speech.fore_color",
1307                 "speech.id",
1308                 "speech.speech_balloon_id",
1309                 "speech.x",
1310                 "speech.y",
1311                 "speech.width",
1312                 "speech.height",
1313                 "speech.settings",
1314                 "speech_balloon.id",
1315                 "speech_balloon.panel_id",
1316                 "speech_balloon.speech_balloon_template_id",
1317                 "speech_balloon.classname",
1318                 "speech_balloon.z",
1319                 "speech_balloon.t",
1320                 "speech_balloon.settings"
1321             ]
1322         },
1323         "SquareSpeechBalloon": "square_speech_balloon",
1324         "square_speech_balloon": {
1325             "base": "speech_balloon",
1326             "attributes": {
1327                 "balloon.r": {
1328                     "model": "balloon",
1329                     "part": "balloon",
1330                     "column": "r",
1331                     "type": "hidden",
1332                     "label": {
1333                         "type": "hidden"
1334                     },
1335                     "options": {}
1336                 }
1337             },
1338             "fields": [
1339                 "speech_balloon.caption",
1340                 "balloon.r",
1341                 "balloon.x",
1342                 "balloon.y",
1343                 "balloon.width",
1344                 "balloon.height",
1345                 "balloon.id",
1346                 "balloon.speech_balloon_id",
1347                 "balloon.system_picture_id",
1348                 "balloon.settings",
1349                 "speech.writing_format_id",
1350                 "speech.font_size",
1351                 "speech.text_align",
1352                 "speech.quotes",
1353                 "speech.content",
1354                 "speech.fore_color",
1355                 "speech.id",
1356                 "speech.speech_balloon_id",
1357                 "speech.x",
1358                 "speech.y",
1359                 "speech.width",
1360                 "speech.height",
1361                 "speech.settings",
1362                 "speech_balloon.id",
1363                 "speech_balloon.panel_id",
1364                 "speech_balloon.speech_balloon_template_id",
1365                 "speech_balloon.classname",
1366                 "speech_balloon.z",
1367                 "speech_balloon.t",
1368                 "speech_balloon.settings"
1369             ]
1370         },
1371         "GroundPicture": "ground_picture",
1372         "ground_picture": {
1373             "attributes": {
1374                 "id": {
1375                     "column": "id",
1376                     "type": "hidden",
1377                     "label": {
1378                         "type": "hidden"
1379                     },
1380                     "options": {}
1381                 },
1382                 "panel_id": {
1383                     "column": "panel_id",
1384                     "type": "hidden",
1385                     "label": {
1386                         "type": "hidden"
1387                     },
1388                     "options": {}
1389                 },
1390                 "picture_id": {
1391                     "column": "picture_id",
1392                     "type": "hidden",
1393                     "label": {
1394                         "type": "hidden"
1395                     },
1396                     "options": {}
1397                 },
1398                 "caption": {
1399                     "column": "caption",
1400                     "type": "text",
1401                     "label": {},
1402                     "options": {
1403                         "row_break": true
1404                     }
1405                 },
1406                 "repeat": {
1407                     "column": "repeat",
1408                     "type": "select",
1409                     "label": {},
1410                     "options": {
1411                         "source": "magic_number",
1412                         "key": "ground_picture_repeat_items",
1413                         "row_break": true
1414                     }
1415                 },
1416                 "x": {
1417                     "column": "x",
1418                     "type": "number",
1419                     "label": {},
1420                     "options": {
1421                         "size": 5
1422                     }
1423                 },
1424                 "y": {
1425                     "column": "y",
1426                     "type": "number",
1427                     "label": {},
1428                     "options": {
1429                         "size": 5,
1430                         "row_break": true
1431                     }
1432                 },
1433                 "z": {
1434                     "column": "z",
1435                     "type": "hidden",
1436                     "label": {
1437                         "type": "hidden"
1438                     },
1439                     "options": {}
1440                 },
1441                 "t": {
1442                     "column": "t",
1443                     "type": "hidden",
1444                     "label": {
1445                         "type": "hidden"
1446                     },
1447                     "options": {}
1448                 }
1449             },
1450             "fields": [
1451                 "caption",
1452                 "repeat",
1453                 "x",
1454                 "y",
1455                 "z",
1456                 "t",
1457                 "id",
1458                 "panel_id",
1459                 "picture_id"
1460             ]
1461         },
1462         "GroundColor": "ground_color",
1463         "ground_color": {
1464             "attributes": {
1465                 "id": {
1466                     "column": "id",
1467                     "type": "hidden",
1468                     "label": {
1469                         "type": "hidden"
1470                     },
1471                     "options": {}
1472                 },
1473                 "panel_id": {
1474                     "column": "panel_id",
1475                     "type": "hidden",
1476                     "label": {
1477                         "type": "hidden"
1478                     },
1479                     "options": {}
1480                 },
1481                 "caption": {
1482                     "column": "caption",
1483                     "type": "text",
1484                     "label": {},
1485                     "options": {
1486                         "row_break": true
1487                     }
1488                 },
1489                 "code": {
1490                     "column": "code",
1491                     "type": "hidden",
1492                     "label": {
1493                         "row_break": true
1494                     },
1495                     "options": {
1496                         "row_break": true
1497                     },
1498                     "helpers": {
1499                         "color": {
1500                             "path": "panels/color_helper",
1501                             "options": {},
1502                             "wrapper": "ground_color-code-wrap"
1503                         }
1504                     }
1505                 },
1506                 "orientation": {
1507                     "column": "orientation",
1508                     "type": "select",
1509                     "label": {},
1510                     "options": {
1511                         "source": "magic_number",
1512                         "key": "ground_color_orientation_items",
1513                         "row_break": true
1514                     }
1515                 },
1516                 "xy": {
1517                     "column": "xy",
1518                     "type": "number",
1519                     "label": {},
1520                     "options": {
1521                         "size": 5
1522                     }
1523                 },
1524                 "wh": {
1525                     "column": "wh",
1526                     "type": "number",
1527                     "label": {},
1528                     "options": {
1529                         "size": 5,
1530                         "row_break": true
1531                     }
1532                 },
1533                 "z": {
1534                     "column": "z",
1535                     "type": "hidden",
1536                     "label": {
1537                         "type": "hidden"
1538                     },
1539                     "options": {}
1540                 },
1541                 "t": {
1542                     "column": "t",
1543                     "type": "hidden",
1544                     "label": {
1545                         "type": "hidden"
1546                     },
1547                     "options": {}
1548                 }
1549             },
1550             "fields": [
1551                 "id",
1552                 "panel_id",
1553                 "caption",
1554                 "code",
1555                 "orientation",
1556                 "xy",
1557                 "wh",
1558                 "z",
1559                 "t"
1560             ]
1561         }
1562     },
1563     "locales": {
1564         "ja": {}
1565     }
1566 }
1567 HD
1568 )
1569   end
1570 end