Try a simpler css

This commit is contained in:
Laurent Destailleur 2009-08-26 09:37:54 +00:00
parent 7bba2c8ecf
commit 5bae8dccf2
3 changed files with 182 additions and 194 deletions

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -17,113 +17,111 @@
*/ */
/** /**
\file htdocs/includes/boxes/box_bookmarks.php * \file htdocs/includes/boxes/box_bookmarks.php
\ingroup bookmark * \ingroup bookmark
\brief Module de génération de l'affichage de la box bookmark * \brief Module de g<EFBFBD>n<EFBFBD>ration de l'affichage de la box bookmark
\version $Id$ * \version $Id$
*/ */
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php"); include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_bookmarks extends ModeleBoxes { class box_bookmarks extends ModeleBoxes {
var $boxcode="bookmarks"; var $boxcode="bookmarks";
var $boximg="object_bookmark"; var $boximg="object_bookmark";
var $boxlabel; var $boxlabel;
var $depends = array("bookmark"); var $depends = array("bookmark");
var $db; var $db;
var $param; var $param;
var $info_box_head = array(); var $info_box_head = array();
var $info_box_contents = array(); var $info_box_contents = array();
/** /**
* \brief Constructeur de la classe * \brief Constructeur de la classe
*/ */
function box_bookmarks() function box_bookmarks()
{ {
global $langs; global $langs;
$langs->load("boxes"); $langs->load("boxes");
$this->boxlabel=$langs->trans("BoxMyLastBookmarks"); $this->boxlabel=$langs->trans("BoxMyLastBookmarks");
} }
/** /**
* \brief Charge les données en mémoire pour affichage ultérieur * \brief Charge les donnees en memoire pour affichage ulterieur
* \param $max Nombre maximum d'enregistrements à charger * \param $max Nombre maximum d'enregistrements a charger
*/ */
function loadBox($max=5) function loadBox($max=5)
{ {
global $user, $langs, $db; global $user, $langs, $db;
$langs->load("boxes"); $langs->load("boxes");
$this->max=$max; $this->max=$max;
$this->info_box_head = array('text' => $langs->trans("BoxMyLastBookmarks",$max), $this->info_box_head = array('text' => $langs->trans("BoxMyLastBookmarks",$max),
'sublink' => DOL_URL_ROOT.'/bookmarks/liste.php'); 'sublink' => DOL_URL_ROOT.'/bookmarks/liste.php');
if ($user->rights->bookmark->creer) if ($user->rights->bookmark->creer)
{ {
$this->info_box_head['subpicto']='object_bookmark'; $this->info_box_head['subpicto']='object_bookmark';
$this->info_box_head['subtext']=$langs->trans("BookmarksManagement"); $this->info_box_head['subtext']=$langs->trans("BookmarksManagement");
} }
else else
{ {
$this->info_box_head['subpicto']='object_bookmark'; $this->info_box_head['subpicto']='object_bookmark';
$this->info_box_head['subtext']=$langs->trans("ListOfBookmark"); $this->info_box_head['subtext']=$langs->trans("ListOfBookmark");
} }
if ($user->rights->bookmark->lire) if ($user->rights->bookmark->lire)
{ {
$sql = "SELECT b.title, b.url, b.target, b.favicon"; $sql = "SELECT b.title, b.url, b.target, b.favicon";
$sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b"; $sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b";
$sql.= " WHERE fk_user = ".$user->id; $sql.= " WHERE fk_user = ".$user->id;
$sql .= " ORDER BY b.dateb DESC "; $sql .= " ORDER BY b.dateb DESC ";
$sql .= $db->plimit($max, 0); $sql .= $db->plimit($max, 0);
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
$i = 0; $i = 0;
while ($i < $num) while ($i < $num)
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
'logo' => $this->boximg, 'logo' => $this->boximg,
'url' => $objp->url, 'url' => $objp->url,
'target' => $objp->target?'newtab':''); 'target' => $objp->target?'newtab':'');
$this->info_box_contents[$i][1] = array('td' => 'align="left"', $this->info_box_contents[$i][1] = array('td' => 'align="left"',
'text' => $objp->title, 'text' => $objp->title,
'url' => $objp->url, 'url' => $objp->url,
'target' => $objp->target?'newtab':''); 'target' => $objp->target?'newtab':'');
$i++;
}
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center" colspan="2"', 'url'=> DOL_URL_ROOT.'/bookmarks/liste.php', 'text'=>$langs->trans("NoRecordedBookmarks"));
}
else
{
dol_print_error($db);
}
}
else {
$this->info_box_contents[0][0] = array('align' => 'left',
'text' => $langs->trans("ReadPermissionNotAllowed"));
}
}
function showBox() $i++;
{ }
parent::showBox($this->info_box_head, $this->info_box_contents);
} if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center" colspan="2"', 'url'=> DOL_URL_ROOT.'/bookmarks/liste.php', 'text'=>$langs->trans("NoRecordedBookmarks"));
}
else
{
dol_print_error($db);
}
}
else {
$this->info_box_contents[0][0] = array('align' => 'left',
'text' => $langs->trans("ReadPermissionNotAllowed"));
}
}
function showBox()
{
parent::showBox($this->info_box_head, $this->info_box_contents);
}
} }

View File

@ -32,105 +32,105 @@ include_once(DOL_DOCUMENT_ROOT."/prospect.class.php");
class box_prospect extends ModeleBoxes { class box_prospect extends ModeleBoxes {
var $boxcode="lastprospects"; var $boxcode="lastprospects";
var $boximg="object_company"; var $boximg="object_company";
var $boxlabel; var $boxlabel;
var $depends = array("societe"); var $depends = array("societe");
var $db; var $db;
var $param; var $param;
var $info_box_head = array(); var $info_box_head = array();
var $info_box_contents = array(); var $info_box_contents = array();
/** /**
* \brief Constructeur de la classe * \brief Constructeur de la classe
*/ */
function box_prospect($DB,$param) function box_prospect($DB,$param)
{ {
global $langs; global $langs;
$langs->load("boxes"); $langs->load("boxes");
$this->db=$DB; $this->db=$DB;
$this->param=$param; $this->param=$param;
$this->boxlabel=$langs->trans("BoxLastProspects"); $this->boxlabel=$langs->trans("BoxLastProspects");
} }
/** /**
* \brief Charge les donnees en memoire pour affichage ulterieur * \brief Charge les donnees en memoire pour affichage ulterieur
* \param $max Nombre maximum d'enregistrements a charger * \param $max Nombre maximum d'enregistrements a charger
*/ */
function loadBox($max=5) function loadBox($max=5)
{ {
global $user, $langs, $db, $conf; global $user, $langs, $db, $conf;
$this->max=$max; $this->max=$max;
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastProspects",$max)); $this->info_box_head = array('text' => $langs->trans("BoxTitleLastProspects",$max));
if ($user->rights->societe->lire) if ($user->rights->societe->lire)
{ {
$sql = "SELECT s.nom, s.rowid as socid, s.fk_stcomm, s.tms"; $sql = "SELECT s.nom, s.rowid as socid, s.fk_stcomm, s.tms";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE s.client = 2"; $sql.= " WHERE s.client = 2";
$sql.= " AND s.entity = ".$conf->entity; $sql.= " AND s.entity = ".$conf->entity;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id; if ($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
$sql.= " ORDER BY s.tms DESC"; $sql.= " ORDER BY s.tms DESC";
$sql.= $db->plimit($max, 0); $sql.= $db->plimit($max, 0);
dol_syslog("box_prospect::loadBox sql=".$sql,LOG_DEBUG); dol_syslog("box_prospect::loadBox sql=".$sql,LOG_DEBUG);
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
$prospectstatic=new Prospect($db); $prospectstatic=new Prospect($db);
while ($i < $num) while ($i < $num)
{ {
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
$datem=$objp->tms; $datem=$objp->tms;
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
'logo' => $this->boximg, 'logo' => $this->boximg,
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid); 'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid);
$this->info_box_contents[$i][1] = array('td' => 'align="left"', $this->info_box_contents[$i][1] = array('td' => 'align="left"',
'text' => $objp->nom, 'text' => $objp->nom,
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid); 'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid);
$this->info_box_contents[$i][2] = array('td' => 'align="right"', $this->info_box_contents[$i][2] = array('td' => 'align="right"',
'text' => dol_print_date($datem, "day")); 'text' => dol_print_date($datem, "day"));
$this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', $this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"',
'text' => eregi_replace('img ','img height="14" ',$prospectstatic->LibStatut($objp->fk_stcomm,3))); 'text' => eregi_replace('img ','img height="14" ',$prospectstatic->LibStatut($objp->fk_stcomm,3)));
$i++; $i++;
} }
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProspects")); if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProspects"));
} }
else else
{ {
$this->info_box_contents[0][0] = array( 'td' => 'align="left"', $this->info_box_contents[0][0] = array( 'td' => 'align="left"',
'maxlength'=>500, 'maxlength'=>500,
'text' => ($db->error().' sql='.$sql)); 'text' => ($db->error().' sql='.$sql));
} }
} }
else { else {
dol_syslog("box_prospect::loadBox not allowed de read this box content",LOG_ERR); dol_syslog("box_prospect::loadBox not allowed de read this box content",LOG_ERR);
$this->info_box_contents[0][0] = array('td' => 'align="left"', $this->info_box_contents[0][0] = array('td' => 'align="left"',
'text' => $langs->trans("ReadPermissionNotAllowed")); 'text' => $langs->trans("ReadPermissionNotAllowed"));
} }
} }
function showBox() function showBox()
{ {
parent::showBox($this->info_box_head, $this->info_box_contents); parent::showBox($this->info_box_head, $this->info_box_contents);
} }
} }

View File

@ -61,13 +61,13 @@ body {
<?php print 'direction: '.$langs->direction.";\n"; ?> <?php print 'direction: '.$langs->direction.";\n"; ?>
} }
a:link { font-family: helvetica, verdana, arial, helvetica, sans-serif; font-weight: bold; color: #000000; text-decoration: none; } a:link { font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; color: #000000; text-decoration: none; }
a:visited { font-family: helvetica, verdana, arial, helvetica, sans-serif; font-weight: bold; color: #000000; text-decoration: none; } a:visited { font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; color: #000000; text-decoration: none; }
a:active { font-family: helvetica, verdana, arial, helvetica, sans-serif; font-weight: bold; color: #000000; text-decoration: none; } a:active { font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; color: #000000; text-decoration: none; }
a:hover { font-family: helvetica, verdana, arial, helvetica, sans-serif; font-weight: bold; color: #000000; text-decoration: none; } a:hover { font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; color: #000000; text-decoration: none; }
input input
{ {
font-size: 12px; font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
background: #FDFDFD; background: #FDFDFD;
border: 1px solid #ACBCBB; border: 1px solid #ACBCBB;
@ -76,7 +76,7 @@ input
} }
input.flat input.flat
{ {
font-size: 12px; font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
background: #FDFDFD; background: #FDFDFD;
border: 1px solid #ACBCBB; border: 1px solid #ACBCBB;
@ -84,8 +84,8 @@ input.flat
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
} }
textarea { textarea {
font-size: 12px; font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
background: #FDFDFD; background: #FDFDFD;
border: 1px solid #ACBCBB; border: 1px solid #ACBCBB;
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
@ -93,8 +93,8 @@ textarea {
} }
textarea.flat textarea.flat
{ {
font-size: 12px; font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
background: #FDFDFD; background: #FDFDFD;
border: 1px solid #ACBCBB; border: 1px solid #ACBCBB;
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
@ -111,7 +111,6 @@ select.flat
} }
.button .button
{ {
font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
border: 0px; border: 0px;
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>); background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>);
@ -120,7 +119,6 @@ select.flat
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
} }
.button:focus { .button:focus {
font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
color: #222244; color: #222244;
border: 0px; border: 0px;
@ -131,7 +129,6 @@ select.flat
} }
.buttonajax .buttonajax
{ {
font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
border: 0px; border: 0px;
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>); background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/button_bg.png' ?>);
@ -183,7 +180,6 @@ div.tmenu
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
margin: 0px 0px 4px 0px; margin: 0px 0px 4px 0px;
font-weight: normal; font-weight: normal;
font-size: 12px;
height: 19px; height: 19px;
background: #b3c5cc; background: #b3c5cc;
background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/tmenu.jpg' ?>); background-image: url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/tmenu.jpg' ?>);
@ -196,7 +192,6 @@ a.tmenudisabled:link
{ {
color: #757575; color: #757575;
font-weight: normal; font-weight: normal;
font-size: 12px;
padding: 0px 5px 0px 5px; padding: 0px 5px 0px 5px;
margin: 0px 1px 2px 1px; margin: 0px 1px 2px 1px;
cursor: not-allowed; cursor: not-allowed;
@ -206,7 +201,6 @@ a.tmenudisabled:visited
{ {
color: #757575; color: #757575;
font-weight: normal; font-weight: normal;
font-size: 12px;
padding: 0px 5px 0px 5px; padding: 0px 5px 0px 5px;
margin: 0px 1px 2px 1px; margin: 0px 1px 2px 1px;
cursor: not-allowed; cursor: not-allowed;
@ -216,7 +210,6 @@ a.tmenudisabled:hover
{ {
color: #757575; color: #757575;
font-weight: normal; font-weight: normal;
font-size: 12px;
padding: 0px 5px 0px 5px; padding: 0px 5px 0px 5px;
margin: 0px 1px 2px 1px; margin: 0px 1px 2px 1px;
cursor: not-allowed; cursor: not-allowed;
@ -226,7 +219,6 @@ a.tmenudisabled:active
{ {
color: #757575; color: #757575;
font-weight: normal; font-weight: normal;
font-size: 12px;
padding: 0px 5px 0px 5px; padding: 0px 5px 0px 5px;
margin: 0px 1px 2px 1px; margin: 0px 1px 2px 1px;
cursor: not-allowed; cursor: not-allowed;
@ -363,7 +355,6 @@ a.login
padding: 0px 8px; padding: 0px 8px;
margin: 0px 0px 1px 0px; margin: 0px 0px 1px 0px;
font-weight: bold; font-weight: bold;
font-size: 12px;
} }
a.login:hover a.login:hover
{ {
@ -547,7 +538,6 @@ div.onglet_inf
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
margin: -12px 0px 0px 10px; margin: -12px 0px 0px 10px;
font-weight:bold; font-weight:bold;
font-size: 12px;
height: 19px; height: 19px;
color: #000000; color: #000000;
text-decoration: none; text-decoration: none;
@ -659,7 +649,7 @@ td.tab {
/* Nouvelle syntaxe a utiliser */ /* Nouvelle syntaxe a utiliser */
a.butAction:link { font-size: 12px; a.butAction:link {
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
font-weight: bold; font-weight: bold;
background: white; background: white;
@ -670,7 +660,7 @@ a.butAction:link { font-size: 12px;
text-decoration: none; text-decoration: none;
white-space: nowrap; } white-space: nowrap; }
a.butAction:visited { font-size: 12px; a.butAction:visited {
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
font-weight: bold; font-weight: bold;
background: white; background: white;
@ -681,7 +671,7 @@ a.butAction:visited { font-size: 12px;
text-decoration: none; text-decoration: none;
white-space: nowrap; } white-space: nowrap; }
a.butAction:active { font-size: 12px; a.butAction:active {
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
font-weight: bold; font-weight: bold;
background: white; background: white;
@ -692,7 +682,7 @@ a.butAction:active { font-size: 12px;
text-decoration: none; text-decoration: none;
white-space: nowrap; } white-space: nowrap; }
a.butAction:hover { font-size: 12px; a.butAction:hover {
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
font-weight: bold; font-weight: bold;
background: #dee7ec; background: #dee7ec;
@ -703,7 +693,7 @@ a.butAction:hover { font-size: 12px;
text-decoration: none; text-decoration: none;
white-space: nowrap; } white-space: nowrap; }
.butActionRefused { font-size: 12px !important; .butActionRefused {
font-family: helvetica, verdana, arial, sans-serif !important; font-family: helvetica, verdana, arial, sans-serif !important;
font-weight: bold !important; font-weight: bold !important;
background: white !important; background: white !important;
@ -716,7 +706,7 @@ a.butAction:hover { font-size: 12px;
cursor: not-allowed; cursor: not-allowed;
} }
a.butActionDelete { font-size: 12px; a.butActionDelete {
font-family: helvetica, verdana, arial, sans-serif; font-family: helvetica, verdana, arial, sans-serif;
font-weight: bold; font-weight: bold;
background: white; background: white;
@ -727,10 +717,10 @@ a.butActionDelete { font-size: 12px;
text-decoration: none; text-decoration: none;
white-space: nowrap; } white-space: nowrap; }
a.butActionDelete:link { font-size: 12px; font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; background: white; border: 1px solid #997777; color: #436976; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; } a.butActionDelete:link { font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; background: white; border: 1px solid #997777; color: #436976; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; }
a.butActionDelete:active { font-size: 12px; font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; background: white; border: 1px solid #997777; color: #436976; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; } a.butActionDelete:active { font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; background: white; border: 1px solid #997777; color: #436976; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; }
a.butActionDelete:visited { font-size: 12px; font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; background: white; border: 1px solid #997777; color: #436976; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; } a.butActionDelete:visited { font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; background: white; border: 1px solid #997777; color: #436976; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; }
a.butActionDelete:hover { font-size: 12px; font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; background: #FFe7ec; border: 1px solid #997777; color: #436976; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; } a.butActionDelete:hover { font-family: helvetica, verdana, arial, sans-serif; font-weight: bold; background: #FFe7ec; border: 1px solid #997777; color: #436976; padding: 0em 0.7em; margin: 0em 0.5em; text-decoration: none; white-space: nowrap; }
/* ============================================================================== */ /* ============================================================================== */