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
/* 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
* it under the terms of the GNU General Public License as published by
@ -17,113 +17,111 @@
*/
/**
\file htdocs/includes/boxes/box_bookmarks.php
\ingroup bookmark
\brief Module de génération de l'affichage de la box bookmark
\version $Id$
*/
* \file htdocs/includes/boxes/box_bookmarks.php
* \ingroup bookmark
* \brief Module de g<EFBFBD>n<EFBFBD>ration de l'affichage de la box bookmark
* \version $Id$
*/
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_bookmarks extends ModeleBoxes {
var $boxcode="bookmarks";
var $boximg="object_bookmark";
var $boxlabel;
var $depends = array("bookmark");
var $boxcode="bookmarks";
var $boximg="object_bookmark";
var $boxlabel;
var $depends = array("bookmark");
var $db;
var $param;
var $info_box_head = array();
var $info_box_contents = array();
var $info_box_head = array();
var $info_box_contents = array();
/**
* \brief Constructeur de la classe
*/
function box_bookmarks()
{
global $langs;
$langs->load("boxes");
/**
* \brief Constructeur de la classe
*/
function box_bookmarks()
{
global $langs;
$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
* \param $max Nombre maximum d'enregistrements à charger
*/
function loadBox($max=5)
{
global $user, $langs, $db;
$langs->load("boxes");
$this->max=$max;
$this->info_box_head = array('text' => $langs->trans("BoxMyLastBookmarks",$max),
/**
* \brief Charge les donnees en memoire pour affichage ulterieur
* \param $max Nombre maximum d'enregistrements a charger
*/
function loadBox($max=5)
{
global $user, $langs, $db;
$langs->load("boxes");
$this->max=$max;
$this->info_box_head = array('text' => $langs->trans("BoxMyLastBookmarks",$max),
'sublink' => DOL_URL_ROOT.'/bookmarks/liste.php');
if ($user->rights->bookmark->creer)
{
$this->info_box_head['subpicto']='object_bookmark';
$this->info_box_head['subtext']=$langs->trans("BookmarksManagement");
}
else
{
$this->info_box_head['subpicto']='object_bookmark';
$this->info_box_head['subtext']=$langs->trans("ListOfBookmark");
}
if ($user->rights->bookmark->creer)
{
$this->info_box_head['subpicto']='object_bookmark';
$this->info_box_head['subtext']=$langs->trans("BookmarksManagement");
}
else
{
$this->info_box_head['subpicto']='object_bookmark';
$this->info_box_head['subtext']=$langs->trans("ListOfBookmark");
}
if ($user->rights->bookmark->lire)
{
$sql = "SELECT b.title, b.url, b.target, b.favicon";
$sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b";
$sql.= " WHERE fk_user = ".$user->id;
$sql .= " ORDER BY b.dateb DESC ";
$sql .= $db->plimit($max, 0);
if ($user->rights->bookmark->lire)
{
$sql = "SELECT b.title, b.url, b.target, b.favicon";
$sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b";
$sql.= " WHERE fk_user = ".$user->id;
$sql .= " ORDER BY b.dateb DESC ";
$sql .= $db->plimit($max, 0);
$result = $db->query($sql);
if ($result)
{
$num = $db->num_rows($result);
$i = 0;
while ($i < $num)
{
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
$result = $db->query($sql);
if ($result)
{
$num = $db->num_rows($result);
$i = 0;
while ($i < $num)
{
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
'logo' => $this->boximg,
'url' => $objp->url,
'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,
'url' => $objp->url,
'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()
{
parent::showBox($this->info_box_head, $this->info_box_contents);
}
$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()
{
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 {
var $boxcode="lastprospects";
var $boximg="object_company";
var $boxlabel;
var $depends = array("societe");
var $boxcode="lastprospects";
var $boximg="object_company";
var $boxlabel;
var $depends = array("societe");
var $db;
var $param;
var $db;
var $param;
var $info_box_head = array();
var $info_box_contents = array();
var $info_box_head = array();
var $info_box_contents = array();
/**
* \brief Constructeur de la classe
*/
function box_prospect($DB,$param)
{
global $langs;
$langs->load("boxes");
/**
* \brief Constructeur de la classe
*/
function box_prospect($DB,$param)
{
global $langs;
$langs->load("boxes");
$this->db=$DB;
$this->param=$param;
$this->db=$DB;
$this->param=$param;
$this->boxlabel=$langs->trans("BoxLastProspects");
}
$this->boxlabel=$langs->trans("BoxLastProspects");
}
/**
* \brief Charge les donnees en memoire pour affichage ulterieur
* \param $max Nombre maximum d'enregistrements a charger
*/
function loadBox($max=5)
{
global $user, $langs, $db, $conf;
/**
* \brief Charge les donnees en memoire pour affichage ulterieur
* \param $max Nombre maximum d'enregistrements a charger
*/
function loadBox($max=5)
{
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)
{
$sql = "SELECT s.nom, s.rowid as socid, s.fk_stcomm, s.tms";
$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";
$sql.= " WHERE s.client = 2";
$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->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
$sql.= " ORDER BY s.tms DESC";
$sql.= $db->plimit($max, 0);
if ($user->rights->societe->lire)
{
$sql = "SELECT s.nom, s.rowid as socid, s.fk_stcomm, s.tms";
$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";
$sql.= " WHERE s.client = 2";
$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->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
$sql.= " ORDER BY s.tms DESC";
$sql.= $db->plimit($max, 0);
dol_syslog("box_prospect::loadBox sql=".$sql,LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
dol_syslog("box_prospect::loadBox sql=".$sql,LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
$prospectstatic=new Prospect($db);
while ($i < $num)
{
$objp = $db->fetch_object($resql);
$datem=$objp->tms;
$i = 0;
$prospectstatic=new Prospect($db);
while ($i < $num)
{
$objp = $db->fetch_object($resql);
$datem=$objp->tms;
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
'logo' => $this->boximg,
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid);
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
'logo' => $this->boximg,
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid);
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
'text' => $objp->nom,
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid);
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
'text' => $objp->nom,
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid);
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
'text' => dol_print_date($datem, "day"));
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
'text' => dol_print_date($datem, "day"));
$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)));
$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)));
$i++;
}
$i++;
}
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProspects"));
}
else
{
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProspects"));
}
else
{
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
'maxlength'=>500,
'text' => ($db->error().' sql='.$sql));
}
}
else {
dol_syslog("box_prospect::loadBox not allowed de read this box content",LOG_ERR);
$this->info_box_contents[0][0] = array('td' => 'align="left"',
}
}
else {
dol_syslog("box_prospect::loadBox not allowed de read this box content",LOG_ERR);
$this->info_box_contents[0][0] = array('td' => 'align="left"',
'text' => $langs->trans("ReadPermissionNotAllowed"));
}
}
}
}
function showBox()
{
parent::showBox($this->info_box_head, $this->info_box_contents);
}
function showBox()
{
parent::showBox($this->info_box_head, $this->info_box_contents);
}
}

View File

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