diff --git a/e107_plugins/gallery/e_header.php b/e107_plugins/gallery/e_header.php index e41f77fa2..80b87c15e 100644 --- a/e107_plugins/gallery/e_header.php +++ b/e107_plugins/gallery/e_header.php @@ -17,9 +17,10 @@ if(USER_AREA) { e107::js('gallery', 'jslib/prettyPhoto/js/jquery.prettyPhoto.js','jquery'); + e107::css('gallery', 'jslib/prettyPhoto/css/prettyPhoto.css','jquery'); -e107::js('gallery', 'jslib/jquery.cycle.all.js','jquery'); + e107::css('gallery', 'gallery_style.css'); // Work-around for indent issue. see: https://github.com/twitter/bootstrap/issues/4890 @@ -49,51 +50,6 @@ e107::js('inline',$prettyPhoto,'jquery'); -$gp = e107::getPlugPref('gallery'); - -e107::js('inline'," - -$(document).ready(function() -{ - - $('#gallery-slideshow-content').cycle({ - fx: '".varset($gp['slideshow_effect'],'scrollHorz')."', - next: '.gal-next', - prev: '.gal-prev', - speed: ".varset($gp['slideshow_duration'],1000).", // speed of the transition (any valid fx speed value) - timeout: ".varset($gp['slideshow_freq'],4000).", - slideExpr: '.slide', - pause: 1, // pause on hover - TODO pref - - activePagerClass: '.gallery-slide-jumper-selected',//, - before: function(currSlideElement, nextSlideElement, options, forwardFlag) - { - var nx = $(nextSlideElement).attr('id').split('item-'); - var th = $(currSlideElement).attr('id').split('item-'); - $('#gallery-jumper-'+th[1]).removeClass('gallery-slide-jumper-selected'); - $('#gallery-jumper-'+nx[1]).addClass('gallery-slide-jumper-selected'); - } - }); - - - - $('.gallery-slide-jumper').click(function() { - var nid = $(this).attr('id'); - var id = nid.split('-jumper-'); - - var go = parseInt(id[1]) - 1; - $('#gallery-slideshow-content').cycle(go); - return false; - }); - - $('#img.lb-close').on('live', function(e) { - $(this).attr('src','".e_PLUGIN."gallery/jslib/lightbox/images/close.png'); - }); - - - -}); -"); unset($gp); diff --git a/e107_plugins/gallery/e_shortcode.php b/e107_plugins/gallery/e_shortcode.php index 0198d9373..bbb71861d 100644 --- a/e107_plugins/gallery/e_shortcode.php +++ b/e107_plugins/gallery/e_shortcode.php @@ -75,7 +75,7 @@ class gallery_shortcodes extends e_shortcode $w = vartrue($parms['w']) ? $parms['w'] : $tp->thumbWidth(); // 190; // 160; $h = vartrue($parms['h']) ? $parms['h'] : $tp->thumbHeight(); // 130; - $class = ($this->slideMode == TRUE) ? 'gallery-slideshow-thumb img-responsive' : varset($parms['class'],'gallery-thumb img-responsive'); + $class = ($this->slideMode == TRUE) ? 'gallery-slideshow-thumb img-responsive img-rounded' : varset($parms['class'],'gallery-thumb img-responsive'); // $rel = ($this->slideMode == TRUE) ? 'lightbox.SlideGallery' : 'lightbox.Gallery'; $rel = ($this->slideMode == TRUE) ? 'prettyPhoto[slide]' : 'prettyPhoto[gal]'; $att = 'aw='.$w.'&ah='.$h.'&x=1'; // 'aw=190&ah=150'; @@ -218,7 +218,6 @@ class gallery_shortcodes extends e_shortcode $tp = e107::getParser(); $this->slideMode = TRUE; $parms = eHelper::scDualParams($parm); - $amount = $parms[1] ? intval($parms[1]) : 3; // vartrue(e107::getPlugPref('gallery','slideshow_perslide'),3); $parms = $parms[2]; $limit = (integer) vartrue($parms['limit'], 16); diff --git a/e107_plugins/gallery/gallery_style.css b/e107_plugins/gallery/gallery_style.css index d50634573..758f786e6 100644 --- a/e107_plugins/gallery/gallery_style.css +++ b/e107_plugins/gallery/gallery_style.css @@ -17,15 +17,15 @@ ul.gallery-cat > li > div > h3 { text-align: center } /* SLIDESHOW */ -#gallery-slideshow-wrapper { display:block; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; width: 660px; height: 146px; overflow: hidden; background: #000000; margin-left:auto;margin-right:auto } +#gallery-slideshow-wrapper { display:block; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; width: 664px; height: 146px; overflow: hidden; background: #000000; margin-left:auto;margin-right:auto } #gallery-slideshow-content { width: 3500px; } -#gallery-slideshow-content .slide { float: left; width: 660px; padding:12px; height: 146px; } +#gallery-slideshow-content .slide { float: left; width: 679px; padding:12px; height: 146px; white-space:nowrap } -.gallery-slideshow-controls { clear:both; width: 660px; margin-left:auto; margin-right:auto; padding-bottom:10px; } +.gallery-slideshow-controls { clear:both; width: 664px; margin-left:auto; margin-right:auto; padding-top:5px; padding-bottom:10px; } -.gallery-slide-item { margin-right:8px; } +.gallery-slide-item { margin-right:8px; display: inline-block; } .gallery-slideshow-thumb { -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; } diff --git a/e107_plugins/gallery/slideshow_menu.php b/e107_plugins/gallery/slideshow_menu.php index 850fd4c63..01d986bd3 100644 --- a/e107_plugins/gallery/slideshow_menu.php +++ b/e107_plugins/gallery/slideshow_menu.php @@ -9,8 +9,57 @@ if (!defined('e107_INIT')) { exit; } e107::plugLan('gallery', 'front'); +$gp = e107::getPlugPref('gallery'); + +e107::js('gallery', 'jslib/jquery.cycle.all.js','jquery'); +e107::js('footer-inline'," + +$(document).ready(function() +{ + + $('#gallery-slideshow-content').cycle({ + fx: '".varset($gp['slideshow_effect'],'scrollHorz')."', + next: '.gal-next', + prev: '.gal-prev', + speed: ".varset($gp['slideshow_duration'],1000).", // speed of the transition (any valid fx speed value) + timeout: ".varset($gp['slideshow_freq'],4000).", + slideExpr: '.slide', + pause: 1, // pause on hover - TODO pref + + activePagerClass: '.gallery-slide-jumper-selected',//, + before: function(currSlideElement, nextSlideElement, options, forwardFlag) + { + var nx = $(nextSlideElement).attr('id').split('item-'); + var th = $(currSlideElement).attr('id').split('item-'); + $('#gallery-jumper-'+th[1]).removeClass('gallery-slide-jumper-selected'); + $('#gallery-jumper-'+nx[1]).addClass('gallery-slide-jumper-selected'); + } + }); + + + + $('.gallery-slide-jumper').click(function() { + var nid = $(this).attr('id'); + var id = nid.split('-jumper-'); + + var go = parseInt(id[1]) - 1; + $('#gallery-slideshow-content').cycle(go); + return false; + }); + + $('#img.lb-close').on('live', function(e) { + $(this).attr('src','".e_PLUGIN."gallery/jslib/lightbox/images/close.png'); + }); + + + +}); +"); + + $text = e107::getParser()->parseTemplate("{GALLERY_SLIDESHOW}"); e107::getRender()->tablerender("Gallery",$text,'gallery_slideshow'); unset($text); +unset($gp); ?> diff --git a/e107_plugins/gallery/templates/gallery_template.php b/e107_plugins/gallery/templates/gallery_template.php index 7164dbc77..337870fc5 100644 --- a/e107_plugins/gallery/templates/gallery_template.php +++ b/e107_plugins/gallery/templates/gallery_template.php @@ -62,21 +62,21 @@ $GALLERY_TEMPLATE['cat_end'] = $GALLERY_TEMPLATE['slideshow_wrapper'] = '