Changeset 27402 for extensions/Slide


Ignore:
Timestamp:
Feb 18, 2014, 8:08:00 AM (10 years ago)
Author:
Miklfe
Message:

Correction du slideshow.js
correction de l'erreur d'affichage des boutons actions sur la page image
modification du css

Location:
extensions/Slide
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/Slide/js/slideshow.js

    r27126 r27402  
    7979                                        $('ul',ele).append($('<li />').addClass('img-' + i).append($('<div />').addClass('contenerImg').width(options.width).height(cont_h).append(blockImg)));
    8080                               
    81                                         var $block = $('.img-'+ i ,ele);
    82                                         _resizeSlideshowImag($block)    ;
    83 
    8481                                });
    85 
     82                               
     83                                _resizeSlideshowImag();
    8684       
    87                 //resize and center image_____________________________________________________________________________________________________
    88                                
    89                                 function _resizeSlideshowImag ($block){
    90 
    91                                         var $img                = $block.find('img'),
    92                                                 $descr          = $block.find('.descr'),
    93                                                 $img_w          = $img.width(),
    94                                                 $img_h          = $img.height(),
    95                                                 $img_r          = $img_h/$img_w,
    96                                                 $box_h          = cont_h,
    97                                                 $box_w          = options.width,
    98                                                 $box_r          = $box_h/$box_w,
    99                                                 $new_h,
    100                                                 $new_w;
    101                                        
    102                                         if(($img_h > $box_h) || ($img_w > $box_w)){
    103                                                 if($box_r < $img_r){
    104                                                         $new_h  = $box_h - 30;
    105                                                         $new_w  = $box_h / $img_r
    106                                                 }else{
    107                                                         $new_h  = ($box_w * $img_r) - 30;
    108                                                         $new_w  = $box_w
    109                                                 };
    110 
    111                                         }else{
    112                                                 $new_h  = $img_h;
    113                                                 $new_w  = $img_w;
    114                                         };
    115                                         var $left       = ($(ele).data('e').s_w / 2)-($new_w / 2) + 'px',
    116                                                 $top    = ($box_h / 2)-($new_h / 2) + 'px';
    117                                                
    118                                         $img.css({
    119                                                 width   : $new_w + 'px',
    120                                                 height  : $new_h + 'px',
    121                                                 left    : $left,
    122                                                 top             : $top,
    123                                         });
    124                                         $descr.css(
    125                                                 {
    126                                                 left    : $left,
    127                                                 width   : $new_w + 'px',
    128                                                 height  : $new_h/4,
    129                                                 bottom  : (($box_h / 2)-($new_h / 2)) + 'px',
    130                                         })
    131                         //      })
    132                                 };
    13385//slide_____________________________________________________________________________________________
    13486                                if(options.styleSlideshow == 'Slide'){
     
    323275
    324276//___________________________________________Fonctions_____________________________________________________________________________________
     277//resize and center image__________________________________________________________________________________________________________________
     278                               
     279                                function _resizeSlideshowImag (){
     280                                       
     281                                        $('ul img',ele).each(function(){
     282                                                var $img                = $(this),
     283                                                        $descr          = $(this).prev(),
     284                                                        $img_w          = $img.width(),
     285                                                        $img_h          = $img.height(),
     286                                                        $img_r          = $img_h/$img_w,
     287                                                        $box_h          = cont_h,
     288                                                        $box_w          = options.width,
     289                                                        $box_r          = $box_h/$box_w,
     290                                                        $new_h,
     291                                                        $new_w;
     292                                                if(($img_h > $box_h) || ($img_w > $box_w)){
     293                                                        if($box_r < $img_r){
     294                                                                $new_h  = $box_h - 30;
     295                                                                $new_w  = $box_h / $img_r
     296                                                        }else{
     297                                                                $new_h  = ($box_w * $img_r) - 30;
     298                                                                $new_w  = $box_w
     299                                                        };
     300       
     301                                                }else{
     302                                                        $new_h  = $img_h;
     303                                                        $new_w  = $img_w;
     304                                                };
     305                                                var $left       = ($(ele).data('e').s_w / 2)-($new_w / 2) + 'px',
     306                                                        $top    = ($box_h / 2)-($new_h / 2) + 'px';
     307                                                       
     308                                                $img.css({
     309                                                        width   : $new_w + 'px',
     310                                                        height  : $new_h + 'px',
     311                                                        left    : $left,
     312                                                        top             : $top,
     313                                                });
     314                                                $descr.css(
     315                                                        {
     316                                                        left    : $left,
     317                                                        width   : $new_w + 'px',
     318                                                        height  : $new_h/4,
     319                                                        bottom  : (($box_h / 2)-($new_h / 2)) + 'px',
     320                                                })
     321                                        })
     322                                };
    325323//animation________________________________________________________________________________________________________________________________                     
    326324                        function _rotate(ele) {
  • extensions/Slide/template/picture.tpl

    r26889 r27402  
    1 {* Example of resizeable
    2 {include file='include/autosize.inc.tpl'}
    3 *}
    41
    52{if isset($MENUBAR)}{$MENUBAR}{/if}
     
    2421
    2522{strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
    26   <span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span>
     23  <span class="pwg-icon pwg-icon-sizes"></span><span class="pwg-button-text">{'Photo sizes'|@translate}</span>
    2724</a>
    2825<div id="derivativeSwitchBox" class="switchBox">
    2926  <div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
    3027  {foreach from=$current.unique_derivatives item=derivative key=derivative_type}
    31   <span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
     28  <span class="swit  <span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
    3229  <span href="" class="derivative" data-typesave="{$derivative_type}"  data-url="{$derivative->get_url()}" data-typemap="{$derivative->get_type()} " data-cookie="{$COOKIE_PATH}">{$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span>
     30
    3331  </span><br>
    3432  {/foreach}
    35   {if isset($U_ORIGINAL)}
     33{if isset($U_ORIGINAL)}
    3634    {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
    3735  <span class="original" href="" rel="nofollow" data-url="{$U_ORIGINAL}" data-winname="xxx" data-features="scrollbars=yes,toolbar=no,status=no,resizable=yes">{'Original'|@translate}</span>
    38   {/if}
     36{/if}
    3937</div>
    4038{/strip}
     
    5553        </a>
    5654{/if}{/strip}
     55{if isset($PLUGIN_PICTURE_BUTTONS)}{foreach from=$PLUGIN_PICTURE_BUTTONS item=button}{$button}{/foreach}{/if}
    5756{if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
    5857{strip}{if isset($favorite)}
  • extensions/Slide/template/picture_nav_buttons.tpl

    r26889 r27402  
    44{if isset($slideshow.U_INC_PERIOD)}
    55        <a href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}" class="pwg-state-default pwg-button">
    6                 <span class="pwg-icon pwg-icon-clock-minus">&nbsp;</span><span class="pwg-button-text">{'Reduce diaporama speed'|@translate}</span>
     6                <span class="pwg-icon pwg-icon-clock-minus"></span><span class="pwg-button-text">{'Reduce diaporama speed'|@translate}</span>
    77        </a>
    88{else}
    99        <span class="pwg-state-disabled pwg-button">
    10                 <span class="pwg-icon pwg-icon-clock-minus">&nbsp;</span><span class="pwg-button-text">{'Reduce diaporama speed'|@translate}</span>
     10                <span class="pwg-icon pwg-icon-clock-minus"></span><span class="pwg-button-text">{'Reduce diaporama speed'|@translate}</span>
    1111        </span>
    1212{/if}
    1313{if isset($slideshow.U_DEC_PERIOD)}
    1414        <a href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}" class="pwg-state-default pwg-button">
    15                 <span class="pwg-icon pwg-icon-clock-plus">&nbsp;</span><span class="pwg-button-text">{'Accelerate diaporama speed'|@translate}</span>
     15                <span class="pwg-icon pwg-icon-clock-plus"></span><span class="pwg-button-text">{'Accelerate diaporama speed'|@translate}</span>
    1616        </a>
    1717{else}
    1818        <span class="pwg-state-disabled pwg-button">
    19                 <span class="pwg-icon pwg-icon-clock-plus">&nbsp;</span><span class="pwg-button-text">{'Accelerate diaporama speed'|@translate}</span>
     19                <span class="pwg-icon pwg-icon-clock-plus"></span><span class="pwg-button-text">{'Accelerate diaporama speed'|@translate}</span>
    2020        </span>
    2121{/if}
     
    2323{if isset($slideshow.U_START_REPEAT)}
    2424        <a href="{$slideshow.U_START_REPEAT}" title="{'Repeat the slideshow'|@translate}" class="pwg-state-default pwg-button">
    25                 <span class="pwg-icon pwg-icon-repeat-play">&nbsp;</span><span class="pwg-button-text">{'Repeat the slideshow'|@translate}</span>
     25                <span class="pwg-icon pwg-icon-repeat-play"></span><span class="pwg-button-text">{'Repeat the slideshow'|@translate}</span>
    2626        </a>
    2727{/if}
    2828{if isset($slideshow.U_STOP_REPEAT)}
    2929        <a href="{$slideshow.U_STOP_REPEAT}" title="{'Not repeat the slideshow'|@translate}" class="pwg-state-default pwg-button">
    30                 <span class="pwg-icon pwg-icon-repeat-stop">&nbsp;</span><span class="pwg-button-text">{'Not repeat the slideshow'|@translate}</span>
     30                <span class="pwg-icon pwg-icon-repeat-stop"></span><span class="pwg-button-text">{'Not repeat the slideshow'|@translate}</span>
    3131        </a>
    3232{/if}
    3333{strip}{if isset($first)}
    3434        <a href="{$first.U_IMG}" title="{'First'|@translate} : {$first.TITLE}" class="pwg-state-default pwg-button slshFirst">
    35                 <span class="pwg-icon pwg-icon-arrowstop-w">&nbsp;</span><span class="pwg-button-text">{'First'|@translate}</span>
     35                <span class="pwg-icon pwg-icon-arrowstop-w"></span><span class="pwg-button-text">{'First'|@translate}</span>
    3636        </a>
    3737{else}
    3838        <span class="pwg-state-disabled pwg-button">
    39                 <span class="pwg-icon pwg-icon-arrowstop-w">&nbsp;</span><span class="pwg-button-text">{'First'|@translate}</span>
     39                <span class="pwg-icon pwg-icon-arrowstop-w"></span><span class="pwg-button-text">{'First'|@translate}</span>
    4040        </span>
    4141{/if}{/strip}
    4242{strip}{if isset($U_UP) and !isset($slideshow)}
    4343        <a href="{$U_UP}" title="{'Thumbnails'|@translate}" class="pwg-state-default pwg-button">
    44                 <span class="pwg-icon pwg-icon-arrow-n">&nbsp;</span><span class="pwg-button-text">{'Thumbnails'|@translate}</span>
     44                <span class="pwg-icon pwg-icon-arrow-n"></span><span class="pwg-button-text">{'Thumbnails'|@translate}</span>
    4545        </a>
    4646{/if}{/strip}
    4747{strip}{if isset($previous)}
    48         <a href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE|@escape}" class="pwg-state-default pwg-button">
    49                 <span class="pwg-icon pwg-icon-arrow-w">&nbsp;</span><span class="pwg-button-text">{'Previous'|@translate}</span>
     48        <a href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE_ESC}" class="pwg-state-default pwg-button">
     49                <span class="pwg-icon pwg-icon-arrow-w"></span><span class="pwg-button-text">{'Previous'|@translate}</span>
    5050        </a>
    5151{else}
    5252        <span class="pwg-state-disabled pwg-button">
    53                 <span class="pwg-icon pwg-icon-arrow-w">&nbsp;</span><span class="pwg-button-text">{'Previous'|@translate}</span>
     53                <span class="pwg-icon pwg-icon-arrow-w"></span><span class="pwg-button-text">{'Previous'|@translate}</span>
    5454        </span>
    5555{/if}{/strip}
    5656{if isset($slideshow.U_START_PLAY)}
    5757        <a href="{$slideshow.U_START_PLAY}" title="{'Play of slideshow'|@translate}" class="pwg-state-default pwg-button">
    58                 <span class="pwg-icon pwg-icon-play">&nbsp;</span><span class="pwg-button-text">{'Play of slideshow'|@translate}</span>
     58                <span class="pwg-icon pwg-icon-play"></span><span class="pwg-button-text">{'Play of slideshow'|@translate}</span>
    5959        </a>
    6060{/if}
    6161{if isset($slideshow.U_STOP_PLAY)}
    6262        <a href="{$slideshow.U_STOP_PLAY}" title="{'Pause of slideshow'|@translate}" class="pwg-state-default pwg-button">
    63                 <span class="pwg-icon pwg-icon-pause">&nbsp;</span><span class="pwg-button-text">{'Pause of slideshow'|@translate}</span>
     63                <span class="pwg-icon pwg-icon-pause"></span><span class="pwg-button-text">{'Pause of slideshow'|@translate}</span>
    6464        </a>
    6565{/if}
    6666{strip}{if isset($next)}
    6767        <a href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE|@escape}" class="pwg-state-default pwg-button pwg-button-icon-right">
    68                 <span class="pwg-icon pwg-icon-arrow-e">&nbsp;</span><span class="pwg-button-text">{'Next'|@translate}</span>
     68                <span class="pwg-icon pwg-icon-arrow-e"></span><span class="pwg-button-text">{'Next'|@translate}</span>
    6969        </a>
    7070{else}
    7171        <span class="pwg-state-disabled pwg-button pwg-button-icon-right">
    72                 <span class="pwg-icon pwg-icon-arrow-e">&nbsp;</span><span class="pwg-button-text">{'Next'|@translate}</span>
     72                <span class="pwg-icon pwg-icon-arrow-e"></span><span class="pwg-button-text">{'Next'|@translate}</span>
    7373        </span>
    7474{/if}{/strip}
     
    7979{else}
    8080        <span class="pwg-state-disabled pwg-button pwg-button-icon-right">
    81                 <span class="pwg-icon pwg-icon-arrowstop-e">&nbsp;</span><span class="pwg-button-text">{'Last'|@translate}</span>
     81                <span class="pwg-icon pwg-icon-arrowstop-e"></span><span class="pwg-button-text">{'Last'|@translate}</span>
    8282        </span>
    8383{/if}{/strip}-->*}
  • extensions/Slide/theme.css

    r27022 r27402  
    182182}
    183183
    184 .dd_wrapper, .cl_wrapper, .cc_wrapper, #menubar dt, #menubar dt a {
     184.dd_wrapper, .cl_wrapper, .cc_wrapper, #menubar dt {
    185185    float:                      left;
    186186    padding:                    3px 16px 6px;
     
    190190    text-decoration:            none;
    191191    font-size:                  16px;
     192}
     193#menubar dt a{
     194        color:                                          #B3B3B3;
    192195}
    193196.activate{
Note: See TracChangeset for help on using the changeset viewer.