Changeset 9868


Ignore:
Timestamp:
Mar 26, 2011, 4:53:38 PM (10 years ago)
Author:
flop25
Message:

use of tiptip for the name of the picture, and this name is now in the alt attribute.

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/element_set_ranks.php

    r9865 r9868  
    198198SELECT
    199199    id,
     200    file,
    200201    path,
    201202    tn_ext,
     203    name,
    202204    rank
    203205  FROM '.IMAGES_TABLE.'
     
    217219       
    218220        $thumbnail_size = getimagesize($src);
     221  if ( !empty( $row['name'] ) )
     222  {
     223    $thumbnail_name = $row['name'];
     224  }
     225  else
     226  {
     227    $file_wo_ext = get_filename_wo_extension($row['file']);
     228        $thumbnail_name = str_replace('_', ' ', $file_wo_ext);
     229  }
    219230        $thumbnail_info[] = array(
     231                'name'  => $thumbnail_name,
    220232                'width' => $thumbnail_size[0],
    221233                'height'        => $thumbnail_size[1],
     
    243255    array(
    244256      'ID' => $thumbnails_info['id'],
     257      'NAME' => $thumbnails_info['name'],
    245258      'TN_SRC' => $thumbnails_info['tn_src'],
    246259      'RANK' => $thumbnails_info['rank'],
  • trunk/admin/themes/default/template/element_set_ranks.tpl

    r9864 r9868  
    2929  checkOrderOptions();
    3030});
     31jQuery(document).ready(function() {
     32jQuery('.clipwrapper').tipTip({
     33'delay' : 0,
     34'fadeIn' : 200,
     35'fadeOut' : 200
     36});
     37});
    3138{/literal}{/footer_script}
    3239
     
    4552      {foreach from=$thumbnails item=thumbnail}
    4653      <li class="rank-of-image" style="width:{$thumbnail.CLIPING_li}px; height:{$thumbnail.CLIPING_li}px; ">
    47         <div class="clipwrapper" style="width:{$thumbnail.CLIPING}px; height:{$thumbnail.CLIPING}px; ">
     54        <div class="clipwrapper" style="width:{$thumbnail.CLIPING}px; height:{$thumbnail.CLIPING}px; " title="{$thumbnail.NAME|@replace:'"':' '}">
    4855          <div class="clip" style="clip:rect({$thumbnail.CLIP_TOP}px {$thumbnail.CLIP_RIGHT}px {$thumbnail.CLIP_BOTTOM}px {$thumbnail.CLIP_LEFT}px);top:-{$thumbnail.CLIP_TOP}px;left:-{$thumbnail.CLIP_LEFT}px">
    49             <img src="{$thumbnail.TN_SRC}" class="thumbnail" alt="">
     56            <img src="{$thumbnail.TN_SRC}" class="thumbnail" alt="{$thumbnail.NAME|@replace:'"':' '}">
    5057          </div>
    5158        </div>
Note: See TracChangeset for help on using the changeset viewer.