Skip to content
Permalink
Browse files

Fix rendering of the carousel inside of a Story. Fixes bug #12386

  • Loading branch information...
perlDreamer committed Sep 20, 2012
1 parent 50c7634 commit e046e5a8ce70d53355ebccc6aaee085c5f8a2cbb
@@ -10,6 +10,7 @@
- fixed: UpdateAssetSubscribers workflow activity ERRORs if the group cannot be found.
- fixed: EMS has issues showing badges WITHOUT related badge groups.
- fixed: It's okay to paste assets which are archived, because if you don't they stay in the clipboard forever.
- fixed #12386: Story Manager - Carousel rendering broken in Story

7.10.26
- fixed: Template diagnostics when called without a session asset.
Binary file not shown.
@@ -32,6 +32,7 @@ BEGIN

# upgrade functions go here
fixMetaDataRevisionDates($session);
addPhotoHeightToStoryArchive($session);

finish($session); # this line required

@@ -91,6 +92,22 @@ sub fixMetaDataRevisionDates {
}


#----------------------------------------------------------------------------
# Describe what our function does
sub addPhotoHeightToStoryArchive {
my $session = shift;
print "\tAdd Photo Height to the Story Manager... " unless $quiet;
# and here's our code
$session->db->write(<<EOSQL);
ALTER TABLE StoryArchive add column photoHeight INT(11);
EOSQL
$session->db->write(<<EOSQL);
UPDATE StoryArchive set photoHeight=300
EOSQL
print "DONE!\n" unless $quiet;
}


#----------------------------------------------------------------------------
# Describe what our function does
#sub exampleFunction {
@@ -966,10 +966,11 @@ sub viewTemplateVariables {
};
++$photoCounter;
}
$var->{hasPhotos} = $photoCounter;
$var->{singlePhoto} = $photoCounter == 1;
$var->{canEdit} = $self->canEdit;
$var->{photoWidth} = $archive->get('photoWidth');
$var->{hasPhotos} = $photoCounter;
$var->{singlePhoto} = $photoCounter == 1;
$var->{canEdit} = $self->canEdit;
$var->{photoWidth} = $archive->get('photoWidth');
$var->{photoHeight} = $archive->get('photoHeight');
return $var;
}

@@ -126,6 +126,13 @@ sub definition {
hoverHelp => $i18n->get('photo width help'),
defaultValue => '300',
},
photoHeight => {
tab => 'display',
fieldType => 'integer',
label => $i18n->get('photo height'),
hoverHelp => $i18n->get('photo height help'),
defaultValue => '300',
},
editStoryTemplateId => {
tab => 'display',
fieldType => 'template',
@@ -87,6 +87,7 @@ our $HELP = {
],
},
{ name => 'photoWidth', },
{ name => 'photoHeight', },
{ name => 'hasPhotos', },
{ name => 'singlePhoto', },
{ name => 'photo_loop',
@@ -437,6 +437,12 @@ our $I18N = {
lastUpdated => 0,
},

'photoWidth' => {
message => q|The height of slides, set in the Story Archive for this Story.|,
context => q|Template variable|,
lastUpdated => 0,
},

'hasPhoto' => {
message => q|This template variable will be true if the a photo in the photo_loop has an image in it.|,
context => q|Template variable|,
@@ -321,6 +321,12 @@ our $I18N = {
lastUpdated => 0,
},

'photoHeight' => {
message => q|The height used to display photos.|,
context => q|Template variable.|,
lastUpdated => 0,
},

'photo width' => {
message => q|Photo width|,
context => q|Label in the edit screen|,
@@ -333,6 +339,18 @@ our $I18N = {
lastUpdated => 0,
},

'photo height' => {
message => q|Photo Height|,
context => q|Label in the edit screen|,
lastUpdated => 0,
},

'photo height help' => {
message => q|Slides in the photo carousel have to have a fixed height to render in some browsers. To disable this feature, set it to 0.|,
context => q|hoverhelp for photoHeight in the edit screen|,
lastUpdated => 0,
},

'sortAlphabeticallyChronologically' => {
message => q|Sort Order|,
context => q|Label in the edit screen|,

0 comments on commit e046e5a

Please sign in to comment.
You can’t perform that action at this time.