mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 21:43:18 +00:00
Merge pull request #1084 from nlegoff/fix-phras-123
[3.8][PHRAS-123] Fix tooltip content display
This commit is contained in:
@@ -103,12 +103,10 @@ class Tooltip implements ControllerProviderInterface
|
|||||||
|
|
||||||
public function displayPreview(Application $app, $sbas_id, $record_id)
|
public function displayPreview(Application $app, $sbas_id, $record_id)
|
||||||
{
|
{
|
||||||
$record = new \record_adapter($app, $sbas_id, $record_id);
|
return $app['twig']->render('prod/Tooltip/Preview.html.twig', array(
|
||||||
|
'record' => new \record_adapter($app, $sbas_id, $record_id),
|
||||||
return $app['twig']->render(
|
'not_wrapped' => true
|
||||||
'prod/Tooltip/Preview.html.twig'
|
));
|
||||||
, array('record' => $record, 'not_wrapped' => true)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function displayCaption(Application $app, $sbas_id, $record_id, $context)
|
public function displayCaption(Application $app, $sbas_id, $record_id, $context)
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<div class="popover" style="display:block;{% if maxwidth %}max-width:{{ maxwidth }}px;{% endif %}{% if width %}width:{{ width }}px;{% endif %}position:relative;">
|
<div class="popover" style="display:block;{% if maxwidth is not none %}max-width:{{ maxwidth }}px;{% endif %}{% if width is not none %}width:{{ width }}px;{% endif %}position:relative;">
|
||||||
<div class="arrow"></div>
|
<div class="arrow"></div>
|
||||||
<div class="popover-inner" style="width:auto;">
|
<div class="popover-inner" style="width:auto;">
|
||||||
<h3 class="popover-title">
|
<h3 class="popover-title">
|
||||||
{% if title %}
|
{% if title is not none %}
|
||||||
{{ title }}
|
{{ title }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<button data-dismiss="modal" class="close tooltip_closer" style="display:none;">×</button>
|
<button data-dismiss="modal" class="close tooltip_closer" style="display:none;">×</button>
|
||||||
|
@@ -414,7 +414,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (resizeImgTips) {
|
if (resizeImgTips) {
|
||||||
var factor = Math.min((width - 45) / width, (height - 75) / height);
|
var factor = Math.max(Math.min((width - 45) / width, (height - 75) / height), 1);
|
||||||
var imgWidth = Math.round(width * factor);
|
var imgWidth = Math.round(width * factor);
|
||||||
var imgHeight = Math.round(height * factor);
|
var imgHeight = Math.round(height * factor);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user