diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index e96fdcd4c5a..a0b9d0ed6a0 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -696,6 +696,16 @@ function img_disable($alt = "default") } +/** + \brief Affiche logo help avec curseur "?" + \return string Retourne tag img +*/ +function img_help() +{ + global $conf,$langs; + return ''; +} + /** \brief Affiche logo info \param alt Texte sur le alt de l'image @@ -705,7 +715,7 @@ function img_info($alt = "default") { global $conf,$langs; if ($alt=="default") $alt=$langs->trans("Informations"); - return ''.$alt.''; + return ''.$alt.''; } /** diff --git a/htdocs/lib/lib_foot.js b/htdocs/lib/lib_foot.js new file mode 100644 index 00000000000..bb3a9c0c494 --- /dev/null +++ b/htdocs/lib/lib_foot.js @@ -0,0 +1,79 @@ +// Copyright (C) 2005 Laurent Destailleur +// +// Script javascript mis en bas de page (avant fin de body) +// +// \file htdocs/lib/lib_foot.js +// \brief Fichier qui inclue les fonctions javascript de fin de page si option use_javascript active +// \version $Revision$ + + + +/*********************************************** +* Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) +* This notice MUST stay intact for legal use +* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code +***********************************************/ + +var offsetxpoint=-60 //Customize x offset of tooltip +var offsetypoint=20 //Customize y offset of tooltip +var ie=document.all +var ns6=document.getElementById && !document.all +var enabletip=false +if (ie||ns6) +var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : "" + +function ietruebody(){ +return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body +} + +function ddrivetip(thetext, thecolor, thewidth){ +if (ns6||ie){ +if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px" +if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor +tipobj.innerHTML=thetext +enabletip=true +return false +} +} + +function positiontip(e){ +if (enabletip){ +var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft; +var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop; +//Find out how close the mouse is to the corner of the window +var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20 +var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20 + +var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000 + +//if the horizontal distance isn't enough to accomodate the width of the context menu +if (rightedge +// +// Script javascript mis en en-tete de pages (dans section head) +// +// \file htdocs/lib/lib_head.js +// \brief Fichier qui inclue les fonctions javascript d'en-tete si option use_javascript active +// \version $Revision$ + // Pour la fonction de saisi auto des villes // ***************************************** @@ -23,42 +31,6 @@ function autofilltownfromzip_save_refresh_create() } -// Pour les tooltips -//****************** - -function ShowTip(fArg) -{ - var tooltipOBJ = (document.getElementById) ? document.getElementById('tt' + fArg) : eval("document.all['tt" + fArg + "']"); - if (tooltipOBJ != null) { - var tooltipLft = (document.body.offsetwidth?document.body.offsetwidth:document.body.style.pixelWidth) - (tooltipOBJ.offsetWidth?tooltipOBJ.offsetWidth:(tooltipOBJ.style.pixelWidth?tooltipOBJ.style.pixelWidth:300)) - 30; - var tooltipTop = 10; - if (navigator.appName == 'Netscape') { - tooltipTop = (document.body.scrolltop>=0?document.body.scrolltop+10:event.clientY+10); - tooltipOBJ.style.top = tooltipTop+"px"; - tooltipOBJ.style.left = tooltipLft+"px"; - } - else { - tooltipTop = (document.body.scrolltop>=0?document.body.scrolltop+10:event.clientY+10); - tooltipTop = (document.body.scrollTop>=0?document.body.scrollTop+10:event.clientY+10); - - if ((event.clientX > tooltipLft) && (event.clientY < (tooltipOBJ.scrollHeight?tooltipOBJ.scrollHeight:tooltipOBJ.style.pixelHeight) + 10)) { - tooltipTop = (document.body.scrolltop?document.body.scrolltop:document.body.offsetTop) + event.clientY + 20; - } - - tooltipOBJ.style.left = tooltipLft; - tooltipOBJ.style.top = tooltipTop; - } - tooltipOBJ.style.visibility = "visible"; - } -} -function HideTip(fArg) -{ - var tooltipOBJ = (document.getElementById) ? document.getElementById('tt' + fArg) : eval("document.all['tt" + fArg + "']"); - if (tooltipOBJ != null) { - tooltipOBJ.style.visibility = "hidden"; - } -} - // Pour la saisie des dates par calendrier // *************************************** @@ -262,3 +234,73 @@ function displaySelectBoxes() { } } } + + + +/*********************************************** +* Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) +* This notice MUST stay intact for legal use +* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code +***********************************************/ + +var offsetxpoint=-60 //Customize x offset of tooltip +var offsetypoint=20 //Customize y offset of tooltip +var ie=document.all +var ns6=document.getElementById && !document.all +var enabletip=false +if (ie||ns6) +var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : "" + +function ietruebody(){ +return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body +} + +function showtip(thetext){ +if (ns6||ie){ +tipobj.innerHTML=thetext +enabletip=true +return false +} +} + +function positiontip(e){ +if (enabletip){ +var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft; +var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop; +//Find out how close the mouse is to the corner of the window +var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20 +var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20 + +var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000 + +//if the horizontal distance isn't enough to accomodate the width of the context menu +if (rightedgetrans("Cancel")) llxHeader("","",$langs->trans("ProductServiceCard")); +$html = new Form($db); /* @@ -262,7 +263,6 @@ llxHeader("","",$langs->trans("ProductServiceCard")); */ if ($_GET["action"] == 'create' && $user->rights->produit->creer) { - $html = new Form($db); $product = new Product($db); if ($_error == 1) { @@ -547,7 +547,6 @@ if ($_GET["id"] || $_GET["ref"]) $langs->load("bills"); print ''.$langs->trans("VATRate").''; - $html = new Form($db); print $html->select_tva("tva_tx", $product->tva_tx, $mysoc, ''); print ''; print ''.$langs->trans("Status").''; @@ -639,7 +638,6 @@ print "\n
\n"; if ($_GET["id"] && $_GET["action"] == '' && $product->envente) { - $htmls = new Form($db); $propal = New Propal($db); print ''; @@ -712,7 +710,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente) print '
'.$otherprop; print ''; print ''; print '
'.$langs->trans("OtherPropals").''; - $htmls->select_array("propalid", $otherprop); + $html->select_array("propalid", $otherprop); print '
'. strftime("%d %b",$objp->dp)."\n"; print ''.$langs->trans("Discount"); diff --git a/htdocs/theme/eldy/eldy.css.php b/htdocs/theme/eldy/eldy.css.php index e8c3849fbdf..efb355cf9d3 100644 --- a/htdocs/theme/eldy/eldy.css.php +++ b/htdocs/theme/eldy/eldy.css.php @@ -829,9 +829,16 @@ padding: 2px; /* ============================================================================== */ /* Tooltips */ /* ============================================================================== */ -div.tooltip { -position:absolute; top: 0px; left: 0px; z-index: 2; width: 300px; visibility:hidden; font: 8pt 'MS Comic Sans','Arial',sans-serif; -background-color: #FFFFE6; padding: 8px; border: 1px solid black; + +#dhtmltooltip +{ +position: absolute; +width: 200px; +border: 1px solid #444444; +padding: 2px; +background-color: lightyellow; +visibility: hidden; +z-index: 100; }