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.
This commit is contained in:
parent
bd0d7c080c
commit
5ef030d1f8
6 changed files with 42 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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(<<EOSQL);
|
||||
ALTER TABLE Carousel ADD COLUMN slideWidth int(11)
|
||||
EOSQL
|
||||
$session->db->write(<<EOSQL);
|
||||
UPDATE Carousel SET slideWidth=0;
|
||||
EOSQL
|
||||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
sub setDefaultEMSScheduleTemplate {
|
||||
my $session = shift;
|
||||
print "\tSet the default EMS schedule template on existing EMS'es that do not have one... " unless $quiet;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,13 @@ sub definition {
|
|||
hoverHelp =>$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
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ our $HELP = {
|
|||
{ 'name' => 'itemId'},
|
||||
{ 'name' => 'sequenceNumber'},
|
||||
],
|
||||
}
|
||||
},
|
||||
{ 'name' => 'slideWidth', },
|
||||
],
|
||||
related => [],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue