Ignore:
Timestamp:
Mar 4, 2012, 5:28:42 PM (12 years ago)
Author:
Zaphod
Message:

feature 2588: template modification for v2.4
-> #content on picture & slideshow page
-> class 'browsePathSeparator' on LEVEL_SEPARATOR on browsePath
-> derivativeSwitchLink replaced by pwg-size icon (with associated css modification on themes)
-> new id #theImageAndInfos that contains #theImage and #imageInfos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/template/picture_content.tpl

    r13068 r13474  
    33        title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}"
    44{/if}>
    5 {if count($current.unique_derivatives)>1}
    6 {footer_script}{literal}
    7 function changeImgSrc(url,typeSave,typeMap,typeDisplay)
    8 {
    9         var theImg = document.getElementById("theMainImage");
    10         if (theImg)
    11         {
    12                 theImg.removeAttribute("width");theImg.removeAttribute("height");
    13                 theImg.src = url;
    14                 var elt = document.getElementById("derivativeSwitchLink");
    15                 if (elt) elt.innerHTML = typeDisplay;
    16                 theImg.useMap = "#map"+typeMap;
    17         }
    18         document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
    19 }
    20 
    21 function toggleDerivativeSwitchBox()
    22 {
    23         var elt = document.getElementById("derivativeSwitchBox"),
    24                 ePos = document.getElementById("derivativeSwitchLink");
    25         if (elt.style.display==="none")
    26         {
    27                 elt.style.position = "absolute";
    28                 elt.style.left = (ePos.offsetLeft+10)+"px";
    29                 elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
    30                 elt.style.display="";
    31         }
    32         else
    33                 elt.style.display="none";
    34 }
    35 {/literal}{/footer_script}
    36 <a id="derivativeSwitchLink" href="javascript:toggleDerivativeSwitchBox()">{$current.selected_derivative->get_type()|@translate}</a>
    37 <div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none">
    38 {foreach from=$current.unique_derivatives item=derivative key=derivative_type}
    39 <a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}','{$derivative->get_type()|@translate|@escape:javascript}')">{$derivative->get_type()|@translate} ({$derivative->get_size_hr()})</a><br>
    40 {/foreach}
    41 {if isset($U_ORIGINAL)}
    42 <a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" rel="nofollow">{'Original'|@translate}</a>
    43 {/if}
    44 </div>
    45 {/if}
    465
    476{foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip}
Note: See TracChangeset for help on using the changeset viewer.