Merge remote-tracking branch 'upstream/develop' into dolibarr-3509

This commit is contained in:
Juanjo Menent 2015-09-23 22:49:23 +02:00
commit 5dc78a337d
38 changed files with 630 additions and 278 deletions

View File

@ -15,7 +15,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
# Require all granted
# </IfVersion>
# <IfVersion < 2.3>
# Order allow, deny
# Order allow,deny
# Allow from all
# </IfVersion>
#
@ -27,7 +27,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order allow, deny
Order allow,deny
Allow from all
</IfVersion>

View File

@ -467,6 +467,7 @@ if ($nboftargetok) {
# Removed known external modules to avoid any error when packaging from env where external modules are tested
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom/*`; # For custom we want to keep dir
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`;
@ -481,8 +482,8 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
# Removed other test files
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
# Removed other test files
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`; # This is a dev tool
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;

6
htdocs/.gitignore vendored
View File

@ -1,7 +1,11 @@
/allscreens*
/ancot*
/bootstrap*
/dolimed*
/ecommerce*
/extensions*
/google*
/lead
/multicompany*
/ndf*
/numberingpack*
@ -11,5 +15,3 @@
/teclib*
/test.php
/ultimatepdf*
/lead
/dolimed*

View File

@ -343,7 +343,7 @@ else // Show
print ($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
print '</td>';
print '<td width="20">';
if ($user->admin && $conf->global->MAIN_LANG_DEFAULT!='auto') print info_admin($langs->trans("SubmitTranslation",$conf->global->MAIN_LANG_DEFAULT),1);
if ($user->admin && $conf->global->MAIN_LANG_DEFAULT!='auto') print info_admin($langs->trans("SubmitTranslation".($conf->global->MAIN_LANG_DEFAULT=='en_US'?'ENUS':''),$conf->global->MAIN_LANG_DEFAULT),1);
print '</td>';
print "</tr>";

View File

@ -108,6 +108,14 @@ if (! $foundcache && $test)
$foundcache++;
print img_picto('','tick.png').' '.$langs->trans("EAcceleratorInstalled");
}
$test=function_exists('opcache_get_status');
if (! $foundcache && $test)
{
$foundcache++;
print img_picto('','tick.png').' '.$langs->trans("ZendOPCacheInstalled"); // Should be by defautl starting with PHP 5.5
//$tmp=opcache_get_status();
//var_dump($tmp);
}
$test=function_exists('apc_cache_info');
if (! $foundcache && $test)
{

View File

@ -60,7 +60,8 @@ class DolibarrApiAccess implements iAuthenticate
$userClass = Defaults::$userIdentifierClass;
if (isset($_GET['api_key'])) {
if (isset($_GET['api_key']))
{
$sql = "SELECT u.login, u.datec, u.api_key, ";
$sql.= " u.tms as date_modification, u.entity";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
@ -100,7 +101,9 @@ class DolibarrApiAccess implements iAuthenticate
}
else
{
return false;
throw new RestException(401, "Failed to login to API. No parameter 'api_key' provided");
//dol_syslog("Failed to login to API. No parameter key provided", LOG_DEBUG);
//return false;
}
$userClass::setCacheIdentifier(static::$role);

View File

@ -419,7 +419,7 @@ else if ($id || $ref)
// Ref
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
print '<td class="valeur">';
print $form->showrefnav($member,'id');
print $form->showrefnav($member,'id','','1','rowid','ref','','&type=3');
print '</td></tr>';
// Login

View File

@ -86,21 +86,15 @@ if ($action == 'update' && $user->rights->categorie->creer)
if (empty($categorie->label))
{
$error++;
$action = 'create';
$action = 'edit';
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), 'errors');
}
if (empty($categorie->description))
{
$error++;
$action = 'create';
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Description")), 'errors');
}
if (! $error && empty($categorie->error))
{
$ret = $extrafields->setOptionalsFromPost($extralabels,$categorie);
if ($ret < 0) $error++;
if ($categorie->update($user) > 0)
if (! $error && $categorie->update($user) > 0)
{
header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$categorie->id.'&type='.$type);
exit;
@ -151,7 +145,7 @@ print '</tr>';
// Description
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td >';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('description',$object->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50);

View File

@ -965,25 +965,25 @@ if ($id > 0)
print '<div class="tabsAction">';
if (! empty($conf->propal->enabled) && $user->rights->propal->creer)
if (! empty($conf->propal->enabled) && $user->rights->propal->creer && $object->status==1)
{
$langs->load("propal");
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddProp").'</a></div>';
}
if (! empty($conf->commande->enabled) && $user->rights->commande->creer)
if (! empty($conf->commande->enabled) && $user->rights->commande->creer && $object->status==1)
{
$langs->load("orders");
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/card.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddOrder").'</a></div>';
}
if ($user->rights->contrat->creer)
if ($user->rights->contrat->creer && $object->status==1)
{
$langs->load("contracts");
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddContract").'</a></div>';
}
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer)
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer && $object->status==1)
{
$langs->load("fichinter");
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddIntervention").'</a></div>';
@ -992,7 +992,7 @@ if ($id > 0)
// Add invoice
if ($user->societe_id == 0)
{
if (! empty($conf->deplacement->enabled))
if (! empty($conf->deplacement->enabled) && $object->status==1)
{
$langs->load("trips");
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/deplacement/card.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddTrip").'</a></div>';
@ -1000,7 +1000,7 @@ if ($id > 0)
if (! empty($conf->facture->enabled))
{
if ($user->rights->facture->creer)
if ($user->rights->facture->creer && $object->status==1)
{
$langs->load("bills");
$langs->load("orders");

View File

@ -195,22 +195,18 @@ if (empty($reshook))
{
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{
// Define output language
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
if (! empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$model=$object->modelpdf;
$ret = $object->fetch($id); // Reload to get new records
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
if (! empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$model=$object->modelpdf;
$ret = $object->fetch($id); // Reload to get new records
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
}
} else {
$langs->load("errors");
@ -1290,7 +1286,7 @@ if ($action == 'create')
print '</td>';
} else {
print '<td colspan="2">';
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 2 OR s.client = 3', 1);
print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 1);
print '</td>';
}
print '</tr>' . "\n";
@ -1414,11 +1410,7 @@ if ($action == 'create')
print '<tr>';
print '<td class="border" valign="top">' . $langs->trans('NotePublic') . '</td>';
print '<td valign="top" colspan="2">';
$note_public = '';
if (is_object($objectsrc)) // Take value from source object
{
$note_public = $objectsrc->note_public;
}
$note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc)?$objectsrc->note_public:null));
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
@ -1428,11 +1420,7 @@ if ($action == 'create')
print '<tr>';
print '<td class="border" valign="top">' . $langs->trans('NotePrivate') . '</td>';
print '<td valign="top" colspan="2">';
$note_private = '';
if (! empty($origin) && ! empty($originid) && is_object($objectsrc)) // Take value from source object
{
$note_private = $objectsrc->note_private;
}
$note_private = $object->getDefaultCreateValueFor('note_private', ((! empty($origin) && ! empty($originid) && is_object($objectsrc))?$objectsrc->note_private:null));
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
// print '<textarea name="note_private" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_private.'.</textarea>

View File

@ -1292,8 +1292,8 @@ if ($action == 'create' && $user->rights->commande->creer)
$datedelivery = (! empty($objectsrc->date_livraison) ? $objectsrc->date_livraison : '');
$note_private = (! empty($objectsrc->note_private) ? $objectsrc->note_private : (! empty($objectsrc->note_private) ? $objectsrc->note_private : ''));
$note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : '');
$note_private = $object->getDefaultCreateValueFor('note_private', (! empty($objectsrc->note_private) ? $objectsrc->note_private : null));
$note_public = $object->getDefaultCreateValueFor('note_public', (! empty($objectsrc->note_public) ? $objectsrc->note_public : null));
// Object source contacts list
$srccontactslist = $objectsrc->liste_contact(- 1, 'external', 1);
@ -1311,6 +1311,9 @@ if ($action == 'create' && $user->rights->commande->creer)
$remise_absolue = 0;
$dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER)?-1:'';
$projectid = 0;
$note_private = $object->getDefaultCreateValueFor('note_private');
$note_public = $object->getDefaultCreateValueFor('note_public');
}
$absolute_discount=$soc->getAvailableDiscounts();

View File

@ -2285,11 +2285,7 @@ if ($action == 'create')
print '<tr>';
print '<td class="border" valign="top">' . $langs->trans('NotePublic') . '</td>';
print '<td valign="top" colspan="2">';
$note_public = '';
if (is_object($objectsrc)) // Take value from source object
{
$note_public = $objectsrc->note_public;
}
$note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc)?$objectsrc->note_public:null));
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
@ -2299,11 +2295,7 @@ if ($action == 'create')
print '<tr>';
print '<td class="border" valign="top">' . $langs->trans('NotePrivate') . '</td>';
print '<td valign="top" colspan="2">';
$note_private = '';
if (! empty($origin) && ! empty($originid) && is_object($objectsrc)) // Take value from source object
{
$note_private = $objectsrc->note_private;
}
$note_private = $object->getDefaultCreateValueFor('note_private', ((! empty($origin) && ! empty($originid) && is_object($objectsrc))?$objectsrc->note_private:null));
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
// print '<textarea name="note_private" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_private.'.</textarea>

View File

@ -82,7 +82,8 @@ class box_contacts extends ModeleBoxes
$societestatic=new Societe($db);
$line = 0;
while ($line < $num) {
while ($line < $num)
{
$objp = $db->fetch_object($result);
$datec=$db->jdate($objp->datec);
$datem=$db->jdate($objp->tms);
@ -92,7 +93,6 @@ class box_contacts extends ModeleBoxes
$contactstatic->firstname=$objp->firstname;
$contactstatic->civility_id=$objp->civility_id;
$contactstatic->statut=$objp->status;
$societestatic->id = $objp->fk_soc;
$societestatic->code_client = $objp->code_client;
$societestatic->name = $objp->socname;

View File

@ -389,7 +389,7 @@ abstract class CommonObject
*
* @param Translate $langs Language object for translation of civility
* @param int $option 0=No option, 1=Add civility
* @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname
* @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname, 2=Firstname
* @param int $maxlen Maximum length
* @return string String with full name
*/
@ -3549,7 +3549,47 @@ abstract class CommonObject
/* Functions common to commonobject and commonobjectline */
/* For default values */
/**
* Return the default value to use for a field when showing the create form of object.
* Return values in this order:
* 1) If parameter is available into POST, we return it first.
* 2) If not but an alternate value was provided as parameter of function, we return it.
* 3) If not but a constant $conf->global->OBJECTELEMENT_FIELDNAME is set, we return it (It is better to use the dedicated table).
* 4) Return value found into database (TODO No yet implemented)
*
* @param string $fieldname Name of field
* @param string $alternatevalue Alternate value to use
* @return string Default value
**/
function getDefaultCreateValueFor($fieldname, $alternatevalue=null)
{
global $conf, $_POST;
// If param is has been posted with use this value first.
if (isset($_POST[$fieldname])) return GETPOST($fieldname, 2);
if (isset($alternatevalue)) return $alternatevalue;
$newelement=$this->element;
if ($newelement == 'facture') $newelement='invoice';
if ($newelement == 'commande') $newelement='order';
if (empty($newelement))
{
dol_syslog("Ask a default value using common method getDefaultCreateValueForField on an object with no property ->element defined. Return empty string.", LOG_WARNING);
return '';
}
$keyforfieldname=strtoupper($newelement.'_DEFAULT_'.$fieldname);
//var_dump($keyforfieldname);
if (isset($conf->global->$keyforfieldname)) return $conf->global->$keyforfieldname;
// TODO Ad here a scan into table llx_overwrite_default with a filter on $this->element and $fieldname
}
/* For triggers */

View File

@ -31,6 +31,8 @@ require_once DOL_DOCUMENT_ROOT .'/core/db/DoliDB.class.php';
*/
class DoliDBMysqli extends DoliDB
{
/** @var mysqli Database object */
public $db;
//! Database type
public $type='mysqli';
//! Database label
@ -81,29 +83,26 @@ class DoliDBMysqli extends DoliDB
$this->connected = false;
$this->ok = false;
$this->error=$langs->trans("ErrorWrongHostParameter");
dol_syslog(get_class($this)."::DoliDBMysqli : Erreur Connect, wrong host parameters",LOG_ERR);
dol_syslog(get_class($this)."::DoliDBMysqli : Connect error, wrong host parameters",LOG_ERR);
return $this->ok;
}
// Essai connexion serveur
// We do not try to connect to database, only to server. Connect to database is done later in constrcutor
$this->db = $this->connect($host, $user, $pass, '', $port);
// Try server connection
// We do not try to connect to database, only to server. Connect to database is done later in constrcutor
$this->db = $this->connect($host, $user, $pass, '', $port);
if ($this->db)
{
$this->connected = true;
$this->ok = true;
}
else
{
// host, login ou password incorrect
$this->connected = false;
$this->ok = false;
$this->error=mysqli_connect_error();
dol_syslog(get_class($this)."::DoliDBMysqli : Erreur Connect mysqli_connect_error=".$this->error,LOG_ERR);
}
if ($this->db->connect_errno) {
$this->connected = false;
$this->ok = false;
$this->error = $this->db->connect_error;
dol_syslog(get_class($this) . "::DoliDBMysqli Connect error: " . $this->error, LOG_ERR);
return $this->ok;
} else {
$this->connected = true;
$this->ok = true;
}
// Si connexion serveur ok et si connexion base demandee, on essaie connexion base
// If server connection is ok, we try to connect to the database
if ($this->connected && $name)
{
if ($this->select_db($name))
@ -116,7 +115,7 @@ class DoliDBMysqli extends DoliDB
$clientmustbe='';
if (preg_match('/UTF-8/i',$conf->file->character_set_client)) $clientmustbe='utf8';
if (preg_match('/ISO-8859-1/i',$conf->file->character_set_client)) $clientmustbe='latin1';
if (mysqli_character_set_name($this->db) != $clientmustbe)
if ($this->db->character_set_name() != $clientmustbe)
{
$this->query("SET NAMES '".$clientmustbe."'", $this->db);
//$this->query("SET CHARACTER SET ". $this->forcecharset);
@ -128,7 +127,7 @@ class DoliDBMysqli extends DoliDB
$this->database_name = '';
$this->ok = false;
$this->error=$this->error();
dol_syslog(get_class($this)."::DoliDBMysqli : Erreur Select_db ".$this->error,LOG_ERR);
dol_syslog(get_class($this)."::DoliDBMysqli : Select_db error ".$this->error,LOG_ERR);
}
}
else
@ -142,7 +141,7 @@ class DoliDBMysqli extends DoliDB
$clientmustbe='';
if (preg_match('/UTF-8/i',$conf->file->character_set_client)) $clientmustbe='utf8';
if (preg_match('/ISO-8859-1/i',$conf->file->character_set_client)) $clientmustbe='latin1';
if (mysqli_character_set_name($this->db) != $clientmustbe)
if ($this->db->character_set_name() != $clientmustbe)
{
$this->query("SET NAMES '".$clientmustbe."'", $this->db);
//$this->query("SET CHARACTER SET ". $this->forcecharset);
@ -175,36 +174,27 @@ class DoliDBMysqli extends DoliDB
function select_db($database)
{
dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG);
return mysqli_select_db($this->db,$database);
return $this->db->select_db($database);
}
/**
* Connexion to server
/**
* Connect to server
*
* @param string $host database server host
* @param string $login login
* @param string $passwd password
* @param string $name name of database (not used for mysql, used for pgsql)
* @param integer $port Port of database server
* @return mysqli Database access handler
* @see close
*/
function connect($host, $login, $passwd, $name, $port=0)
{
dol_syslog(get_class($this)."::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name",LOG_DEBUG);
* @param string $host database server host
* @param string $login login
* @param string $passwd password
* @param string $name name of database (not used for mysql, used for pgsql)
* @param integer $port Port of database server
* @return mysqli Database access object
* @see close
*/
function connect($host, $login, $passwd, $name, $port = 0)
{
dol_syslog(get_class($this) . "::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name", LOG_DEBUG);
$newhost=$host;
$newport=$port;
// With mysqli, port must be in connect parameters
if (! $newport) $newport=3306;
$this->db = @mysqli_connect($newhost, $login, $passwd, $name, $newport);
//print "Resultat fonction connect: ".$this->db;
return $this->db;
}
return new mysqli($host, $login, $passwd, $name, $port);
}
/**
* Return version of database server
@ -213,7 +203,7 @@ class DoliDBMysqli extends DoliDB
*/
function getVersion()
{
return mysqli_get_server_info($this->db);
return $this->db->get_server_info();
}
/**
@ -221,10 +211,10 @@ class DoliDBMysqli extends DoliDB
*
* @return string Version string
*/
function getDriverInfo()
{
return mysqli_get_client_info($this->db);
}
function getDriverInfo()
{
return $this->db->get_client_info();
}
/**
@ -239,7 +229,7 @@ class DoliDBMysqli extends DoliDB
{
if ($this->transaction_opened > 0) dol_syslog(get_class($this)."::close Closing a connection with an opened transaction depth=".$this->transaction_opened,LOG_ERR);
$this->connected=false;
return mysqli_close($this->db);
return $this->db->close();
}
return false;
}
@ -264,11 +254,11 @@ class DoliDBMysqli extends DoliDB
if (! $this->database_name)
{
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
$ret = mysqli_query($this->db,$query);
$ret = $this->db->query($query);
}
else
{
$ret = mysqli_query($this->db,$query);
$ret = $this->db->query($query);
}
if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query))
@ -300,7 +290,7 @@ class DoliDBMysqli extends DoliDB
{
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
if (! is_object($resultset)) { $resultset=$this->_results; }
return mysqli_fetch_object($resultset);
return $resultset->fetch_object();
}
@ -314,7 +304,7 @@ class DoliDBMysqli extends DoliDB
{
// If resultset not provided, we take the last used by connexion
if (! is_object($resultset)) { $resultset=$this->_results; }
return mysqli_fetch_array($resultset);
return $resultset->fetch_array();
}
/**
@ -329,7 +319,7 @@ class DoliDBMysqli extends DoliDB
if (! is_bool($resultset))
{
if (! is_object($resultset)) { $resultset=$this->_results; }
return mysqli_fetch_row($resultset);
return $resultset->fetch_row();
}
else
{
@ -349,7 +339,7 @@ class DoliDBMysqli extends DoliDB
{
// If resultset not provided, we take the last used by connexion
if (! is_object($resultset)) { $resultset=$this->_results; }
return mysqli_num_rows($resultset);
return $resultset->num_rows;
}
/**
@ -365,7 +355,7 @@ class DoliDBMysqli extends DoliDB
if (! is_object($resultset)) { $resultset=$this->_results; }
// mysql necessite un link de base pour cette fonction contrairement
// a pqsql qui prend un resultset
return mysqli_affected_rows($this->db);
return $this->db->affected_rows;
}
@ -380,7 +370,7 @@ class DoliDBMysqli extends DoliDB
// If resultset not provided, we take the last used by connexion
if (! is_object($resultset)) { $resultset=$this->_results; }
// Si resultset en est un, on libere la memoire
if (is_object($resultset)) mysqli_free_result($resultset);
if (is_object($resultset)) $resultset->free_result();
}
/**
@ -436,10 +426,10 @@ class DoliDBMysqli extends DoliDB
1451 => 'DB_ERROR_CHILD_EXISTS'
);
if (isset($errorcode_map[mysqli_errno($this->db)])) {
return $errorcode_map[mysqli_errno($this->db)];
if (isset($errorcode_map[$this->db->errno])) {
return $errorcode_map[$this->db->errno];
}
$errno=mysqli_errno($this->db);
$errno=$this->db->errno;
return ($errno?'DB_ERROR_'.$errno:'0');
}
}
@ -456,7 +446,7 @@ class DoliDBMysqli extends DoliDB
return 'Not connected. Check setup parameters in conf/conf.php file and your mysql client and server versions';
}
else {
return mysqli_error($this->db);
return $this->db->error;
}
}
@ -469,7 +459,7 @@ class DoliDBMysqli extends DoliDB
*/
function last_insert_id($tab,$fieldid='rowid')
{
return mysqli_insert_id($this->db);
return $this->db->insert_id;
}
/**

View File

@ -950,7 +950,7 @@ function dol_move($srcfile, $destfile, $newmask=0, $overwriteifexists=1)
else dol_syslog("files.lib.php::dol_move failed", LOG_WARNING);
}
if (empty($newmask) && ! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
@chmod($newpathofsrcfile, octdec($newmask));
@chmod($newpathofdestfile, octdec($newmask));
}
return $result;

View File

@ -4297,12 +4297,16 @@ function dolGetFirstLastname($firstname,$lastname,$nameorder=-1)
$ret='';
// If order not defined, we use the setup
if ($nameorder < 0) $nameorder=(empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION));
if ($nameorder)
if ($nameorder && ((string) $nameorder != '2'))
{
$ret.=$firstname;
$ret.=$firstname;
if ($firstname && $lastname) $ret.=' ';
$ret.=$lastname;
}
else if ($nameorder == 2)
{
$ret.=$firstname;
}
else
{
$ret.=$lastname;

View File

@ -59,12 +59,14 @@ function build_calfile($format,$title,$desc,$events_array,$outputfile)
fwrite($calfileh,"CALSCALE:GREGORIAN\n");
fwrite($calfileh,"X-WR-CALNAME:".$encoding.format_cal($format,$title)."\n");
fwrite($calfileh,"X-WR-CALDESC:".$encoding.format_cal($format,$desc)."\n");
$hh=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'hour');
$mm=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'min');
$ss=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'sec');
//fwrite($calfileh,"X-WR-TIMEZONE:Europe/Paris\n");
if (! empty($conf->global->MAIN_AGENDA_EXPORT_CACHE)
&& $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60) fwrite($calfileh,"X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n");
&& $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60){
$hh=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'hour');
$mm=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'min');
$ss=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'sec');
fwrite($calfileh,"X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n");
}
foreach ($events_array as $date => $event)
{

View File

@ -235,7 +235,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
}
$title=$langs->trans("GoIntoSetupToChangeLogo");
print "\n".'<!-- Show logo on menu -->'."\n";
print '<div class="blockvmenuimpair">'."\n";
print '<div class="blockvmenuimpair blockvmenulogo">'."\n";
print '<div class="menu_titre" id="menu_titre_logo"></div>';
print '<div class="menu_top" id="menu_top_logo"></div>';
print '<div class="menu_contenu" id="menu_contenu_logo">';

View File

@ -439,7 +439,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
}
$title=$langs->trans("GoIntoSetupToChangeLogo");
print "\n".'<!-- Show logo on menu -->'."\n";
print '<div class="blockvmenuimpair">'."\n";
print '<div class="blockvmenuimpair blockvmenulogo">'."\n";
print '<div class="menu_titre" id="menu_titre_logo"></div>';
print '<div class="menu_top" id="menu_top_logo"></div>';
print '<div class="menu_contenu" id="menu_contenu_logo">';
@ -1395,7 +1395,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$invert=empty($conf->global->MAIN_MENU_INVERT)?"":"invert";
if (empty($noout))
{
$alt=0; $blockvmenuopened=false;
$alt=0; $altok=0; $blockvmenuopened=false;
$num=count($menu_array);
for ($i = 0; $i < $num; $i++)
{
@ -1405,14 +1405,15 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$alt++;
if (empty($menu_array[$i]['level']) && $showmenu)
{
$altok++;
$blockvmenuopened=true;
if (($alt%2==0))
if ($altok % 2 == 0)
{
print '<div class="blockvmenuimpair'.$invert.'">'."\n";
print '<div class="blockvmenuimpair'.$invert.($alt == 1 ? ' blockvmenufirst':'').'">'."\n";
}
else
{
print '<div class="blockvmenupair'.$invert.'">'."\n";
print '<div class="blockvmenupair'.$invert.($alt == 1 ? ' blockvmenufirst':'').'">'."\n";
}
}
@ -1478,9 +1479,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
{
if ($showmenu)
print '<div class="menu_end"></div>'."\n";
if ($blockvmenuopened) { print "</div>\n"; $blockvmenuopened=false; }
if ($blockvmenuopened) { print '</div>'."\n"; $blockvmenuopened=false; }
}
}
if ($altok) print '<div class="blockvmenuend"></div>';
}
return count($menu_array);

View File

@ -628,8 +628,14 @@ class DolibarrModules // Can not be abstract, because we need to insta
{
$dirfound++;
// Run llx_mytable.sql files
// Run llx_mytable.sql files, then llx_mytable_*.sql
$files = array();
while (($file = readdir($handle))!==false)
{
$files[] = $file;
}
sort($files);
foreach ($files as $file)
{
if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data')
{
@ -640,8 +646,14 @@ class DolibarrModules // Can not be abstract, because we need to insta
rewinddir($handle);
// Run llx_mytable.key.sql files (Must be done after llx_mytable.sql)
// Run llx_mytable.key.sql files (Must be done after llx_mytable.sql) then then llx_mytable_*.key.sql
$files = array();
while (($file = readdir($handle))!==false)
{
$files[] = $file;
}
sort($files);
foreach ($files as $file)
{
if (preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data')
{
@ -653,7 +665,13 @@ class DolibarrModules // Can not be abstract, because we need to insta
rewinddir($handle);
// Run data_xxx.sql files (Must be done after llx_mytable.key.sql)
$files = array();
while (($file = readdir($handle))!==false)
{
$files[] = $file;
}
sort($files);
foreach ($files as $file)
{
if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'data')
{
@ -665,7 +683,13 @@ class DolibarrModules // Can not be abstract, because we need to insta
rewinddir($handle);
// Run update_xxx.sql files
$files = array();
while (($file = readdir($handle))!==false)
{
$files[] = $file;
}
sort($files);
foreach ($files as $file)
{
if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,6) == 'update')
{

View File

@ -164,7 +164,7 @@ class modBanque extends DolibarrModules
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='Bordereaux remise Chq/Fact';
$this->export_permission[$r]=array(array("banque","export"));
$this->export_fields_array[$r]=array("bch.rowid"=>"bordereauid","bch.number"=>"Numero","bch.ref_ext"=>"RefExt",'ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation",
$this->export_fields_array[$r]=array("bch.rowid"=>"DepositId","bch.number"=>"Numero","bch.ref_ext"=>"RefExt",'ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation",
"bch.date_bordereau"=>"Date","bch.amount"=>"Total","bch.nbcheque"=>"NbCheque","bu.url_id"=>"IdThirdParty","s.nom"=>"ThirdParty","f.facnumber"=>"InvoiceRef"
);
$this->export_TypeFields_array[$r]=array('ba.ref'=>'Text','ba.label'=>'Text','b.datev'=>'Date','b.num_chq'=>'Text','b.amount'=>'Numeric','b.num_releve'=>'Text','b.datec'=>"Date",

View File

@ -51,7 +51,7 @@ $(document).ready(function() {
$('#refreshbutton').click( function() {
$.pleaseBePatient("<?php echo $langs->trans('PleaseBePatient'); ?>");
$.getJSON( "<?php echo DOL_URL_ROOT . '/ecm/ajax/ecmdatabase.php'; ?>", {
$.get( "<?php echo DOL_URL_ROOT . '/ecm/ajax/ecmdatabase.php'; ?>", {
action: "build",
element: "ecm"
},

View File

@ -1460,8 +1460,8 @@ if ($action=='create')
$datedelivery = (! empty($objectsrc->date_livraison) ? $objectsrc->date_livraison : '');
$note_private = (! empty($objectsrc->note_private) ? $objectsrc->note_private : (! empty($objectsrc->note_private) ? $objectsrc->note_private : ''));
$note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : '');
$note_private = $object->getDefaultCreateValueFor('note_private', (! empty($objectsrc->note_private) ? $objectsrc->note_private : null));
$note_public = $object->getDefaultCreateValueFor('note_public', (! empty($objectsrc->note_public) ? $objectsrc->note_public : null));
// Object source contacts list
$srccontactslist = $objectsrc->liste_contact(- 1, 'external', 1);
@ -1471,6 +1471,9 @@ if ($action=='create')
{
$cond_reglement_id = $societe->cond_reglement_supplier_id;
$mode_reglement_id = $societe->mode_reglement_supplier_id;
$note_private = $object->getDefaultCreateValueFor('note_private');
$note_public = $object->getDefaultCreateValueFor('note_public');
}
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="post">';

View File

@ -1477,7 +1477,8 @@ if ($action == 'create')
// Public note
print '<tr><td>'.$langs->trans('NotePublic').'</td>';
print '<td>';
$doleditor = new DolEditor('note_public', GETPOST('note_public'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
$note_public = $object->getDefaultCreateValueFor('note_public');
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
print $doleditor->Create(1);
print '</td>';
// print '<td><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_5.'"></textarea></td>';
@ -1486,7 +1487,8 @@ if ($action == 'create')
// Private note
print '<tr><td>'.$langs->trans('NotePrivate').'</td>';
print '<td>';
$doleditor = new DolEditor('note_private', GETPOST('note_private'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
$note_private = $object->getDefaultCreateValueFor('note_private');
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
print $doleditor->Create(1);
print '</td>';
// print '<td><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_5.'"></textarea></td>';

View File

@ -5,11 +5,8 @@
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
<<<<<<< HEAD
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
=======
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
>>>>>>> refs/remotes/origin/3.6
*
* 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
@ -46,6 +43,7 @@ $confirm = GETPOST('confirm');
$facid=GETPOST('facid','int');
$socid=GETPOST('socid','int');
$accountid = GETPOST('accountid');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@ -200,7 +198,7 @@ if (empty($reshook))
if (! $error)
{
$result=$paiement->addPaymentToBank($user,'payment_supplier','(SupplierInvoicePayment)',$_POST['accountid'],'','');
$result=$paiement->addPaymentToBank($user,'payment_supplier','(SupplierInvoicePayment)',$accountid,'','');
if ($result < 0)
{
setEventMessage($paiement->error, 'errors');
@ -304,7 +302,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (! empty($conf->banque->enabled))
{
print '<tr><td class="fieldrequired">'.$langs->trans('Account').'</td><td>';
$form->select_comptes(empty($_POST['accountid'])?'':$_POST['accountid'],'accountid',0,'',2);
$form->select_comptes(empty($accountid)?'':$accountid,'accountid',0,'',2);
print '</td></tr>';
}
else

View File

@ -279,7 +279,8 @@ MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos)
MAIN_SMS_SENDMODE=Method to use to send SMS
MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending
FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally.
SubmitTranslation=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit modified files on www.dolibarr.org forum.
SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr.
SubmitTranslation=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit your change to www.transifex.com/dolibarr-association/dolibarr/
ModuleSetup=Module setup
ModulesSetup=Modules setup
ModuleFamilyBase=System

View File

@ -382,6 +382,8 @@ ChequesReceipts=Checks receipts
ChequesArea=Checks deposits area
ChequeDeposits=Checks deposits
Cheques=Checks
DepositId=Id deposit
NbCheque=Number of checks
CreditNoteConvertedIntoDiscount=This credit note or deposit invoice has been converted into %s
UsBillingContactAsIncoiveRecipientIfExist=Use customer billing contact address instead of third party address as recipient for invoices
ShowUnpaidAll=Show all unpaid invoices

View File

@ -1390,8 +1390,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
</script>' . "\n";
// Raven.js for client-side Sentry logging support
if (array_key_exists('mod_syslog_sentry', $conf->loghandlers) && ! empty($conf->global->SYSLOG_SENTRY_DSN)) {
if (array_key_exists('mod_syslog_sentry', $conf->loghandlers) && ! empty($conf->global->SYSLOG_SENTRY_DSN))
{
// Filter out secret key
$dsn = parse_url($conf->global->SYSLOG_SENTRY_DSN);
$public_dsn = $dsn['scheme'] . '://' . $dsn['user'] .'@' . $dsn['host'] . $dsn['path'];
@ -1460,12 +1460,12 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
// User photo
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem" style="padding: 0px;">';
$toprightmenu.=$user->getPhotoUrl(16,16,'loginphoto');
$toprightmenu.=$user->getPhotoUrl(0,0,'loginphoto');
$toprightmenu.='</div></div>';
// Login name with tooltip
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem" style="padding: 0px;">';
$toprightmenu.=$user->getNomurl(0, '', true, 0, 11);
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem login_block_elem_name" style="padding: 0px;">';
$toprightmenu.=$user->getNomurl(0, '', true, 0, 11, 0, 'firstname','alogin');
$toprightmenu.='</div></div>';
$toprightmenu.='</div>';

1
htdocs/public/api/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/cache/

View File

@ -110,8 +110,11 @@ foreach ($modulesdir as $dir)
{
$classname=$reg[1];
$classname = str_replace('Api_','',ucwords($reg[1])).'Api';
$classname = ucfirst($classname);
require_once $dir_part.$file_searched;
if(class_exists($classname)) {
if (class_exists($classname))
{
dol_syslog("Found API classname=".$classname);
$api->r->addAPIClass($classname,'');
}
}

View File

@ -419,7 +419,7 @@ class Societe extends CommonObject
* @param User $user Object of user that ask creation
* @return int >= 0 if OK, < 0 if KO
*/
function create($user='')
function create($user)
{
global $langs,$conf;
@ -484,7 +484,7 @@ class Societe extends CommonObject
$this->add_commercial($user, $this->commercial_id);
}
// si un commercial cree un client il lui est affecte automatiquement
else if (!$user->rights->societe->client->voir)
else if (empty($user->rights->societe->client->voir))
{
$this->add_commercial($user, $user->id);
}

View File

@ -1,3 +1,4 @@
/bootstrap
/oblyon
/autre
/allscreens

View File

@ -107,7 +107,7 @@ $colorbacklinepair2=(250+round($isred/3)).','.(250+round($isgreen/3)).','.(250+r
$colorbacklinepairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)); // line pair
$colorbackbody='243,243,243';
$colortext='40,40,40';
$fontsize='12';
$fontsize='13';
$fontsizesmaller='11';
$usegradient=1;
@ -487,6 +487,11 @@ div.confirmmessage {
z-index: 999999;
}
*/
.googlerefreshcal {
padding-top: 4px;
padding-bottom: 4px;
}
/* ============================================================================== */
/* Styles to hide objects */
@ -551,6 +556,12 @@ td.showDragHandle {
#id-right { /* This must stay id-right ant not be replaced with echo $right */
width: 100%;
}
#id-left {
/* background-color: #fff;
border-right: 1px #888 solid;
height: calc(100% - 50px);*/
}
div.fiche {
margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'20'):'24')); ?>px;
@ -767,6 +778,9 @@ div.tmenucenter
<?php } ?>
width: 100%;
}
div.menu_titre {
padding-top: 5px;
}
.mainmenuaspan
{
padding-right: 4px;
@ -1036,9 +1050,10 @@ div.login_block_other { padding-top: 3px; text-align: right; }
height: 16px;
}
.alogin, .alogin:hover {
color: #888 !important;
color: #<?php echo $colortextbackvmenu; ?> !important;
font-weight: normal !important;
font-size: <?php echo $fontsizesmaller; ?>px !important;
padding-top: 2px;
}
.alogin:hover {
text-decoration:underline !important;
@ -1052,6 +1067,8 @@ img.login, img.printer, img.entity {
}
img.loginphoto {
border-radius: 2px;
width: 16px;
height: 16px;
}
.span-icon-user {
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/object_user.png',1); ?>) no-repeat scroll 7px 7px;
@ -1101,8 +1118,31 @@ font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; }
a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print $fontsizesmaller ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #666666; text-decoration: none; }
div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks
.vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenubookmarks
{
border-top: 1px solid #BBB;
}
.vmenu div.blockvmenubookmarks, .vmenu div.blockvmenuend, .vmenu div.blockvmenulogo
{
border-bottom: 1px solid #BBB;
}
.vmenu div.blockvmenuend, .vmenu div.blockvmenulogo
{
margin: 0 0 8px 2px;
}
.vmenu div.blockvmenuend, div.blockvmenusearch
{
padding-bottom: 5px;
}
.vmenu div.blockvmenulogo
{
padding-bottom: 10px;
}
div.blockvmenubookmarks
{
padding-bottom: 6px !important;
}
div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks, div.blockvmenuend
{
font-family: <?php print $fontlist ?>;
color: #000000;
@ -1112,20 +1152,21 @@ div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks
padding-right: 1px;
padding-top: 3px;
padding-bottom: 3px;
margin: 1px 0px 8px 2px;
/* margin: 1px 0 8px 2px; */
margin: 0 0 0 2px;
background: rgb(<?php echo $colorbackvmenu1; ?>);
/*border-left: 1px solid #AAA;
border-left: 1px solid #AAA;
border-right: 1px solid #BBB;
border-bottom: 1px solid #BBB;
/* border-bottom: 1px solid #BBB;
border-top: 1px solid #BBB;
border-radius: 4px;
-moz-border-radius: 4px;
-moz-box-shadow: 3px 3px 4px #DDD;
-webkit-box-shadow: 3px 3px 4px #DDD;
box-shadow: 3px 3px 4px #DDD;
*/
*/
}
div.blockvmenusearch
@ -1140,17 +1181,16 @@ div.blockvmenusearch
padding-bottom: 3px;
margin: 1px 0px 8px 2px;
background: rgb(<?php echo $colorbackvmenu2; ?>);
/*
border-left: 1px solid #AAA;
border-right: 1px solid #CCC;
border-bottom: 1px solid #CCC;
border-top: 1px solid #CCC;
border-radius: 4px;
border-right: 1px solid #BBB;
border-bottom: 1px solid #BBB;
border-top: 1px solid #BBB;
/*border-radius: 4px;
-moz-border-radius: 4px;
-moz-box-shadow: 3px 3px 4px #DDD;
-webkit-box-shadow: 3px 3px 4px #DDD;
box-shadow: 3px 3px 4px #DDD;
*/
box-shadow: 3px 3px 4px #DDD;*/
}
div.blockvmenusearch > form > div {
@ -2682,8 +2722,12 @@ table.valid {
border-radius: 4px;
}
#tiptip_content {
background-color: rgb(255,255,255);
background-color: rgba(255,255,255,0.95);
-moz-border-radius:0px;
-webkit-border-radius: 0px;
border-radius: 0px;
background-color: rgb(255,255,255);
/* background-color: rgb(255,255,255);
background-color: rgba(255,255,255,0.95);*/
line-height: 1.4em;
min-width: 200px;
}
@ -3674,7 +3718,6 @@ border-top-right-radius: 6px;
.public_border {
border: 1px solid #888;
}
.public_liste_titre {
@ -3686,6 +3729,15 @@ border-top-right-radius: 6px;
}
@media only screen and (max-width: 767px)
{
.mainmenuaspan {
display: none;
}
li.tmenu, li.tmenusel {
min-width: 32px;
}
div.mainmenu {
min-width: auto;
}
.imgopensurveywizard { width:95%; height: auto; }
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
@ -94,7 +94,6 @@ $isblue=max(0,(2*$colblue-$colred-$colgreen)/2); // 0 - 255
$colorbackhmenu1=($colred-3).','.($colgreen-3).','.($colblue-3); // topmenu
$colorbackhmenu2=($colred+5).','.($colgreen+5).','.($colblue+5);
$colorbackvmenu1=($colred+15).','.($colgreen+16).','.($colblue+17); // vmenu
$colorbackvmenu1b=($colred+5).','.($colgreen+6).','.($colblue+7); // vmenu (not menu)
$colorbackvmenu2=($colred-15).','.($colgreen-15).','.($colblue-15);
$colorbacktitle1=($colred-5).','.($colgreen-5).','.($colblue-5); // title of array
$colorbacktitle2=($colred-15).','.($colgreen-15).','.($colblue-15);
@ -107,26 +106,30 @@ $colorbacklineimpairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+roun
$colorbacklinepair1=(244+round($isred/3)).','.(244+round($isgreen/3)).','.(244+round($isblue/3)); // line pair
$colorbacklinepair2=(250+round($isred/3)).','.(250+round($isgreen/3)).','.(250+round($isblue/3)); // line pair
$colorbacklinepairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)); // line pair
$colorbackbody='#f0f0f0';
$colorbackbody='243,243,243';
$colortext='40,40,40';
$fontsize='13';
$fontsizesmaller='11';
$usegradient=1;
// Eldy colors
if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED))
{
// 90A4AE, 607D8B, 455A64, 37474F
// Case of option always editable
if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1='140,150,180'; // topmenu (140,160,185)
if (! isset($conf->global->THEME_ELDY_BACKTITLE1)) $conf->global->THEME_ELDY_BACKTITLE1='140,150,180'; // title of arrays TO MATCH ELDY (140,160,185)
//if (! isset($conf->global->THEME_ELDY_BACKTITLE1)) $conf->global->THEME_ELDY_BACKTITLE1='230,230,230'; // title of arrays TO MATCH BOOTSTRAP
// 90A4AE, 607D8B, 455A64, 37474F
$conf->global->THEME_ELDY_TOPMENU_BACK1=join(',',colorStringToArray('#37474F')); // topmenu #607D8B
$conf->global->THEME_ELDY_TOPMENU_BACK2='236,236,236';
$conf->global->THEME_ELDY_VERMENU_BACK1='255,255,255'; // vmenu
$conf->global->THEME_ELDY_VERMENU_BACK1b='230,232,232'; // vmenu (not menu)
$conf->global->THEME_ELDY_VERMENU_BACK2='240,240,240';
$conf->global->THEME_ELDY_BACKTITLE1=join(',',colorStringToArray('#607D8B')); // title of arrays
$conf->global->THEME_ELDY_BACKTITLE2='230,230,230';
$conf->global->THEME_ELDY_BACKTABCARD2='255,255,255'; // card
$conf->global->THEME_ELDY_BACKTABCARD1='234,234,234';
$conf->global->THEME_ELDY_BACKTABCARD1='255,255,255'; // card
$conf->global->THEME_ELDY_BACKTABCARD2='234,234,234';
$conf->global->THEME_ELDY_BACKTABACTIVE='234,234,234';
$conf->global->THEME_ELDY_BACKBODY='#f0f0f0;';
$conf->global->THEME_ELDY_BACKBODY='243,243,243';
$conf->global->THEME_ELDY_LINEPAIR1='242,242,242';
$conf->global->THEME_ELDY_LINEPAIR2='248,248,248';
$conf->global->THEME_ELDY_LINEPAIRHOVER='238,246,252';
@ -134,12 +137,14 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED))
$conf->global->THEME_ELDY_LINEIMPAIR2='255,255,255';
$conf->global->THEME_ELDY_LINEIMPAIRHOVER='238,246,252';
$conf->global->THEME_ELDY_TEXT='50,50,130';
$conf->global->THEME_ELDY_FONT_SIZE1='13';
$conf->global->THEME_ELDY_FONT_SIZE2='11';
}
// Cas of option availables only if THEME_ELDY_ENABLE_PERSONALIZED is on
$colorbackhmenu1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1) :(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1);
$colorbackhmenu2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK2)?$colorbackhmenu2:$conf->global->THEME_ELDY_TOPMENU_BACK2) :(empty($user->conf->THEME_ELDY_TOPMENU_BACK2)?$colorbackhmenu2:$user->conf->THEME_ELDY_TOPMENU_BACK2);
$colorbackvmenu1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK1)?$colorbackvmenu1:$conf->global->THEME_ELDY_VERMENU_BACK1) :(empty($user->conf->THEME_ELDY_VERMENU_BACK1)?$colorbackvmenu1:$user->conf->THEME_ELDY_VERMENU_BACK1);
$colorbackvmenu1b =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK1b)?$colorbackvmenu1:$conf->global->THEME_ELDY_VERMENU_BACK1b) :(empty($user->conf->THEME_ELDY_VERMENU_BACK1b)?$colorbackvmenu1b:$user->conf->THEME_ELDY_VERMENU_BACK1b);
$colorbackvmenu2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK2)?$colorbackvmenu2:$conf->global->THEME_ELDY_VERMENU_BACK2) :(empty($user->conf->THEME_ELDY_VERMENU_BACK2)?$colorbackvmenu2:$user->conf->THEME_ELDY_VERMENU_BACK2);
$colorbacktitle1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_BACKTITLE1) ?$colorbacktitle1:$conf->global->THEME_ELDY_BACKTITLE1) :(empty($user->conf->THEME_ELDY_BACKTITLE1)?$colorbacktitle1:$user->conf->THEME_ELDY_BACKTITLE1);
$colorbacktitle2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_BACKTITLE2) ?$colorbacktitle2:$conf->global->THEME_ELDY_BACKTITLE2) :(empty($user->conf->THEME_ELDY_BACKTITLE2)?$colorbacktitle2:$user->conf->THEME_ELDY_BACKTITLE2);
@ -156,19 +161,21 @@ $colorbackbody =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty(
$colortext =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TEXT) ?$colortext:$conf->global->THEME_ELDY_TEXT) :(empty($user->conf->THEME_ELDY_TEXT)?$colortext:$user->conf->THEME_ELDY_TEXT);
$fontsize =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_FONT_SIZE1) ?$fontsize:$conf->global->THEME_ELDY_FONT_SIZE1) :(empty($user->conf->THEME_ELDY_FONT_SIZE1)?$fontsize:$user->conf->THEME_ELDY_FONT_SIZE1);
$fontsizesmaller =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_FONT_SIZE2) ?$fontsize:$conf->global->THEME_ELDY_FONT_SIZE2) :(empty($user->conf->THEME_ELDY_FONT_SIZE2)?$fontsize:$user->conf->THEME_ELDY_FONT_SIZE2);
// No hover by default, we keep only if we set var THEME_ELDY_USE_HOVER
if ((! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) && empty($user->conf->THEME_ELDY_USE_HOVER))
|| (empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) && empty($conf->global->THEME_ELDY_USE_HOVER)))
// Hover can be disabled with THEME_ELDY_USE_HOVER=0
if ((! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) && (isset($user->conf->THEME_ELDY_USE_HOVER) && $user->conf->THEME_ELDY_USE_HOVER == '0'))
|| (empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) && (isset($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER == '0')))
{
$colorbacklineimpairhover='';
$colorbacklinepairhover='';
}
// Format color value to match expected format (may be 'FFFFFF' or '255,255,255')
$colorbacktabcard1=join(',',colorStringToArray($colorbacktabcard1));
$colorbacktabcard2=join(',',colorStringToArray($colorbacktabcard2));
// Format color value to match expected format (may be 'FFFFFF' or '255,255,255')
$colorbackbody=join(',',colorStringToArray($colorbackbody));
$colorbackhmenu1=join(',',colorStringToArray($colorbackhmenu1));
$colorbackhmenu2=join(',',colorStringToArray($colorbackhmenu2));
$colorbackvmenu1=join(',',colorStringToArray($colorbackvmenu1));
$colorbackvmenu2=join(',',colorStringToArray($colorbackvmenu2));
$colorbacktabcard1=join(',',colorStringToArray($colorbacktabcard1));
$colorbacktabcard2=join(',',colorStringToArray($colorbacktabcard2));
@ -194,6 +201,10 @@ else { $colortextbacktab='111'; }
print '/*'."\n";
print 'colred='.$colred.' colgreen='.$colgreen.' colblue='.$colblue."\n";
print 'isred='.$isred.' isgreen='.$isgreen.' isblue='.$isblue."\n";
print 'colorbackbody='.$colorbackbody."\n";
print 'colorbackvmenu1='.$colorbackvmenu1."\n";
print 'colorbackhmenu1='.$colorbackhmenu1."\n";
print 'colorbacktitle1='.$colorbacktitle1."\n";
print 'colorbacklineimpair1='.$colorbacklineimpair1."\n";
print 'colorbacklineimpair2='.$colorbacklineimpair2."\n";
print 'colorbacklineimpairhover='.$colorbacklineimpairhover."\n";
@ -221,7 +232,7 @@ body {
<?php if (GETPOST("optioncss") == 'print') { ?>
background-color: #FFFFFF;
<?php } else { ?>
background: <?php print $colorbackbody; ?>;
background: rgb(<?php print $colorbackbody; ?>);
<?php } ?>
color: #101010;
font-size: <?php print $fontsize ?>px;
@ -266,6 +277,11 @@ input, textarea, select {
margin-bottom:1px;
margin-top:1px;
}
input.removedassigned {
padding: 2px !important;
vertical-align: text-bottom;
margin-bottom: -3px;
}
<?php } ?>
select.flat, form.flat select {
@ -281,6 +297,7 @@ input.liste_titre {
input.removedfile {
padding: 0px !important;
border: 0px !important;
vertical-align: text-bottom;
}
textarea:disabled {
background:#f4f4f4;
@ -389,6 +406,9 @@ th .button {
-webkit-border-radius:0px !important;
border-radius:0px !important;
}
.maxwidthsearch { /* Max width of column with the search picto */
width: 54px;
}
.valignmiddle {
vertical-align: middle;
@ -401,6 +421,7 @@ textarea.centpercent {
}
.center {
text-align: center;
margin: 0px auto;
}
.left {
text-align: <?php print $left; ?>;
@ -448,12 +469,38 @@ textarea.centpercent {
#formuserfile_link {
margin-left: 1px;
}
.listofinvoicetype {
height: 28px;
vertical-align: middle;
}
div.divsearchfield {
float: <?php print $left; ?>;
margin-<?php print $right; ?>: 12px;
}
div.confirmmessage {
padding-top: 6px;
}
/* Style to move picto into left of button */
/*
.buttonactionview {
padding-left: 15px;
}
.pictoactionview {
padding-left: 10px;
margin-right: -24px;
z-index: 999999;
}
*/
.googlerefreshcal {
padding-top: 4px;
padding-bottom: 4px;
}
/* ============================================================================== */
/* Styles to hide objects */
/* ============================================================================== */
.clearboth { clear:both; }
.hideobject { display: none; }
.minwidth100 { min-width: 100px; }
.minwidth200 { min-width: 200px; }
@ -500,6 +547,7 @@ td.showDragHandle {
margin-bottom: 0px;
display: table;
table-layout: fixed;
width: 100%;
}
#id-right, #id-left {
display: table-cell;
@ -515,17 +563,17 @@ td.showDragHandle {
#id-left {
min-height: 100%;
position: relative;
width: 183px;
width: 193px;
}
#id-right { /* This must stay id-right and not be replaced with echo $right */
width: 100%;
padding-left: 184px;
padding-left: 194px;
padding-top: 12px;
}
.side-nav {
background: #FFF;
border-right: 1px solid rgba(0,0,0,0.14);
border-right: 1px solid rgba(0,0,0,0.2);
bottom: 0;
color: #333;
display: block;
@ -561,12 +609,12 @@ td.showDragHandle {
overflow-y: auto;
}
.side-nav-vert {
margin-left: 184px;
margin-left: 194px;
}
div.fiche {
margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'12'):'24')); ?>px;
margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'20'):'24')); ?>px;
margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->dol_optimize_smallscreen)?'12':'4')); ?>px;
<?php if (! empty($conf->dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?>
}
@ -610,6 +658,19 @@ margin : 0px auto;
padding-left: 2px;
padding-right: 2px;
}
.pictowarning {
padding-left: 3px;
}
.colorthumb {
padding-left: 1px !important;
padding-right: 1px;
padding-top: 1px;
padding-bottom: 1px;
}
div.attacharea {
padding-top: 10px;
padding-bottom: 10px;
}
/* ============================================================================== */
@ -620,21 +681,32 @@ margin : 0px auto;
$minwidthtmenu=66;
$heightmenu=48; /* height of top menu, part with image */
$heightmenu2=48; /* height of top menu, ârt with login */
$disableimages = 0;
$maxwidthloginblock = 110;
if (! empty($conf->global->THEME_ELDY_DISABLE_IMAGE) || $dol_optimize_smallscreen) { $disableimages = 1; $maxwidthloginblock = 180; }
?>
div#tmenu_tooltip {
<?php if (GETPOST("optioncss") == 'print') { ?>
display:none;
<?php } else { ?>
/* padding-<?php echo $right; ?>: 100px; */
background: <?php echo $colorbackvmenu; ?>;
/*box-shadow: 0 0 6px rgba(0, 0, 0, .4) !important;*/
background: rgb(<?php echo $colorbackhmenu1 ?>);
/*
background-image: linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
background-image: -ms-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0, rgba(255,255,255,.3)), color-stop(1, rgba(128,128,128,.3)) );
*/
<?php } ?>
}
div#tmenu_tooltip {
<?php if (GETPOST("optioncss") == 'print') { ?>
display:none;
<?php } else { ?>
/* padding-<?php echo $right; ?>: <? echo ($maxwidthloginblock - 10); ?>px; */
<?php } ?>
}
@ -726,6 +798,7 @@ li.tmenusel, li.tmenu:hover {
/* background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/nav-overlay3.png',1); ?>) 50% 0 repeat-x !important; Nicer but problem when menu wrap on 2 lines */
}
.tmenuend .tmenuleft { width: 0px; }
/* .tmenuend { display: none; } */
div.tmenuleft
{
float: <?php print $left; ?>;
@ -744,6 +817,9 @@ div.tmenucenter
height: <?php print $heightmenu; ?>px;
width: 100%;
}
div.menu_titre {
padding-bottom: 2px;
}
.mainmenuaspan
{
padding-right: 4px;
@ -884,6 +960,9 @@ foreach($mainmenuusedarray as $val)
.tmenuimage {
padding:0 0 0 0 !important;
margin:0 0px 0 0 !important;
<?php if ($disableimages) { ?>
display: none;
<?php } ?>
}
@ -912,8 +991,7 @@ form#login {
text-shadow: 1px 1px 1px #FFF;
}
.login_table {
margin-left: 10px;
margin-right: 10px;
margin: 0px auto; /* Center */
padding-left:6px;
padding-right:6px;
padding-top:16px;
@ -973,10 +1051,10 @@ table.login_table_securitycode tr td {
}
div.login_block {
padding-top: 8px;
position: absolute;
<?php print $left; ?>: 5px;
left: 0;
border-right: 1px solid rgba(0,0,0,0.3);
padding-top: 5px;
padding-bottom: 3px;
<?php print $left; ?>: 0;
top: 0px;
position: fixed;
font-weight: bold;
@ -984,7 +1062,7 @@ div.login_block {
text-align: center;
vertical-align: middle;
background: #FFF;
width: 183px;
width: 193px;
height: 42px;
<?php if (GETPOST("optioncss") == 'print') { ?>
display: none;
@ -1013,6 +1091,9 @@ div.login_block_other { padding-top: 3px; }
padding: 0px 0px 0px 4px !important;
height: 16px;
}
.login_block_elem_name {
margin-top: 5px;
}
.alogin, .alogin:hover {
color: #888 !important;
font-weight: normal !important;
@ -1028,6 +1109,12 @@ img.login, img.printer, img.entity {
color: white;
font-weight: bold;
}
img.loginphoto {
border-radius: 5px;
margin-top: -4px;
width: 20px;
height: 20px;
}
.span-icon-user {
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/object_user.png',1); ?>) no-repeat scroll 7px 7px;
@ -1091,7 +1178,7 @@ div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks
margin: 1px 0px 8px 0px;
padding-bottom: 10px;
border-bottom: 1px solid #f4f4f4;
border-bottom: 1px solid #e0e0e0;
}
div.blockvmenusearch
@ -1404,8 +1491,6 @@ img.toolbarbutton {
/* Onglets */
/* ============================================================================== */
div.tabs {
/* margin: 0px 0px 2px 6px;
padding: 0px 6px 3px 0px; */
text-align: <?php print $left; ?>;
margin-left: 6px !important;
margin-right: 6px !important;
@ -1430,7 +1515,7 @@ div.tabBar {
border-top: 1px solid #CCC;
width: auto;
background: rgb(<?php echo $colorbacktabcard2; ?>);
background: rgb(<?php echo $colorbacktabcard1; ?>);
<?php if (empty($dol_optimize_smallscreen)) { ?>
-moz-box-shadow: 3px 3px 4px #f4f4f4;
@ -1485,6 +1570,12 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
}
.tabactive, a.tab#active {
color: #<?php echo $colortextbacktab; ?> !important;
background: rgb(<?php echo $colorbacktabcard1; ?>) !important;
-moz-box-shadow: 0 -1px 4px rgba(0,0,0,.1);
-webkit-box-shadow: 0 -1px 4px rgba(0,0,0,.1);
box-shadow: 0 -1px 4px rgba(0,0,0,.1);
border-right: 1px solid #CCCCCC;
border-left: 1px solid #f4f4f4;
border-top: 1px solid #D8D8D8;
@ -1493,12 +1584,6 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
-webkit-border-radius:3px 3px 0px 0px;
border-radius:3px 3px 0px 0px;
-moz-box-shadow: 0 -1px 4px rgba(0,0,0,.1);
-webkit-box-shadow: 0 -1px 4px rgba(0,0,0,.1);
box-shadow: 0 -1px 4px rgba(0,0,0,.1);
background: rgb(<?php echo $colorbacktabcard2; ?>) !important;
color: #<?php echo $colortextbacktab; ?>;
}
a.tab:hover
{
@ -1508,11 +1593,6 @@ a.tab:hover
*/
text-decoration: underline;
}
a.tab:link, a.tab:visited
{
/* color: #888; */
/* font-weight: normal !important; */
}
a.tabimage {
color: #434956;
font-family: <?php print $fontlist ?>;
@ -1815,7 +1895,7 @@ table.nobordernopadding tr {
}
table.nobordernopadding tr td {
border: 0px;
padding: 0 3px 0 0 !important;
padding: 0 3px 0 0;
}
table.border tr td table.nobordernopadding tr td {
padding-top: 0px;
@ -1945,7 +2025,7 @@ div.pagination .disabled a:focus {
background-color: #fff;
border-color: #ddd;
}
div.pagination li .active {
div.pagination li.pagination .active {
text-decoration: underline;
}
div.pagination li.paginationafterarrows {
@ -1979,35 +2059,49 @@ div.pagination li.paginationafterarrows {
}
*/
.impair:hover, td.nohover {
<?php if ($colorbacklineimpairhover) { if ($colorbacklinepairhover > 0) { ?>
background: rgb(<?php echo $colorbacklineimpairhover; ?>);
/* Set the color for hover lines */
.odd:hover, .impair:hover, .even:hover, .pair:hover, .even:hover, .pair:hover, table.dataTable tr.even:hover, table.dataTable tr.odd:hover, .box_pair:hover, .box_impair:hover
{
<?php if ($colorbacklineimpairhover) { ?>
background: rgb(<?php echo $colorbacklineimpairhover; ?>) !important;
<?php } else { ?>
background: rgba(0, 0, 0, 0.05) !important;
<?php } } ?>
<?php } ?>
}
.odd, .impair, .nohover .odd:hover, .nohover .impair:hover, tr.odd td.nohover, tr.impair td.nohover {
.odd, .impair, .nohover .odd:hover, .nohover .impair:hover, tr.odd td.nohover, tr.impair td.nohover, tr.box_pair td.nohover, tr.box_impair td.nohover
{
font-family: <?php print $fontlist ?>;
border: 0px;
margin-bottom: 1px;
color: #202020;
min-height: 18px; /* seems to not be used */
background: #ffffff;
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
}
#GanttChartDIV {
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
}
.even, .pair, .nohover .even:hover, .nohover .pair:hover, tr.even td.nohover, tr.pair td.nohover {
font-family: <?php print $fontlist ?>;
border: 0px;
margin-bottom: 1px;
color: #202020;
background-color: #f9f9f9;
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?>;
}
table.dataTable tr.odd {
background-color: #f9f9f9 !important;
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?> !important;
}
/* For no hover style */
table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td {
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
}
tr.nohoverpair td {
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?> !important;
}
table.dataTable td {
padding: 5px 2px 5px 3px !important;
}
@ -2033,18 +2127,23 @@ tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, tabl
}
div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr
{
background: rgb(<?php echo $colorbacktitle1; ?>);
background-repeat: repeat-x;
/* TO MATCH BOOTSTRAP */
background: #ddd;
color: #000 !important;
/* TO MATCH ELDY */
/*
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background: rgb(<?php echo $colorbacktitle1; ?>);
<?php if ($usegradient) { ?>
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
*/
<?php } ?>
font-weight: bold;
*/
color: #<?php echo $colortexttitle; ?>;
font-family: <?php print $fontlist ?>;
border-bottom: 1px solid #FDFFFF;
@ -2058,7 +2157,6 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
{
font-family: <?php print $fontlist ?>;
font-weight: bold;
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
vertical-align: middle;
}
tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a {
@ -2077,7 +2175,6 @@ tr.liste_titre_sel th, th.liste_titre_sel, tr.liste_titre_sel td, td.liste_titre
font-weight: normal;
border-bottom: 1px solid #FDFFFF;
text-decoration: underline;
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
}
input.liste_titre {
background: transparent;
@ -2097,7 +2194,6 @@ input.liste_titre {
.tableforservicepart1 .impair, .tableforservicepart1 .pair, .tableforservicepart2 .impair, .tableforservicepart2 .pair {
//background: none;
background: #FFF;
}
.tableforservicepart1 tbody tr td, .tableforservicepart2 tbody tr td {
@ -2138,6 +2234,9 @@ div.tabBar .noborder {
text-align: center;
border-radius: 2px;
}
.boxstats:hover {
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?>;
}
.boxtable {
-moz-box-shadow: 3px 3px 4px #f4f4f4;
@ -2155,10 +2254,25 @@ div.tabBar .noborder {
tr.box_titre {
height: 26px !important;
background: rgb(<?php echo $colorbacktitle1; ?>);
/* TO MATCH BOOTSTRAP */
background: #ddd;
color: #000 !important;
/* TO MATCH ELDY */
/*
background: rgb(<?php echo $colorbacktitle1; ?>);
<?php if ($usegradient) { ?>
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
background-image: linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0.3) 100%);
<?php } ?>
*/
background-repeat: repeat-x;
color: #<?php echo $colortexttitle; ?>;
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
font-family: <?php print $fontlist ?>, sans-serif;
font-weight: bold;
border-bottom: 1px solid #FDFFFF;
@ -2179,12 +2293,6 @@ tr.box_impair {
}
tr.box_pair {
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
font-family: <?php print $fontlist ?>;
background-color: #f9f9f9;
@ -2288,6 +2396,8 @@ a.impayee:hover { font-weight: bold; color: #550000; }
.legendColorBox, .legendLabel { border: none !important; }
div.dolgraph div.legend, div.dolgraph div.legend div { background-color: rgba(255,255,255,0) !important; }
div.dolgraph div.legend table tbody tr { height: auto; }
td.legendColorBox { padding: 2px 2px 2px 0 !important; }
td.legendLabel { padding: 2px 2px 2px 0 !important; }
.photo {
border: 0px;
@ -2297,16 +2407,18 @@ div.dolgraph div.legend table tbody tr { height: auto; }
margin-top: 2px;
}
.photointooltip {
-webkit-box-shadow: 0px 0px 5px #777;
-moz-box-shadow: 0px 0px 5px #777;
box-shadow: 0px 0px 6px #777;
margin-top: 8px;
float: left;
/*text-align: center; */
}
.photodelete {
margin-top: 6px !important;
}
.logo_setup
{
content:url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/logo_setup.svg',1) ?>);
display: inline-block;
}
div.titre {
@ -2416,14 +2528,20 @@ padding: 2px;
z-index: 3000;
background-color: #EFCFAA;
opacity: 1;
-moz-border-radius:3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-border-radius:0px;
-webkit-border-radius: 0px;
border-radius: 0px;
}
#tiptip_content {
background-color: rgb(252,248,246);
background-color: rgba(252,248,246,0.95);
-moz-border-radius:0px;
-webkit-border-radius: 0px;
border-radius: 0px;
background-color: rgb(255,255,255);
/* background-color: rgb(252,248,246);
background-color: rgba(252,248,246,0.95);*/
line-height: 1.4em;
min-width: 200px;
}
/* ============================================================================== */
@ -2551,6 +2669,8 @@ table.cal_month { border-spacing: 0px; }
.cal_today_peruser_peruserleft { background: #FDFDF0; border-left: solid 3px #6C7C7B; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
.cal_past { }
.cal_peruser { padding: 0px; }
.cal_impair { background: #F8F8F8; }
.cal_today_peruser_impair { background: #F8F8F0; }
.peruser_busy { background: #CC8888; }
.peruser_notbusy { background: #EEDDDD; opacity: 0.5; }
table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 3px; border-radius: 3px;
@ -3040,10 +3160,21 @@ div.dolEventError h1, div.dolEventError h2 {
/* Datatable */
/* ============================================================================== */
.sorting_asc { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_asc.png',1); ?>') no-repeat center right; }
.sorting_desc { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_desc.png',1); ?>') no-repeat center right; }
.sorting_asc_disabled { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_asc_disabled',1); ?>') no-repeat center right; }
.sorting_desc_disabled { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_desc_disabled',1); ?>') no-repeat center right; }
table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 {
background: none !important;
}
.sorting_asc { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_asc.png',1); ?>') no-repeat center right !important; }
.sorting_desc { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_desc.png',1); ?>') no-repeat center right !important; }
.sorting_asc_disabled { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_asc_disabled.png',1); ?>') no-repeat center right !important; }
.sorting_desc_disabled { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_desc_disabled.png',1); ?>') no-repeat center right !important; }
.dataTables_paginate {
margin-top: 8px;
}
.paginate_button_disabled {
opacity: 1 !important;
color: #888 !important;
cursor: default !important;
}
.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover
{
font-weight: normal;
@ -3052,9 +3183,34 @@ div.dolEventError h1, div.dolEventError h2 {
{
text-decoration: underline !important;
}
.paginate_active
{
text-decoration: underline !important;
}
.paginate_button
{
font-weight: normal !important;
text-decoration: none !important;
}
.paging_full_numbers {
height: inherit !important;
}
.paging_full_numbers a.paginate_active:hover, .paging_full_numbers a.paginate_button:hover {
background-color: #DDD !important;
}
.paging_full_numbers, .paging_full_numbers a.paginate_active, .paging_full_numbers a.paginate_button {
background-color: #FFF !important;
border-radius: inherit !important;
}
.paging_full_numbers a.paginate_button_disabled:hover {
background-color: #FFF !important;
}
.paginate_button, .paginate_active {
border: 1px solid #ddd !important;
padding: 6px 12px !important;
margin-left: -1px !important;
line-height: 1.42857143 !important;
margin: 0 0 !important;
}
/* For jquery plugin combobox */
@ -3096,6 +3252,8 @@ a span.select2-chosen
}
.select2-container .select2-choice {
background-image: none;
height: 24px;
line-height: 24px;
}
.select2-choices .select2-search-choice {
border: 1px solid #aaa !important;
@ -3111,8 +3269,48 @@ a span.select2-chosen
cursor: default;
}
.select2-container-multi .select2-choices .select2-search-choice {
margin-top: 2px;
margin-bottom: 2px;
margin-bottom: 3px;
}
/* To emulate select 2 style */
.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr {
padding: 2px 5px 1px 5px;
margin: 0 0 2px 3px;
position: relative;
line-height: 13px;
color: #333;
cursor: default;
border: 1px solid #aaaaaa;
border-radius: 3px;
-webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
background-clip: padding-box;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: #e4e4e4;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0);
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee));
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
}
.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr a {
font-weight: normal;
}
.select2-container-multi-dolibarr .select2-choices-dolibarr li {
float: left;
list-style: none;
}
.select2-container-multi-dolibarr .select2-choices-dolibarr {
height: auto !important;
height: 1%;
margin: 0;
padding: 0 5px 0 0;
position: relative;
cursor: text;
overflow: hidden;
}
@ -3253,7 +3451,9 @@ ul.ulmenu {
color: #<?php echo $colortexttitle; ?> !important;
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
}
.ui-btn-icon-right {
border-right: 1px solid #ccc !important;
}
.ui-body-c {
border: 1px solid #ccc;
text-shadow: none;
@ -3298,5 +3498,38 @@ border-top-right-radius: 6px;
padding-left: 54px;
}
/* The theme for public pages */
.public_body {
margin: 20px;
}
.public_border {
border: 1px solid #888;
}
/* CSS style used for small screen */
.imgopensurveywizard
{
padding: 0 4px 0 4px;
}
@media only screen and (max-width: 767px)
{
.mainmenuaspan {
display: none;
}
li.tmenu, li.tmenusel {
min-width: 32px;
}
div.mainmenu {
min-width: auto;
}
.imgopensurveywizard { width:95%; height: auto; }
}
<?php
if (is_object($db)) $db->close();

View File

@ -1836,9 +1836,11 @@ class User extends CommonObject
* @param integer $notooltip 1=Disable tooltip
* @param int $maxlen Max length of visible user name
* @param int $hidethirdpartylogo Hide logo of thirdparty if user is external user
* @param string $mode 'firstname'=Show only firstname
* @param string $morecss Add more css on link
* @return string String with URL
*/
function getNomUrl($withpicto=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0)
function getNomUrl($withpicto=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='',$morecss='')
{
global $langs, $conf, $db;
global $dolibarr_main_authentication, $dolibarr_main_demo;
@ -1896,7 +1898,7 @@ class User extends CommonObject
$link = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'"';
$link.= ($notooltip?'':' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip"');
$link.= ($notooltip?'':' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip'.($morecss?' '.$morecss:'').'"');
$link.= '>';
$linkend='</a>';
@ -1905,7 +1907,7 @@ class User extends CommonObject
$result.=($link.img_object(($notooltip?'':$label), 'user', ($notooltip?'':'class="classfortooltip"')).$linkend);
if ($withpicto != 2) $result.=' ';
}
$result.= $link . $this->getFullName($langs,'',-1,$maxlen) . $linkend . $companylink;
$result.= $link . $this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen) . $linkend . $companylink;
return $result;
}