'speech.speech_balloon_template_module_name',\r
'speech.speech_balloon_template_settings',\r
'speech.writing_format_module_name',\r
- 'speech.writing_format_settings',\r
]\r
},\r
speech: {\r
speech_balloon_template_settings: {\r
row_break: true,\r
},\r
- writing_format_settings: {\r
- label: {\r
- type: 'none',\r
- },\r
- tag: {\r
- type: 'hidden',\r
- },\r
- },\r
},\r
field_names: [\r
'writing_format_id',\r
'speech_balloon_template_module_name',\r
'speech_balloon_template_settings',\r
'writing_format_module_name',\r
- 'writing_format_settings',\r
],\r
},\r
ground_picture: {\r
field_names: [\r
]\r
},\r
+ plain_speech_balloon_speech_balloon: {\r
+ fields: {\r
+ },\r
+ field_names: [\r
+ ]\r
+ },\r
+ plain_speech_balloon_balloon: {\r
+ fields: {\r
+ },\r
+ field_names: [\r
+ ]\r
+ },\r
+ plain_speech_balloon_speech: {\r
+ fields: {\r
+ },\r
+ field_names: [\r
+ ]\r
+ },\r
+ square_speech_balloon_speech_balloon: {\r
+ fields: {\r
+ },\r
+ field_names: [\r
+ ]\r
+ },\r
+ square_speech_balloon_balloon: {\r
+ fields: {\r
+ },\r
+ field_names: [\r
+ ]\r
+ },\r
+ square_speech_balloon_speech: {\r
+ fields: {\r
+ },\r
+ field_names: [\r
+ ]\r
+ },\r
test_speech_balloon_speech_balloon: {\r
fields: {\r
a: {\r
################################################################\r
circle_speech_balloon_speech_balloon: {\r
attributes: {\r
- width: {\r
+ },\r
+ },\r
+ circle_speech_balloon_balloon: {\r
+ attributes: {\r
+ },\r
+ },\r
+ circle_speech_balloon_speech: {\r
+ attributes: {\r
+ },\r
+ },\r
+ plain_speech_balloon_speech_balloon: {\r
+ attributes: {\r
+ },\r
+ },\r
+ plain_speech_balloon_balloon: {\r
+ attributes: {\r
+ },\r
+ },\r
+ plain_speech_balloon_speech: {\r
+ attributes: {\r
+ },\r
+ },\r
+ square_speech_balloon_speech_balloon: {\r
+ attributes: {\r
+ },\r
+ },\r
+ square_speech_balloon_balloon: {\r
+ attributes: {\r
+ },\r
+ },\r
+ square_speech_balloon_speech: {\r
+ attributes: {\r
+ },\r
+ },\r
+ test_speech_balloon_speech_balloon: {\r
+ attributes: {\r
+ a: {\r
type: 'number',\r
rules : {\r
required: true,\r
},\r
},\r
},\r
- circle_speech_balloon_speech_balloon: {\r
+ test_speech_balloon_balloon: {\r
attributes: {\r
- width: {\r
+ b: {\r
type: 'number',\r
rules : {\r
required: true,\r
},\r
},\r
},\r
- circle_speech_balloon_speech_balloon: {\r
+ test_speech_balloon_speech: {\r
attributes: {\r
- width: {\r
+ c: {\r
type: 'number',\r
rules : {\r
required: true,\r
'height', \r
'quotes', \r
'speech_balloon_template_settings', \r
- 'writing_format_settings', \r
],\r
associations: {\r
belongs_to: [\r
# validates :caption, :presence => true
validates :speech_balloon_template_settings, :boost => {:boost_name => :speech_balloon_template}
- def _y
+ def attr_y
self.attributes['y']
end
def style
{
'width' => self.width.to_s + 'px','height' => self.height.to_s + 'px',
- 'top' => self._y.to_s + 'px','left' => self.x.to_s + 'px'
+ 'top' => self.attr_y.to_s + 'px','left' => self.x.to_s + 'px'
}
end
@@repeat_texts = ['repeat', 'repeat-x', 'repeat-y', 'no-repeat']
- def _y
+ def attr_y
self.attributes['y']
end
'position' => 'absolute', 'top' => '0px', 'left' => '0px', 'z-index' => self.z,
'background-image' => "url(#{self.picture.url})",
'background-repeat' => self.repeat_text,
- 'background-position' => "#{self.x}px #{self._y}px"
+ 'background-position' => "#{self.x}px #{self.attr_y}px"
}
self.merge_opacity(r, opacity) if spot and spot != self
r
-class OriginalPictureLicenseGroup < ActiveRecord::Base
+class OriginalPictureLicenseGroup < Peta::Item
belongs_to :original_picture
belongs_to :license_group
validates :z, :presence => true, :numericality => {:greater_than => 0}
validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0}
- def _y
+ def attr_y
self.attributes['y']
end
end
def opt_div_style
- "top:#{self._y}px; left:#{self.x}px; z-index:#{self.z}; position: absolute;"
+ "top:#{self.attr_y}px; left:#{self.x}px; z-index:#{self.z}; position: absolute;"
end
def opt_img_tag spot = nil, opacity = 20
validates :z, :presence => true, :numericality => {:greater_than => 0}
validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0}
+ def attr_y
+ self.attributes['y']
+ end
+
def supply_default
self.x = 15
self.y = 15
@@text_align_texts = ['left', 'left', 'right', 'center']
+ def attr_y
+ self.attributes['y']
+ end
+
def supply_default
self.x = 0
self.y = 0
def outer_style
{
- 'top' => self._y, 'left' => self.x,
+ 'top' => self.attr_y, 'left' => self.x,
'width' => self.width, 'height' => self.height
}
end
<% end %>\r
- <%= h(manifest.magic_numbers['profile']['users']['caption']) %>\r
</title>\r
- <%= stylesheet_link_tag "application" %>\r
+ <%= stylesheet_link_tag "test" %>\r
<%= javascript_include_tag "application" %>\r
- <%= raw panel_editor_javascript_include_tags %>\r
<%= csrf_meta_tags %>\r
</head>\r
<body>\r
-<div class="sheet_panel" style="top:<%= elm._y %>px; left:<%= elm.x %>px; z-index:<%= elm.z %>;">
+<div class="sheet_panel" style="top:<%= elm.attr_y %>px; left:<%= elm.x %>px; z-index:<%= elm.z %>;">
<% if elm.panel -%>
<%# blocked in panels/body panel = Panel.show elm.panel, author -%>
<%= render 'panels/body', :panel => elm.panel, :operators => operators, :spot => nil %>
end
def init_fields
- @manifest.each_field do |field_name, field_manifest|
+ @manifest.each_field do |field_name, field_manifest|
boost_name = @item.class.find_boost_name(field_name)
extend_model = if boost_name
@item.boosters[boost_name].extend_model
"width",\r
"height",\r
"quotes",\r
- "speech_balloon_template_settings",\r
- "writing_format_settings"\r
+ "speech_balloon_template_settings"\r
],\r
"associations": {\r
"belongs_to": [\r
},\r
"speech_balloon_template_settings": {\r
"row_break": true\r
- },\r
- "writing_format_settings": {\r
- "label": {\r
- "type": "none"\r
- },\r
- "tag": {\r
- "type": "hidden"\r
- }\r
}\r
},\r
"field_names": [\r
"speech_balloon_template_id",\r
"speech_balloon_template_module_name",\r
"speech_balloon_template_settings",\r
- "writing_format_module_name",\r
- "writing_format_settings"\r
+ "writing_format_module_name"\r
]\r
},\r
"ground_picture": {\r
"fields": {},\r
"field_names": []\r
},\r
+ "plain_speech_balloon_speech_balloon": {\r
+ "fields": {},\r
+ "field_names": []\r
+ },\r
+ "plain_speech_balloon_balloon": {\r
+ "fields": {},\r
+ "field_names": []\r
+ },\r
+ "plain_speech_balloon_speech": {\r
+ "fields": {},\r
+ "field_names": []\r
+ },\r
+ "square_speech_balloon_speech_balloon": {\r
+ "fields": {},\r
+ "field_names": []\r
+ },\r
+ "square_speech_balloon_balloon": {\r
+ "fields": {},\r
+ "field_names": []\r
+ },\r
+ "square_speech_balloon_speech": {\r
+ "fields": {},\r
+ "field_names": []\r
+ },\r
"test_speech_balloon_speech_balloon": {\r
"fields": {\r
"a": {\r
"speech.speech_balloon_template_id",\r
"speech.speech_balloon_template_module_name",\r
"speech.speech_balloon_template_settings",\r
- "speech.writing_format_module_name",\r
- "speech.writing_format_settings"\r
+ "speech.writing_format_module_name"\r
]\r
},\r
"speech": {},\r
}\r
}\r
},\r
+ "original_picture_license_group": {\r
+ "args": {\r
+ "boost": {\r
+ "license_group": {\r
+ "extend_model_class_name": "Attribute",\r
+ "item_name_for_extend_model": "attribute"\r
+ },\r
+ "credit_picture": {\r
+ "template_name": "license_group",\r
+ "extend_model_class_name": "CreditPicture",\r
+ "item_name_for_extend_model": "credit_picture"\r
+ }\r
+ }\r
+ }\r
+ },\r
"speech_balloon_template": {\r
"type": "template"\r
},\r
}\r
}\r
},\r
+ "original_picture_license_group": {\r
+ "attributes": {}\r
+ },\r
"speech_balloon_template": {\r
"associations": {\r
"belongs_to": {\r
}\r
},\r
"circle_speech_balloon_speech_balloon": {\r
+ "attributes": {}\r
+ },\r
+ "circle_speech_balloon_balloon": {\r
+ "attributes": {}\r
+ },\r
+ "circle_speech_balloon_speech": {\r
+ "attributes": {}\r
+ },\r
+ "plain_speech_balloon_speech_balloon": {\r
+ "attributes": {}\r
+ },\r
+ "plain_speech_balloon_balloon": {\r
+ "attributes": {}\r
+ },\r
+ "plain_speech_balloon_speech": {\r
+ "attributes": {}\r
+ },\r
+ "square_speech_balloon_speech_balloon": {\r
+ "attributes": {}\r
+ },\r
+ "square_speech_balloon_balloon": {\r
+ "attributes": {}\r
+ },\r
+ "square_speech_balloon_speech": {\r
+ "attributes": {}\r
+ },\r
+ "test_speech_balloon_speech_balloon": {\r
"attributes": {\r
- "width": {\r
+ "a": {\r
+ "type": "number",\r
+ "rules": {\r
+ "required": true,\r
+ "number": true\r
+ }\r
+ }\r
+ }\r
+ },\r
+ "test_speech_balloon_balloon": {\r
+ "attributes": {\r
+ "b": {\r
+ "type": "number",\r
+ "rules": {\r
+ "required": true,\r
+ "number": true\r
+ }\r
+ }\r
+ }\r
+ },\r
+ "test_speech_balloon_speech": {\r
+ "attributes": {\r
+ "c": {\r
"type": "number",\r
"rules": {\r
"required": true,\r