Ignore:
Timestamp:
Jun 1, 2014, 7:10:51 PM (10 years ago)
Author:
Miklfe
Message:

Slim 2.0 release1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Slim/template/mainpage_categories.tpl

    r28556 r28581  
    22
    33{footer_script}{literal}
    4 $(document).ready(function () {
    5         var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)),
    6                 start;
     4(function($) {
     5        $(document).ready(function(){
    76       
    8         if (isTouch==true){
    9         start="";
    10         }else{
    11         start="onStart";
    12         };
     7                var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)),
     8                        start;
     9               
     10                if (isTouch==true){
     11                start="";
     12                }else{
     13                start="onStart";
     14                };
     15               
     16                $("div.carousel").smoothDivScroll({
     17                        autoScrollingMode: start,
     18                        touchScrolling: true,
     19                        autoScrollingStep: {/literal}{$Slim.carousel_speed}{literal},
     20                        manualContinuousScrolling: true,
     21                        mousewheelScrolling: "allDirections",
     22               
     23                });     
     24                               
     25                $("div.carousel").bind("mouseover", function() {
     26                        $(this).smoothDivScroll("stopAutoScrolling");
     27                }).bind("mouseout", function() {
     28                        $(this).smoothDivScroll("startAutoScrolling");
     29                });     
    1330       
    14         $("div.carousel").smoothDivScroll({
    15                 autoScrollingMode: start,
    16                 touchScrolling: true,
    17                 autoScrollingStep: 5,
    18                 mousewheelScrolling: "allDirections",
    19                 manualContinuousScrolling: true,
    2031               
    21         });     
    22                        
    23         $("div.carousel").bind("mouseover", function() {
    24                 $(this).smoothDivScroll("stopAutoScrolling");
    25         }).bind("mouseout", function() {
    26                 $(this).smoothDivScroll("startAutoScrolling");
    27         });     
    28 });
     32        });
     33})(jQuery);
    2934{/literal}{/footer_script}
     35
    3036
    3137<div class="carousel">
     
    3541                                                                <img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()-22}"/>
    3642                                                       
    37                                                 <div class="CatMPdescription">
    38                                                         <h3>
    39                                                                 {$cat.NAME}
    40                                                         </h3>
    41                                                         <div>
    42                                                                 {$cat.CAPTION_NB_IMAGES}
    43                                                 </div>
    44                                                         </div> 
     43                                                        <div class="CatMPdescription">
     44                                                                <h3>
     45                                                                        {$cat.NAME}
     46                                                                        {if !empty($cat.icon_ts)}
     47                                                                        <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" alt="(!)">
     48                                                                        {/if}
     49                                                                </h3>
     50                                                                <div class="Nb_images">
     51                                                                {if isset($cat.INFO_DATES) }
     52                                                                <p class="dates">{$cat.INFO_DATES}</p>
     53                                                                {/if}
     54                                                                <p >{$cat.CAPTION_NB_IMAGES}</p>
     55                                                                {if not empty($cat.DESCRIPTION)}
     56                                                                <p>{$cat.DESCRIPTION}</p>
     57                                                                {/if}
     58                                                                </div>
     59                                                        </div>
    4560                                                </a>
    4661                                                </div>
Note: See TracChangeset for help on using the changeset viewer.