From 1f0e5270999e17433a5cf58ca13c3c14a0ec6e80 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Thu, 24 Mar 2011 18:19:35 -0500 Subject: [PATCH] add 12079 Carousel auto play --- docs/changelog/7.x.x.txt | 1 + ...oot_import_carousel_carousel-default.wgpkg | Bin 0 -> 1646 bytes docs/upgrades/upgrade_7.10.12-7.10.13.pl | 11 ++++++++ lib/WebGUI/Asset/Wobject/Carousel.pm | 15 ++++++++++ lib/WebGUI/i18n/English/Asset_Carousel.pm | 26 +++++++++++++++++- 5 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 docs/upgrades/packages-7.10.13/root_import_carousel_carousel-default.wgpkg diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 2497b0595..a0b6f66b4 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.10.13 + - added #12079: Carousel Auto Play 7.10.12 - fixed #12072: Product, related and accessory assets diff --git a/docs/upgrades/packages-7.10.13/root_import_carousel_carousel-default.wgpkg b/docs/upgrades/packages-7.10.13/root_import_carousel_carousel-default.wgpkg new file mode 100644 index 0000000000000000000000000000000000000000..edb86fb28991b710499a1ba1ff34d37eec9177f5 GIT binary patch literal 1646 zcmV-!29fz6iwFP!00000|Ls`oPa8Q9&*%OXRzA@asEWv<17KBz(I*A+Ke)+)f84VW5*Zw)6eZ zDAwAh_w2g&+TU7=?_?`TJlNmgmj7m}anLU1fByic$PbC)edWLQoq~7IVm>{BBCKj7 z6`imu>5~s1ckNWHWXzP|OyjI&L(V`kYFPN&5@)OJs%1t(M724(jimzWph6+88etOu&^Fz4Kq{4#xV2O5sK0~%Y@gj6CQ>2 zu@pwTXAM{%KN(erPVTyp4Vt#f4XBcdW>KAL%|L^`;R2p?R?jGfIvpq;8=_UP(Zs~? zh-32V`5RQUv$XEk4hLV5ktxl!@6EValTzeDE(B9=G*c%o)ZXS;$;Q3rVWdXl2j{}7 z{6Z}AEP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.10.13.pl b/docs/upgrades/upgrade_7.10.12-7.10.13.pl index 2e493b252..35af14a75 100644 --- a/docs/upgrades/upgrade_7.10.12-7.10.13.pl +++ b/docs/upgrades/upgrade_7.10.12-7.10.13.pl @@ -31,6 +31,7 @@ my $quiet; # this line required my $session = start(); # this line required # upgrade functions go here +addAutoPlayToCarousel( $session ); finish($session); # this line required @@ -44,6 +45,16 @@ finish($session); # this line required # print "DONE!\n" unless $quiet; #} +#---------------------------------------------------------------------------- +# Add AutoPlay fields to the Carousel +sub addAutoPlayToCarousel { + my $session = shift; + print "\tAdding Auto Play to Carousel... " unless $quiet; + $session->db->write( + "ALTER TABLE Carousel ADD COLUMN autoPlay INT, ADD COLUMN autoPlayInterval INT" + ); + print "DONE!\n" unless $quiet; +} # -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- diff --git a/lib/WebGUI/Asset/Wobject/Carousel.pm b/lib/WebGUI/Asset/Wobject/Carousel.pm index 0e1e67951..c5c48407d 100644 --- a/lib/WebGUI/Asset/Wobject/Carousel.pm +++ b/lib/WebGUI/Asset/Wobject/Carousel.pm @@ -65,6 +65,21 @@ sub definition { fieldType =>'text', autoGenerate =>0, }, + autoPlay => { + fieldType => 'yesNo', + defaultValue => 0, + tab => "properties", + hoverHelp => $i18n->get('carousel autoPlay description'), + label => $i18n->get('carousel autoPlay label'), + }, + autoPlayInterval => { + fieldType => 'Integer', + defaultValue => 4, + tab => 'properties', + hoverHelp => $i18n->get('carousel autoPlayInterval description'), + label => $i18n->get('carousel autoPlayInterval label'), + }, + ); push(@{$definition}, { assetName=>$i18n->get('assetName'), diff --git a/lib/WebGUI/i18n/English/Asset_Carousel.pm b/lib/WebGUI/i18n/English/Asset_Carousel.pm index 890de2666..4413256d4 100644 --- a/lib/WebGUI/i18n/English/Asset_Carousel.pm +++ b/lib/WebGUI/i18n/English/Asset_Carousel.pm @@ -115,7 +115,31 @@ our $I18N = { message => q|This carousel item's sequenceNumber.|, lastUpdated => 0, context => q|Description of the sequenceNumber tmpl_var for the template help.| - } + }, + + 'carousel autoPlay description' => { + message => q{Should this carousel automatically scroll through its items?}, + lastUpdated => 0, + context => 'Description of asset property', + }, + + 'carousel autoPlay label' => { + message => q{Auto Play}, + lastUpdated => 0, + context => 'Label for asset property', + }, + + 'carousel autoPlayInterval label' => { + message => q{Auto Play Interval}, + lastUpdated => 0, + context => 'Label for asset property', + }, + + 'carousel autoPlayInterval description' => { + message => q{Length of time in seconds between carousel slides}, + lastUpdated => 0, + context => 'Description of asset property', + }, }; 1;