Changeset 12873


Ignore:
Timestamp:
01/11/12 06:03:04 (8 years ago)
Author:
rvelices
Message:

feature 2550 - replace Sort order label and select on index page with a css sprite icon

Location:
trunk/themes
Files:
12 edited

Legend:

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

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

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

    r12671 r12873  
    3737.pwg-icon-close {background-position: 0 -52px} 
    3838.pwg-icon-category-edit {background-position: -26px -52px} 
     39.pwg-icon-sort {background-position: -52px -52px} 
    3940.pwg-icon-category-view-normal {background-position: -156px -52px} 
    4041.pwg-icon-category-view-flat {background-position: -182px -52px} 
  • trunk/themes/default/template/index.tpl

    r12764 r12873  
    55        <ul class="categoryActions"> 
    66{if !empty($image_orders)} 
    7                 <li>{'Sort order'|@translate}: {strip} 
    8                 <select onchange="document.location = this.options[this.selectedIndex].value;"> 
    9                         {foreach from=$image_orders item=image_order} 
    10                         <option value="{$image_order.URL}"{if $image_order.SELECTED} selected="selected"{/if}>{$image_order.DISPLAY}</option> 
     7                <li>{strip}<a href="javascript:toggleSortOrderBox()" id="sortOrderLink" title="{'Sort order'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> 
     8                        <span class="pwg-icon pwg-icon-sort">&nbsp;</span><span class="pwg-button-text">{'Sort order'|@translate}</span> 
     9                </a> 
     10                <div id="sortOrderBox" style="display:none; text-align:left" onclick="toggleSortOrderBox()"> 
     11                        {'Sort order'|@translate}: 
     12                        {foreach from=$image_orders item=image_order}<br> 
     13                        {if $image_order.SELECTED} 
     14                        <span>{$image_order.DISPLAY}</span> 
     15                        {else} 
     16                        <a href="{$image_order.URL}" rel="nofollow">{$image_order.DISPLAY}</a> 
     17                        {/if} 
    1118                        {/foreach} 
    12                 </select> 
    13 {/strip}</li> 
     19                </div> 
     20                {footer_script}{literal} 
     21function toggleSortOrderBox() 
     22{ 
     23        var elt = document.getElementById("sortOrderBox"), 
     24                ePos = document.getElementById("sortOrderLink"); 
     25        if (elt.style.display==="none") 
     26        { 
     27                elt.style.position = "absolute"; 
     28                elt.style.left = (ePos.offsetLeft) + "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                {/strip}</li> 
    1437{/if} 
    1538{if isset($favorite)} 
  • trunk/themes/default/theme.css

    r12797 r12873  
    346346} 
    347347 
    348 #derivativeSwitchBox { 
    349         padding: 0.5em; 
     348#derivativeSwitchBox, #sortOrderBox { 
     349        padding: 0.5em 1em; 
    350350        border-radius: 4px; 
    351351        z-index: 100; 
Note: See TracChangeset for help on using the changeset viewer.