Deprecated WebGUI::Storage::Image. WebGUI::Storage can now do everything
WebGUI::Storage::Image can do.
This commit is contained in:
parent
2b3e88fd63
commit
ee84cc7611
34 changed files with 399 additions and 470 deletions
|
|
@ -17,7 +17,7 @@ package WebGUI::AdSpace::Ad;
|
|||
use strict;
|
||||
use WebGUI::AdSpace;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Storage::Image;
|
||||
use WebGUI::Storage;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ Deletes this ad.
|
|||
|
||||
sub delete {
|
||||
my $self = shift;
|
||||
my $storage = WebGUI::Storage::Image->get($self->session, $self->get("storageId"));
|
||||
my $storage = WebGUI::Storage->get($self->session, $self->get("storageId"));
|
||||
$storage->delete if defined $storage;
|
||||
$self->session->db->deleteRow("advertisement","adId",$self->getId);
|
||||
$self = undef;
|
||||
|
|
@ -264,7 +264,7 @@ sub set {
|
|||
if ($self->get("type") eq "text") {
|
||||
$self->{_properties}{renderedAd} = '<div style="position:relative; width:'.($adSpace->get("width")-2).'px; height:'.($adSpace->get("height")-2).'px; margin:0px; overflow:hidden; border:solid '.$self->get("borderColor").' 1px;"><a href="'.$self->session->url->gateway(undef, "op=clickAd;id=".$self->getId).'" style="position:absolute; padding: 3px; top:0px; left:0px; width:100%; height:100%; z-index:10; display:block; text-decoration:none; vertical-align:top; background-color:'.$self->get("backgroundColor").'; font-size: 13px; font-weight: normal;"><b><span style="color:'.$self->get("textColor").';">'.$self->get("title").'</span></b><br /><span style="color:'.$self->get("textColor").';">'.$self->get("adText").'</span></a></div>';
|
||||
} elsif ($self->get("type") eq "image") {
|
||||
my $storage = WebGUI::Storage::Image->get($self->session, $self->get("storageId"));
|
||||
my $storage = WebGUI::Storage->get($self->session, $self->get("storageId"));
|
||||
$self->{_properties}{renderedAd} = '<div style="position:relative; width:'.$adSpace->get("width").'px; height:'.$adSpace->get("height").'px; margin:0px; overflow:hidden; border:0px;"><a href="'.$self->session->url->gateway(undef, "op=clickAd;id=".$self->getId).'" style="position:absolute; padding: 3px; top:0px; left:0px; width:100%; height:100%; z-index:10; display:block; text-decoration:none; vertical-align:top;"><img src="'.$storage->getUrl($storage->getFiles->[0]).'" alt="'.$self->get("title").'" style="z-index:0;position:relative;border-style:none;border: 0px;" /></a></div>';
|
||||
} elsif ($self->get("type") eq "rich") {
|
||||
my $ad = $self->get("richMedia");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue