From 5ef030d1f8fed542b8c7050c28033d7fc1e710a4 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 20 Aug 2009 23:12:59 +0000 Subject: [PATCH] Give the Carousel a minimum width, and expose it as a template variable to help YUI Carousel with rendering. Adjust default template, Help, i18n. Fixes bug #10511. --- docs/changelog/7.x.x.txt | 1 + ...oot_import_carousel_carousel-default.wgpkg | Bin 0 -> 1519 bytes docs/upgrades/upgrade_7.7.17-7.7.18.pl | 14 ++++++++++ lib/WebGUI/Asset/Wobject/Carousel.pm | 25 +++++------------- lib/WebGUI/Help/Asset_Carousel.pm | 3 ++- lib/WebGUI/i18n/English/Asset_Carousel.pm | 18 +++++++++++++ 6 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 docs/upgrades/packages-7.7.18/root_import_carousel_carousel-default.wgpkg diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index bae74dfa2..80a5d29d9 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.7.18 + - fixed #10511: Carousel cutting off edge of photo - fixed #10804: EMS Schedule Screen broken - fixed: Logging errors when getting the list of available driver classes. - fixed #10797: Unable to search for non-ASCII text diff --git a/docs/upgrades/packages-7.7.18/root_import_carousel_carousel-default.wgpkg b/docs/upgrades/packages-7.7.18/root_import_carousel_carousel-default.wgpkg new file mode 100644 index 0000000000000000000000000000000000000000..d3a83739f5933ccaceea354dcb22f547d0b42a83 GIT binary patch literal 1519 zcmV%i` zu?6U2B%dThxJ>^0tt8tr#FX|Xx#>gvfNibxX|-B?-vqy3i5D&6_uh@UT*=`4G`@i4v{T&3+eERFD_P_D;u0O^McQ4=& z))bi~F;?UXD}}@9j4&l@sE2<4W6#*7;sQ@dxhWAmAwp4NIvN;_6bb@3(JxEgx7Mne z@!Ak$sg7Q zGNs;iO5?~IbBK=pZ9vzTuSd0k#eE1;G1Ere5DN}06MI-n0yD@P%HS8zyxiiZlcAuA zLQ;g4E-vwu^LoT*bux#&^w!?ta9giEi!C&v^n9ZrRzj%-EVK+Y!GzSGGeH zIr5Ec*^cs`^2MCNELYxU2XhD{Y1C2w_%63n5u3CToGXvcG{+UWSv=GuGRA4F+%PIn zXcQ5)PHI%13$C~(lXcSs7$P~1jv}gz$qyV{&f&(;kLVnQz_}9m0jR64$)pZk0$ep> zBh^>1mMc0&l1NE8Ys|4|;0TWN88aQAOER#%z=T5JJi%i*=zEC;@G=DbRtAiy1Swe# zsftOCGz|)0ly29AX@+ZP(*n5DU<)v@sSMucxaCDg&b$I&YKKW+M8zycG$;h|D&}0T zQ5UBsj5LB6I)Agw7??=vPWtNe*y5UHX#`Zp8Y$B$rbQgI6+~tYTeqG@0F4TlWK1LS zg+^*RFoFfXEc9E?c~t6>+=3eQi@h;E83(nGF62OY*$NAz7t>Nx22l!yS%7DjX&9?I9LK!ydYpAgl^59Mz4-t4X8X-s`l`Id?>jj`wEi9}6thWXkYFy)pgfp zV5lc&v|5QefWXZ^4^db->write(<db->write(<$i18n->get('carousel template description'), label =>$i18n->get('carousel template label'), }, + slideWidth =>{ + fieldType => "integer", + defaultValue => 0, + tab => "display", + hoverHelp => $i18n->get('carousel slideWidth description'), + label => $i18n->get('carousel slideWidth label'), + }, items =>{ noFormPost =>1, fieldType =>'text', @@ -274,23 +281,5 @@ sub view { return $self->processTemplate($var, undef, $self->{_viewTemplate}); } -#------------------------------------------------------------------- - -=head2 www_edit ( ) - -Web facing method which is the default edit page. This method is entirely -optional. Take it out unless you specifically want to set a submenu in your -adminConsole views. - -=cut - -#sub www_edit { -# my $self = shift; -# return $self->session->privilege->insufficient() unless $self->canEdit; -# return $self->session->privilege->locked() unless $self->canEditIfLocked; -# my $i18n = WebGUI::International->new($self->session, "Asset_Carousel"); -# return $self->getAdminConsole->render($self->getEditForm->print, $i18n->get("edit title")); -#} - 1; #vim:ft=perl diff --git a/lib/WebGUI/Help/Asset_Carousel.pm b/lib/WebGUI/Help/Asset_Carousel.pm index 5a0039a08..9a63baaf1 100644 --- a/lib/WebGUI/Help/Asset_Carousel.pm +++ b/lib/WebGUI/Help/Asset_Carousel.pm @@ -18,7 +18,8 @@ our $HELP = { { 'name' => 'itemId'}, { 'name' => 'sequenceNumber'}, ], - } + }, + { 'name' => 'slideWidth', }, ], related => [], }, diff --git a/lib/WebGUI/i18n/English/Asset_Carousel.pm b/lib/WebGUI/i18n/English/Asset_Carousel.pm index ae38e6193..08b6e096d 100644 --- a/lib/WebGUI/i18n/English/Asset_Carousel.pm +++ b/lib/WebGUI/i18n/English/Asset_Carousel.pm @@ -21,6 +21,24 @@ our $I18N = { context => q|Description of the carousel template field, used as hover help.| }, + 'carousel slideWidth label' => { + message => q|Carousel slide width|, + lastUpdated => 0, + context => q|Slide, one "frame" or "page" in the Carousel.| + }, + + 'carousel slideWidth description' => { + message => q|Width in pixels. The Carousel will not automatically resize itself for content of various widths. Setting this width will help it render properly. If left with the default, 0, then the width of the Carousel is set by the width of the first element.|, + lastUpdated => 0, + context => q|Description of the carousel template field, used as hover help.| + }, + + 'slideWidth' => { + message => q|The width set for each slide in the Carousel|, + lastUpdated => 0, + context => q|Description of the carousel template field, used as hover help.| + }, + 'items label' => { message => q|Items|, lastUpdated => 0,