OSDN Git Service

fix remove tree
authoryasushiito <yas@pen-chan.jp>
Tue, 25 Mar 2014 23:46:47 +0000 (08:46 +0900)
committeryasushiito <yas@pen-chan.jp>
Tue, 25 Mar 2014 23:46:47 +0000 (08:46 +0900)
37 files changed:
app/assets/javascripts/manifest/work/items.js.coffee.erb [new file with mode: 0644]
app/assets/javascripts/manifest/work/models.js.coffee.erb
app/assets/javascripts/panels.js.coffee
app/assets/javascripts/system.js.coffee
config/environments/development.rb
lib/local_manifest/list_group/list/includes/auto.rb
lib/locmare/list_group/list/private.rb
lib/manifest.rb
lib/manifest/item.rb [new file with mode: 0644]
lib/manifest/item/base.rb [new file with mode: 0644]
lib/manifest/item/binder.rb [new file with mode: 0644]
lib/manifest/item/content.rb [new file with mode: 0644]
lib/manifest/item/element.rb [new file with mode: 0644]
lib/manifest/item/item.rb [new file with mode: 0644]
lib/manifest/item/leaf.rb [new file with mode: 0644]
lib/manifest/item/owner.rb [new file with mode: 0644]
lib/manifest/item/root.rb [new file with mode: 0644]
lib/manifest/manifest.rb
lib/manifest/model.rb
lib/manifest/model/association.rb
lib/manifest/model/association/has_many.rb
lib/manifest/model/association/has_one.rb
lib/manifest/model/peta.rb [deleted file]
lib/manifest/model/peta/base.rb [deleted file]
lib/manifest/model/peta/binder.rb [deleted file]
lib/manifest/model/peta/content.rb [deleted file]
lib/manifest/model/peta/element.rb [deleted file]
lib/manifest/model/peta/item.rb [deleted file]
lib/manifest/model/peta/leaf.rb [deleted file]
lib/manifest/model/peta/owner.rb [deleted file]
lib/manifest/model/peta/root.rb [deleted file]
lib/peta/binder.rb
lib/peta/element.rb
lib/peta/element_nestable_content.rb
lib/peta/item.rb
lib/peta/leaf.rb
public/manifest.json

diff --git a/app/assets/javascripts/manifest/work/items.js.coffee.erb b/app/assets/javascripts/manifest/work/items.js.coffee.erb
new file mode 100644 (file)
index 0000000..41defde
--- /dev/null
@@ -0,0 +1,103 @@
+#マニフェスト\r
+@items = {\r
+  scroll: {\r
+    type: 'binder',\r
+    args: {\r
+    },\r
+  },\r
+  scroll_panel: {\r
+    type: 'leaf',\r
+    args: {\r
+      parent_model_name: 'scroll',\r
+    },\r
+  },\r
+  comic: {\r
+    type: 'binder',\r
+    args: {\r
+    },\r
+  },\r
+  story: {\r
+    type: 'binder',\r
+    args: {\r
+    },\r
+  },\r
+  story_sheet: {\r
+    type: 'leaf',\r
+    args: {\r
+      parent_model_name: 'story',\r
+    },\r
+  },\r
+  sheet: {\r
+    type: 'root',\r
+    args: {\r
+    },\r
+  },\r
+  sheet_panel: {\r
+    type: 'element',\r
+    args: {\r
+      parent_model_name: 'sheet',\r
+    },\r
+  },\r
+  panel: {\r
+    type: 'root',\r
+    args: {\r
+    },\r
+  },\r
+  panel_picture: {\r
+    type: 'element',\r
+    args: {\r
+      parent_model_name: 'panel',\r
+    },\r
+  },\r
+  speech_balloon: {\r
+    type: 'element',\r
+    args: {\r
+      parent_model_name: 'speech_balloon',\r
+    },\r
+  }, \r
+  balloon: {\r
+    type: 'element',\r
+    args: {\r
+      parent_model_name: 'speech_balloon',\r
+    },\r
+  },\r
+  speech: {\r
+    type: 'element',\r
+    args: {\r
+      parent_model_name: 'scroll',\r
+    },\r
+  },\r
+  ground_picture: {\r
+    type: 'element',\r
+    args: {\r
+      parent_model_name: 'panel',\r
+    },\r
+  },\r
+  ground_color: {\r
+    type: 'element',\r
+    args: {\r
+      parent_model_name: 'panel',\r
+    },\r
+  },\r
+  original_picture: {\r
+  },\r
+  picture: {\r
+  },\r
+  resource_picture: {\r
+  },\r
+  speech_balloon_template: {\r
+  },\r
+  writing_format: {\r
+  },\r
+  license_group: {\r
+  },\r
+  license: {\r
+  },\r
+  author: {\r
+  },\r
+  artist: {\r
+  },\r
+  system_picture: {\r
+  },\r
+}\r
+\r
index 8437e64..5ba5d44 100644 (file)
@@ -1,12 +1,6 @@
 #マニフェスト\r
 @models = {\r
   scroll: {\r
-    peta: {\r
-      type: 'binder',\r
-      args: {\r
-        leaf_tree_name: 'owner',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         author: {\r
@@ -58,9 +52,6 @@
     },\r
   },\r
   scroll_panel: {\r
-    peta: {\r
-      type: 'leaf',\r
-    },\r
     associations: {\r
       belongs_to: {\r
         panel: {\r
     },\r
   },\r
   comic: {\r
-    peta: {\r
-      type: 'binder',\r
-      args: {\r
-        leaf_tree_name: 'owner',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         author: {\r
     },\r
   },\r
   story: {\r
-    peta: {\r
-      type: 'binder',\r
-      args: {\r
-        leaf_tree_name: 'owner',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         comic: {\r
     },\r
   },\r
   story_sheet: {\r
-    peta: {\r
-      type: 'leaf',\r
-    },\r
     associations: {\r
       belongs_to: {\r
         story: {\r
     },\r
   },\r
   sheet: {\r
-    peta: {\r
-      type: 'root',\r
-      args: {\r
-        element_tree_name: 'owner',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         author: {\r
     },\r
   },\r
   sheet_panel: {\r
-    peta: {\r
-      type: 'element',\r
-      args: {\r
-        element_tree_name: 'owner',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         sheet: {\r
     },\r
   },\r
   panel: {\r
-    peta: {\r
-      type: 'root',\r
-      args: {\r
-        element_tree_name: 'panel',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         author: {\r
     },\r
   },\r
   panel_picture: {\r
-    peta: {\r
-      type: 'element',\r
-      args: {\r
-        element_tree_name: 'panel',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         panel: {\r
     },\r
   },\r
   speech_balloon: {\r
-    peta: {\r
-      type: 'element',\r
-      args: {\r
-        element_tree_name: 'panel',\r
-      },\r
-    },\r
     extend_column_name: 'classname', \r
     associations: {\r
       belongs_to: {\r
     },\r
   }, \r
   balloon: {\r
-    peta: {\r
-      type: 'element',\r
-      args: {\r
-        element_tree_name: 'panel',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         speech_balloon: {\r
     },\r
   },\r
   speech: {\r
-    peta: {\r
-      type: 'element',\r
-      args: {\r
-        element_tree_name: 'panel',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         speech_balloon: {\r
     },\r
   },\r
   ground_picture: {\r
-    peta: {\r
-      type: 'element',\r
-      args: {\r
-        element_tree_name: 'panel',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         panel: {\r
     },\r
   },\r
   ground_color: {\r
-    peta: {\r
-      type: 'element',\r
-      args: {\r
-        element_tree_name: 'panel',\r
-      },\r
-    },\r
     associations: {\r
       belongs_to: {\r
         panel: {\r
index c846200..efa5151 100644 (file)
@@ -9,6 +9,7 @@ $ ->
     confirm(  )\r
   editor = window.PettanrEditor\r
   manifest =  {\r
+    items: window.items,\r
     controllers: window.controllers,\r
     models: window.models,\r
     system_resources: window.system_resources,\r
index e51224a..08c9c07 100644 (file)
@@ -1,5 +1,6 @@
 $ ->\r
   manifest =  {\r
+    items: window.items,\r
     controllers: window.controllers,\r
     models: window.models,\r
     system_resources: window.system_resources,\r
index 0cbf048..9eea6b0 100644 (file)
@@ -2,7 +2,6 @@ Pettanr::Application.configure do
 
   ActiveSupport::Dependencies.autoload_paths << File::join( Rails.root, 'lib')
   ActiveSupport::Dependencies.explicitly_unloadable_constants << 'Editor' 
-  ActiveSupport::Dependencies.explicitly_unloadable_constants << 'Peta' 
   ActiveSupport::Dependencies.explicitly_unloadable_constants << 'ManifestBase' 
   ActiveSupport::Dependencies.explicitly_unloadable_constants << 'Manifest' 
   ActiveSupport::Dependencies.explicitly_unloadable_constants << 'LocalManifest' 
index cc30cfd..2666168 100644 (file)
@@ -23,9 +23,20 @@ module LocalManifest
             self.model_manifest.tree[self.list_group.tree_name]
           end
           
+          def parent_includes parent_model
+ p  parent_model.item_name
+            if parent_model.parent_model
+ p  ({parent_model.item_name => parent_includes(parent_model.parent_model)})
+              {parent_model.item_name => parent_includes(parent_model.parent_model)}
+            else
+              {parent_model.item_name => {}}
+            end
+          end
+          
           def includes
-            if self.tree_manifest
-              self.tree_manifest.include_hash
+ p  self.model.item_name
+            if self.model.parent_model
+              self.parent_includes self.model.parent_model
             else
               {}
             end
index c583bcf..0ab82b6 100644 (file)
@@ -8,7 +8,11 @@ module Locmare
       end
       
       def where_condition operators
-        owner_model = @model_manifest.tree[@tree_name].root_model
+        owner_model = if tree = @model_manifest.tree[@tree_name]
+          @model_manifest.tree[@tree_name].root_model
+        else
+          @model
+        end
         case owner_model.owner_type
         when :author
           operator = operators.author
index 4329151..0319140 100644 (file)
@@ -1,5 +1,6 @@
 require_dependency 'manifest_base/manifest_base'
 require_dependency "manifest/manifest"
+require_dependency "manifest/item"
 require_dependency "manifest/controller"
 require_dependency "manifest/model"
 require_dependency "manifest/system_resource"
diff --git a/lib/manifest/item.rb b/lib/manifest/item.rb
new file mode 100644 (file)
index 0000000..5bc58a5
--- /dev/null
@@ -0,0 +1,22 @@
+ManifestBase.require_modules "manifest/item/", 
+  %w|base item owner content root element binder leaf|
+
+module Manifest
+  class ItemFactory < ManifestBase::Factory
+    include ItemModule
+    
+    def self.types
+      {
+        'item' => ItemPeta, 'owner' => OwnerPeta, 'content' => ContentPeta, 
+        'root' => RootPeta, 'element' => ElementPeta, 
+        'binder' => BinderPeta, 'leaf' => LeafPeta
+      }
+    end
+    
+    def self.default_type
+      'item'
+    end
+    
+  end
+end
+
diff --git a/lib/manifest/item/base.rb b/lib/manifest/item/base.rb
new file mode 100644 (file)
index 0000000..c3a901f
--- /dev/null
@@ -0,0 +1,16 @@
+module Manifest
+  module ItemModule
+    class BasePeta < ManifestBase::TypeNameArgs
+      
+      def set_default
+        super
+      end
+      
+      def init
+        super
+      end
+      
+    end
+    
+  end
+end
diff --git a/lib/manifest/item/binder.rb b/lib/manifest/item/binder.rb
new file mode 100644 (file)
index 0000000..1e18b27
--- /dev/null
@@ -0,0 +1,16 @@
+module Manifest
+  module ItemModule
+    class BinderPeta < BasePeta
+      attr :leaf_tree_name
+      
+      def set_default
+        super
+      end
+      
+      def init
+        super
+      end
+      
+    end
+  end
+end
diff --git a/lib/manifest/item/content.rb b/lib/manifest/item/content.rb
new file mode 100644 (file)
index 0000000..c64303b
--- /dev/null
@@ -0,0 +1,15 @@
+module Manifest
+  module ItemModule
+    class ContentPeta < BasePeta
+      
+      def set_default
+        super
+      end
+      
+      def init
+        super
+      end
+      
+    end
+  end
+end
diff --git a/lib/manifest/item/element.rb b/lib/manifest/item/element.rb
new file mode 100644 (file)
index 0000000..9a4ed72
--- /dev/null
@@ -0,0 +1,18 @@
+module Manifest
+  module ItemModule
+    class ElementPeta < BasePeta
+      attr :parent_model_name
+      
+      def set_default
+        super
+        ManifestBase.alert_undefined_message 'parent_model_name', self.module_message unless @args['parent_model_name']
+      end
+      
+      def init
+        super
+        @parent_model_name = @args['parent_model_name']
+      end
+      
+    end
+  end
+end
diff --git a/lib/manifest/item/item.rb b/lib/manifest/item/item.rb
new file mode 100644 (file)
index 0000000..636e825
--- /dev/null
@@ -0,0 +1,15 @@
+module Manifest
+  module ItemModule
+    class ItemPeta < BasePeta
+      
+      def set_default
+        super
+      end
+      
+      def init
+        super
+      end
+      
+    end
+  end
+end
diff --git a/lib/manifest/item/leaf.rb b/lib/manifest/item/leaf.rb
new file mode 100644 (file)
index 0000000..519e6fd
--- /dev/null
@@ -0,0 +1,18 @@
+module Manifest
+  module ItemModule
+    class LeafPeta < BasePeta
+      attr :parent_model_name
+      
+      def set_default
+        super
+        ManifestBase.alert_undefined_message 'parent_model_name', self.module_message unless @args['parent_model_name']
+      end
+      
+      def init
+        super
+        @parent_model_name = @args['parent_model_name']
+      end
+      
+    end
+  end
+end
diff --git a/lib/manifest/item/owner.rb b/lib/manifest/item/owner.rb
new file mode 100644 (file)
index 0000000..6b9d76a
--- /dev/null
@@ -0,0 +1,15 @@
+module Manifest
+  module ItemModule
+    class OwnerPeta < BasePeta
+      
+      def set_default
+        super
+      end
+      
+      def init
+        super
+      end
+      
+    end
+  end
+end
diff --git a/lib/manifest/item/root.rb b/lib/manifest/item/root.rb
new file mode 100644 (file)
index 0000000..be05082
--- /dev/null
@@ -0,0 +1,16 @@
+module Manifest
+  module ItemModule
+    class RootPeta < BasePeta
+      attr :element_tree_name
+      
+      def set_default
+        super
+      end
+      
+      def init
+        super
+      end
+      
+    end
+  end
+end
index 69ea996..070d712 100644 (file)
@@ -2,7 +2,7 @@ module Manifest
   class Manifest
     cattr_accessor :manifest
     attr :system_resources, :magic_numbers,
-      :controllers, :models, :module_names
+      :items, :controllers, :models, :module_names
     # call me before load routes.rb
     # routes.rb needs engine_resources manifest in system_resources
     # ex. it's adding license_groups routes
@@ -16,6 +16,7 @@ module Manifest
     def init
       # managers can't initialize before load  application.rb
       return unless defined? ::Pettanr
+      @items = ManifestBase.load_type_name_args(self, @global_json, 'items', ItemFactory)
       @controllers = Controller.load(self, @global_json, 'controllers')
       @models = Model.load(self, @global_json, 'models')
     end
index 6b86071..c225c38 100644 (file)
@@ -1,11 +1,11 @@
 ManifestBase.require_modules "manifest/model/", 
-  %w|attribute association list tree peta|
+  %w|attribute association list tree|
 
 module Manifest
   class Model < ManifestBase::Base
     include ModelModule
     
-    attr :attributes, :associations, :tree, :list, :peta, :extend_column_name
+    attr :attributes, :associations, :tree, :list, :extend_column_name
     
     def set_default
       super
@@ -38,7 +38,6 @@ module Manifest
       @json['tree'].each {|tree_name, parent_model_name|
         @tree[tree_name] = Tree.new(self, tree_name, parent_model_name)
       }
-      @peta = ManifestBase.load_type_args(self, @json, 'peta', PetaFactory)
       @extend_column_name = @json['extend_column_name']
       @list = ManifestBase.load_value self, @json, 'list', List
     end
index 0724664..b9e101c 100644 (file)
@@ -26,6 +26,20 @@ module Manifest
         @parent.name
       end
       
+      def each_parent_model
+        @belongs_to.each do |name, belongs_to_manifest|
+          next unless @parent.classify.element?
+          if @parent.classify.my_peta.type == 'element'
+            next unless belongs_to_manifest.model.my_peta.type == 'root'
+          end
+          if @parent.classify.my_peta.type == 'leaf'
+            next unless belongs_to_manifest.model.my_peta.type == 'binder'
+          end
+ p  [@parent.classify  , belongs_to_manifest.model]
+          yield belongs_to_manifest.model
+        end
+      end
+      
       def child_element_name child_model
         if @has_one[child_model.item_name]
           child_model.item_name
index 2d5e7dd..98ed731 100644 (file)
@@ -6,7 +6,7 @@ module Manifest
         
         def set_default
           super
-          @values['model_name'] ||= @name.singularize
+          @values['model_name'] ||= ::Manifest.singularize @name
           @values['foreign_key'] ||= @parent.model_name + '_id'
         end
         
@@ -17,6 +17,10 @@ module Manifest
           @through = @values['through']
         end
         
+        def through?
+          @through.blank? == false
+        end
+        
         def model
           ::Manifest.item_name_to_model @model_name
         end
index 6db1fc5..20f0721 100644 (file)
@@ -16,6 +16,10 @@ module Manifest
           @foreign_key = @values['foreign_key']
         end
         
+        def through?
+          @through.blank? == false
+        end
+        
         def model
           ::Manifest.item_name_to_model @model_name
         end
diff --git a/lib/manifest/model/peta.rb b/lib/manifest/model/peta.rb
deleted file mode 100644 (file)
index c23fb47..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-ManifestBase.require_modules "manifest/model/peta/", 
-  %w|base item owner content root element binder leaf|
-
-module Manifest
-  module ModelModule
-    class PetaFactory < ManifestBase::Factory
-      include PetaModule
-      
-      def self.types
-        {
-          'item' => ItemPeta, 'owner' => OwnerPeta, 'content' => ContentPeta, 
-          'root' => RootPeta, 'element' => ElementPeta, 
-          'binder' => BinderPeta, 'leaf' => LeafPeta
-        }
-      end
-      
-      def self.default_type
-        'item'
-      end
-      
-    end
-    
-  end
-end
diff --git a/lib/manifest/model/peta/base.rb b/lib/manifest/model/peta/base.rb
deleted file mode 100644 (file)
index ce562ee..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-module Manifest
-  module ModelModule
-    module PetaModule
-      class BasePeta < ManifestBase::TypeArgs
-        
-        def set_default
-          super
-        end
-        
-        def init
-          super
-        end
-        
-      end
-      
-    end
-  end
-end
diff --git a/lib/manifest/model/peta/binder.rb b/lib/manifest/model/peta/binder.rb
deleted file mode 100644 (file)
index 8c59a84..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-module Manifest
-  module ModelModule
-    module PetaModule
-      class BinderPeta < BasePeta
-        attr :leaf_tree_name
-        
-        def set_default
-          super
-          ManifestBase.alert_undefined_message 'leaf_tree_name', self.module_message unless @args['leaf_tree_name']
-        end
-        
-        def init
-          super
-          @leaf_tree_name = @args['leaf_tree_name']
-        end
-        
-      end
-      
-    end
-  end
-end
diff --git a/lib/manifest/model/peta/content.rb b/lib/manifest/model/peta/content.rb
deleted file mode 100644 (file)
index 2c134c9..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-module Manifest
-  module ModelModule
-    module PetaModule
-      class ContentPeta < BasePeta
-        
-        def set_default
-          super
-        end
-        
-        def init
-          super
-        end
-        
-      end
-      
-    end
-  end
-end
diff --git a/lib/manifest/model/peta/element.rb b/lib/manifest/model/peta/element.rb
deleted file mode 100644 (file)
index 28a5a71..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-module Manifest
-  module ModelModule
-    module PetaModule
-      class ElementPeta < BasePeta
-        attr :element_tree_name
-        
-        def set_default
-          super
-          ManifestBase.alert_undefined_message 'element_tree_name', self.module_message unless @args['element_tree_name']
-        end
-        
-        def init
-          super
-          @element_tree_name = @args['element_tree_name']
-        end
-        
-      end
-      
-    end
-  end
-end
diff --git a/lib/manifest/model/peta/item.rb b/lib/manifest/model/peta/item.rb
deleted file mode 100644 (file)
index 9a9fbf2..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-module Manifest
-  module ModelModule
-    module PetaModule
-      class ItemPeta < BasePeta
-        
-        def set_default
-          super
-        end
-        
-        def init
-          super
-        end
-        
-      end
-      
-    end
-  end
-end
diff --git a/lib/manifest/model/peta/leaf.rb b/lib/manifest/model/peta/leaf.rb
deleted file mode 100644 (file)
index ad672f3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-module Manifest
-  module ModelModule
-    module PetaModule
-      class LeafPeta < BasePeta
-        
-        def set_default
-          super
-        end
-        
-        def init
-          super
-        end
-        
-      end
-      
-    end
-  end
-end
diff --git a/lib/manifest/model/peta/owner.rb b/lib/manifest/model/peta/owner.rb
deleted file mode 100644 (file)
index be63c29..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-module Manifest
-  module ModelModule
-    module PetaModule
-      class OwnerPeta < BasePeta
-        
-        def set_default
-          super
-        end
-        
-        def init
-          super
-        end
-        
-      end
-      
-    end
-  end
-end
diff --git a/lib/manifest/model/peta/root.rb b/lib/manifest/model/peta/root.rb
deleted file mode 100644 (file)
index e5963ec..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-module Manifest
-  module ModelModule
-    module PetaModule
-      class RootPeta < BasePeta
-        attr :element_tree_name
-        
-        def set_default
-          super
-          ManifestBase.alert_undefined_message 'element_tree_name', self.module_message unless @args['element_tree_name']
-        end
-        
-        def init
-          super
-          @element_tree_name = @args['element_tree_name']
-        end
-        
-      end
-      
-    end
-  end
-end
index 9d0aa6c..64b52e6 100644 (file)
@@ -5,7 +5,7 @@ module Peta
     # Dynamic Methods
     
     def self._leaf_tree_name
-      self.my_manifest.peta.leaf_tree_name
+      self.my_peta.leaf_tree_name
     end
     
     def self.load_manifest
index ccdbbf8..d666e71 100644 (file)
@@ -4,6 +4,28 @@ module Peta
     
     # Dynamic ClassMethods
     
+    def self.load_manifest
+      super
+      # Class Methods
+      self.my_manifest.associations.each_parent_model do |parent_model|
+        define_singleton_method("parent_model") do 
+          parent_model
+        end
+      end
+      # Instance Methods
+    end
+    
+    def self.element?
+      true
+    end
+    
+    def self.root_model
+      if self.parent_model
+        self.parent_model.root_model
+      else
+        self
+      end
+    end
     
     def self.list_opt_for_panel
       {}
index eed0fa1..315bdce 100644 (file)
@@ -5,7 +5,7 @@ module Peta
     # Dynamic Methods
     
     def self._element_tree_name
-      self.my_manifest.peta.element_tree_name
+      self.my_peta.element_tree_name
     end
     
     def self.load_manifest
index b6ac63d..cfd771c 100644 (file)
@@ -18,7 +18,7 @@ module Peta
       define_singleton_method("valid_encode_columns") do 
         r
       end
-      define_singleton_method("parent_model") do |tree_name|
+      define_singleton_method("parent_modela") do |tree_name|
         self.my_manifest.tree[tree_name].parent_model
       end
       define_singleton_method("child_models") do  |tree_name|
@@ -40,6 +40,10 @@ module Peta
     
     before_validation :valid_encode
     
+    def self.my_peta
+      Manifest.manifest.items[self.item_name]
+    end
+    
     def self.my_manifest
       Manifest.manifest.models[self.item_name]
     end
@@ -64,6 +68,18 @@ module Peta
       false
     end
     
+    def self.element?
+      false
+    end
+    
+    def self.root?
+      false
+    end
+    
+    def self.parent_model
+      nil
+    end
+    
     def self.path_name with_engine = false
       self.plural.underscore
     end
index 8dedbd6..81574a9 100644 (file)
@@ -4,6 +4,25 @@ module Peta
     
     # Dynamic ClassMethods
     
+    def self.load_manifest
+      super
+      # Class Methods
+      self.my_manifest.associations.each_parent_model do |parent_model|
+        define_singleton_method("parent_model") do 
+          parent_model
+        end
+      end
+      # Instance Methods
+    end
+    
+    def self.element?
+      true
+    end
+    
+    def self.root_model
+      self.parent_model
+    end
+    
     def self.play_list_where cid
       ['scroll_panels.scroll_id = ?', cid]
     end
index 370e21c..fe97bc5 100644 (file)
@@ -1,4 +1,90 @@
 {\r
+  "items": {\r
+    "scroll": {\r
+      "type": "binder",\r
+      "args": {}\r
+    },\r
+    "scroll_panel": {\r
+      "type": "leaf",\r
+      "args": {\r
+        "parent_model_name_name": "scroll"\r
+      }\r
+    },\r
+    "comic": {\r
+      "type": "binder",\r
+      "args": {}\r
+    },\r
+    "story": {\r
+      "type": "binder",\r
+      "args": {}\r
+    },\r
+    "story_sheet": {\r
+      "type": "leaf",\r
+      "args": {\r
+        "parent_model_name": "story"\r
+      }\r
+    },\r
+    "sheet": {\r
+      "type": "root",\r
+      "args": {}\r
+    },\r
+    "sheet_panel": {\r
+      "type": "element",\r
+      "args": {\r
+        "parent_model_name": "sheet"\r
+      }\r
+    },\r
+    "panel": {\r
+      "type": "root",\r
+      "args": {}\r
+    },\r
+    "panel_picture": {\r
+      "type": "element",\r
+      "args": {\r
+        "parent_model_name": "panel"\r
+      }\r
+    },\r
+    "speech_balloon": {\r
+      "type": "element",\r
+      "args": {\r
+        "parent_model_name": "speech_balloon"\r
+      }\r
+    },\r
+    "balloon": {\r
+      "type": "element",\r
+      "args": {\r
+        "parent_model_name": "speech_balloon"\r
+      }\r
+    },\r
+    "speech": {\r
+      "type": "element",\r
+      "args": {\r
+        "parent_model_name": "scroll"\r
+      }\r
+    },\r
+    "ground_picture": {\r
+      "type": "element",\r
+      "args": {\r
+        "parent_model_name": "panel"\r
+      }\r
+    },\r
+    "ground_color": {\r
+      "type": "element",\r
+      "args": {\r
+        "parent_model_name": "panel"\r
+      }\r
+    },\r
+    "original_picture": {},\r
+    "picture": {},\r
+    "resource_picture": {},\r
+    "speech_balloon_template": {},\r
+    "writing_format": {},\r
+    "license_group": {},\r
+    "license": {},\r
+    "author": {},\r
+    "artist": {},\r
+    "system_picture": {}\r
+  },\r
   "controllers": {\r
     "scrolls": {\r
       "actions": {\r
   },\r
   "models": {\r
     "scroll": {\r
-      "peta": {\r
-        "type": "binder",\r
-        "args": {\r
-          "leaf_tree_name": "owner"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "author": {}\r
       }\r
     },\r
     "scroll_panel": {\r
-      "peta": {\r
-        "type": "leaf"\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "panel": {},\r
       }\r
     },\r
     "comic": {\r
-      "peta": {\r
-        "type": "binder",\r
-        "args": {\r
-          "leaf_tree_name": "owner"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "author": {}\r
       }\r
     },\r
     "story": {\r
-      "peta": {\r
-        "type": "binder",\r
-        "args": {\r
-          "leaf_tree_name": "owner"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "comic": {}\r
       }\r
     },\r
     "story_sheet": {\r
-      "peta": {\r
-        "type": "leaf"\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "story": {},\r
       }\r
     },\r
     "sheet": {\r
-      "peta": {\r
-        "type": "root",\r
-        "args": {\r
-          "element_tree_name": "owner"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "author": {}\r
       }\r
     },\r
     "sheet_panel": {\r
-      "peta": {\r
-        "type": "element",\r
-        "args": {\r
-          "element_tree_name": "owner"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "sheet": {},\r
       }\r
     },\r
     "panel": {\r
-      "peta": {\r
-        "type": "root",\r
-        "args": {\r
-          "element_tree_name": "panel"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "author": {}\r
       }\r
     },\r
     "panel_picture": {\r
-      "peta": {\r
-        "type": "element",\r
-        "args": {\r
-          "element_tree_name": "panel"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "panel": {}\r
       }\r
     },\r
     "speech_balloon": {\r
-      "peta": {\r
-        "type": "element",\r
-        "args": {\r
-          "element_tree_name": "panel"\r
-        }\r
-      },\r
       "extend_column_name": "classname",\r
       "associations": {\r
         "belongs_to": {\r
       }\r
     },\r
     "balloon": {\r
-      "peta": {\r
-        "type": "element",\r
-        "args": {\r
-          "element_tree_name": "panel"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "speech_balloon": {},\r
       }\r
     },\r
     "speech": {\r
-      "peta": {\r
-        "type": "element",\r
-        "args": {\r
-          "element_tree_name": "panel"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "speech_balloon": {},\r
       }\r
     },\r
     "ground_picture": {\r
-      "peta": {\r
-        "type": "element",\r
-        "args": {\r
-          "element_tree_name": "panel"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "panel": {}\r
       }\r
     },\r
     "ground_color": {\r
-      "peta": {\r
-        "type": "element",\r
-        "args": {\r
-          "element_tree_name": "panel"\r
-        }\r
-      },\r
       "associations": {\r
         "belongs_to": {\r
           "panel": {}\r
     "provider_sources": [\r
       "http://sourceforge.jp/projects/pettanr/wiki/ProviderSource/attach/provider_source.json"\r
     ]\r
-  },\r
-  "locals": {\r
-    "profilers": {\r
-      "scroll": {\r
-        "column_names": [\r
-          "title",\r
-          "description",\r
-          "visible",\r
-          "author_id"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "author"\r
-          ],\r
-          "has_many": [\r
-            "scroll_panels.by_scroll",\r
-            "panels.by_scroll"\r
-          ]\r
-        }\r
-      },\r
-      "scroll_panel": {\r
-        "column_names": [\r
-          "scroll_id",\r
-          "panel_id",\r
-          "t",\r
-          "author_id"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "scroll",\r
-            "panel"\r
-          ]\r
-        }\r
-      },\r
-      "comic": {\r
-        "column_names": [\r
-          "title",\r
-          "description",\r
-          "visible",\r
-          "author_id"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "author"\r
-          ],\r
-          "has_many": [\r
-            "stories.by_comic"\r
-          ]\r
-        }\r
-      },\r
-      "story": {\r
-        "column_names": [\r
-          "comic_id",\r
-          "title",\r
-          "description",\r
-          "t",\r
-          "visible"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "comic"\r
-          ],\r
-          "has_many": [\r
-            "story_sheets.by_story",\r
-            "sheets.by_story"\r
-          ]\r
-        }\r
-      },\r
-      "story_sheet": {\r
-        "column_names": [\r
-          "story_id",\r
-          "sheet_id",\r
-          "t",\r
-          "author_id"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "story",\r
-            "sheet"\r
-          ]\r
-        }\r
-      },\r
-      "sheet": {\r
-        "column_names": [\r
-          "caption",\r
-          "width",\r
-          "height",\r
-          "visible",\r
-          "author_id"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "author"\r
-          ],\r
-          "has_many": [\r
-            "story_sheets.by_sheet",\r
-            "stories.by_sheet",\r
-            "sheet_panels.by_sheet",\r
-            "panels.by_sheet"\r
-          ]\r
-        }\r
-      },\r
-      "sheet_panel": {\r
-        "column_names": [\r
-          "sheet_id",\r
-          "panel_id",\r
-          "x",\r
-          "y",\r
-          "z",\r
-          "t",\r
-          "author_id"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "sheet",\r
-            "panel"\r
-          ]\r
-        }\r
-      },\r
-      "panel": {\r
-        "column_names": [\r
-          "width",\r
-          "height",\r
-          "border",\r
-          "caption",\r
-          "publish",\r
-          "author_id"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "author"\r
-          ],\r
-          "has_many": [\r
-            "scroll_panels.by_panel",\r
-            "scrolls.by_panel",\r
-            "sheet_panels.by_panel",\r
-            "sheets.by_panel",\r
-            "panel_pictures.by_panel",\r
-            "speech_balloons.by_panel",\r
-            "ground_pictures.by_panel",\r
-            "ground_colors.by_panel"\r
-          ]\r
-        }\r
-      },\r
-      "panel_picture": {\r
-        "column_names": [\r
-          "panel_id",\r
-          "picture_id",\r
-          "caption",\r
-          "x",\r
-          "y",\r
-          "width",\r
-          "height",\r
-          "link",\r
-          "z",\r
-          "t"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "panel"\r
-          ]\r
-        }\r
-      },\r
-      "speech_balloon": {\r
-        "column_names": [\r
-          "panel_id",\r
-          "speech_balloon_template_id",\r
-          "classname",\r
-          "z",\r
-          "t",\r
-          "settings",\r
-          "caption"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "panel"\r
-          ],\r
-          "has_one": [\r
-            "balloon.by_speech_balloon",\r
-            "speech.by_speech_balloon"\r
-          ]\r
-        }\r
-      },\r
-      "speech": {\r
-        "column_names": [\r
-          "speech_balloon_id",\r
-          "writing_format_id",\r
-          "content",\r
-          "font_size",\r
-          "text_align",\r
-          "fore_color",\r
-          "x",\r
-          "y",\r
-          "width",\r
-          "height",\r
-          "quotes",\r
-          "settings"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "speech_balloon",\r
-            "writing_format"\r
-          ]\r
-        }\r
-      },\r
-      "balloon": {\r
-        "column_names": [\r
-          "speech_balloon_id",\r
-          "system_picture_id",\r
-          "x",\r
-          "y",\r
-          "width",\r
-          "height",\r
-          "r",\r
-          "settings"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "speech_balloon",\r
-            "system_picture"\r
-          ]\r
-        }\r
-      },\r
-      "ground_picture": {\r
-        "column_names": [\r
-          "panel_id",\r
-          "picture_id",\r
-          "caption",\r
-          "repeat",\r
-          "x",\r
-          "y",\r
-          "z",\r
-          "t"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "panel"\r
-          ]\r
-        }\r
-      },\r
-      "ground_color": {\r
-        "column_names": [\r
-          "panel_id",\r
-          "caption",\r
-          "code",\r
-          "orientation",\r
-          "xy",\r
-          "wh",\r
-          "z",\r
-          "t"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "panel"\r
-          ]\r
-        }\r
-      },\r
-      "original_picture": {\r
-        "column_names": [\r
-          "ext",\r
-          "width",\r
-          "height",\r
-          "filesize",\r
-          "artist_id",\r
-          "md5",\r
-          "uploaded_at",\r
-          "published_at",\r
-          "stopped_at"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "artist"\r
-          ],\r
-          "has_one": [\r
-            "resource_picture.by_original_picture"\r
-          ]\r
-        }\r
-      },\r
-      "picture": {\r
-        "column_names": [\r
-          "original_picture_id",\r
-          "revision",\r
-          "ext",\r
-          "width",\r
-          "height",\r
-          "filesize",\r
-          "artist_id",\r
-          "license_id",\r
-          "md5",\r
-          "artist_name",\r
-          "credit",\r
-          "settings",\r
-          "classname"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "license",\r
-            "artist"\r
-          ]\r
-        }\r
-      },\r
-      "resource_picture": {\r
-        "column_names": [\r
-          "original_picture_id",\r
-          "revision",\r
-          "ext",\r
-          "width",\r
-          "height",\r
-          "filesize",\r
-          "artist_id",\r
-          "license_id",\r
-          "md5",\r
-          "artist_name",\r
-          "credit",\r
-          "settings",\r
-          "picture_id",\r
-          "classname"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "original_picture",\r
-            "license",\r
-            "artist"\r
-          ]\r
-        }\r
-      },\r
-      "speech_balloon_template": {\r
-        "column_names": [\r
-          "name",\r
-          "classname",\r
-          "caption",\r
-          "t",\r
-          "system_picture_id",\r
-          "settings"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "system_picture"\r
-          ]\r
-        }\r
-      },\r
-      "writing_format": {\r
-        "column_names": [\r
-          "name",\r
-          "classname",\r
-          "caption",\r
-          "system_picture_id",\r
-          "settings"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "system_picture"\r
-          ],\r
-          "has_many": []\r
-        }\r
-      },\r
-      "license_group": {\r
-        "column_names": [\r
-          "name",\r
-          "classname",\r
-          "caption",\r
-          "url"\r
-        ],\r
-        "associations": {\r
-          "has_many": [\r
-            "licenses.by_license_group"\r
-          ]\r
-        }\r
-      },\r
-      "license": {\r
-        "column_names": [\r
-          "license_group_id",\r
-          "name",\r
-          "caption",\r
-          "system_picture_id",\r
-          "url",\r
-          "settings",\r
-          "credit_pictures"\r
-        ],\r
-        "associations": {\r
-          "belongs_to": [\r
-            "license_group",\r
-            "system_picture"\r
-          ],\r
-          "has_many": [\r
-            "resource_pictures.by_license"\r
-          ]\r
-        }\r
-      },\r
-      "author": {\r
-        "column_names": [\r
-          "name",\r
-          "user_id"\r
-        ],\r
-        "associations": {\r
-          "has_many": [\r
-            "scrolls.by_author",\r
-            "scroll_panels.by_author",\r
-            "comics.by_author",\r
-            "stories.by_author",\r
-            "sheets.by_author",\r
-            "sheet_panels.by_author",\r
-            "panels.by_author",\r
-            "panel_pictures.by_author",\r
-            "speech_balloons.by_author",\r
-            "balloons.by_author",\r
-            "speeches.by_author",\r
-            "ground_pictures.by_author",\r
-            "ground_colors.by_author"\r
-          ]\r
-        }\r
-      },\r
-      "artist": {\r
-        "column_names": [\r
-          "name",\r
-          "author_id"\r
-        ],\r
-        "associations": {\r
-          "has_many": [\r
-            "resource_pictures.by_artist"\r
-          ]\r
-        }\r
-      },\r
-      "system_picture": {\r
-        "column_names": [\r
-          "ext",\r
-          "width",\r
-          "height",\r
-          "filesize",\r
-          "md5"\r
-        ],\r
-        "associations": {\r
-          "has_many": [\r
-            "licenses.by_system_picture"\r
-          ]\r
-        }\r
-      }\r
-    },\r
-    "filers": {\r
-      "scroll": {\r
-        "symbol": {},\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "column",\r
-              "args": {\r
-                "column_name": "title"\r
-              }\r
-            },\r
-            "link": {\r
-              "type": "action",\r
-              "args": {\r
-                "action_name": "play"\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {}\r
-      },\r
-      "scroll_panel": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "link": {\r
-              "type": "none"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "none"\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "comic": {\r
-        "symbol": {},\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "column",\r
-              "args": {\r
-                "column_name": "title"\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {}\r
-      },\r
-      "story": {\r
-        "symbol": {},\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "method",\r
-              "args": {\r
-                "method_name": "title_with_t"\r
-              }\r
-            },\r
-            "link": {\r
-              "type": "action",\r
-              "args": {\r
-                "action_name": "play"\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {}\r
-      },\r
-      "story_sheet": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "link": {\r
-              "type": "none"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "none"\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "sheet": {\r
-        "symbol": {},\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {},\r
-            "link": {\r
-              "type": "action",\r
-              "args": {\r
-                "action_name": "play"\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {}\r
-      },\r
-      "sheet_panel": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "link": {\r
-              "type": "none"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "none"\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "panel": {\r
-        "symbol": {},\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "link": {\r
-              "type": "none"\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {}\r
-      },\r
-      "panel_picture": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "picture"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "link": {\r
-              "type": "none"\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "speech_balloon": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "picture"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "method",\r
-              "args": {\r
-                "method_name": "plain_scenario"\r
-              }\r
-            },\r
-            "link": {\r
-              "type": "none"\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "speech": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "picture"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "column",\r
-              "args": {\r
-                "column_name": "content"\r
-              }\r
-            },\r
-            "link": {\r
-              "type": "none"\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "balloon": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "picture"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "none"\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "ground_picture": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "picture"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "link": {\r
-              "type": "none"\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "ground_color": {\r
-        "symbol": {\r
-          "type": "template",\r
-          "args": {\r
-            "template_name": "symbol"\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "link": {\r
-              "type": "none"\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "original_picture": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "picture"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "method",\r
-              "args": {\r
-                "method_name": "revision"\r
-              }\r
-            },\r
-            "link": {\r
-              "type": "action",\r
-              "args": {\r
-                "action_name": "history"\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "template",\r
-          "args": {\r
-            "template_name": "publish"\r
-          }\r
-        }\r
-      },\r
-      "picture": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "picture"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "column",\r
-              "args": {\r
-                "column_name": "revision"\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "resource_picture": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "picture"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "none"\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "speech_balloon_template": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "picture"\r
-            }\r
-          }\r
-        },\r
-        "caption": {},\r
-        "summary": {\r
-          "type": "none"\r
-        },\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "writing_format": {\r
-        "symbol": {},\r
-        "caption": {},\r
-        "summary": {\r
-          "type": "none"\r
-        },\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "license_group": {\r
-        "symbol": {},\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "link": {\r
-              "type": "url_column",\r
-              "args": {\r
-                "column_name": "url"\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "summary": {\r
-          "type": "none"\r
-        },\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "license": {\r
-        "symbol": {},\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "method",\r
-              "args": {\r
-                "method_name": "caption_with_group"\r
-              }\r
-            },\r
-            "link": {\r
-              "type": "url_column",\r
-              "args": {\r
-                "column_name": "url"\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      },\r
-      "author": {\r
-        "symbol": {},\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "column",\r
-              "args": {\r
-                "column_name": "name"\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "account"\r
-        }\r
-      },\r
-      "artist": {\r
-        "symbol": {},\r
-        "caption": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "column",\r
-              "args": {\r
-                "column_name": "name"\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "summary": {},\r
-        "edit": {\r
-          "type": "account"\r
-        }\r
-      },\r
-      "system_picture": {\r
-        "symbol": {\r
-          "type": "default",\r
-          "args": {\r
-            "face": {\r
-              "type": "picture"\r
-            }\r
-          }\r
-        },\r
-        "caption": {\r
-          "type": "none"\r
-        },\r
-        "summary": {\r
-          "type": "none"\r
-        },\r
-        "edit": {\r
-          "type": "none"\r
-        }\r
-      }\r
-    },\r
-    "list_groups": {\r
-      "scroll": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_author": {\r
-            "type": "filter"\r
-          },\r
-          "by_panel": {\r
-            "type": "through_filter",\r
-            "args": {\r
-              "through": "scroll_panels"\r
-            }\r
-          },\r
-          "play": {\r
-            "type": "play",\r
-            "args": {\r
-              "filter_item_name": "scroll",\r
-              "filter_model_name": "scroll_panel",\r
-              "filter_key": "scroll_id"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "scroll_panel": {\r
-        "tree_name": "owner",\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_scroll": {\r
-            "type": "filter"\r
-          },\r
-          "by_panel": {\r
-            "type": "filter"\r
-          },\r
-          "by_author": {\r
-            "type": "filter",\r
-            "args": {\r
-              "tree_name": "scroll_owner"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "comic": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_author": {\r
-            "type": "foreign_filter",\r
-            "args": {\r
-              "tree_name": "comic_owner"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "story": {\r
-        "tree_name": "owner",\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_comic": {\r
-            "type": "filter"\r
-          },\r
-          "by_sheet": {\r
-            "type": "through_filter",\r
-            "args": {\r
-              "through": "story_sheets"\r
-            }\r
-          },\r
-          "by_author": {\r
-            "type": "foreign_filter",\r
-            "args": {\r
-              "tree_name": "comic_owner"\r
-            }\r
-          },\r
-          "play": {\r
-            "type": "play"\r
-          }\r
-        }\r
-      },\r
-      "story_sheet": {\r
-        "tree_name": "owner",\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_story": {\r
-            "type": "filter"\r
-          },\r
-          "by_sheet": {\r
-            "type": "filter"\r
-          },\r
-          "by_author": {\r
-            "type": "foreign_filter",\r
-            "args": {\r
-              "tree_name": "comic_owner"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "sheet": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_story": {\r
-            "type": "through_filter",\r
-            "args": {\r
-              "through": "story_sheets"\r
-            }\r
-          },\r
-          "by_panel": {\r
-            "type": "through_filter",\r
-            "args": {\r
-              "through": "sheet_panels"\r
-            }\r
-          },\r
-          "by_author": {\r
-            "type": "filter"\r
-          },\r
-          "play": {\r
-            "type": "play"\r
-          }\r
-        }\r
-      },\r
-      "sheet_panel": {\r
-        "tree_name": "owner",\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_sheet": {\r
-            "type": "filter"\r
-          },\r
-          "by_panel": {\r
-            "type": "filter"\r
-          },\r
-          "by_author": {\r
-            "type": "foreign_filter",\r
-            "args": {\r
-              "tree_name": "sheet_owner"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "panel": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_scroll": {\r
-            "type": "through_filter",\r
-            "args": {\r
-              "through": "scroll_panels"\r
-            }\r
-          },\r
-          "by_sheet": {\r
-            "type": "through_filter",\r
-            "args": {\r
-              "through": "sheet_panels"\r
-            }\r
-          },\r
-          "by_author": {\r
-            "type": "filter"\r
-          },\r
-          "by_speech_balloon_template": {\r
-            "type": "through_filter"\r
-          }\r
-        }\r
-      },\r
-      "panel_picture": {\r
-        "tree_name": "owner",\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_panel": {\r
-            "type": "filter"\r
-          },\r
-          "by_author": {\r
-            "type": "foreign_filter",\r
-            "args": {\r
-              "tree_name": "panel_owner"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "speech_balloon": {\r
-        "tree_name": "owner",\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_panel": {\r
-            "type": "filter"\r
-          },\r
-          "by_speech_balloon_template": {\r
-            "type": "filter"\r
-          },\r
-          "by_author": {\r
-            "type": "foreign_filter",\r
-            "args": {\r
-              "tree_name": "panel_owner"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "speech": {\r
-        "tree_name": "owner",\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_panel": {\r
-            "type": "filter"\r
-          },\r
-          "by_speech_balloon": {\r
-            "type": "filter"\r
-          },\r
-          "by_author": {\r
-            "type": "foreign_filter",\r
-            "args": {\r
-              "tree_name": "panel_owner"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "balloon": {\r
-        "tree_name": "owner",\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "by_speech_balloon": {\r
-            "type": "filter"\r
-          },\r
-          "by_writing_format": {\r
-            "type": "filter"\r
-          },\r
-          "by_author": {\r
-            "type": "foreign_filter",\r
-            "args": {\r
-              "tree_name": "panel_owner"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "ground_picture": {\r
-        "tree_name": "owner",\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_panel": {\r
-            "type": "filter"\r
-          },\r
-          "by_author": {\r
-            "type": "foreign_filter",\r
-            "args": {\r
-              "tree_name": "panel_owner"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "ground_color": {\r
-        "tree_name": "owner",\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_panel": {\r
-            "type": "filter"\r
-          },\r
-          "by_author": {\r
-            "type": "foreign_filter",\r
-            "args": {\r
-              "tree_name": "panel_owner"\r
-            }\r
-          }\r
-        }\r
-      },\r
-      "original_picture": {\r
-        "lists": {\r
-          "private": {\r
-            "type": "private"\r
-          }\r
-        }\r
-      },\r
-      "picture": {},\r
-      "resource_picture": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "private": {\r
-            "type": "private"\r
-          },\r
-          "by_original_picture": {\r
-            "type": "filter"\r
-          },\r
-          "by_license": {\r
-            "type": "filter"\r
-          },\r
-          "by_artist": {\r
-            "type": "filter"\r
-          }\r
-        }\r
-      },\r
-      "speech_balloon_template": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "select_items": {\r
-            "type": "system_resource"\r
-          }\r
-        }\r
-      },\r
-      "writing_format": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "select_items": {\r
-            "type": "system_resource"\r
-          },\r
-          "by_system_picture": {\r
-            "type": "filter"\r
-          }\r
-        }\r
-      },\r
-      "license_group": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "select_items": {\r
-            "type": "system_resource"\r
-          }\r
-        }\r
-      },\r
-      "license": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          },\r
-          "by_license_group": {\r
-            "type": "filter"\r
-          },\r
-          "by_system_picture": {\r
-            "type": "filter"\r
-          }\r
-        }\r
-      },\r
-      "author": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          }\r
-        }\r
-      },\r
-      "artist": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          }\r
-        }\r
-      },\r
-      "system_picture": {\r
-        "lists": {\r
-          "public": {\r
-            "type": "public"\r
-          }\r
-        }\r
-      }\r
-    },\r
-    "forms": {\r
-      "base": {\r
-        "scroll": {\r
-          "fields": {\r
-            "title": {\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "description": {\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "text_area"\r
-                }\r
-              }\r
-            },\r
-            "visible": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "select"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "author_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "title",\r
-            "description",\r
-            "visible",\r
-            "id",\r
-            "author_id"\r
-          ]\r
-        },\r
-        "scroll_panel": {\r
-          "fields": {\r
-            "scroll_id": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "panel_id": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "t": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "scroll_id",\r
-            "panel_id",\r
-            "t",\r
-            "id"\r
-          ]\r
-        },\r
-        "comic": {\r
-          "fields": {\r
-            "title": {\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "description": {\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "text_area"\r
-                }\r
-              }\r
-            },\r
-            "visible": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "select"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "author_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "title",\r
-            "description",\r
-            "visible",\r
-            "id",\r
-            "author_id"\r
-          ]\r
-        },\r
-        "story": {\r
-          "fields": {\r
-            "comic_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "title": {\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "description": {\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "text_area"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "visible": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "select"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "t": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "author_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "comic_id",\r
-            "title",\r
-            "description",\r
-            "visible",\r
-            "t",\r
-            "id",\r
-            "author_id"\r
-          ]\r
-        },\r
-        "story_sheet": {\r
-          "fields": {\r
-            "story_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "sheet_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "t": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "story_id",\r
-            "sheet_id",\r
-            "t",\r
-            "id"\r
-          ]\r
-        },\r
-        "sheet": {\r
-          "fields": {\r
-            "caption": {\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "width": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "height": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "visible": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "select"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "author_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "caption",\r
-            "width",\r
-            "height",\r
-            "visible",\r
-            "id",\r
-            "author_id"\r
-          ]\r
-        },\r
-        "sheet_panel": {\r
-          "fields": {\r
-            "sheet_id": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "panel_id": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "x": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "y": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "z": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "t": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "sheet_id",\r
-            "panel_id",\r
-            "x",\r
-            "y",\r
-            "z",\r
-            "t",\r
-            "id"\r
-          ]\r
-        },\r
-        "panel": {\r
-          "fields": {\r
-            "caption": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "width": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "height": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "border": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "publish": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "select"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "author_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "caption",\r
-            "width",\r
-            "height",\r
-            "border",\r
-            "publish",\r
-            "id",\r
-            "author_id"\r
-          ]\r
-        },\r
-        "panel_picture": {\r
-          "fields": {\r
-            "caption": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "x": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "y": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "width": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "helpers": {\r
-                  "size": {\r
-                    "type": "size",\r
-                    "args": {\r
-                      "dom_class": "panel_picture_width_tool"\r
-                    }\r
-                  }\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "height": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "helpers": {\r
-                  "size": {\r
-                    "type": "size",\r
-                    "args": {\r
-                      "dom_class": "panel_picture_height_tool"\r
-                    }\r
-                  }\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "link": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "panel_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "picture_id": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "hidden"\r
-                },\r
-                "helpers": {\r
-                  "popup": {\r
-                    "type": "popup",\r
-                    "args": {\r
-                      "source": "pictures"\r
-                    }\r
-                  }\r
-                }\r
-              }\r
-            },\r
-            "z": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "t": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "caption",\r
-            "x",\r
-            "y",\r
-            "width",\r
-            "height",\r
-            "link",\r
-            "id",\r
-            "panel_id",\r
-            "picture_id",\r
-            "z",\r
-            "t"\r
-          ]\r
-        },\r
-        "speech_balloon": {\r
-          "fields": {\r
-            "speech_balloon.id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech_balloon.panel_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech_balloon.speech_balloon_template_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech_balloon.caption": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "speech_balloon.z": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech_balloon.t": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech_balloon.classname": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech_balloon.settings": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "balloon.id": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "balloon.speech_balloon_id": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "balloon.system_picture_id": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "balloon.r": {\r
-              "type": "part",\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "helpers": {\r
-                  "tail_angle": {\r
-                    "type": "size",\r
-                    "args": {}\r
-                  }\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "balloon.x": {\r
-              "type": "part",\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "balloon.y": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {},\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "balloon.width": {\r
-              "type": "part",\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "balloon.height": {\r
-              "type": "part",\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "balloon.settings": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech.id": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech.speech_balloon_id": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech.x": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech.y": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech.width": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech.height": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "speech.writing_format_id": {\r
-              "type": "part",\r
-              "args": {\r
-                "tag": {\r
-                  "type": "select"\r
-                }\r
-              }\r
-            },\r
-            "speech.font_size": {\r
-              "type": "part",\r
-              "args": {\r
-                "tag": {\r
-                  "type": "select"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "speech.text_align": {\r
-              "type": "part",\r
-              "args": {\r
-                "tag": {\r
-                  "type": "select"\r
-                }\r
-              }\r
-            },\r
-            "speech.quotes": {\r
-              "type": "part",\r
-              "args": {\r
-                "tag": {\r
-                  "type": "text"\r
-                }\r
-              }\r
-            },\r
-            "speech.content": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "text_area",\r
-                  "args": {\r
-                    "options": {\r
-                      "size": "45x5"\r
-                    }\r
-                  }\r
-                }\r
-              }\r
-            },\r
-            "speech.fore_color": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "row_break": true\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                },\r
-                "helpers": {\r
-                  "color": {\r
-                    "type": "color",\r
-                    "args": {\r
-                      "wrapper": "speech-fore_color-wrap"\r
-                    }\r
-                  }\r
-                }\r
-              }\r
-            },\r
-            "speech.settings": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          }\r
-        },\r
-        "ground_picture": {\r
-          "fields": {\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "panel_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "picture_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "caption": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "repeat": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "select",\r
-                  "args": {\r
-                    "source": "magic_number",\r
-                    "key": "ground_picture_repeat_items"\r
-                  }\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "x": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "y": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "z": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "t": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "caption",\r
-            "repeat",\r
-            "x",\r
-            "y",\r
-            "z",\r
-            "t",\r
-            "id",\r
-            "panel_id",\r
-            "picture_id"\r
-          ]\r
-        },\r
-        "ground_color": {\r
-          "fields": {\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "panel_id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "caption": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "code": {\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                },\r
-                "helpers": {\r
-                  "color": {\r
-                    "type": "color",\r
-                    "args": {\r
-                      "wrapper": "ground_color-code-wrap"\r
-                    }\r
-                  }\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "orientation": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "select"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "xy": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                }\r
-              }\r
-            },\r
-            "wh": {\r
-              "args": {\r
-                "tag": {\r
-                  "type": "number"\r
-                },\r
-                "row_break": true\r
-              }\r
-            },\r
-            "z": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "t": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "id",\r
-            "panel_id",\r
-            "caption",\r
-            "code",\r
-            "orientation",\r
-            "xy",\r
-            "wh",\r
-            "z",\r
-            "t"\r
-          ]\r
-        },\r
-        "author": {\r
-          "fields": {\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "name": {\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "id",\r
-            "name"\r
-          ]\r
-        },\r
-        "artist": {\r
-          "fields": {\r
-            "id": {\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            },\r
-            "name": {\r
-              "args": {\r
-                "label": {\r
-                  "args": {\r
-                    "row_break": true\r
-                  }\r
-                },\r
-                "tag": {\r
-                  "type": "text"\r
-                },\r
-                "row_break": true\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "id",\r
-            "name"\r
-          ]\r
-        }\r
-      },\r
-      "extend": {\r
-        "CircleSpeechBalloon": {\r
-          "base": "speech_balloon",\r
-          "fields": {},\r
-          "field_names": [\r
-            "speech_balloon.caption",\r
-            "balloon.r",\r
-            "balloon.x",\r
-            "balloon.y",\r
-            "balloon.width",\r
-            "balloon.height",\r
-            "balloon.id",\r
-            "balloon.speech_balloon_id",\r
-            "balloon.system_picture_id",\r
-            "balloon.settings",\r
-            "speech.writing_format_id",\r
-            "speech.font_size",\r
-            "speech.text_align",\r
-            "speech.quotes",\r
-            "speech.content",\r
-            "speech.fore_color",\r
-            "speech.id",\r
-            "speech.speech_balloon_id",\r
-            "speech.x",\r
-            "speech.y",\r
-            "speech.width",\r
-            "speech.height",\r
-            "speech.settings",\r
-            "speech_balloon.id",\r
-            "speech_balloon.panel_id",\r
-            "speech_balloon.speech_balloon_template_id",\r
-            "speech_balloon.classname",\r
-            "speech_balloon.z",\r
-            "speech_balloon.t",\r
-            "speech_balloon.settings"\r
-          ]\r
-        },\r
-        "PlainSpeechBalloon": {\r
-          "base": "speech_balloon",\r
-          "fields": {\r
-            "balloon.r": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "speech_balloon.caption",\r
-            "balloon.r",\r
-            "balloon.x",\r
-            "balloon.y",\r
-            "balloon.width",\r
-            "balloon.height",\r
-            "balloon.id",\r
-            "balloon.speech_balloon_id",\r
-            "balloon.system_picture_id",\r
-            "balloon.settings",\r
-            "speech.writing_format_id",\r
-            "speech.font_size",\r
-            "speech.text_align",\r
-            "speech.quotes",\r
-            "speech.content",\r
-            "speech.fore_color",\r
-            "speech.id",\r
-            "speech.speech_balloon_id",\r
-            "speech.x",\r
-            "speech.y",\r
-            "speech.width",\r
-            "speech.height",\r
-            "speech.settings",\r
-            "speech_balloon.id",\r
-            "speech_balloon.panel_id",\r
-            "speech_balloon.speech_balloon_template_id",\r
-            "speech_balloon.classname",\r
-            "speech_balloon.z",\r
-            "speech_balloon.t",\r
-            "speech_balloon.settings"\r
-          ]\r
-        },\r
-        "SquareSpeechBalloon": {\r
-          "base": "speech_balloon",\r
-          "fields": {\r
-            "balloon.r": {\r
-              "type": "part",\r
-              "args": {\r
-                "label": {\r
-                  "type": "none"\r
-                },\r
-                "tag": {\r
-                  "type": "hidden"\r
-                }\r
-              }\r
-            }\r
-          },\r
-          "field_names": [\r
-            "speech_balloon.caption",\r
-            "balloon.r",\r
-            "balloon.x",\r
-            "balloon.y",\r
-            "balloon.width",\r
-            "balloon.height",\r
-            "balloon.id",\r
-            "balloon.speech_balloon_id",\r
-            "balloon.system_picture_id",\r
-            "balloon.settings",\r
-            "speech.writing_format_id",\r
-            "speech.font_size",\r
-            "speech.text_align",\r
-            "speech.quotes",\r
-            "speech.content",\r
-            "speech.fore_color",\r
-            "speech.id",\r
-            "speech.speech_balloon_id",\r
-            "speech.x",\r
-            "speech.y",\r
-            "speech.width",\r
-            "speech.height",\r
-            "speech.settings",\r
-            "speech_balloon.id",\r
-            "speech_balloon.panel_id",\r
-            "speech_balloon.speech_balloon_template_id",\r
-            "speech_balloon.classname",\r
-            "speech_balloon.z",\r
-            "speech_balloon.t",\r
-            "speech_balloon.settings"\r
-          ]\r
-        }\r
-      }\r
-    }\r
   }\r
 }
\ No newline at end of file