";
- // Photo
- print '| ';
- print $form->showphoto('contact',$contactstatic,0,0,0,'photorefnoborder','small',1,0,1);
- print ' | ';
-
- // Name
+ // Photo - Name
print '';
- print $contactstatic->getNomUrl(0,'',0,'&backtopage='.urlencode($backtopage));
+ print $form->showphoto('contact',$contactstatic,0,0,0,'photorefnoborder valignmiddle marginrightonly','small',1,0,1);
+ print $contactstatic->getNomUrl(0,'',0,'&backtopage='.urlencode($backtopage));
print ' | ';
// Job position
@@ -812,7 +802,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
if ($obj->poste) print $obj->poste;
print '';
- // Address and phone
+ // Address - Phone - Email
print '';
print $contactstatic->getBannerAddress('contact', $object);
print ' | ';
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index a872d166283..64b26ed7875 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -5855,10 +5855,11 @@ function getImageFileNameForSize($file, $extName, $extImgTarget='')
* Return URL we can use for advanced preview links
*
* @param string $modulepart propal, facture, facture_fourn, ...
- * @param string $relativepath Relative path of docs
- * @return string Output string with HTML
+ * @param string $relativepath Relative path of docs.
+ * @param int $alldata Return array with all components (1 is recommended)
+ * @return string|array Output string with href link or array with all components of link
*/
-function getAdvancedPreviewUrl($modulepart, $relativepath)
+function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata=0)
{
global $conf, $langs;
@@ -5868,8 +5869,15 @@ function getAdvancedPreviewUrl($modulepart, $relativepath)
//$mime_preview[]='vnd.oasis.opendocument.presentation';
//$mime_preview[]='archive';
$num_mime = array_search(dol_mimetype($relativepath, '', 1), $mime_preview);
+
+ if ($alldata == 1)
+ {
+ if ($num_mime !== false) return array('target'=>'_blank', 'css'=>'documentpreview', 'url'=>DOL_URL_ROOT.'/document.php?modulepart='.$modulepart.'&attachment=0&file='.urlencode($relativepath), 'mime'=>dol_mimetype($relativepath), );
+ else return array();
+ }
- if ($num_mime !== false) return 'javascript:document_preview(\''.dol_escape_js(DOL_URL_ROOT.'/document.php?modulepart='.$modulepart.'&attachment=0&file='.$relativepath).'\', \''.dol_mimetype($relativepath).'\', \''.dol_escape_js($langs->trans('Preview')).'\')';
+ // old behavior
+ if ($num_mime !== false) return 'javascript:document_preview(\''.dol_escape_js(DOL_URL_ROOT.'/document.php?modulepart='.$modulepart.'&attachment=0&file='.urlencode($relativepath)).'\', \''.dol_mimetype($relativepath).'\', \''.dol_escape_js($langs->trans('Preview')).'\')';
else return '';
}
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 9c0a98cbcfb..7d5e5dfa64c 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1882,7 +1882,9 @@ if (! function_exists("llxFooter"))
if (! empty($delayedhtmlcontent)) print $delayedhtmlcontent;
- // Wrapper to show tooltips
+ // TODO Move this in lib_head.js
+
+ // Wrapper to show tooltips (html or onclick popup)
if (! empty($conf->use_javascript_ajax) && empty($conf->dol_no_mouse_hover))
{
print "\n\n";
@@ -1902,6 +1904,21 @@ if (! function_exists("llxFooter"))
' . "\n";
}
+ // Wrapper to manage document_preview
+ if (! empty($conf->use_javascript_ajax))
+ {
+ print "\n\n";
+ print '' . "\n";
+ }
+
// Wrapper to manage dropdown
if ($conf->use_javascript_ajax)
{
diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php
index f1db2d21835..42860abb98a 100644
--- a/htdocs/societe/rib.php
+++ b/htdocs/societe/rib.php
@@ -802,7 +802,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
- print '';
+ print '
';
print '
';
print '
';
@@ -845,7 +845,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
}
print '| '.$langs->trans("BankAccountDomiciliation").' | ';
- print ' |
";
@@ -854,7 +854,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
print "\n";
print '| '.$langs->trans("BankAccountOwnerAddress").' | ';
- print ' |
";