Changeset 25998 for extensions/Slimi/template
- Timestamp:
- Dec 17, 2013, 11:25:38 PM (10 years ago)
- Location:
- extensions/Slimi/template
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Slimi/template/index.tpl
r18812 r25998 145 145 146 146 {if !empty($THUMBNAILS)} 147 <ul class="thumbnails" id="thumbnails">148 147 {$THUMBNAILS} 149 </ul> 148 {footer_script}{literal} 149 $('.jcarousel') 150 .jcarousel({ 151 wrap: 'circular' 152 }) 153 .jcarouselAutoscroll({ 154 autostart: false 155 }); 156 157 $('.jcarousel-control-prev') 158 .on('jcarouselcontrol:active', function() { 159 $(this).removeClass('inactive'); 160 }) 161 .on('jcarouselcontrol:inactive', function() { 162 $(this).addClass('inactive'); 163 }) 164 .jcarouselControl({ 165 target: '-=1' 166 }); 167 168 $('.jcarousel-control-next') 169 .on('jcarouselcontrol:active', function() { 170 $(this).removeClass('inactive'); 171 }) 172 .on('jcarouselcontrol:inactive', function() { 173 $(this).addClass('inactive'); 174 }) 175 .jcarouselControl({ 176 target: '+=1' 177 }); 178 {/literal}{/footer_script} 150 179 {/if} 151 180 152 181 {if empty($THUMBNAILS)} 153 {if !empty($CATEGORIES)}{$CATEGORIES}{/if} 182 {if !empty($CATEGORIES)}{$CATEGORIES} 183 {footer_script}{literal} 184 $('.jcarousel') 185 .jcarousel({ 186 wrap: 'circular' 187 }) 188 .jcarouselAutoscroll({ 189 interval: 3000, 190 target: '+=1', 191 autostart: true 192 }); 193 194 $('.jcarousel-control-prev') 195 .on('jcarouselcontrol:active', function() { 196 $(this).removeClass('inactive'); 197 }) 198 .on('jcarouselcontrol:inactive', function() { 199 $(this).addClass('inactive'); 200 }) 201 .jcarouselControl({ 202 target: '-=1' 203 }); 204 205 $('.jcarousel-control-next') 206 .on('jcarouselcontrol:active', function() { 207 $(this).removeClass('inactive'); 208 }) 209 .on('jcarouselcontrol:inactive', function() { 210 $(this).addClass('inactive'); 211 }) 212 .jcarouselControl({ 213 target: '+=1' 214 }); 215 216 $('.jcarousel') 217 .on('mouseenter', function(){ 218 $(this).jcarouselAutoscroll('stop') 219 }) 220 .on('mouseleave', function(){ 221 $(this).jcarouselAutoscroll('start') 222 }); 223 {/literal}{/footer_script} 224 225 {/if} 154 226 {/if} 155 227 -
extensions/Slimi/template/mainpage_categories.tpl
r18917 r25998 1 1 {define_derivative name='carousel' width='300' height='300' min_width='300'} 2 3 4 {html_style} 5 .jcarousel-skin-cat .jcarousel-list li{ldelim} 6 min-width:{$carousel->max_width()}px; 7 {/html_style} 8 9 <div id="carouselcat"> 10 2 <div id="carousel"> 11 3 <div id="wrap"> 12 <ul id="carousel" class="jcarousel-skin-cat">13 4 <div class="jcarousel"> 5 <ul> 14 6 {foreach from=$category_thumbnails item=cat} 15 16 17 7 <li> 18 8 <div class="illustration"> … … 40 30 {/foreach} 41 31 </ul> 42 {footer_script}{literal}43 function mycarousel_initCallback(carousel)44 {45 // Disable autoscrolling if the user clicks the prev or next button.46 carousel.buttonNext.bind('click', function() {47 carousel.startAuto(1);48 });49 50 carousel.buttonPrev.bind('click', function() {51 carousel.startAuto(0);52 });53 54 55 // Pause autoscrolling if the user moves with the cursor over the clip.56 carousel.clip.hover(function() {carousel.stopAuto();},57 function() {carousel.startAuto();}58 );59 };60 61 jQuery(document).ready(function() {62 jQuery('#carousel').jcarousel({63 auto: 1,64 wrap: 'circular',65 scroll: 2,66 animation: 2000,67 initCallback: mycarousel_initCallback,68 69 });70 });71 {/literal}{/footer_script}72 32 </div> 73 33 </div> 74 34 <a href="#" class="jcarousel-control-prev">‹</a> 35 <a href="#" class="jcarousel-control-next">›</a> 36 </div> -
extensions/Slimi/template/thumbnails.tpl
r19019 r25998 3 3 global $page, $template; 4 4 $template->assign('cat_name', $page['category']['name']); 5 6 global $Slimi; $this->assign( 'Slimi', $Slimi);7 5 {/php} 8 6 9 7 10 <div id="carousel thumb">8 <div id="carousel"> 11 9 <div id="wrap"> 12 <ul id="carousel" class="jcarousel-skin-cat"> 10 <div class="jcarousel"> 11 <ul> 13 12 {if !empty($category_thumbnails)} 14 13 … … 39 38 {assign var=derivative value=$pwg->derivative($carousel, $thumbnail.src_image)} 40 39 <li> 41 <div class="i Illustration">40 <div class="illustration"> 42 41 <a href="{if ($Slimi.lytebox_slimi)==1}{$thumbnail.path}" class="lytebox" rev="slide:true group:name showNavigation:true navType:1 slideInterval:6000"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'''|replace:'"':'"'}"> 43 42 <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" height="{$carousel->max_height()}"/> … … 73 72 {/foreach} 74 73 </ul> 75 {footer_script}{literal}76 function mycarousel_initCallback(carousel)77 {78 // Pause autoscrolling if the user moves with the cursor over the clip.79 carousel.clip.hover(function() {80 carousel.stopAuto();81 }, function() {82 carousel.startAuto();83 });84 };85 86 jQuery(document).ready(function() {87 jQuery('#carousel').jcarousel({88 auto: 0,89 wrap: 'circular',90 scroll: 2,91 initCallback: mycarousel_initCallback,92 93 });94 });95 96 {/literal}{/footer_script}97 74 98 75 </div> 99 76 </div> 77 <a href="#" class="jcarousel-control-prev">‹</a> 78 <a href="#" class="jcarousel-control-next">›</a> 79 </div>
Note: See TracChangeset
for help on using the changeset viewer.