def opt_div_style full_url, spot = nil, opacity = 20
o = (spot and spot != self) ? "opacity: #{opacity.to_f/100}; filter:alpha(opacity=#{opacity});" : ''
- "position: absolute; width:#{self.panel.width}px; height:#{self.panel.height}px; top: 0px; left: 0px; z-index:#{self.z}; background-image: url(#{full_url}); background-repeat: #{self.repeat_text}; background-position: #{self.x}px #{self.y}px; #{o}"
+ "position: absolute; width:#{self.get_panel.width}px; height:#{self.get_panel.height}px; top: 0px; left: 0px; z-index:#{self.z}; background-image: url(#{full_url}); background-repeat: #{self.repeat_text}; background-position: #{self.x}px #{self.y}px; #{o}"
end
def tmb_opt_img_tag
{:src => self.picture.url, :width => tw, :height => th, :alt => self.caption}
end
+ def new_panel
+ @new_panel
+ end
+
+ def new_panel= v
+ @new_panel = v
+ end
+
+ def get_panel
+ self.panel || @new_panel
+ end
+
def tag_id c = nil
'panel' + tag_panel_id + 'ground_picture' + tag_element_id + c.to_s
end
end
def tag_panel_id
- self.panel.new_record? ? '0' : self.panel.id.to_s
+ self.get_panel.new_record? ? '0' : self.get_panel.id.to_s
end
def tag_element_id