Several fixes in look and feel

This commit is contained in:
Laurent Destailleur 2018-06-23 14:23:07 +02:00
parent dbb90e80a3
commit 6dba88ab6e
7 changed files with 59 additions and 37 deletions

View File

@ -2146,14 +2146,29 @@ else
} }
if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0) if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0)
{
if ($user->rights->contrat->activer)
{ {
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=activate">'.$langs->trans("ActivateAllContracts").'</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=activate">'.$langs->trans("ActivateAllContracts").'</a></div>';
} }
else
{
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#">'.$langs->trans("ActivateAllContracts").'</a></div>';
}
}
if ($object->nbofservicesclosed < $nbofservices) if ($object->nbofservicesclosed < $nbofservices)
{ {
if ($user->rights->contrat->desactiver)
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=close">'.$langs->trans("CloseAllContracts").'</a></div>';
}
else
{
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#">'.$langs->trans("CloseAllContracts").'</a></div>';
}
//if (! $numactive) //if (! $numactive)
//{ //{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=close">'.$langs->trans("CloseAllContracts").'</a></div>';
//} //}
//else //else
//{ //{

View File

@ -90,11 +90,11 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
else else
{ {
print '<tr>'; print '<tr>';
print '<td>'; print '<td class="titlefield">';
print '<table width="100%" class="nobordernopadding">'; print '<table width="100%" class="nobordernopadding">';
print '<tr>'; print '<tr>';
print '<td'; print '<td';
print ' class="titlefield'; print ' class="';
//var_dump($action);exit; //var_dump($action);exit;
if ((! empty($action) && ($action == 'create' || $action == 'edit')) && ! empty($extrafields->attributes[$object->table_element]['required'][$key])) print ' fieldrequired'; if ((! empty($action) && ($action == 'create' || $action == 'edit')) && ! empty($extrafields->attributes[$object->table_element]['required'][$key])) print ' fieldrequired';
print '">'; print '">';

View File

@ -93,11 +93,11 @@ if (count($export->array_export_code))
{ {
if ($user->rights->export->creer) if ($user->rights->export->creer)
{ {
print '<a class="butAction" href="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export">'.$langs->trans("NewExport").'</a>'; print '<a class="butActionNew" href="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export">'.$langs->trans("NewExport").'<span class="fa fa-plus-circle valignmiddle"></span></a>';
} }
else else
{ {
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("NewExport").'</a>'; print '<a class="butActionNewRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("NewExport").'<span class="fa fa-plus-circle valignmiddle"></span></a>';
} }
/* /*
print '<form action="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export"><input type="submit" class="button" value="'.$langs->trans("NewExport").'"'; print '<form action="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export"><input type="submit" class="button" value="'.$langs->trans("NewExport").'"';

View File

@ -436,7 +436,7 @@ if ($step == 2 && $datatoimport)
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="max_file_size" value="'.$conf->maxfilesize.'">'; print '<input type="hidden" name="max_file_size" value="'.$conf->maxfilesize.'">';
print $langs->trans("ChooseFormatOfFileToImport",img_picto('','filenew')).'<br>'; print '<span class="opacitymedium">'.$langs->trans("ChooseFormatOfFileToImport",img_picto('','filenew')).'</span><br><br>';
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
$filetoimport=''; $filetoimport='';
@ -552,12 +552,12 @@ if ($step == 3 && $datatoimport)
print '<input type="hidden" value="'.$enclosure.'" name="enclosure">'; print '<input type="hidden" value="'.$enclosure.'" name="enclosure">';
print '<input type="hidden" value="'.$datatoimport.'" name="datatoimport">'; print '<input type="hidden" value="'.$datatoimport.'" name="datatoimport">';
print '<span class="opacitymedium">'.$langs->trans("ChooseFileToImport",img_picto('','filenew')).'</span><br><br>';
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
$filetoimport=''; $filetoimport='';
print '<tr><td colspan="6">'.$langs->trans("ChooseFileToImport",img_picto('','filenew')).'</td></tr>';
//print '<tr class="liste_titre"><td colspan="6">'.$langs->trans("FileWithDataToImport").'</td></tr>'; //print '<tr class="liste_titre"><td colspan="6">'.$langs->trans("FileWithDataToImport").'</td></tr>';
// Input file name box // Input file name box
@ -835,8 +835,8 @@ if ($step == 4 && $datatoimport)
print '<input type="hidden" name="endatlinenb" value="'.$endatlinenb.'">'; print '<input type="hidden" name="endatlinenb" value="'.$endatlinenb.'">';
print '<input type="hidden" name="separator" value="'.$separator.'">'; print '<input type="hidden" name="separator" value="'.$separator.'">';
print '<input type="hidden" name="enclosure" value="'.$enclosure.'">'; print '<input type="hidden" name="enclosure" value="'.$enclosure.'">';
print '<table><tr><td colspan="2">'; print '<table><tr><td colspan="2" class="opacitymedium">';
print $langs->trans("SelectImportFields",img_picto('','uparrow','')).' '; print $langs->trans("SelectImportFields",img_picto('','grip_title','')).' ';
$htmlother->select_import_model($importmodelid,'importmodelid',$datatoimport,1); $htmlother->select_import_model($importmodelid,'importmodelid',$datatoimport,1);
print '<input type="submit" class="button" value="'.$langs->trans("Select").'">'; print '<input type="submit" class="button" value="'.$langs->trans("Select").'">';
print '</td></tr></table>'; print '</td></tr></table>';
@ -869,7 +869,7 @@ if ($step == 4 && $datatoimport)
$lefti=1; $lefti=1;
foreach ($array_match_file_to_database as $key => $val) foreach ($array_match_file_to_database as $key => $val)
{ {
$var=!$var;
show_elem($fieldssource,$key,$val,$var); // key is field number in source file show_elem($fieldssource,$key,$val,$var); // key is field number in source file
//print '> '.$lefti.'-'.$key.'-'.$val; //print '> '.$lefti.'-'.$key.'-'.$val;
$listofkeys[$key]=1; $listofkeys[$key]=1;
@ -886,7 +886,7 @@ if ($step == 4 && $datatoimport)
$num=count($fieldssource); $num=count($fieldssource);
while ($lefti <= $num) while ($lefti <= $num)
{ {
$var=!$var;
$newkey=getnewkey($fieldssource,$listofkeys); $newkey=getnewkey($fieldssource,$listofkeys);
show_elem($fieldssource,$newkey,'',$var); // key start after field number in source file show_elem($fieldssource,$newkey,'',$var); // key start after field number in source file
//print '> '.$lefti.'-'.$newkey; //print '> '.$lefti.'-'.$newkey;
@ -905,11 +905,12 @@ if ($step == 4 && $datatoimport)
$height=24; $height=24;
$i = 0; $i = 0;
$mandatoryfieldshavesource=true; $mandatoryfieldshavesource=true;
$var=true;
print '<table width="100%" class="nobordernopadding">'; print '<table width="100%" class="nobordernopadding">';
foreach($fieldstarget as $code=>$label) foreach($fieldstarget as $code=>$label)
{ {
$var = !$var;
print '<tr class="oddeven" height="'.$height.'">'; print '<tr '.$bc[$var].' height="'.$height.'">';
$i++; $i++;
$entity=(! empty($objimport->array_import_entities[0][$code])?$objimport->array_import_entities[0][$code]:$objimport->array_import_icon[0]); $entity=(! empty($objimport->array_import_entities[0][$code])?$objimport->array_import_entities[0][$code]:$objimport->array_import_icon[0]);
@ -1314,6 +1315,7 @@ if ($step == 5 && $datatoimport)
if ($action == 'launchsimu') print ' &nbsp; <a href="'.$_SERVER["PHP_SELF"].'?step=5'.$param.'">'.$langs->trans("Modify").'</a>'; if ($action == 'launchsimu') print ' &nbsp; <a href="'.$_SERVER["PHP_SELF"].'?step=5'.$param.'">'.$langs->trans("Modify").'</a>';
print '</td></tr>'; print '</td></tr>';
// Keys for update
print '<tr><td>'; print '<tr><td>';
print $langs->trans("KeysToUseForUpdates"); print $langs->trans("KeysToUseForUpdates");
print '</td><td>'; print '</td><td>';
@ -1334,12 +1336,12 @@ if ($step == 5 && $datatoimport)
if (count($objimport->array_import_updatekeys[0])) if (count($objimport->array_import_updatekeys[0]))
{ {
print $form->multiselectarray('updatekeys', $objimport->array_import_updatekeys[0], $updatekeys, 0, 0, '', 1, '80%'); print $form->multiselectarray('updatekeys', $objimport->array_import_updatekeys[0], $updatekeys, 0, 0, '', 1, '80%');
print $form->textwithpicto("", $langs->trans("SelectPrimaryColumnsForUpdateAttempt"));
} }
else else
{ {
print '<span class="opacitymedium">'.$langs->trans("UpdateNotYetSupportedForThisImport").'</span>'; print '<span class="opacitymedium">'.$langs->trans("UpdateNotYetSupportedForThisImport").'</span>';
} }
print $form->textwithpicto("", $langs->trans("SelectPrimaryColumnsForUpdateAttempt"));
} }
/*echo '<pre>'; /*echo '<pre>';
print_r($objimport->array_import_updatekeys); print_r($objimport->array_import_updatekeys);
@ -1427,7 +1429,8 @@ if ($step == 5 && $datatoimport)
if ($action != 'launchsimu') if ($action != 'launchsimu')
{ {
// Show import id // Show import id
print $langs->trans("NowClickToTestTheImport",$langs->transnoentitiesnoconv("RunSimulateImportFile")).'<br>'; print '<br><span class="opacitymedium">';
print $langs->trans("NowClickToTestTheImport",$langs->transnoentitiesnoconv("RunSimulateImportFile")).'</span><br>';
print '<br>'; print '<br>';
// Actions // Actions
@ -1943,7 +1946,7 @@ function show_elem($fieldssource,$pos,$key,$var,$nostyle='')
{ {
print '<tr '.($nostyle?'':$bc[$var]).' height="'.$height.'">'; print '<tr '.($nostyle?'':$bc[$var]).' height="'.$height.'">';
print '<td class="nocellnopadding" width="16" style="font-weight: normal">'; print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
print img_picto(($pos>0?$langs->trans("MoveField",$pos):''),'uparrow','class="boxhandle" style="cursor:move;"'); print img_picto(($pos>0?$langs->trans("MoveField",$pos):''),'grip_title','class="boxhandle" style="cursor:move;"');
print '</td>'; print '</td>';
print '<td style="font-weight: normal">'; print '<td style="font-weight: normal">';
print $langs->trans("NoFields"); print $langs->trans("NoFields");
@ -1966,7 +1969,7 @@ function show_elem($fieldssource,$pos,$key,$var,$nostyle='')
print '<tr '.($nostyle?'':$bc[$var]).' height="'.$height.'">'; print '<tr '.($nostyle?'':$bc[$var]).' height="'.$height.'">';
print '<td class="nocellnopadding" width="16" style="font-weight: normal">'; print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object // The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
print img_picto($langs->trans("MoveField",$pos),'uparrow','class="boxhandle" style="cursor:move;"'); print img_picto($langs->trans("MoveField",$pos),'grip_title','class="boxhandle" style="cursor:move;"');
print '</td>'; print '</td>';
print '<td style="font-weight: normal">'; print '<td style="font-weight: normal">';
print $langs->trans("Field").' '.$pos; print $langs->trans("Field").' '.$pos;

View File

@ -92,7 +92,7 @@ if (count($import->array_import_code))
{ {
//if ($user->rights->import->run) //if ($user->rights->import->run)
//{ //{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/imports/import.php?leftmenu=import">'.$langs->trans("NewImport").'</a>'; print '<a class="butActionNew" href="'.DOL_URL_ROOT.'/imports/import.php?leftmenu=import">'.$langs->trans("NewImport").'<span class="fa fa-plus-circle valignmiddle"></span></a>';
//} //}
//else //else
//{ //{

View File

@ -1440,9 +1440,9 @@ div.statusrefbis {
vertical-align: text-bottom; vertical-align: text-bottom;
} }
img.photoref, div.photoref { img.photoref, div.photoref {
border: 1px solid #CCC; border: 1px solid #DDD;
-webkit-box-shadow: 2px 2px 4px #ccc; -webkit-box-shadow: 1px 1px 4px #DDD;
box-shadow: 2px 2px 4px #ccc; box-shadow: 1px 1px 4px #DDD;
padding: 4px; padding: 4px;
height: 80px; height: 80px;
width: 80px; width: 80px;
@ -2402,6 +2402,10 @@ span.butAction, span.butActionDelete {
cursor: pointer; cursor: pointer;
} }
.butAction {
background: rgb(230, 238, 230)
/* background: rgb(230, 232, 239); */
}
.butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { .butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active {
text-decoration: none; text-decoration: none;
text-transform: uppercase; text-transform: uppercase;
@ -2410,14 +2414,14 @@ span.butAction, span.butActionDelete {
margin: 0em <?php echo ($dol_optimize_smallscreen?'0.7':'0.9'); ?>em !important; margin: 0em <?php echo ($dol_optimize_smallscreen?'0.7':'0.9'); ?>em !important;
padding: 0.6em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em; padding: 0.6em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em;
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
display: inline-block; display: inline-block;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
/* color: #fff; */ /* color: #fff; */
/* background: rgb(<?php echo $colorbackhmenu1 ?>); */ /* background: rgb(<?php echo $colorbackhmenu1 ?>); */
color: #000; color: #444;
border: 1px solid #aaa; /* border: 1px solid #aaa; */
/* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */
border-top-right-radius: 0 !important; border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important; border-bottom-right-radius: 0 !important;
@ -2432,13 +2436,13 @@ span.butAction, span.butActionDelete {
margin: 0em 0.3em 0 0.3em !important; margin: 0em 0.3em 0 0.3em !important;
padding: 0.2em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em 0.3em; padding: 0.2em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em 0.3em;
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
display: inline-block; display: inline-block;
/* text-align: center; New button are on right of screen */ /* text-align: center; New button are on right of screen */
cursor: pointer; cursor: pointer;
/*color: #fff !important; /*color: #fff !important;
background: rgb(<?php echo $colorbackhmenu1 ?>); background: rgb(<?php echo $colorbackhmenu1 ?>);
border: 1px solid rgb(<?php echo $colorbackhmenu1 ?>);*/ border: 1px solid rgb(<?php echo $colorbackhmenu1 ?>);*/
border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
border-top-right-radius: 0 !important; border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important; border-bottom-right-radius: 0 !important;
@ -2454,8 +2458,8 @@ a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-ci
} }
.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete { .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete {
/* background: #633; */ background: rgb(239, 232, 230);
border: 1px solid #633; /* border: 1px solid #633; */
color: #633; color: #633;
} }
@ -2749,7 +2753,7 @@ div.refidpadding {
} }
div.refid { div.refid {
font-weight: bold; font-weight: bold;
color: #625; color: rgb(<?php print $colortexttitlenotab; ?>);
font-size: 1.2em; font-size: 1.2em;
} }
div.refidno { div.refidno {

View File

@ -2731,7 +2731,7 @@ div.refidpadding {
} }
div.refid { div.refid {
font-weight: bold; font-weight: bold;
color: #766; color: rgb(<?php print $colortexttitlenotab; ?>);
font-size: 160%; font-size: 160%;
} }
div.refidno { div.refidno {