Changeset 13683


Ignore:
Timestamp:
03/23/12 22:58:12 (8 years ago)
Author:
plg
Message:

feature 2598: add sizes XXS and XS

new label for sizes

On picture.php, the current size is "checked" and javascript refreshed when switched (with jQuery)

jQuery loaded by default on header.tpl (already loaded by thumbnails.tpl)

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/derivative_std_params.inc.php

    r13472 r13683  
    2222define('IMG_SQUARE', 'square'); 
    2323define('IMG_THUMB', 'thumb'); 
     24define('IMG_XXSMALL', '2small'); 
     25define('IMG_XSMALL', 'xsmall'); 
    2426define('IMG_SMALL', 'small'); 
    2527define('IMG_MEDIUM', 'medium'); 
     
    4244final class ImageStdParams 
    4345{ 
    44   private static $all_types = array(IMG_SQUARE,IMG_THUMB,IMG_SMALL,IMG_MEDIUM,IMG_LARGE,IMG_XLARGE,IMG_XXLARGE); 
     46  private static $all_types = array( 
     47    IMG_SQUARE,IMG_THUMB,IMG_XXSMALL,IMG_XSMALL,IMG_SMALL,IMG_MEDIUM,IMG_LARGE,IMG_XLARGE,IMG_XXLARGE 
     48    ); 
    4549  private static $all_type_map = array(); 
    4650  private static $type_map = array(); 
     
    163167    self::$type_map[IMG_SQUARE] = new DerivativeParams( SizingParams::square(120,120) ); 
    164168    self::$type_map[IMG_THUMB] = new DerivativeParams( SizingParams::classic(144,144) ); 
    165     self::$type_map[IMG_SMALL] = new DerivativeParams( SizingParams::classic(240,240) ); 
    166     self::$type_map[IMG_MEDIUM] = new DerivativeParams( SizingParams::classic(432,432) ); 
    167     self::$type_map[IMG_LARGE] = new DerivativeParams( SizingParams::classic(648,576) ); 
    168     self::$type_map[IMG_XLARGE] = new DerivativeParams( SizingParams::classic(864,648) ); 
    169     self::$type_map[IMG_XXLARGE] = new DerivativeParams( SizingParams::classic(1200,900) ); 
     169    self::$type_map[IMG_XXSMALL] = new DerivativeParams( SizingParams::classic(240,240) ); 
     170    self::$type_map[IMG_XSMALL] = new DerivativeParams( SizingParams::classic(432,324) ); 
     171    self::$type_map[IMG_SMALL] = new DerivativeParams( SizingParams::classic(576,432) ); 
     172    self::$type_map[IMG_MEDIUM] = new DerivativeParams( SizingParams::classic(792,594) ); 
     173    self::$type_map[IMG_LARGE] = new DerivativeParams( SizingParams::classic(1008,756) ); 
     174    self::$type_map[IMG_XLARGE] = new DerivativeParams( SizingParams::classic(1224,918) ); 
     175    self::$type_map[IMG_XXLARGE] = new DerivativeParams( SizingParams::classic(1656,1242) ); 
    170176  } 
    171177 
  • trunk/language/en_UK/common.lang.php

    r13234 r13683  
    370370$lang['Your username has been successfully changed to : %s'] = 'Your username has been successfully changed to : %s'; 
    371371$lang['Your password has been reset'] = 'Your password has been reset'; 
    372 $lang['square'] = "Square"; 
    373 $lang['thumb'] = "Thumb"; 
    374 $lang['small'] = "Small"; 
    375 $lang['medium'] = "Medium"; 
    376 $lang['large'] = "Large"; 
    377 $lang['xlarge'] = "XLarge"; 
    378 $lang['xxlarge'] = "XXLarge"; 
    379 $lang['Original'] = "Original"; 
     372$lang['square'] = 'Square'; 
     373$lang['thumb'] = 'Thumbnail'; 
     374$lang['2small'] = 'XXS - tiny'; 
     375$lang['xsmall'] = 'XS - extra small'; 
     376$lang['small'] = 'S - small'; 
     377$lang['medium'] = 'M - medium'; 
     378$lang['large'] = 'L - large'; 
     379$lang['xlarge'] = 'XL - extra large'; 
     380$lang['xxlarge'] = 'XXL - huge'; 
     381$lang['Original'] = 'Original'; 
    380382$lang['Thank you for registering at %s!'] = 'Thank you for registering at %s!'; 
    381383$lang['Here are your connection settings'] = 'Here are your connection settings'; 
  • trunk/language/fr_FR/common.lang.php

    r13234 r13683  
    375375$lang['If you think you\'ve received this email in error, please contact us at %s'] = 'Si vous pensez avoir reçu cet email par erreur, veuillez nous contacter %s'; 
    376376$lang['Photo sizes'] = 'Tailles de photo'; 
    377 $lang['square'] = "Carré"; 
    378 $lang['thumb'] = "Miniature"; 
    379 $lang['small'] = "Petit"; 
    380 $lang['medium'] = "Moyen"; 
    381 $lang['large'] = "Large"; 
    382 $lang['xlarge'] = "XLarge"; 
    383 $lang['xxlarge'] = "XXLarge"; 
     377$lang['square'] = 'Carré'; 
     378$lang['thumb'] = 'Miniature'; 
     379$lang['2small'] = 'XXS - minuscule'; 
     380$lang['xsmall'] = 'XS - très petit'; 
     381$lang['small'] = 'S - petit'; 
     382$lang['medium'] = 'M - moyen'; 
     383$lang['large'] = 'L - grand'; 
     384$lang['xlarge'] = 'XL - très grand'; 
     385$lang['xxlarge'] = 'XXL - énorme'; 
    384386$lang['Show latest comments first'] = 'Montrer les commentaires les plus récents en premier'; 
    385387$lang['Show oldest comments first'] = 'Montrer les commentaires les plus anciens en premier'; 
  • trunk/themes/Sylvia/theme.css

    r12881 r13683  
    464464  background-color:#666; 
    465465} 
     466 
     467#derivativeSwitchBox, #sortOrderBox { 
     468    background-color: #222222; 
     469    border: 1px solid #FF3363; 
     470    border-radius: 0 15px 0 15px; 
     471} 
     472 
     473.switchBoxTitle { 
     474  border-color:#666; 
     475} 
  • trunk/themes/default/template/header.tpl

    r13048 r13683  
    5050<![endif]--> 
    5151 
     52{combine_script id="jquery"} 
     53 
    5254{if not empty($head_elements)} 
    5355        {foreach from=$head_elements item=elt}{$elt} 
  • trunk/themes/default/template/index.tpl

    r13115 r13683  
    99                </a> 
    1010                <div id="sortOrderBox" style="display:none; text-align:left" onclick="toggleSortOrderBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleSortOrderBox()"> 
    11                         {'Sort order'|@translate}<hr> 
     11                        <div class="switchBoxTitle">{'Sort order'|@translate}</div> 
    1212                        {foreach from=$image_orders item=image_order name=loop}{if !$smarty.foreach.loop.first}<br>{/if} 
    1313                        {if $image_order.SELECTED} 
    14                         <span>{$image_order.DISPLAY}</span> 
     14                        <span>&#x2714; {$image_order.DISPLAY}</span> 
    1515                        {else} 
    1616                        <a href="{$image_order.URL}" rel="nofollow">{$image_order.DISPLAY}</a> 
     
    4040                </a> 
    4141                <div id="derivativeSwitchBox" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleImageDerivativesBox()"> 
    42                         {'Photo sizes'|@translate}<hr> 
     42                        <div class="switchBoxTitle">{'Photo sizes'|@translate}</div> 
    4343                        {foreach from=$image_derivatives item=image_derivative name=loop}{if !$smarty.foreach.loop.first}<br>{/if} 
    4444                        {if $image_derivative.SELECTED} 
    45                         <span>{$image_derivative.DISPLAY}</span> 
     45                        <span>&#x2714; {$image_derivative.DISPLAY}</span> 
    4646                        {else} 
    4747                        <a href="{$image_derivative.URL}" rel="nofollow">{$image_derivative.DISPLAY}</a> 
  • trunk/themes/default/template/picture.tpl

    r13489 r13683  
    3030                theImg.useMap = "#map"+typeMap; 
    3131        } 
     32  jQuery('.derivativeChecked').hide(); 
     33  jQuery('#derivativeChecked'+typeSave).show(); 
    3234        document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}'; 
    3335} 
     
    5153<span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span></a> 
    5254<div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none"> 
     55<div class="switchBoxTitle">{'Photo sizes'|@translate}</div> 
    5356{foreach from=$current.unique_derivatives item=derivative key=derivative_type} 
    54 <a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')">{$derivative->get_type()|@translate} ({$derivative->get_size_hr()})</a><br> 
     57<span class="derivativeChecked" id="derivativeChecked{$derivative->get_type()}" {if $derivative->get_type() ne $current.selected_derivative->get_type()}style="display:none"{/if}>&#x2714;</span> <a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')">{$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span></a><br> 
    5558{/foreach} 
    5659{if isset($U_ORIGINAL)} 
  • trunk/themes/default/theme.css

    r13474 r13683  
    342342 
    343343#derivativeSwitchBox, #sortOrderBox { 
    344         padding: 0.5em 1em; 
     344        padding: 0.5em 10px; 
    345345        border-radius: 4px; 
    346346        z-index: 100; 
     347  text-align:left; 
     348} 
     349 
     350.switchBoxTitle { 
     351  border-bottom:1px solid #000; 
     352  padding-bottom:5px; 
     353  margin-bottom:5px; 
    347354} 
    348355 
  • trunk/themes/elegant/theme.css

    r13479 r13683  
    107107 
    108108/* borders */ 
    109 #derivativeSwitchBox, #sortOrderBox{ 
    110         border: 1px solid #000; 
     109#derivativeSwitchBox, #sortOrderBox { 
     110        border: 2px solid #444; 
    111111} 
     112 
     113.switchBoxTitle { 
     114  border-bottom:2px solid #444; 
     115} 
     116 
     117.derivativeSizeDetails {display:none} 
    112118 
    113119FIELDSET, INPUT, SELECT, TEXTAREA { 
Note: See TracChangeset for help on using the changeset viewer.