Changeset 13773


Ignore:
Timestamp:
Mar 27, 2012, 10:05:37 PM (9 years ago)
Author:
rvelices
Message:
  • remove unnecessary classes switchSelected switchUnselected (same effect acheved through visibility)
  • remove unused css
Location:
trunk
Files:
5 edited

Legend:

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

    r13225 r13773  
    241241  {
    242242    $key = get_ephemeral_key(3, $page['image_id']);
     243    $content = '';
     244    if ('reject'===@$comment_action)
     245    {
     246      $content = htmlspecialchars( stripslashes($comm['content']) );
     247    }
    243248    $template->assign('comment_add',
    244249        array(
    245250          'F_ACTION' => $url_self,
    246251          'KEY' => $key,
    247           'CONTENT' => null,
     252          'CONTENT' => $content,
    248253          'SHOW_AUTHOR' => !is_classic_user()
    249254        ));
  • trunk/themes/dark/theme.css

    r13729 r13773  
    4040
    4141FIELDSET, INPUT, SELECT, TEXTAREA,
    42 .content .thumbnailCategory ,
     42.thumbnailCategory ,
    4343.content .commentElement ,
    4444.thumbnails .wrap2 {
     
    4848
    4949.thumbnails .wrap2:hover,
    50 .content .thumbnailCategories .thumbnailCategory:hover,
    51 .content .commentsList .commentElement:hover{
     50.thumbnailCategory:hover,
     51.content .commentElement:hover{
    5252        border-color: yellow;   /* thumbnails border color when mouse cursor is over it */
    5353}
  • trunk/themes/default/template/index.tpl

    r13736 r13773  
    88                        <span class="pwg-icon pwg-icon-sort">&nbsp;</span><span class="pwg-button-text">{'Sort order'|@translate}</span>
    99                </a>
    10                 <div id="sortOrderBox" class="switchBox" style="display:none; text-align:left" onclick="toggleSortOrderBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleSortOrderBox(1)">
     10                <div id="sortOrderBox" class="switchBox" style="display:none" onclick="toggleSortOrderBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleSortOrderBox(1)">
    1111                        <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 class="switchCheck">&#x2714; </span><span class="switchSelected">{$image_order.DISPLAY}</span>
     14                        <span>&#x2714; </span>{$image_order.DISPLAY}
    1515                        {else}
    16                         <a href="{$image_order.URL}" class="switchUnselected" rel="nofollow">{$image_order.DISPLAY}</a>
     16                        <span style="visibility:hidden">&#x2714; </span><a href="{$image_order.URL}" rel="nofollow">{$image_order.DISPLAY}</a>
    1717                        {/if}
    1818                        {/foreach}
     
    2323                ePos = document.getElementById("sortOrderLink");
    2424        if (!forceHide && elt.style.display==="none") {
    25                 elt.style.position = "absolute";
    2625                elt.style.left = ePos.offsetLeft+"px";
    2726                elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
     
    3938                        <span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span>
    4039                </a>
    41                 <div id="derivativeSwitchBox" class="switchBox" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleImageDerivativesBox(1)">
     40                <div id="derivativeSwitchBox" class="switchBox" style="display:none" onclick="toggleImageDerivativesBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleImageDerivativesBox(1)">
    4241                        <div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
    4342                        {foreach from=$image_derivatives item=image_derivative name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
    4443                        {if $image_derivative.SELECTED}
    45                         <span class="switchCheck">&#x2714; </span><span class="switchSelected">{$image_derivative.DISPLAY}</span>
     44                        <span>&#x2714; </span>{$image_derivative.DISPLAY}
    4645                        {else}
    47                         <a href="{$image_derivative.URL}" class="switchUnselected" rel="nofollow">{$image_derivative.DISPLAY}</a>
     46                        <span style="visibility:hidden">&#x2714; </span><a href="{$image_derivative.URL}" class="switchUnselected" rel="nofollow">{$image_derivative.DISPLAY}</a>
    4847                        {/if}
    4948                        {/foreach}
     
    5453                ePos = document.getElementById("derivativeChooseLink");
    5554        if (!forceHide && elt.style.display==="none") {
    56                 elt.style.position = "absolute";
    57                 elt.style.left = ePos.offsetLeft+"px";
     55                elt.style.left = (ePos.offsetLeft-25)+"px";
    5856                elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
    5957                elt.style.display="";
  • trunk/themes/default/template/picture.tpl

    r13736 r13773  
    2020
    2121{if count($current.unique_derivatives)>1}
    22 {footer_script}{literal}
     22{footer_script require='jquery'}{literal}
    2323function changeImgSrc(url,typeSave,typeMap)
    2424{
     
    3030                theImg.useMap = "#map"+typeMap;
    3131        }
    32   jQuery('.derivativeChecked').hide();
    33   jQuery('#derivativeChecked'+typeSave).show();
    34   jQuery('#derivativeSiwtchBox .switchSelected').addClass('switchUnselected').removeClass('switchSelected');
    35   jQuery('#derivativeName'+typeSave).addClass('switchSelected').removeClass('switchUnselected');
    36     document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
     32        jQuery('#derivativeSwitchBox .switchCheck').css('visibility','hidden');
     33        jQuery('#derivativeChecked'+typeSave).css('visibility','visible');
     34        document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
    3735}
    3836
     
    4341        if (elt.style.display==="none")
    4442        {
    45                 elt.style.position = "absolute";
    4643                elt.style.left = (ePos.offsetLeft)+"px";
    4744                elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
     
    5148                elt.style.display="none";
    5249}
     50jQuery("#derivativeSwitchBox").on('mouseleave click', function() {
     51        this.style.display="none";
     52}
     53);
    5354{/literal}{/footer_script}
    5455{strip}<a id="derivativeSwitchLink" href="javascript:toggleDerivativeSwitchBox()" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
    5556<span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span></a>
    56 <div id="derivativeSwitchBox" class="switchBox" onclick="toggleDerivativeSwitchBox()" style="display:none" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e.parentNode.parentNode==this||e==this||toggleDerivativeSwitchBox()">
     57<div id="derivativeSwitchBox" class="switchBox" style="display:none">
    5758<div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
    5859{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
    59 <span class="derivativeChecked switchCheck"
    60  id="derivativeChecked{$derivative_type}" {if $derivative->get_type() ne $current.selected_derivative->get_type()}style="display:none"{/if}>&#x2714; </span>
    61 <a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')"
    62  id="derivativeName{$derivative_type}"
    63  class="{if $derivative->get_type() == $current.selected_derivative->get_type()}switchSelected{else}switchUnselected{/if}">
     60<span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
     61<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')">
    6462        {$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span>
    6563</a><br>
  • trunk/themes/default/theme.css

    r13735 r13773  
    287287        overflow: auto;
    288288        /*width: inherit;*/
    289 }
    290 
    291 .commentElement .description H3 {
    292         text-align: left;
    293         background: transparent;
    294         margin: 0;
    295         padding: 0.1em;
    296         font-size: 120%;
    297289}
    298290
     
    383375
    384376.switchBox {
    385         padding: 0.5em 10px;
     377        padding: 0.5em 5px;
    386378        border-radius: 4px;
    387379        z-index: 100;
    388   text-align:left;
     380        text-align: left;
     381        position: absolute; /*left, right set through js*/
    389382}
    390383
     
    398391        clear: left;
    399392        text-align: center;
    400         position: relative; /*so that the drivative switch link is positioned relative to us*/
    401393}
    402394
Note: See TracChangeset for help on using the changeset viewer.