From 7f852d293cf918b4b4cc7b0939f7b527c6222e56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Jun 2011 22:13:05 +0000 Subject: [PATCH] Fix: Avoid wrap with chrome. Fix: Disable lightbox. Does not works with showphoto. --- htdocs/comm/propal/index.php | 6 ++-- htdocs/commande/index.php | 8 ++--- htdocs/compta/dons/index.php | 42 +++++++++++++-------------- htdocs/core/class/html.form.class.php | 38 +++++++++++++++++++++--- htdocs/fourn/commande/index.php | 4 +-- htdocs/main.inc.php | 10 ++++--- htdocs/viewimage.php | 4 +-- 7 files changed, 72 insertions(+), 40 deletions(-) diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 48bdab9ed1e..02df09c1d53 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -239,7 +239,7 @@ if ($resql) $propal_static->ref=$obj->ref; print ''; - print ''; @@ -309,7 +309,7 @@ if ($conf->propal->enabled) $propal_static->ref=$obj->ref; print '
'; + print ''; print $propal_static->getNomUrl(1); print '
'; - print ''; @@ -381,7 +381,7 @@ if ($conf->propal->enabled) $propal_static->ref=$obj->ref; print '
'; + print ''; print $propal_static->getNomUrl(1); print '
'; - print ''; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 8ba89f7e90c..23f318d9658 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -21,7 +21,7 @@ /** * \file htdocs/commande/index.php * \ingroup commande - * \brief Page acceuil espace commandes + * \brief Home page of customer order module * \version $Id$ */ @@ -252,7 +252,7 @@ if ($resql) $commandestatic->ref=$obj->ref; print '
'; + print ''; print $propal_static->getNomUrl(1); print '
'; - print ''; @@ -321,7 +321,7 @@ if ($conf->commande->enabled) $commandestatic->ref=$obj->ref; print '
'; + print ''; print $commandestatic->getNomUrl(1); print '
'; - print ''; @@ -392,7 +392,7 @@ if ($conf->commande->enabled) $commandestatic->ref=$obj->ref; print '
'; + print ''; print $commandestatic->getNomUrl(1); print '
'; - print ''; diff --git a/htdocs/compta/dons/index.php b/htdocs/compta/dons/index.php index f36059e3703..972d21b33f3 100644 --- a/htdocs/compta/dons/index.php +++ b/htdocs/compta/dons/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,7 @@ /** * \file htdocs/compta/dons/index.php * \ingroup don - * \brief Page accueil espace don + * \brief Home page of donation module * \version $Id$ */ @@ -56,17 +56,17 @@ $result = $db->query($sql); if ($result) { - $num = $db->num_rows($result); - $i = 0; - while ($i < $num) + $num = $db->num_rows($result); + $i = 0; + while ($i < $num) { - $objp = $db->fetch_object($result); + $objp = $db->fetch_object($result); - $somme[$objp->fk_statut] = $objp->somme; - $nb[$objp->fk_statut] = $objp->nb; - $i++; + $somme[$objp->fk_statut] = $objp->somme; + $nb[$objp->fk_statut] = $objp->nb; + $i++; } - $db->free($result); + $db->free($result); } else { dol_print_error($db); } @@ -109,15 +109,15 @@ print ''; $var=true; foreach ($listofstatus as $status) { - $var=!$var; - print ""; - print ''; - print ''; - print ''; - print ''; - $totalnb += $nb[$status]; - $total += $somme[$status]; - print ""; + $var=!$var; + print ""; + print ''; + print ''; + print ''; + print ''; + $totalnb += $nb[$status]; + $total += $somme[$status]; + print ""; } print ''; @@ -170,7 +170,7 @@ if ($resql) $donation_static->id=$obj->rowid; $donation_static->ref=$obj->ref?$obj->ref:$obj->rowid; - print ''; @@ -185,7 +185,7 @@ if ($resql) print ''; // Date - print ''; + print ''; print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6e21bd3f9eb..c1f1c17335e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3350,13 +3350,19 @@ class Form if ($dir) { + $cache='0'; if ($file && file_exists($dir."/".$file)) { - $ret.=''; + // TODO Link to large image + $ret.=''; + $ret.=''; + $ret.=''; } else if ($altfile && file_exists($dir."/".$altfile)) { - $ret.=''; + $ret.=''; + $ret.=''; + $ret.=''; } else { @@ -3364,16 +3370,40 @@ class Form { global $dolibarr_main_url_root; $ret.=''; - $ret.=''; + $ret.='Photo found on Gravatar'; } else { - $ret.=''; + $ret.='No photo'; } } } else dol_print_error('','Call of showphoto with wrong parameters'); + /* Disabled. lightbox seems to not work. I don't know why. + $ret.="\n\n"; + + $ret.="\n\n"; + */ + return $ret; } diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 648a8afda5c..ad02cd337c0 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -286,7 +286,7 @@ if ($resql) $commandestatic->ref=$obj->ref; print '
'; + print ''; print $commandestatic->getNomUrl(1); print '
'.$donstatic->LibStatut($status,4).''.$nb[$status].''.($nb[$status]?price($somme[$status],'MT'):' ').''.($nb[$status]?price(price2num($somme[$status]/$nb[$status],'MT')):' ').'
'.$donstatic->LibStatut($status,4).''.$nb[$status].''.($nb[$status]?price($somme[$status],'MT'):' ').''.($nb[$status]?price(price2num($somme[$status]/$nb[$status],'MT')):' ').'
'; + print ''; print $donation_static->getNomUrl(1); print ''.dol_print_date($db->jdate($obj->datec),'day').''.dol_print_date($db->jdate($obj->datem),'day').''.$donation_static->LibStatut($obj->fk_statut,5).'
'; - print ''; @@ -354,7 +354,7 @@ else dol_print_error($db); $commandestatic->ref=$obj->ref; print '
'; + print ''; print $commandestatic->getNomUrl(1); print '
'; - print ''; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c5be8eb78cd..de48ca72de7 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -906,7 +906,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; print ''."\n"; // JQuery print ''."\n"; // Tooltip - print ''."\n"; // JNotify + print ''."\n"; // JNotify + //print ''."\n"; // Lightbox } print ''."\n"; @@ -950,13 +951,14 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs $ext='.js'; if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) { $ext='.jgz'; } // mini='_mini', ext='.gz' - // JQuery. Must be before other includes (prototype/scriptaculous/...) + // JQuery. Must be before other includes print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; - print ''."\n"; - // jQuery Layout + print ''."\n"; + //print ''."\n"; + // jQuery Layout if (!empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT')) { print ''."\n"; diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 409a5dcb0c1..f7273746288 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -21,8 +21,8 @@ /** * \file htdocs/viewimage.php - * \brief Wrapper permettant l'affichage de fichiers images Dolibarr - * \remarks Call to wrapper is '' + * \brief Wrapper to show images into Dolibarr screens + * \remarks Call to wrapper is '' * \version $Id$ */
'; + print ''; print $commandestatic->getNomUrl(1); print '