use of tiptip for the name of the picture, and this name is now in the alt attribute.
git-svn-id: http://piwigo.org/svn/trunk@9868 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
46893b9a4d
commit
eacd53fb97
2 changed files with 22 additions and 2 deletions
|
|
@ -197,8 +197,10 @@ $template->assign(
|
||||||
$query = '
|
$query = '
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
id,
|
||||||
|
file,
|
||||||
path,
|
path,
|
||||||
tn_ext,
|
tn_ext,
|
||||||
|
name,
|
||||||
rank
|
rank
|
||||||
FROM '.IMAGES_TABLE.'
|
FROM '.IMAGES_TABLE.'
|
||||||
JOIN '.IMAGE_CATEGORY_TABLE.' ON image_id = id
|
JOIN '.IMAGE_CATEGORY_TABLE.' ON image_id = id
|
||||||
|
|
@ -216,7 +218,17 @@ while ($row = pwg_db_fetch_assoc($result))
|
||||||
$src = get_thumbnail_url($row);
|
$src = get_thumbnail_url($row);
|
||||||
|
|
||||||
$thumbnail_size = getimagesize($src);
|
$thumbnail_size = getimagesize($src);
|
||||||
|
if ( !empty( $row['name'] ) )
|
||||||
|
{
|
||||||
|
$thumbnail_name = $row['name'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$file_wo_ext = get_filename_wo_extension($row['file']);
|
||||||
|
$thumbnail_name = str_replace('_', ' ', $file_wo_ext);
|
||||||
|
}
|
||||||
$thumbnail_info[] = array(
|
$thumbnail_info[] = array(
|
||||||
|
'name' => $thumbnail_name,
|
||||||
'width' => $thumbnail_size[0],
|
'width' => $thumbnail_size[0],
|
||||||
'height' => $thumbnail_size[1],
|
'height' => $thumbnail_size[1],
|
||||||
'id' => $row['id'],
|
'id' => $row['id'],
|
||||||
|
|
@ -242,6 +254,7 @@ foreach ($thumbnail_info as $thumbnails_info)
|
||||||
'thumbnails',
|
'thumbnails',
|
||||||
array(
|
array(
|
||||||
'ID' => $thumbnails_info['id'],
|
'ID' => $thumbnails_info['id'],
|
||||||
|
'NAME' => $thumbnails_info['name'],
|
||||||
'TN_SRC' => $thumbnails_info['tn_src'],
|
'TN_SRC' => $thumbnails_info['tn_src'],
|
||||||
'RANK' => $thumbnails_info['rank'],
|
'RANK' => $thumbnails_info['rank'],
|
||||||
'CLIPING' => round($clipping),
|
'CLIPING' => round($clipping),
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,13 @@ jQuery(document).ready(function() {
|
||||||
|
|
||||||
checkOrderOptions();
|
checkOrderOptions();
|
||||||
});
|
});
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
jQuery('.clipwrapper').tipTip({
|
||||||
|
'delay' : 0,
|
||||||
|
'fadeIn' : 200,
|
||||||
|
'fadeOut' : 200
|
||||||
|
});
|
||||||
|
});
|
||||||
{/literal}{/footer_script}
|
{/literal}{/footer_script}
|
||||||
|
|
||||||
<h2>{'Manage photo ranks'|@translate}</h2>
|
<h2>{'Manage photo ranks'|@translate}</h2>
|
||||||
|
|
@ -44,9 +51,9 @@ jQuery(document).ready(function() {
|
||||||
<ul class="thumbnails">
|
<ul class="thumbnails">
|
||||||
{foreach from=$thumbnails item=thumbnail}
|
{foreach from=$thumbnails item=thumbnail}
|
||||||
<li class="rank-of-image" style="width:{$thumbnail.CLIPING_li}px; height:{$thumbnail.CLIPING_li}px; ">
|
<li class="rank-of-image" style="width:{$thumbnail.CLIPING_li}px; height:{$thumbnail.CLIPING_li}px; ">
|
||||||
<div class="clipwrapper" style="width:{$thumbnail.CLIPING}px; height:{$thumbnail.CLIPING}px; ">
|
<div class="clipwrapper" style="width:{$thumbnail.CLIPING}px; height:{$thumbnail.CLIPING}px; " title="{$thumbnail.NAME|@replace:'"':' '}">
|
||||||
<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">
|
<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">
|
||||||
<img src="{$thumbnail.TN_SRC}" class="thumbnail" alt="">
|
<img src="{$thumbnail.TN_SRC}" class="thumbnail" alt="{$thumbnail.NAME|@replace:'"':' '}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" name="rank_of_image[{$thumbnail.ID}]" value="{$thumbnail.RANK}" style="display:none">
|
<input type="text" name="rank_of_image[{$thumbnail.ID}]" value="{$thumbnail.RANK}" style="display:none">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue