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 000000000..d3a83739f Binary files /dev/null and b/docs/upgrades/packages-7.7.18/root_import_carousel_carousel-default.wgpkg differ diff --git a/docs/upgrades/upgrade_7.7.17-7.7.18.pl b/docs/upgrades/upgrade_7.7.17-7.7.18.pl index 55f45eb8d..c00fef3b4 100644 --- a/docs/upgrades/upgrade_7.7.17-7.7.18.pl +++ b/docs/upgrades/upgrade_7.7.17-7.7.18.pl @@ -36,6 +36,7 @@ addInboxNotificationsSubjectSetting($session); profileFieldRequiredEditable($session); deleteOldInboxMessageStates($session); setDefaultEMSScheduleTemplate($session); +addCarouselSlideWidth($session); finish($session); # this line required #---------------------------------------------------------------------------- @@ -47,6 +48,19 @@ finish($session); # this line required # print "DONE!\n" unless $quiet; #} +sub addCarouselSlideWidth { + my $session = shift; + print "\tAdd a default width property to the Carousel... " unless $quiet; + $session->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,