From e046e5a8ce70d53355ebccc6aaee085c5f8a2cbb Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 20 Sep 2012 14:00:57 -0700 Subject: [PATCH] Fix rendering of the carousel inside of a Story. Fixes bug #12386 --- docs/changelog/7.x.x.txt | 1 + ...ot_import_storymanager_storytemplate.wgpkg | Bin 0 -> 2057 bytes docs/upgrades/upgrade_7.10.26-7.10.27.pl | 17 +++++++++++++++++ lib/WebGUI/Asset/Story.pm | 9 +++++---- lib/WebGUI/Asset/Wobject/StoryArchive.pm | 7 +++++++ lib/WebGUI/Help/Asset_Story.pm | 1 + lib/WebGUI/i18n/English/Asset_Story.pm | 6 ++++++ lib/WebGUI/i18n/English/Asset_StoryArchive.pm | 18 ++++++++++++++++++ 8 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 docs/upgrades/packages-7.10.27/root_import_storymanager_storytemplate.wgpkg diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index fcc6f6360..78632e9c1 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -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. diff --git a/docs/upgrades/packages-7.10.27/root_import_storymanager_storytemplate.wgpkg b/docs/upgrades/packages-7.10.27/root_import_storymanager_storytemplate.wgpkg new file mode 100644 index 0000000000000000000000000000000000000000..3826c5cf45a46c8ba579b6ea568356e2054aaea5 GIT binary patch literal 2057 zcmV+k2=@0MiwFP!00000|Lt1qZyPrf_vic-3w;P2AlA!{6)UO$#Z7AG@^H>hgW`NO zC@m#1-d*mIT+3>Z|GhIqF83iRy|(cshe$yD;E?m?aDL-7ckcevZnt~AM>{+1cBl8K zjo;gygM*!&z<=61oo>5(*lV{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(9_mMQG;31%B-p;VY5S+x+=}3g&%D8%{XZ z)FC_u_`QDIQ7h*wb`-XNGUUbWy};`5eccPn0(?G;TU&le%c~L^Au8i^#sRWo<(JXP zn>WqOh^YAtv0PIoSj*w3e?qsi+`VkrJ5|*8hru*UCRmDtU4HW*_*gJQ5%{d+jd<`w z0N^;VGT^$*xM?0ce7ctN#~{h#pM@6Vi1&j|@Ck6FS01_NoSTX#Ay>N_>3S{~6>5bQ zJdFf>^S8=ZTPw}>Aim|ZT}Z9}_y=DuqzVCx*Bg*)N2xU*RC^rFHAZV*mzBoVoq&4H zhVZ2OXET4bsa+}%f=K3E2?KA=b0y<527aoSlo`tn5P=I2YnmreL-}yf?V1-#@u{^>Wo(p`jy$ z8IqlQRYEEBk9^9q$mT%VSWuI@7?aGSqu$Zcqh7b9k>WRS6=m{cKKxo23;?n)!14)E z*n>ClGIRxxTHh0^ChN!*9R4roAfS`vb65`*U=7XYK)AX3|+&K!|`9(|T)0MO)mM%(0r`7!m69@JxD zBDYX)SDn55iRnqz#a|)$2o2V9utn(4{b{I#1HXIJ=lta6%lSOL1Osh2S7xODA0Ut? z6SYju*_y80u$lXdSC;7B)6=*+|1f?LE|Z=(n~ubyXtRYrUux*J>%BRlf*fo#N?ko5 zEBX`rI&4LMnXf>J?*37CzxTLXf@Xk#0FyfPrgCvIoxQn!VMe#1Ha(TiF669G&tnLu nAO639Pxn6E`x5`}V9R6cfvpF&9@u)|>w4gKjOl$004e|gqzn0g literal 0 HcmV?d00001 diff --git a/docs/upgrades/upgrade_7.10.26-7.10.27.pl b/docs/upgrades/upgrade_7.10.26-7.10.27.pl index cc499a350..38415fff0 100644 --- a/docs/upgrades/upgrade_7.10.26-7.10.27.pl +++ b/docs/upgrades/upgrade_7.10.26-7.10.27.pl @@ -32,6 +32,7 @@ my $session = start(); # this line required # 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(<db->write(<{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; } diff --git a/lib/WebGUI/Asset/Wobject/StoryArchive.pm b/lib/WebGUI/Asset/Wobject/StoryArchive.pm index d5f096169..5d1954ffb 100644 --- a/lib/WebGUI/Asset/Wobject/StoryArchive.pm +++ b/lib/WebGUI/Asset/Wobject/StoryArchive.pm @@ -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', diff --git a/lib/WebGUI/Help/Asset_Story.pm b/lib/WebGUI/Help/Asset_Story.pm index f6fd4d2b1..96a6f25c9 100644 --- a/lib/WebGUI/Help/Asset_Story.pm +++ b/lib/WebGUI/Help/Asset_Story.pm @@ -87,6 +87,7 @@ our $HELP = { ], }, { name => 'photoWidth', }, + { name => 'photoHeight', }, { name => 'hasPhotos', }, { name => 'singlePhoto', }, { name => 'photo_loop', diff --git a/lib/WebGUI/i18n/English/Asset_Story.pm b/lib/WebGUI/i18n/English/Asset_Story.pm index 628074062..3646a59a4 100644 --- a/lib/WebGUI/i18n/English/Asset_Story.pm +++ b/lib/WebGUI/i18n/English/Asset_Story.pm @@ -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|, diff --git a/lib/WebGUI/i18n/English/Asset_StoryArchive.pm b/lib/WebGUI/i18n/English/Asset_StoryArchive.pm index a6588e011..382c10c5f 100644 --- a/lib/WebGUI/i18n/English/Asset_StoryArchive.pm +++ b/lib/WebGUI/i18n/English/Asset_StoryArchive.pm @@ -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|,