#782: preview (as a tooltip) for image attachments.

SVN:trunk[2877]
This commit is contained in:
Denis Flaven
2013-10-03 16:53:25 +00:00
parent e3832a13a6
commit 4be0837ead
5 changed files with 30 additions and 6 deletions

View File

@@ -117,5 +117,21 @@ class ormDocument
{
return "<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=download_document&class=$sClass&id=$Id&field=$sAttCode\">".$this->GetFileName()."</a>\n";
}
public function IsPreviewAvailable()
{
$bRet = false;
switch($this->GetMimeType())
{
case 'image/png':
case 'image/jpg':
case 'image/jpeg':
case 'image/gif':
$bRet = true;
break;
}
return $bRet;
}
}
?>