Changeset 17349 for extensions
- Timestamp:
- Aug 3, 2012, 5:48:51 PM (12 years ago)
- Location:
- extensions/ExtendedDescription
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ExtendedDescription/main.inc.php
r17181 r17349 616 616 617 617 // sort pictures 618 function rank_sort($a, $b) 619 { 620 global $ids; 621 return array_search($a, $ids) > array_search($b, $ids); 622 } 623 uksort($pictures, 'rank_sort'); 618 if (!function_exists('ed_rank_sort')) 619 { 620 function ed_rank_sort($a, $b) 621 { 622 global $ids; 623 return array_search($a, $ids) > array_search($b, $ids); 624 } 625 } 626 uksort($pictures, 'ed_rank_sort'); 624 627 625 628 foreach ($pictures as $row) -
extensions/ExtendedDescription/template/nivoslider/jquery.nivo.slider.js
r17010 r17349 11 11 * July 25th 2012 12 12 * Damien (Mistic) Sorel 13 * ability to stop slideshow with beforeChange (line 318) 13 * ability to stop slideshow with beforeChange (line 343) 14 */ 15 16 /** 17 * August 3rd 2012 18 * Damien (Mistic) Sorel (from http://joshfester.com/differing-image-heights-in-nivo-slider) 19 * dynamic width (lines 95 & 102 & 322-338) 14 20 */ 15 21 … … 87 93 // Detect Window Resize 88 94 $(window).resize(function() { 89 slider.children('img').width(slider.width());95 //slider.children('img').width(slider.width()); 90 96 sliderImg.attr('src', vars.currentImage.attr('src')); 91 97 sliderImg.stop().height('auto'); … … 93 99 $('.nivo-box').remove(); 94 100 }); 101 102 slider.width($(kids[vars.currentSlide]).width()); 95 103 96 104 //Create caption … … 312 320 } 313 321 322 // resize the slider (don't resize for diff < 20px) 323 if (vars.currentSlide+1 == vars.totalSlides) { 324 next_width = $(kids[0]).width(); 325 } 326 else { 327 next_width = $(kids[vars.currentSlide + 1]).width(); 328 } 329 if (Math.abs(next_width - slider.width()) > 20) { 330 slider.animate({width: next_width}, 'fast', function() { nivoRun2(slider, kids, settings, nudge) }); 331 } 332 else { 333 nivoRun2(slider, kids, settings, nudge); 334 } 335 336 }; 337 338 var nivoRun2 = function(slider, kids, settings, nudge){ 314 339 // Stop 315 340 if((!vars || vars.stop) && !nudge) { return false; } -
extensions/ExtendedDescription/template/nivoslider/nivo-slider.css
r17010 r17349 9 9 10 10 /* The Nivo Slider styles */ 11 .slider-wrapper { 12 margin:0 auto; 13 } 11 14 .nivoSlider { 12 15 position:relative; … … 14 17 height:auto; 15 18 overflow: hidden; 19 margin: 0 auto; 16 20 } 17 21 .nivoSlider img { … … 23 27 display: block !important; 24 28 position: relative !important; 25 width: 100% !important; 29 //width: 100% !important; 30 margin: 0 auto; 26 31 } 27 32 -
extensions/ExtendedDescription/template/slider.tpl
r17010 r17349 25 25 26 26 {if not $elastic_size} 27 {* assign var=slider_min_w value=$img_size.w *}28 27 {assign var=slider_min_h value=$img_size.h} 29 28 {/if} 30 29 31 <div class="slider-wrapper theme-default" style="width:{$img_size.w}px;{if $elastic_size}height:{math equation='x+y' x=$img_size.h y=40}px;{/if} margin:0 auto;">30 <div class="slider-wrapper theme-default" style="width:{$img_size.w}px;{if $elastic_size}height:{math equation='x+y' x=$img_size.h y=40}px;{/if}"> 32 31 <div id="slider{$slider_id}" class="nivoSlider" style="width:{$img_size.w}px;{if $elastic_size}height:{$img_size.h}px;{/if}"> 33 32 {foreach from=$slider_content item=thumbnail}{strip} … … 38 37 {/if} 39 38 40 <img {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="" data-src="{$derivative->get_url()}"{/if} alt="{$thumbnail.TN_ALT}" { if $show_title}title="<a href='{$thumbnail.URL}'>{$thumbnail.NAME|replace:'"':"'"}</a>"{/if}>39 <img {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="" data-src="{$derivative->get_url()}"{/if} alt="{$thumbnail.TN_ALT}" {$derivative->get_size_htm()} {if $show_title}title="<a href='{$thumbnail.URL}'>{$thumbnail.NAME|replace:'"':"'"}</a>"{/if}> 41 40 42 41 {if not $elastic_size} 43 42 {assign var=derivative_size value=$derivative->get_size()} 44 {* math assign=slider_min_w equation="min(x,y)" x=$slider_min_w y=$derivative_size[0] *}45 43 {math assign=slider_min_h equation="min(x,y)" x=$slider_min_h y=$derivative_size[1]} 46 44 {/if} … … 52 50 {footer_script} 53 51 $("#slider{$slider_id}").css({ldelim} 54 {* width: {$slider_min_w}, *}55 52 height: {$slider_min_h} 56 53 });
Note: See TracChangeset
for help on using the changeset viewer.