diff options
author | rvelices <rv-github@modusoptimus.com> | 2013-11-28 21:10:37 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2013-11-28 21:10:37 +0000 |
commit | 5640aafb9d0c1638301bf83cbb63689b0bc5562d (patch) | |
tree | d2b5cda3568c897cfb0371a19f135a6e11e5a44e | |
parent | 092fdc76e0e628d7d31cf10439cb4aa39637c99f (diff) |
remove reminescences of pre multi size ...
git-svn-id: http://piwigo.org/svn/trunk@25746 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | include/calendar_monthly.class.php | 46 | ||||
-rw-r--r-- | themes/default/template/month_calendar.tpl | 10 | ||||
-rw-r--r-- | themes/default/theme.css | 12 |
3 files changed, 5 insertions, 63 deletions
diff --git a/include/calendar_monthly.class.php b/include/calendar_monthly.class.php index c8f2d5b3e..5022f1a3e 100644 --- a/include/calendar_monthly.class.php +++ b/include/calendar_monthly.class.php @@ -419,10 +419,6 @@ class Calendar extends CalendarBase } list($cell_width, $cell_height) = ImageStdParams::get_by_type(IMG_SQUARE)->sizing->ideal_size; - if ($cell_width>120) - { - $cell_width = $cell_height = 120; - } $tpl_weeks = array(); $tpl_crt_week = array(); @@ -455,47 +451,6 @@ class Calendar extends CalendarBase } else { - list($tn_width,$tn_height) = $items[$day]['derivative']->get_size(); - - // now need to fit the thumbnail of size tn_size within - // a cell of size cell_size by playing with CSS position (left/top) - // and the width and height of <img>. - $ratio_w = $tn_width/$cell_width; - $ratio_h = $tn_height/$cell_height; - - $pos_top=$pos_left=0; - $css_style = ''; - - if ( $ratio_w>1 and $ratio_h>1) - {// cell completely smaller than the thumbnail so we will let the browser - // resize the thumbnail - if ($ratio_w > $ratio_h ) - {// thumbnail ratio compared to cell -> wide format - $css_style = 'height:'.$cell_height.'px;'; - $browser_img_width = $cell_height*$tn_width/$tn_height; - $pos_left = ($browser_img_width-$cell_width)/2; - } - else - { - $css_style = 'width:'.$cell_width.'px;'; - $browser_img_height = $cell_width*$tn_height/$tn_width; - $pos_top = ($browser_img_height-$cell_height)/2; - } - } - else - { - $pos_left = ($tn_width-$cell_width)/2; - $pos_top = ($tn_height-$cell_height)/2; - } - - if ( round($pos_left)!=0) - { - $css_style.='left:'.round(-$pos_left).'px;'; - } - if ( round($pos_top)!=0) - { - $css_style.='top:'.round(-$pos_top).'px;'; - } $url = duplicate_index_url( array( 'chronology_date' => @@ -514,7 +469,6 @@ class Calendar extends CalendarBase 'NB_ELEMENTS' => $items[$day]['nb_images'], 'IMAGE' => $items[$day]['derivative']->get_url(), 'U_IMG_LINK' => $url, - 'IMAGE_STYLE' => $css_style, 'IMAGE_ALT' => $items[$day]['file'], ); } diff --git a/themes/default/template/month_calendar.tpl b/themes/default/template/month_calendar.tpl index 9fbd8a1fa..ac8fed166 100644 --- a/themes/default/template/month_calendar.tpl +++ b/themes/default/template/month_calendar.tpl @@ -1,4 +1,4 @@ -{if !empty($chronology_navigation_bars) } +{if !empty($chronology_navigation_bars)} {foreach from=$chronology_navigation_bars item=bar} <div class="calendarBar"> {if isset($bar.previous)} @@ -22,7 +22,7 @@ {/foreach} {/if} -{if !empty($chronology_calendar.calendar_bars) } +{if !empty($chronology_calendar.calendar_bars)} {foreach from=$chronology_calendar.calendar_bars item=bar} <div class="calendarCalBar"> <span class="calCalHead"><a href="{$bar.U_HEAD}">{$bar.HEAD_LABEL}</a> ({$bar.NB_IMAGES})</span><br> @@ -40,7 +40,7 @@ {/foreach} {/if} -{if isset($chronology_calendar.month_view) } +{if isset($chronology_calendar.month_view)} <table class="calMonth"> <thead> <tr> @@ -50,7 +50,7 @@ </tr> </thead> {html_style} -TABLE.calMonth TBODY TD, TABLE.calMonth TBODY TD DIV.calImg{ +.calMonth TD, .calMonth .calImg{ width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px } {/html_style} @@ -63,7 +63,7 @@ TABLE.calMonth TBODY TD, TABLE.calMonth TBODY TD DIV.calImg{ <div class="calBackDate">{$day.DAY}</div><div class="calForeDate">{$day.DAY}</div> <div class="calImg"> <a href="{$day.U_IMG_LINK}"> - <img style="{$day.IMAGE_STYLE}" src="{$day.IMAGE}" alt="{$day.IMAGE_ALT}" title="{$day.NB_ELEMENTS|@translate_dec:'%d photo':'%d photos'}"> + <img src="{$day.IMAGE}" alt="{$day.IMAGE_ALT}" title="{$day.NB_ELEMENTS|@translate_dec:'%d photo':'%d photos'}"> </a> </div> {else} diff --git a/themes/default/theme.css b/themes/default/theme.css index 1207c46b7..a5f8e49ad 100644 --- a/themes/default/theme.css +++ b/themes/default/theme.css @@ -173,18 +173,6 @@ TD.calDayCellFull, TD.calDayCellEmpty { border: 1px solid gray; } -.calImg { - overflow: hidden; - vertical-align: bottom; - z-index: 1; - position: relative; /*<- this required by IE*/ -} - -.calImg IMG { - position: relative; - border: 0; -} - .calBackDate { padding-left: 4px; padding-top: 0; |