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 %}
|
||||
<div style="margin:5px;width:280px;height:300px;position:relative;">
|
||||
<div class="noToolTipResize" style="margin:5px;width:280px;height:300px;position:relative;">
|
||||
<div>
|
||||
<span style="font-weight:bold;font-size:14px;">
|
||||
{{ basket.getName() }}
|
||||
@@ -25,3 +25,5 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{% 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>
|
||||
<span style="font-weight:bold;font-size:14px;">
|
||||
{{ Story.get_title() }}
|
||||
@@ -25,3 +25,5 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -251,8 +251,11 @@
|
||||
var width = 'auto';
|
||||
var height = 'auto';
|
||||
var ratio = 1;
|
||||
var resizeImgTips = false;
|
||||
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);
|
||||
height = parseInt($imgTips[0].style.height);
|
||||
ratio = width/height;
|
||||
@@ -325,7 +328,7 @@
|
||||
|
||||
|
||||
//correction par ratio
|
||||
if ($('#' + settings($.tooltip.current).id + ' .imgTips')[0]) {
|
||||
if (resizeImgTips && $('#' + settings($.tooltip.current).id + ' .imgTips')[0]) {
|
||||
|
||||
if(ratioSurfaceH > ratioImage)
|
||||
{
|
||||
@@ -403,7 +406,7 @@
|
||||
|
||||
|
||||
//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')
|
||||
width = $('#' + settings($.tooltip.current).id).width();
|
||||
if(height == 'auto')
|
||||
@@ -439,20 +442,14 @@
|
||||
top: top
|
||||
});
|
||||
|
||||
if(resizeImgTips)
|
||||
{
|
||||
$imgTips.css({
|
||||
width: width,
|
||||
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