Fix: Pb with popu calendar in EI8 and security options of IE6

This commit is contained in:
Laurent Destailleur 2009-08-13 12:32:22 +00:00
parent 19703451fd
commit f52a4182a4
9 changed files with 239 additions and 245 deletions

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) phpBSM
* Copyright (C) 2005-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
*
* This file is a modified version of datepicker.php from phpBSM to fix some
@ -22,10 +22,10 @@
*/
/**
\file htdocs/lib/datepicker.php
\brief Fichier de gestion de la popup de selection de date eldy
\version $Id$
*/
* \file htdocs/lib/datepicker.php
* \brief Fichier de gestion de la popup de selection de date eldy
* \version $Id$
*/
if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language
@ -37,12 +37,17 @@ set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
require_once("../master.inc.php");
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL by the main.inc.php
$langs->load("main");
$right=($langs->direction=='rtl'?'left':'right');
$left=($langs->direction=='rtl'?'right':'left');
// URL http://mydolibarr/lib/datepicker.php?mode=test&m=10&y=2038 can be used for tests
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'."\n";
print '<html><head>';
print '<html>'."\n";
print '<head>'."\n";
if (isset($_GET["mode"]) && $_GET["mode"] == 'test')
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_head.js"></script>'."\n";
@ -51,24 +56,32 @@ else
{
print '<title>Calendar</title>';
}
// Define tradMonths javascript array
// Define tradMonths javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
$tradTemp=array($langs->trans("January"),
$langs->trans("February"),
$langs->trans("March"),
$langs->trans("April"),
$langs->trans("May"),
$langs->trans("June"),
$langs->trans("July"),
$langs->trans("August"),
$langs->trans("September"),
$langs->trans("October"),
$langs->trans("November"),
$langs->trans("December")
);
$langs->trans("February"),
$langs->trans("March"),
$langs->trans("April"),
$langs->trans("May"),
$langs->trans("June"),
$langs->trans("July"),
$langs->trans("August"),
$langs->trans("September"),
$langs->trans("October"),
$langs->trans("November"),
$langs->trans("December")
);
print '<script type="text/javascript">';
print 'var tradMonths = '.php2js($tradTemp).';';
print 'var tradMonths = [';
foreach($tradTemp as $val)
{
print '"'.addslashes($val).'",';
}
print '""];';
print '</script>'."\n";
print '</head><body>'."\n";
print '</head>'."\n";
print '<body>'."\n";
$qualified=true;
@ -110,14 +123,14 @@ function xyzToUnixTimestamp($mysqldate){
function displayBox($selectedDate,$month,$year){
global $dolibarr_main_url_root,$langs,$conf;
//print "$selectedDate,$month,$year";
$thedate=dol_mktime(12,0,0,$month,1,$year);
//print "thedate=$thedate";
$today=mktime();
$todayArray=dol_getdate($today);
if($selectedDate != "00000000")
{
{
$selDate=xyzToUnixTimestamp($selectedDate);
$xyz=dol_date("Ymd",$selDate);
}
@ -126,26 +139,32 @@ function displayBox($selectedDate,$month,$year){
$selDate=0;
$xyz=0;
}
?>
?>
<table class="dp" cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan="6" class="dpHead">
<?php
<td colspan="6" class="dpHead"><?php
$selectMonth = dol_date("F", $thedate);
$selectYear = dol_date("Y", $thedate);
echo $langs->trans($selectMonth).", ".$selectYear;
?>
?></td>
<td class="dpHead">
<button type="button" class="dpInvisibleButtons" id="DPCancel"
onClick="closeDPBox();">X</button>
</td>
<td class="dpHead"><button type="button" class="dpInvisibleButtons" id="DPCancel" onClick="closeDPBox();">X</button></td>
</tr>
<tr>
<td class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo $month?>','<?php echo $year-1?>','<?php echo $xyz ?>')">&lt;&lt;</td>
<td class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php if($month==1) echo "12"; else echo $month-1?>','<?php if($month==1) echo $year-1; else echo $year?>','<?php echo $xyz ?>')">&lt;</td>
<td colspan="3" class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo dol_date('m',$today)?>','<?php echo $todayArray["year"]?>','<?php echo $xyz ?>')"><?php echo $langs->trans("MonthOfDay") ?></td>
<td class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php if($month==12) echo "1"; else echo $month+1?>','<?php if($month==12) echo $year+1; else echo $year;?>','<?php echo $xyz ?>')">&gt;</td>
<td class="dpButtons" onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo $month?>','<?php echo $year+1?>','<?php echo $xyz ?>')">&gt;&gt;</td>
<td class="dpButtons"
onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo $month?>','<?php echo $year-1?>','<?php echo $xyz ?>')">&lt;&lt;</td>
<td class="dpButtons"
onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php if($month==1) echo "12"; else echo $month-1?>','<?php if($month==1) echo $year-1; else echo $year?>','<?php echo $xyz ?>')">&lt;</td>
<td colspan="3" class="dpButtons"
onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo dol_date('m',$today)?>','<?php echo $todayArray["year"]?>','<?php echo $xyz ?>')"><?php echo $langs->trans("MonthOfDay") ?></td>
<td class="dpButtons"
onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php if($month==12) echo "1"; else echo $month+1?>','<?php if($month==12) echo $year+1; else echo $year;?>','<?php echo $xyz ?>')">&gt;</td>
<td class="dpButtons"
onClick="loadMonth('<?php echo $dolibarr_main_url_root.'/lib/' ?>','<?php echo $month?>','<?php echo $year+1?>','<?php echo $xyz ?>')">&gt;&gt;</td>
</tr>
<tr class="dpDayNames">
<tr class="dpDayNames">
<td width="14%"><?php echo $langs->trans("ShortSunday") ?></td>
<td width="14%"><?php echo $langs->trans("ShortMonday") ?></td>
<td width="15%"><?php echo $langs->trans("ShortTuesday") ?></td>
@ -154,69 +173,70 @@ function displayBox($selectedDate,$month,$year){
<td width="14%"><?php echo $langs->trans("ShortFriday") ?></td>
<td width="14%"><?php echo $langs->trans("ShortSaturday") ?></td>
</tr>
<?php
//print "x ".$thedate." y";
$firstdate=dol_getdate($thedate);
$mydate=$firstdate;
<?php
//print "x ".$thedate." y";
$firstdate=dol_getdate($thedate);
$mydate=$firstdate;
// Loop on each day of month
$stoploop=0; $day=1; $cols=0;
while (! $stoploop)
// Loop on each day of month
$stoploop=0; $day=1; $cols=0;
while (! $stoploop)
{
//print_r($mydate);
if($firstdate==$mydate) // At first run
{
//print_r($mydate);
if($firstdate==$mydate) // At first run
echo "<TR class=\"dpWeek\">";
$cols=0;
for($i=0;$i< $mydate["wday"];$i++)
{
echo "<TD>&nbsp;</TD>";
$cols++;
}
}
else
{
if ($mydate["wday"]==0)
{
echo "<TR class=\"dpWeek\">";
$cols=0;
for($i=0;$i< $mydate["wday"];$i++)
{
echo "<TD>&nbsp;</TD>";
$cols++;
}
}
else
{
if ($mydate["wday"]==0)
{
echo "<TR class=\"dpWeek\">";
$cols=0;
}
}
$dayclass="dpReg";
if($thedate==$selDate) $dayclass="dpSelected";
elseif($thedate==$today) $dayclass="dpToday";
// Sur click dans calendrier, appelle fonction dpClickDay
echo "<TD class=\"".$dayclass."\"";
echo " onMouseOver=\"dpHighlightDay(".$mydate["year"].",".dol_date("n",$thedate).",".$mydate["mday"].",tradMonths)\"";
echo " onClick=\"dpClickDay(".$mydate["year"].",".dol_date("n",$thedate).",".$mydate["mday"].",'".$conf->format_date_short_java."')\"";
echo ">".sprintf("%02s",$mydate["mday"])."</TD>";
$cols++;
if ($mydate["wday"]==6) echo "</TR>\n";
//$thedate=strtotime("tomorrow",$thedate);
$day++;
$thedate=dol_mktime(12,0,0,$month,$day,$year);
if ($thedate == '')
{
$stoploop=1;
}
else
{
$mydate=dol_getdate($thedate);
if ($firstdate["month"] != $mydate["month"]) $stoploop=1;
}
}
if ($cols < 7)
$dayclass="dpReg";
if($thedate==$selDate) $dayclass="dpSelected";
elseif($thedate==$today) $dayclass="dpToday";
// Sur click dans calendrier, appelle fonction dpClickDay
echo "<TD class=\"".$dayclass."\"";
echo " onMouseOver=\"dpHighlightDay(".$mydate["year"].",".dol_date("n",$thedate).",".$mydate["mday"].",tradMonths)\"";
echo " onClick=\"dpClickDay(".$mydate["year"].",".dol_date("n",$thedate).",".$mydate["mday"].",'".$conf->format_date_short_java."')\"";
echo ">".sprintf("%02s",$mydate["mday"])."</TD>";
$cols++;
if ($mydate["wday"]==6) echo "</TR>\n";
//$thedate=strtotime("tomorrow",$thedate);
$day++;
$thedate=dol_mktime(12,0,0,$month,$day,$year);
if ($thedate == '')
{
for($i=6; $i>=$cols; $i--) echo "<TD>&nbsp;</TD>";
echo "</TR>\n";
$stoploop=1;
}
else
{
$mydate=dol_getdate($thedate);
if ($firstdate["month"] != $mydate["month"]) $stoploop=1;
}
}
if ($cols < 7)
{
for($i=6; $i>=$cols; $i--) echo "<TD>&nbsp;</TD>";
echo "</TR>\n";
}
?>
<tr><td id="dpExp" class="dpExplanation" colspan="7"><?php
<tr>
<td id="dpExp" class="dpExplanation" colspan="7"><?php
if($selDate)
{
$tempDate=dol_getdate($selDate);
@ -226,49 +246,12 @@ function displayBox($selectedDate,$month,$year){
}
else
{
print "Click a Date";
print "Click a Date";
}
?></td></tr>
?></td>
</tr>
</table>
<?php
<?php
}//end function
/*
* \brief Convertit une variable php en variable javascript
* \param var variable php
* \return result variable javascript
*/
function php2js($var)
{
if (is_array($var))
{
$array = array();
foreach ($var as $a_var)
{
$array[] = php2js($a_var);
}
$result = "[" . join(",", $array) . "]";
return $result;
}
else if (is_bool($var))
{
$result = $var ? "true" : "false";
return $result;
}
else if (is_int($var) || is_integer($var) || is_double($var) || is_float($var))
{
$result = $var;
return $result;
}
else if (is_string($var))
{
$result = "\"" . addslashes(stripslashes($var)) . "\"";
return $result;
}
// autres cas: objets, on ne les gére pas
$result = FALSE;
return $result;
}
?>

View File

@ -162,6 +162,7 @@ function loadMonth(base,month,year,ymd)
var req=null;
req=loadXMLDoc(theURL,null,false);
//alert(theURL+req.responseText); // L'url doit avoir la meme racine que la pages et elements sinon pb de securite.
showDP.box.innerHTML=req.responseText;
}
@ -329,76 +330,33 @@ function loadXMLDoc(url,readyStateFunction,async)
return req;
}
// For Boxes
// To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and not put popup completely on the front)
function hideSelectBoxes() {
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE") > -1) {
for(var i = 0; i < document.all.length; i++) {
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1)
{
for(var i = 0; i < document.all.length; i++)
{
if(document.all[i].tagName)
if(document.all[i].tagName == "SELECT")
document.all[i].style.visibility="hidden";
if(document.all[i].tagName == "SELECT")
document.all[i].style.visibility="hidden";
}
}
}
function displaySelectBoxes() {
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE") > -1) {
for(var i = 0; i < document.all.length; i++) {
if(document.all[i].tagName)
if(document.all[i].tagName == "SELECT")
document.all[i].style.visibility="visible";
}
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1)
{
for(var i = 0; i < document.all.length; i++)
{
if(document.all[i].tagName)
if(document.all[i].tagName == "SELECT")
document.all[i].style.visibility="visible";
}
}
}
// Afficher/cacher les champs d'un formulaire
function formDisplayHideId(baliseId,numField)
{
//if (document.getElementById && document.getElementById(baliseId) != null)
//{
//var balise = document.getElementById(baliseId);
var numDiv = 1
if (document.formsoc.typent_id.value == 8)
{
while ( document.getElementById( baliseId + numDiv) ) {
var balise = document.getElementById( baliseId + numDiv);
if (balise && balise.className == "hidden")
balise.className = "visible";
if (balise && balise.className == "visible")
balise.className = "hidden";
numDiv++
}
}
else
{
while ( document.getElementById( baliseId + numDiv) ) {
var balise = document.getElementById( baliseId + numDiv);
if (balise && balise.className == "visible")
balise.className = "hidden";
if (balise && balise.className == "hidden")
balise.className = "visible";
numDiv++
}
}
//}
}
/*=================================================================
Function: formatDate (javascript object Date(), format)

View File

@ -792,6 +792,29 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
}
}
// Define tradMonths javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)
$tradTemp=array($langs->trans("January"),
$langs->trans("February"),
$langs->trans("March"),
$langs->trans("April"),
$langs->trans("May"),
$langs->trans("June"),
$langs->trans("July"),
$langs->trans("August"),
$langs->trans("September"),
$langs->trans("October"),
$langs->trans("November"),
$langs->trans("December")
);
print '<script type="text/javascript">';
print 'var tradMonths = [';
foreach($tradTemp as $val)
{
print '"'.addslashes($val).'",';
}
print '""];';
print '</script>'."\n";
print "</head>\n";
}
}
@ -939,7 +962,7 @@ function left_menu($menu_array, $helppagename='', $moresearchform='')
}
if ((($conf->produit->enabled && $user->rights->produit->lire) || ($conf->service->enabled && $user->rights->service->lire))
&& $conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)
&& $conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)
{
$langs->load("products");
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/liste.php', DOL_URL_ROOT.'/product/index.php',

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2007 Patrick raguin <patrick.raguin@gmail.com>
* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2007 Patrick raguin <patrick.raguin@gmail.com>
* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -23,7 +23,8 @@
* \version $Id$
*/
require("../../conf/conf.php");
//require_once("../../conf/conf.php");
require_once("../../master.inc.php");
// Define css type
header('Content-type: text/css');
@ -31,6 +32,11 @@ header('Content-type: text/css');
// each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
else header('Cache-Control: no-cache');
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL by the main.inc.php
$langs->load("main",0,1);
$right=($langs->direction=='rtl'?'left':'right');
$left=($langs->direction=='rtl'?'right':'left');
?>
/* ============================================================================== */
@ -104,7 +110,7 @@ select.flat
{
font-size: 100%;
border: 0px;
background-image : url(<?php echo $dolibarr_main_url_root.'/theme/auguria/img/button_bg.png' ?>);
background-image : url(<?php echo DOL_URL_ROOT.'/theme/auguria/img/button_bg.png' ?>);
background-position : bottom;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
@ -113,7 +119,7 @@ select.flat
{
font-size: 100%;
border: 0px;
background-image : url(<?php echo $dolibarr_main_url_root.'/theme/auguria/img/button_bg.png' ?>);
background-image : url(<?php echo DOL_URL_ROOT.'/theme/auguria/img/button_bg.png' ?>);
background-position : bottom;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
@ -162,7 +168,7 @@ div.tmenu
padding: 0px 0px 0px 0px;
margin: 0px 0px 2px 0px;
font-size: 13px;
background-image : url(<?php echo $dolibarr_main_url_root.'/theme/auguria/img/nav.jpg' ?>) ;
background-image : url(<?php echo DOL_URL_ROOT.'/theme/auguria/img/nav.jpg' ?>) ;
height: 22px;
}
@ -383,7 +389,7 @@ div.help
/* Pour menu gauche Auguria */
div.menu_titre {
background: url(<?php echo $dolibarr_main_url_root.'/theme/auguria/img/bg-titre-rubrique.png' ?>);
background: url(<?php echo DOL_URL_ROOT.'/theme/auguria/img/bg-titre-rubrique.png' ?>);
padding: 0px;
padding-top:7px;
padding-left:0px;
@ -397,7 +403,7 @@ div.menu_titre {
}
div.menu_contenu {
background: url(<?php echo $dolibarr_main_url_root.'/theme/auguria/img/bg-rubrique.png' ?>);
background: url(<?php echo DOL_URL_ROOT.'/theme/auguria/img/bg-rubrique.png' ?>);
margin: 0px;
padding: 1px;
@ -409,7 +415,7 @@ div.menu_contenu {
}
div.menu_fin {
background: url(<?php echo $dolibarr_main_url_root.'/theme/auguria/img/bg-bas-rubrique.png' ?>);
background: url(<?php echo DOL_URL_ROOT.'/theme/auguria/img/bg-bas-rubrique.png' ?>);
margin: 0px;
padding: 0px;
height:6px;
@ -465,7 +471,7 @@ div.tabBar {
border-bottom: 1px solid #68ACCF;
border-left: 1px solid #68ACCF;
border-top: 1px solid #68ACCF;
background: #F0F0F0 url(<?php echo $dolibarr_main_url_root.'/theme/login_background.png' ?>) repeat-x;
background: #F0F0F0 url(<?php echo DOL_URL_ROOT.'/theme/login_background.png' ?>) repeat-x;
}
div.tabsAction {
@ -1094,16 +1100,16 @@ ul.arbre strong {
font-weight: normal;
padding: 0 0 0 20px;
margin: 0 0 0 -7px;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/branch.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/branch.gif' ?>);
background-repeat: no-repeat;
background-position: 1px 50%;
}
ul.arbre strong.arbre-plier {
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/plus.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/plus.gif' ?>);
cursor: pointer;
}
ul.arbre strong.arbre-deplier {
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/minus.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/minus.gif' ?>);
cursor: pointer;
}
ul.arbre ul {
@ -1329,7 +1335,7 @@ form.inplaceeditor-form input[type="submit"] { /* The submit button */
font-size: 100%;
font-weight:normal;
border: 0px;
background-image : url(<?php echo $dolibarr_main_url_root.'/theme/auguria/img/button_bg.png' ?>);
background-image : url(<?php echo DOL_URL_ROOT.'/theme/auguria/img/button_bg.png' ?>);
background-position : bottom;
cursor:pointer;
}
@ -1339,7 +1345,7 @@ form.inplaceeditor-form a { /* The cancel link */
font-size: 11px;
font-weight:normal;
border: 0px;
background-image : url(<?php echo $dolibarr_main_url_root.'/theme/auguria/img/button_bg.png' ?>);
background-image : url(<?php echo DOL_URL_ROOT.'/theme/auguria/img/button_bg.png' ?>);
background-position : bottom;
cursor:pointer;
}

View File

@ -24,7 +24,8 @@
* \version $Id$
*/
require("../../conf/conf.php");
//require_once("../../conf/conf.php");
require_once("../../master.inc.php");
// Define css type
header('Content-type: text/css');
@ -32,6 +33,11 @@ header('Content-type: text/css');
// each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
else header('Cache-Control: no-cache');
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL by the main.inc.php
$langs->load("main",0,1);
$right=($langs->direction=='rtl'?'left':'right');
$left=($langs->direction=='rtl'?'right':'left');
?>
@ -940,16 +946,16 @@ ul.arbre strong {
font-weight: normal;
padding: 0 0 0 20px;
margin: 0 0 0 -7px;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/branch.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/branch.gif' ?>);
background-repeat: no-repeat;
background-position: 1px 50%;
}
ul.arbre strong.arbre-plier {
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/plus.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/plus.gif' ?>);
cursor: pointer;
}
ul.arbre strong.arbre-deplier {
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/minus.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/minus.gif' ?>);
cursor: pointer;
}
ul.arbre ul {

View File

@ -47,7 +47,7 @@ $left=($langs->direction=='rtl'?'right':'left');
body {
background-color: #F4F4F4;
background: #f9f9f9 url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/headbg.jpg' ?>) 0 0 no-repeat;
background: #f9f9f9 url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/headbg.jpg' ?>) 0 0 no-repeat;
color: #101010;
font-size: 12px;
font-family: arial,tahoma,verdana,helvetica;
@ -111,7 +111,7 @@ select.flat
font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif;
border: 0px;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/button_bg.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>);
background-position: bottom;
padding: 0px 2px 0px 2px;
margin: 0px 0px 0px 0px;
@ -121,7 +121,7 @@ select.flat
font-family: helvetica, verdana, arial, sans-serif;
color: #222244;
border: 0px;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/button_bg.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>);
background-position: bottom;
padding: 0px 2px 0px 2px;
margin: 0px 0px 0px 0px;
@ -131,7 +131,7 @@ select.flat
font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif;
border: 0px;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/button_bg.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>);
background-position: bottom;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
@ -180,7 +180,7 @@ div.tmenu
font-size: 12px;
height: 19px;
background: #b3c5cc;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/tmenu.jpg' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/tmenu.jpg' ?>);
color: #000000;
text-decoration: none;
}
@ -414,7 +414,7 @@ div.blockvmenupair
padding-bottom: 3px;
margin: 1px 0px 0px 0px;
background: #A3BCC6;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/tmenu.jpg' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/tmenu.jpg' ?>);
background-position:top;
background-repeat:repeat-x;
}
@ -434,7 +434,7 @@ div.blockvmenuimpair
padding-bottom: 3px;
margin: 1px 0px 0px 0px;
background: #A3BCC6;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/tmenu.jpg' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/tmenu.jpg' ?>);
background-position:top;
background-repeat:repeat-x;
}
@ -507,7 +507,7 @@ div.tabBar {
border-bottom: 1px solid #555555;
border-left: 1px solid #D0D0D0;
border-top: 1px solid #D8D8D8;
/* background: #F0F0F0 url(<?php echo $dolibarr_main_url_root.'/theme/login_background.png' ?>) repeat-x; */
/* background: #F0F0F0 url(<?php echo DOL_URL_ROOT.'/theme/login_background.png' ?>) repeat-x; */
}
div.tabsAction {
@ -789,11 +789,11 @@ tr.liste_titre {
height: 16px;
<?php if (eregi('xfirefox',$_SERVER['HTTP_USER_AGENT'])) { // Does not work with IE ?>
background: #91ABB3;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/liste_titre_2.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre_2.png' ?>);
background-repeat: repeat-y;
<?php } else { ?>
background: #7699A9;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/liste_titre.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre.png' ?>);
background-repeat: repeat-x;
<?php } ?>
color: #334444;
@ -804,11 +804,11 @@ white-space: nowrap;
td.liste_titre {
<?php if (eregi('xfirefox',$_SERVER['HTTP_USER_AGENT'])) { // Does not work with IE ?>
background: #91ABB3;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/liste_titre.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre.png' ?>);
background-repeat: repeat-x;
<?php } else { ?>
background: #7699A9;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/liste_titre.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre.png' ?>);
background-repeat: repeat-x;
<?php } ?>
color: #334444;
@ -821,11 +821,11 @@ td.liste_titre_sel
{
<?php if (eregi('xfirefox',$_SERVER['HTTP_USER_AGENT'])) { // Does not work with IE ?>
background: #91ABB3;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/liste_titre.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre.png' ?>);
background-repeat: repeat-x;
<?php } else { ?>
background: #7699A9;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/liste_titre.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre.png' ?>);
background-repeat: repeat-x;
<?php } ?>
color: #F5FFFF;
@ -837,11 +837,11 @@ white-space: nowrap;
input.liste_titre {
<?php if (eregi('xfirefox',$_SERVER['HTTP_USER_AGENT'])) { // Does not work with IE ?>
background: #91ABB3;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/liste_titre.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre.png' ?>);
background-repeat: repeat-x;
<?php } else { ?>
background: #7699A9;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/liste_titre.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre.png' ?>);
background-repeat: repeat-x;
<?php } ?>
border: 0px;
@ -908,11 +908,11 @@ margin: 2px;
tr.box_titre {
<?php if (eregi('xfirefox',$_SERVER['HTTP_USER_AGENT'])) { // Does not work with IE ?>
background: #91ABB3;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/liste_titre_2.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre_2.png' ?>);
background-repeat: repeat-y;
<?php } else { ?>
background: #7699A9;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/liste_titre.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/liste_titre.png' ?>);
background-repeat: repeat-x;
<?php } ?>
color: #334444;
@ -1394,7 +1394,7 @@ form.inplaceeditor-form input[type="submit"] { /* The submit button */
font-size: 100%;
font-weight:normal;
border: 0px;
background-image : url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/button_bg.png' ?>);
background-image : url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>);
background-position : bottom;
cursor:pointer;
}
@ -1404,7 +1404,7 @@ form.inplaceeditor-form a { /* The cancel link */
font-size: 11px;
font-weight:normal;
border: 0px;
background-image : url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/button_bg.png' ?>);
background-image : url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>);
background-position : bottom;
cursor:pointer;
}
@ -1433,16 +1433,16 @@ ul.arbre strong {
font-weight: normal;
padding: 0 0 0 20px;
margin: 0 0 0 -7px;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/branch.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/branch.gif' ?>);
background-repeat: no-repeat;
background-position: 1px 50%;
}
ul.arbre strong.arbre-plier {
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/plus.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/plus.gif' ?>);
cursor: pointer;
}
ul.arbre strong.arbre-deplier {
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/minus.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/minus.gif' ?>);
cursor: pointer;
}
ul.arbre ul {

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -23,7 +23,8 @@
* \version $Id$
*/
require("../../conf/conf.php");
//require_once("../../conf/conf.php");
require_once("../../master.inc.php");
// Define css type
header('Content-type: text/css');
@ -31,6 +32,11 @@ header('Content-type: text/css');
// each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
else header('Cache-Control: no-cache');
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL by the main.inc.php
$langs->load("main",0,1);
$right=($langs->direction=='rtl'?'left':'right');
$left=($langs->direction=='rtl'?'right':'left');
?>
/* ============================================================================== */
@ -39,7 +45,7 @@ else header('Cache-Control: no-cache');
body {
background-color: #F8F8F8;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/freelug/img/background.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/freelug/img/background.png' ?>);
text-decoration: none ;
color: #101010;
font-size: 12px;
@ -107,7 +113,7 @@ select.flat
border-right: 1px solid #aaaaaa;
border-top: 1px solid #dddddd;
border-bottom: 1px solid #aaaaaa;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/freelug/img/button_bg.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/freelug/img/button_bg.png' ?>);
background-position: bottom;
background-repeat: repeat-x;
}
@ -120,7 +126,7 @@ select.flat
border-right: 1px solid #aaaaaa;
border-top: 1px solid #dddddd;
border-bottom: 1px solid #aaaaaa;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/freelug/img/button_bg.png' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/freelug/img/button_bg.png' ?>);
background-position: bottom;
background-repeat: repeat-x;
}
@ -1125,16 +1131,16 @@ ul.arbre strong {
font-weight: normal;
padding: 0 0 0 20px;
margin: 0 0 0 -7px;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/branch.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/branch.gif' ?>);
background-repeat: no-repeat;
background-position: 1px 50%;
}
ul.arbre strong.arbre-plier {
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/plus.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/plus.gif' ?>);
cursor: pointer;
}
ul.arbre strong.arbre-deplier {
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/minus.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/minus.gif' ?>);
cursor: pointer;
}
ul.arbre ul {

View File

@ -24,7 +24,8 @@
* \version $Id$
*/
require("../../conf/conf.php");
//require_once("../../conf/conf.php");
require_once("../../master.inc.php");
// Define css type
header('Content-type: text/css');
@ -32,6 +33,11 @@ header('Content-type: text/css');
// each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
else header('Cache-Control: no-cache');
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL by the main.inc.php
$langs->load("main",0,1);
$right=($langs->direction=='rtl'?'left':'right');
$left=($langs->direction=='rtl'?'right':'left');
?>

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -23,7 +23,8 @@
* \version $Id$
*/
require("../../conf/conf.php");
//require_once("../../conf/conf.php");
require_once("../../master.inc.php");
// Define css type
header('Content-type: text/css');
@ -31,6 +32,11 @@ header('Content-type: text/css');
// each Dolibarr page access.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
else header('Cache-Control: no-cache');
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL by the main.inc.php
$langs->load("main",0,1);
$right=($langs->direction=='rtl'?'left':'right');
$left=($langs->direction=='rtl'?'right':'left');
?>
/* ============================================================================== */
@ -1136,7 +1142,7 @@ form.inplaceeditor-form input[type="submit"] { /* The submit button */
font-size: 100%;
font-weight:normal;
border: 0px;
background-image : url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/button_bg.png' ?>);
background-image : url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>);
background-position : bottom;
cursor:pointer;
}
@ -1146,7 +1152,7 @@ form.inplaceeditor-form a { /* The cancel link */
font-size: 11px;
font-weight:normal;
border: 0px;
background-image : url(<?php echo $dolibarr_main_url_root.'/theme/eldy/img/button_bg.png' ?>);
background-image : url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>);
background-position : bottom;
cursor:pointer;
}
@ -1175,16 +1181,16 @@ ul.arbre strong {
font-weight: normal;
padding: 0 0 0 20px;
margin: 0 0 0 -7px;
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/branch.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/branch.gif' ?>);
background-repeat: no-repeat;
background-position: 1px 50%;
}
ul.arbre strong.arbre-plier {
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/plus.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/plus.gif' ?>);
cursor: pointer;
}
ul.arbre strong.arbre-deplier {
background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/minus.gif' ?>);
background-image: url(<?php echo DOL_URL_ROOT.'/theme/common/treemenu/minus.gif' ?>);
cursor: pointer;
}
ul.arbre ul {