Skip to content

Commit

Permalink
CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 9, 2019
1 parent ff629b2 commit 861c1b4
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 44 deletions.
2 changes: 1 addition & 1 deletion htdocs/core/class/commonobject.class.php
Expand Up @@ -4039,7 +4039,7 @@ public function printObjectLines($action, $seller, $buyer, $selected = 0, $dateS

$i++;
}
print "</tbody>\n";
print "</tbody><!-- end printObjectLines() -->\n";
}

/**
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/tpl/objectline_edit.tpl.php
Expand Up @@ -260,7 +260,7 @@
?>

<?php if (! empty($conf->service->enabled) && $line->product_type == 1 && $dateSelector) { ?>
<tr id="service_duration_area" <?php echo $bc[$var]; ?>>
<tr id="service_duration_area" class="treditedlinefordate">
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
<td class="linecolnum center"><?php $coldisplay++; ?></td>
<?php } ?>
Expand Down
113 changes: 76 additions & 37 deletions htdocs/emailcollector/class/emailcollector.class.php
Expand Up @@ -1275,23 +1275,23 @@ function addPartToArray($obj, $partno, &$part_array)
// Make Operation
dol_syslog("Execute action ".$operation['type']." actionparam=".$operation['actionparam'].' thirdpartystatic->id='.$thirdpartystatic->id.' contactstatic->id='.$contactstatic->id.' projectstatic->id='.$projectstatic->id);

$description = $descriptionfull = '';
$actioncode = 'EMAIL_IN';
// If we scan the Sent box, we use the code for out email
if ($this->source_directory == 'Sent') $actioncode = 'EMAIL_OUT';

$description = $descriptiontitle = $descriptionmeta = $descriptionfull = '';
if (in_array($operation['type'], array('recordevent', 'project', 'ticket')))
{
$description = $langs->trans("ProjectCreatedByEmailCollector", $msgid);
$description = dol_concatdesc($description, "-----");
$description = dol_concatdesc($description, $langs->trans("Topic").' : '.$subject);
$description = dol_concatdesc($description, $langs->trans("From").' : '.$fromstring);
if ($sender) $description = dol_concatdesc($description, $langs->trans("Sender").' : '.$sender);
$description = dol_concatdesc($description, $langs->trans("To").' : '.$to);
//if ($cc) $description = dol_concatdesc($description, $langs->trans("Cc").' : '.$cc);
//if ($bcc) $description = dol_concatdesc($description, $langs->trans("Bcc").' : '.$bcc);
$description = dol_concatdesc($description, "-----");
$description = dol_concatdesc($description, $messagetext);

$descriptionfull = $description;
$descriptionfull = dol_concatdesc($descriptionfull, "----- Header");
$descriptionfull = dol_concatdesc($descriptionfull, $header);
if ($operation['type'] == 'project') $descriptiontitle = $langs->trans("ProjectCreatedByEmailCollector", $msgid);
elseif ($operation['type'] == 'ticket') $descriptiontitle = $langs->trans("TicketCreatedByEmailCollector", $msgid);
else $descriptiontitle = $langs->trans("ActionAC_".$actioncode).' - '.$langs->trans("MailFrom").' '.$from;

$descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Topic").' : '.$subject);
$descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("From").' : '.$fromstring);
if ($sender) $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Sender").' : '.$sender);
$descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("To").' : '.$to);
//if ($cc) $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Cc").' : '.$cc);
//if ($bcc) $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Bcc").' : '.$bcc);
}

// Search and create thirdparty
Expand Down Expand Up @@ -1327,26 +1327,42 @@ function addPartToArray($obj, $partno, &$part_array)
{
if (strtolower($sourcefield) == 'body') $sourcestring=$messagetext;
elseif (strtolower($sourcefield) == 'subject') $sourcestring=$subject;
elseif (strtolower($sourcefield) == 'header') $sourcestring=$header;

$regforval=array();
if (preg_match('/'.$regexstring.'/', $sourcestring, $regforval)) // Do not use preg_quote here, string is already a regex syntax, for example string is 'Name:\s([^\s]*)'
if ($sourcestring)
{
// Overwrite param $tmpproperty
$nametouseforthirdparty = $regforval[1];
$regforval=array();
//var_dump($regexstring);var_dump($sourcestring);
if (preg_match('/'.$regexstring.'/ms', $sourcestring, $regforval))
{
//var_dump($regforval[1]);exit;
// Overwrite param $tmpproperty
$nametouseforthirdparty = isset($regforval[1])?trim($regforval[1]):null;
}
else
{
// Regex not found
$nametouseforthirdparty = null;
}
//var_dump($object->$tmpproperty);exit;
}
else
{
// Nothing can be done for this param
$errorforthisaction++;
$this->errors = 'The extract rule to use to load thirdparty has on an unknown source (must be HEADER, SUBJECT or BODY)';
$this->errors[] = $this->error;
}
//var_dump($sourcestring); var_dump($regexstring);var_dump($nametouseforthirdparty);exit;
}
elseif (preg_match('/^SET:(.*)$/', $valueforproperty, $reg))
{
//if (preg_match('/^options_/', $tmpproperty)) $object->array_options[preg_replace('/^options_/', '', $tmpproperty)] = $reg[1];
//else $object->$tmpproperty = $reg[1];
$nametouseforthirdparty = $reg[1];
}
else
{
$errorforactions++;
$errorforthisaction++;
$this->error = 'Bad syntax for description of action parameters: '.$actionparam;
$this->errors[] = $this->error;
break;
Expand Down Expand Up @@ -1403,25 +1419,29 @@ function addPartToArray($obj, $partno, &$part_array)
// Create event
elseif ($operation['type'] == 'recordevent')
{
$actioncode = 'EMAIL_IN';
// If we scan the Sent box, we use the code for out email
if ($this->source_directory == 'Sent') {
$actioncode = 'EMAIL_OUT';
}

if ($projectstatic->id > 0)
{
if ($projectfoundby) $messagetext .= ' - Project found from '.$projectfoundby;
if ($projectfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Project found from '.$projectfoundby);
}
if ($thirdpartystatic->id > 0)
{
if ($thirdpartyfoundby) $messagetext .= ' - Third party found from '.$thirdpartyfoundby;
if ($thirdpartyfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby);
}
if ($contactstatic->id > 0)
{
if ($contactfoundby) $messagetext .= ' - Contact/address found from '.$contactfoundby;
if ($contactfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby);
}

$description = $descriptiontitle;
$description = dol_concatdesc($description, "-----");
$description = dol_concatdesc($description, $descriptionmeta);
$description = dol_concatdesc($description, "-----");
$description = dol_concatdesc($description, $messagetext);

$descriptionfull = $description;
$descriptionfull = dol_concatdesc($descriptionfull, "----- Header");
$descriptionfull = dol_concatdesc($descriptionfull, $header);

// Insert record of emails sent
$actioncomm = new ActionComm($this->db);

Expand Down Expand Up @@ -1479,14 +1499,24 @@ function addPartToArray($obj, $partno, &$part_array)
if ($thirdpartystatic->id > 0)
{
$projecttocreate->socid = $thirdpartystatic->id;
if ($thirdpartyfoundby) $messagetext .= dol_concatdesc($messagetext, 'Third party found from '.$thirdpartyfoundby);
if ($thirdpartyfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby);
}
if ($contactstatic->id > 0)
{
$projecttocreate->contact_id = $contactstatic->id;
if ($contactfoundby) $messagetext .= dol_concatdesc($messagetext, 'Contact/address found from '.$contactfoundby);
if ($contactfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby);
}

$description = $descriptiontitle;
$description = dol_concatdesc($description, "-----");
$description = dol_concatdesc($description, $descriptionmeta);
$description = dol_concatdesc($description, "-----");
$description = dol_concatdesc($description, $messagetext);

$descriptionfull = $description;
$descriptionfull = dol_concatdesc($descriptionfull, "----- Header");
$descriptionfull = dol_concatdesc($descriptionfull, $header);

$id_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'rowid');
$percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent');

Expand All @@ -1495,7 +1525,7 @@ function addPartToArray($obj, $partno, &$part_array)
$projecttocreate->date_end = '';
$projecttocreate->opp_status = $id_opp_status;
$projecttocreate->opp_percent = $percent_opp_status;
$projecttocreate->description = dol_concatdesc(dolGetFirstLineOfText(dol_string_nohtmltag($description, 2), 8), '...'.$langs->transnoentities("SeePrivateNote").'...');
$projecttocreate->description = dol_concatdesc(dolGetFirstLineOfText(dol_string_nohtmltag($description, 2), 10), '...'.$langs->transnoentities("SeePrivateNote").'...');
$projecttocreate->note_private = dol_concatdesc($descriptionfull, dol_string_nohtmltag($descriptionfull, 2));
$projecttocreate->entity = $conf->entity;

Expand Down Expand Up @@ -1557,19 +1587,28 @@ function addPartToArray($obj, $partno, &$part_array)
// Create event
elseif ($operation['type'] == 'ticket')
{
$note_private = $langs->trans("TicketCreatedByEmailCollector", $msgid);
$tickettocreate = new Ticket($this->db);
if ($thirdpartystatic->id > 0)
{
$tickettocreate->socid = $thirdpartystatic->id;
if ($thirdpartyfoundby) $note_private .= ' - Third party found from '.$thirdpartyfoundby;
if ($thirdpartyfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby);
}
if ($contactstatic->id > 0)
{
$tickettocreate->contact_id = $contactstatic->id;
if ($contactfoundby) $note_private .= ' - Contact/address found from '.$contactfoundby;
if ($contactfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby);
}

$description = $descriptiontitle;
$description = dol_concatdesc($description, "-----");
$description = dol_concatdesc($description, $descriptionmeta);
$description = dol_concatdesc($description, "-----");
$description = dol_concatdesc($description, $messagetext);

$descriptionfull = $description;
$descriptionfull = dol_concatdesc($descriptionfull, "----- Header");
$descriptionfull = dol_concatdesc($descriptionfull, $header);

$tickettocreate->title = $subject;
$tickettocreate->type_code = 0;
$tickettocreate->category_code = 0;
Expand Down Expand Up @@ -1623,7 +1662,7 @@ function addPartToArray($obj, $partno, &$part_array)
if (is_numeric($tickettocreate->ref) && $tickettocreate->ref <= 0)
{
$errorforactions++;
$this->error = 'Failed to create ticket: Can\'t get a valid value for ticket Ref';
$this->error = "Failed to create ticket: Can't get a valid value for ticket Ref. Check the numbering module used to generate the reference in setup of module Ticket.";
}
else
{
Expand Down
17 changes: 14 additions & 3 deletions htdocs/theme/eldy/global.inc.php
Expand Up @@ -2590,12 +2590,17 @@

margin: 0px 0px 5px 0px;
}
table.liste tr:last-of-type td, table.noborder tr:last-of-type td, table.formdoc tr:last-of-type td, div.noborder tr:last-of-type td {
#tablelines {
border-bottom-width: 1px;
border-bottom-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-bottom-style: solid;
}
div.tabBar div.ficheaddleft table.noborder:last-of-type {
table.liste tr:last-of-type td, table.noborder:not(#tablelines) tr:last-of-type td, table.formdoc tr:last-of-type td, div.noborder tr:last-of-type td {
border-bottom-width: 1px;
border-bottom-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-bottom-style: solid;
}
div.tabBar div.ficheaddleft table.noborder:not(.margintable):not(.paymenttable):last-of-type {
border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>);
}
div.tabBar table.border>tbody>tr:last-of-type>td {
Expand All @@ -2621,6 +2626,7 @@
}
.liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd
{
border-bottom-width: 0 !important;
border-top-width: 1px;
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-top-style: solid;
Expand Down Expand Up @@ -2851,8 +2857,13 @@
{
background: rgb(<?php echo $colorbacklinepairhover; ?>) !important; /* Must be background to be stronger than background of odd or even */
}
.tredited {
.tredited, .tredited td {
background: rgb(<?php echo $colorbacklinepairchecked; ?>) !important; /* Must be background to be stronger than background of odd or even */
border-bottom: 0 !important;
}
.treditedlinefordate {
background: rgb(<?php echo $colorbacklinepairchecked; ?>) !important; /* Must be background to be stronger than background of odd or even */
border-bottom: 0px;
}
<?php if ($colorbacklinepairchecked) { ?>
.highlight {
Expand Down
3 changes: 1 addition & 2 deletions htdocs/theme/md/style.css.php
Expand Up @@ -3185,8 +3185,7 @@

.noborder tr.liste_total td, tr.liste_total td, form.liste_total div, .noborder tr.liste_total_wrap td, tr.liste_total_wrap td, form.liste_total_wrap div {
color: #332266;
font-weight: normal;
padding: 4px;
/* padding: 4px; */
}
.noborder tr.liste_total td, tr.liste_total td, form.liste_total div {
white-space: nowrap;
Expand Down

0 comments on commit 861c1b4

Please sign in to comment.