diff --git a/datamodels/2.x/itop-attachments/main.attachments.php b/datamodels/2.x/itop-attachments/main.attachments.php index 062f204dfc..3f72eb5656 100755 --- a/datamodels/2.x/itop-attachments/main.attachments.php +++ b/datamodels/2.x/itop-attachments/main.attachments.php @@ -468,7 +468,8 @@ EOF } } $sPreviewNotAvailable = addslashes(Dict::S('Attachments:PreviewNotAvailable')); - $oPage->add_ready_script("$(document).tooltip({ items: '.attachment a', position: { my: 'left top', at: 'right top', using: function( position, feedback ) { $( this ).css( position ); }}, content: function() { if ($(this).attr('data-preview') == 'true') { return('');} else { return '$sPreviewNotAvailable'; }}});"); + $iMaxWidth = MetaModel::GetModuleSetting('itop-attachments', 'preview_max_width', 290); + $oPage->add_ready_script("$(document).tooltip({ items: '.attachment a', position: { my: 'left top', at: 'right top', using: function( position, feedback ) { $( this ).css( position ); }}, content: function() { if ($(this).attr('data-preview') == 'true') { return('');} else { return '$sPreviewNotAvailable'; }}});"); } protected static function UpdateAttachments($oObject, $oChange = null) diff --git a/datamodels/2.x/itop-attachments/module.attachments.php b/datamodels/2.x/itop-attachments/module.attachments.php index a3482585ed..64774ba5bc 100755 --- a/datamodels/2.x/itop-attachments/module.attachments.php +++ b/datamodels/2.x/itop-attachments/module.attachments.php @@ -64,6 +64,7 @@ SetupWebPage::AddModule( 'settings' => array( 'allowed_classes' => array('Ticket'), // List of classes for which to manage "Attachments" 'position' => 'relations', // Where to display the attachments: relations | properties + 'preview_max_width' => 290, ), ) );