Changeset 12797 for trunk/themes


Ignore:
Timestamp:
Dec 27, 2011, 9:26:49 PM (13 years ago)
Author:
rvelices
Message:

feature 2541 multisize

  • nicer presentation on picture.php
  • added a maintenance purge derivatives action
Location:
trunk/themes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/clear/theme.css

    r8306 r12797  
    1515}
    1616
    17 #menubar DL, .content, #imageToolBar, .header_notes {
     17#menubar DL, .content, #imageToolBar, #derivativeSwitchLink, #derivativeSwitchBox, .header_notes {
    1818  background-color: #eeeeee;
    1919}
    2020
    2121/* borders */
    22 #menubar DL, .content, #imageToolBar {
     22#menubar DL, .content, #imageToolBar, #derivativeSwitchLink, #derivativeSwitchBox {
    2323  border: 1px solid #d3d3d3;
    2424}
  • trunk/themes/dark/theme.css

    r11992 r12797  
    1717}
    1818
    19 #menubar DL, .content, #imageToolBar, #imageHeaderBar, .header_notes {
     19#menubar DL, .content, #imageToolBar, #imageHeaderBar, #derivativeSwitchLink, #derivativeSwitchBox, .header_notes {
    2020        background-color: #505050;
    2121}
     
    3535
    3636/* borders */
    37 #menubar DL, .content{
     37#menubar DL, .content, #derivativeSwitchLink, #derivativeSwitchBox{
    3838        border: 1px solid #000;
    3939}
  • trunk/themes/default/template/picture_content.tpl

    r12796 r12797  
    55{if count($current.available_derivative_types)>1}
    66{footer_script}{literal}
    7 function changeImgSrc(url,type)
     7function changeImgSrc(url,type,display)
    88{
    99        var theImg = document.getElementById("theMainImage");
     
    1212                theImg.removeAttribute("width");theImg.removeAttribute("height");
    1313                theImg.src = url;
     14                var elt = document.getElementById("derivativeSwitchLink");
     15                if (elt) elt.innerHTML = display;
    1416        }
    1517        document.cookie = 'picture_deriv=' + type;
    1618}
     19
     20function toggleDerivativeSwitchBox()
     21{
     22        var elt = document.getElementById("derivativeSwitchBox"),
     23                ePos = document.getElementById("derivativeSwitchLink");
     24        if (elt.style.display==="none")
     25        {
     26                elt.style.position = "absolute";
     27                elt.style.left = (ePos.offsetLeft + 10) + "px";
     28                elt.style.top = (ePos.offsetTop + ePos.offsetHeight) + "px";
     29                elt.style.display="";
     30        }
     31        else
     32                elt.style.display="none";
     33}
    1734{/literal}{/footer_script}
    18 <p>
     35<a id="derivativeSwitchLink" onclick="toggleDerivativeSwitchBox()" style="cursor:pointer">{$current.selected_derivative->get_type()|@translate}</a>
     36<div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none">
    1937{foreach from=$current.available_derivative_types item=derivative_type}
    20 <a onclick="changeImgSrc('{$current.derivatives[$derivative_type]->get_url()|@escape:javascript}', '{$derivative_type}')" title="{$current.derivatives[$derivative_type]->get_size_hr()}">{$derivative_type}</a>
     38<a onclick="changeImgSrc('{$current.derivatives[$derivative_type]->get_url()|@escape:javascript}', '{$derivative_type}', '{$derivative_type|@translate|@escape:javascript}')" style="cursor:pointer">{$derivative_type|@translate} ({$current.derivatives[$derivative_type]->get_size_hr()})</a><br>
    2139{/foreach}
    22 </p>
     40</div>
    2341{/if}
  • trunk/themes/default/theme.css

    r12764 r12797  
    338338#imageToolBar .pwg-button {width:42px;}
    339339
     340
     341#derivativeSwitchLink {
     342        padding: 0.2em;
     343        position: absolute;
     344        left: 5px;
     345        top: 100px;
     346}
     347
     348#derivativeSwitchBox {
     349        padding: 0.5em;
     350        border-radius: 4px;
     351        z-index: 100;
     352}
    340353
    341354#theImage {
Note: See TracChangeset for help on using the changeset viewer.