Changeset 25746


Ignore:
Timestamp:
Nov 28, 2013, 10:10:37 PM (10 years ago)
Author:
rvelices
Message:

remove reminescences of pre multi size ...

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/calendar_monthly.class.php

    r25507 r25746  
    420420
    421421      list($cell_width, $cell_height) = ImageStdParams::get_by_type(IMG_SQUARE)->sizing->ideal_size;
    422       if ($cell_width>120)
    423       {
    424         $cell_width = $cell_height = 120;
    425       }
    426422
    427423      $tpl_weeks    = array();
     
    456452        else
    457453        {
    458           list($tn_width,$tn_height) = $items[$day]['derivative']->get_size();
    459 
    460           // now need to fit the thumbnail of size tn_size within
    461           // a cell of size cell_size by playing with CSS position (left/top)
    462           // and the width and height of <img>.
    463           $ratio_w = $tn_width/$cell_width;
    464           $ratio_h = $tn_height/$cell_height;
    465 
    466           $pos_top=$pos_left=0;
    467           $css_style = '';
    468 
    469           if ( $ratio_w>1 and $ratio_h>1)
    470           {// cell completely smaller than the thumbnail so we will let the browser
    471            // resize the thumbnail
    472             if ($ratio_w > $ratio_h )
    473             {// thumbnail ratio compared to cell -> wide format
    474               $css_style = 'height:'.$cell_height.'px;';
    475               $browser_img_width = $cell_height*$tn_width/$tn_height;
    476               $pos_left = ($browser_img_width-$cell_width)/2;
    477             }
    478             else
    479             {
    480               $css_style = 'width:'.$cell_width.'px;';
    481               $browser_img_height = $cell_width*$tn_height/$tn_width;
    482               $pos_top = ($browser_img_height-$cell_height)/2;
    483             }
    484           }
    485           else
    486           {
    487             $pos_left = ($tn_width-$cell_width)/2;
    488             $pos_top = ($tn_height-$cell_height)/2;
    489           }
    490 
    491           if ( round($pos_left)!=0)
    492           {
    493             $css_style.='left:'.round(-$pos_left).'px;';
    494           }
    495           if ( round($pos_top)!=0)
    496           {
    497             $css_style.='top:'.round(-$pos_top).'px;';
    498           }
    499454          $url = duplicate_index_url(
    500455              array(
     
    515470                'IMAGE'       => $items[$day]['derivative']->get_url(),
    516471                'U_IMG_LINK'  => $url,
    517                 'IMAGE_STYLE' => $css_style,
    518472                'IMAGE_ALT'   => $items[$day]['file'],
    519473              );
  • trunk/themes/default/template/month_calendar.tpl

    r25232 r25746  
    1 {if !empty($chronology_navigation_bars) }
     1{if !empty($chronology_navigation_bars)}
    22{foreach from=$chronology_navigation_bars item=bar}
    33<div class="calendarBar">
     
    2323{/if}
    2424
    25 {if !empty($chronology_calendar.calendar_bars) }
     25{if !empty($chronology_calendar.calendar_bars)}
    2626{foreach from=$chronology_calendar.calendar_bars item=bar}
    2727<div class="calendarCalBar">
     
    4141{/if}
    4242
    43 {if isset($chronology_calendar.month_view) }
     43{if isset($chronology_calendar.month_view)}
    4444<table class="calMonth">
    4545 <thead>
     
    5151 </thead>
    5252{html_style}
    53 TABLE.calMonth TBODY TD, TABLE.calMonth TBODY TD DIV.calImg{
     53.calMonth TD, .calMonth .calImg{
    5454        width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px
    5555}
     
    6464                                <div class="calImg">
    6565                                        <a href="{$day.U_IMG_LINK}">
    66                                                 <img style="{$day.IMAGE_STYLE}" src="{$day.IMAGE}" alt="{$day.IMAGE_ALT}" title="{$day.NB_ELEMENTS|@translate_dec:'%d photo':'%d photos'}">
     66                                                <img src="{$day.IMAGE}" alt="{$day.IMAGE_ALT}" title="{$day.NB_ELEMENTS|@translate_dec:'%d photo':'%d photos'}">
    6767                                        </a>
    6868                                </div>
  • trunk/themes/default/theme.css

    r25232 r25746  
    172172        font-size: 18px;
    173173        border: 1px solid gray;
    174 }
    175 
    176 .calImg {
    177         overflow: hidden;
    178         vertical-align: bottom;
    179         z-index: 1;
    180         position: relative; /*<- this required by IE*/
    181 }
    182 
    183 .calImg IMG {
    184         position: relative;
    185         border: 0;
    186174}
    187175
Note: See TracChangeset for help on using the changeset viewer.