mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 20:43:25 +00:00
Fix basket tooltip display
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{% import 'common/thumbnail.html' as thumbnail %}
|
{% import 'common/thumbnail.html' as thumbnail %}
|
||||||
<div style="margin:5px;width:280px;height:300px;position:relative;">
|
<div class="noToolTipResize" style="margin:5px;width:280px;height:300px;position:relative;">
|
||||||
<div>
|
<div>
|
||||||
<span style="font-weight:bold;font-size:14px;">
|
<span style="font-weight:bold;font-size:14px;">
|
||||||
{{ basket.getName() }}
|
{{ basket.getName() }}
|
||||||
@@ -25,3 +25,5 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
{% import 'common/thumbnail.html' as thumbnail %}
|
{% import 'common/thumbnail.html' as thumbnail %}
|
||||||
<div style="margin:5px;width:280px;height:300px;position:relative;">
|
<div class="noToolTipResize" style="margin:5px;width:280px;height:300px;position:relative;">
|
||||||
<div>
|
<div>
|
||||||
<span style="font-weight:bold;font-size:14px;">
|
<span style="font-weight:bold;font-size:14px;">
|
||||||
{{ Story.get_title() }}
|
{{ Story.get_title() }}
|
||||||
@@ -25,3 +25,5 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@@ -251,8 +251,11 @@
|
|||||||
var width = 'auto';
|
var width = 'auto';
|
||||||
var height = 'auto';
|
var height = 'auto';
|
||||||
var ratio = 1;
|
var ratio = 1;
|
||||||
|
var resizeImgTips = false;
|
||||||
var $imgTips = $('#' + settings($.tooltip.current).id + ' .imgTips');
|
var $imgTips = $('#' + settings($.tooltip.current).id + ' .imgTips');
|
||||||
if ($imgTips[0]) {
|
|
||||||
|
if ($imgTips[0] && $('#' + settings($.tooltip.current).id + ' .noToolTipResize').length === 0) {
|
||||||
|
resizeImgTips = true;
|
||||||
width = parseInt($imgTips[0].style.width);
|
width = parseInt($imgTips[0].style.width);
|
||||||
height = parseInt($imgTips[0].style.height);
|
height = parseInt($imgTips[0].style.height);
|
||||||
ratio = width/height;
|
ratio = width/height;
|
||||||
@@ -325,7 +328,7 @@
|
|||||||
|
|
||||||
|
|
||||||
//correction par ratio
|
//correction par ratio
|
||||||
if ($('#' + settings($.tooltip.current).id + ' .imgTips')[0]) {
|
if (resizeImgTips && $('#' + settings($.tooltip.current).id + ' .imgTips')[0]) {
|
||||||
|
|
||||||
if(ratioSurfaceH > ratioImage)
|
if(ratioSurfaceH > ratioImage)
|
||||||
{
|
{
|
||||||
@@ -403,7 +406,7 @@
|
|||||||
|
|
||||||
|
|
||||||
//si ya une image on re-ajuste au ratio
|
//si ya une image on re-ajuste au ratio
|
||||||
if ($('#' + settings($.tooltip.current).id + ' .imgTips')[0]) {
|
if (resizeImgTips && $('#' + settings($.tooltip.current).id + ' .imgTips')[0]) {
|
||||||
if(width == 'auto')
|
if(width == 'auto')
|
||||||
width = $('#' + settings($.tooltip.current).id).width();
|
width = $('#' + settings($.tooltip.current).id).width();
|
||||||
if(height == 'auto')
|
if(height == 'auto')
|
||||||
@@ -439,20 +442,14 @@
|
|||||||
top: top
|
top: top
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(resizeImgTips)
|
||||||
|
{
|
||||||
$imgTips.css({
|
$imgTips.css({
|
||||||
width: width,
|
width: width,
|
||||||
height: height
|
height: height
|
||||||
// ,
|
|
||||||
// left: left,
|
|
||||||
// top: top
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// if($imgTips.size() > 0)
|
|
||||||
// {
|
|
||||||
// $('#' + settings($.tooltip.current).id).image_enhance('destroy').image_enhance({
|
|
||||||
// zoomable:true
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user