Skip to content

Commit e046e5a

Browse files
committedSep 20, 2012
Fix rendering of the carousel inside of a Story. Fixes bug #12386
1 parent 50c7634 commit e046e5a

File tree

8 files changed

+55
-4
lines changed

8 files changed

+55
-4
lines changed
 

‎docs/changelog/7.x.x.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- fixed: UpdateAssetSubscribers workflow activity ERRORs if the group cannot be found.
1111
- fixed: EMS has issues showing badges WITHOUT related badge groups.
1212
- fixed: It's okay to paste assets which are archived, because if you don't they stay in the clipboard forever.
13+
- fixed #12386: Story Manager - Carousel rendering broken in Story
1314

1415
7.10.26
1516
- fixed: Template diagnostics when called without a session asset.
Binary file not shown.

‎docs/upgrades/upgrade_7.10.26-7.10.27.pl

+17
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ BEGIN
3232

3333
# upgrade functions go here
3434
fixMetaDataRevisionDates($session);
35+
addPhotoHeightToStoryArchive($session);
3536

3637
finish($session); # this line required
3738

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

9394

95+
#----------------------------------------------------------------------------
96+
# Describe what our function does
97+
sub addPhotoHeightToStoryArchive {
98+
my $session = shift;
99+
print "\tAdd Photo Height to the Story Manager... " unless $quiet;
100+
# and here's our code
101+
$session->db->write(<<EOSQL);
102+
ALTER TABLE StoryArchive add column photoHeight INT(11);
103+
EOSQL
104+
$session->db->write(<<EOSQL);
105+
UPDATE StoryArchive set photoHeight=300
106+
EOSQL
107+
print "DONE!\n" unless $quiet;
108+
}
109+
110+
94111
#----------------------------------------------------------------------------
95112
# Describe what our function does
96113
#sub exampleFunction {

‎lib/WebGUI/Asset/Story.pm

+5-4
Original file line numberDiff line numberDiff line change
@@ -966,10 +966,11 @@ sub viewTemplateVariables {
966966
};
967967
++$photoCounter;
968968
}
969-
$var->{hasPhotos} = $photoCounter;
970-
$var->{singlePhoto} = $photoCounter == 1;
971-
$var->{canEdit} = $self->canEdit;
972-
$var->{photoWidth} = $archive->get('photoWidth');
969+
$var->{hasPhotos} = $photoCounter;
970+
$var->{singlePhoto} = $photoCounter == 1;
971+
$var->{canEdit} = $self->canEdit;
972+
$var->{photoWidth} = $archive->get('photoWidth');
973+
$var->{photoHeight} = $archive->get('photoHeight');
973974
return $var;
974975
}
975976

‎lib/WebGUI/Asset/Wobject/StoryArchive.pm

+7
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ sub definition {
126126
hoverHelp => $i18n->get('photo width help'),
127127
defaultValue => '300',
128128
},
129+
photoHeight => {
130+
tab => 'display',
131+
fieldType => 'integer',
132+
label => $i18n->get('photo height'),
133+
hoverHelp => $i18n->get('photo height help'),
134+
defaultValue => '300',
135+
},
129136
editStoryTemplateId => {
130137
tab => 'display',
131138
fieldType => 'template',

‎lib/WebGUI/Help/Asset_Story.pm

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ our $HELP = {
8787
],
8888
},
8989
{ name => 'photoWidth', },
90+
{ name => 'photoHeight', },
9091
{ name => 'hasPhotos', },
9192
{ name => 'singlePhoto', },
9293
{ name => 'photo_loop',

‎lib/WebGUI/i18n/English/Asset_Story.pm

+6
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,12 @@ our $I18N = {
437437
lastUpdated => 0,
438438
},
439439

440+
'photoWidth' => {
441+
message => q|The height of slides, set in the Story Archive for this Story.|,
442+
context => q|Template variable|,
443+
lastUpdated => 0,
444+
},
445+
440446
'hasPhoto' => {
441447
message => q|This template variable will be true if the a photo in the photo_loop has an image in it.|,
442448
context => q|Template variable|,

‎lib/WebGUI/i18n/English/Asset_StoryArchive.pm

+18
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,12 @@ our $I18N = {
321321
lastUpdated => 0,
322322
},
323323

324+
'photoHeight' => {
325+
message => q|The height used to display photos.|,
326+
context => q|Template variable.|,
327+
lastUpdated => 0,
328+
},
329+
324330
'photo width' => {
325331
message => q|Photo width|,
326332
context => q|Label in the edit screen|,
@@ -333,6 +339,18 @@ our $I18N = {
333339
lastUpdated => 0,
334340
},
335341

342+
'photo height' => {
343+
message => q|Photo Height|,
344+
context => q|Label in the edit screen|,
345+
lastUpdated => 0,
346+
},
347+
348+
'photo height help' => {
349+
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.|,
350+
context => q|hoverhelp for photoHeight in the edit screen|,
351+
lastUpdated => 0,
352+
},
353+
336354
'sortAlphabeticallyChronologically' => {
337355
message => q|Sort Order|,
338356
context => q|Label in the edit screen|,

0 commit comments

Comments
 (0)
Please sign in to comment.