OSDN Git Service

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