Changeset 13489 for trunk/themes/default


Ignore:
Timestamp:
Mar 6, 2012, 9:43:18 PM (13 years ago)
Author:
rvelices
Message:

added event for src image url
simplify js in picture.tpl
action.php fix history saving

File:
1 edited

Legend:

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

    r13478 r13489  
    2121{if count($current.unique_derivatives)>1}
    2222{footer_script}{literal}
    23 function changeImgSrc(url,typeSave,typeMap,typeDisplay)
     23function changeImgSrc(url,typeSave,typeMap)
    2424{
    2525        var theImg = document.getElementById("theMainImage");
     
    2828                theImg.removeAttribute("width");theImg.removeAttribute("height");
    2929                theImg.src = url;
    30                 var elt = document.getElementById("derivativeSwitchLink");
    31                 /* if (elt) elt.innerHTML = typeDisplay; */
    3230                theImg.useMap = "#map"+typeMap;
    3331        }
     
    5452<div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none">
    5553{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
    56 <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>
     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>
    5755{/foreach}
    5856{if isset($U_ORIGINAL)}
Note: See TracChangeset for help on using the changeset viewer.