self.tag_id + f.to_s
end
- def field_tree f
- 'panels-' + tag_panel_id + '-' + f.to_s
- end
-
def self.default_page_size
25
end
self.overwrite au
res = false
Panel.transaction do
+ self.panel_elements.each do |elm|
+ elm.new_panel = self
+ end
#self.publish = nil
res = self.save
unless validate_child
def copy
attr = self.copy_attributes
- attr.merge! PanelPicture.panelize(self.panel_pictures.map {|elm| elm.copy_attributes})
- attr.merge! SpeechBalloon.panelize(self.speech_balloons.map {|elm| elm.copy_attributes})
- attr.merge! GroundPicture.panelize(self.ground_pictures.map {|elm| elm.copy_attributes})
- attr.merge! GroundColor.panelize(self.ground_colors.map {|elm| elm.copy_attributes})
- p attr
+ Panel.each_element_class_names do |n|
+ attr.merge! Panel.class_name_to_class(n).panelize(self.elements_by_class_name(n).map {|elm| elm.copy_attributes})
+ end
attr
end