Fix css fro website

This commit is contained in:
Laurent Destailleur 2019-11-09 11:30:08 +01:00
parent 89ecd6a72a
commit e1f676f2f7
4 changed files with 36 additions and 13 deletions

View File

@ -3913,7 +3913,7 @@ tr.visible {
.bordertransp { .bordertransp {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
border: 1px solid #aaa; border: none;
font-weight: normal; font-weight: normal;
} }
.websitebar { .websitebar {
@ -4813,7 +4813,7 @@ div.dataTables_length select {
} }
.select2-dropdown { .select2-dropdown {
border: 1px solid #ccc; border: 1px solid #ccc;
box-shadow: 5px 5px 15px #ddd; box-shadow: 1px 2px 10px #ddd;
} }
.select2-dropdown-open { .select2-dropdown-open {
background-color: #fff; background-color: #fff;

View File

@ -23,7 +23,7 @@ span.butAction, span.butActionDelete {
} }
.button, .butAction, .butActionDelete, .butActionRefused, .butActionNewRefused { .button, .buttonDelete, .butAction, .butActionDelete, .butActionRefused, .butActionNewRefused {
border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); 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;
padding: 0.4em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em; padding: 0.4em <?php echo ($dol_optimize_smallscreen?'0.4':'0.7'); ?>em;

View File

@ -550,7 +550,7 @@ hr { border: 0; border-top: 1px solid #ccc; }
-webkit-box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.2), 0px 0px 0px rgba(60,60,60,0.1); -webkit-box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.2), 0px 0px 0px rgba(60,60,60,0.1);
box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.2), 0px 0px 0px rgba(60,60,60,0.1); box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.2), 0px 0px 0px rgba(60,60,60,0.1);
} }
.button:disabled, .buttonDelete:disabled, .button.disabled { .button:disabled, .buttonDelete:disabled, .button.disabled, .buttonDelete.disabled {
opacity: 0.4; opacity: 0.4;
box-shadow: none; box-shadow: none;
-webkit-box-shadow: none; -webkit-box-shadow: none;
@ -3919,10 +3919,13 @@ tr.visible {
background-image: none; background-image: none;
border: 1px solid #aaa; border: 1px solid #aaa;
font-weight: normal; font-weight: normal;
color: #444 !important;
} }
.websitebar { .websitebar {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
background: #eee; background: #eee;
display: inline-block;
padding: 4px 0 4px 0;
} }
.websitebar .button, .websitebar .buttonDelete .websitebar .button, .websitebar .buttonDelete
{ {
@ -3930,8 +3933,12 @@ tr.visible {
margin: 2px 4px 2px 4px !important; margin: 2px 4px 2px 4px !important;
line-height: normal; line-height: normal;
} }
.websitebar input.button.bordertransp, .websitebar input.buttonDelete.bordertransp {
color: #444 !important;
text-shadow: none;
}
.websiteselection { .websiteselection {
display: inline-block; /* display: inline-block; */
padding-left: 10px; padding-left: 10px;
vertical-align: middle; vertical-align: middle;
} }
@ -3943,7 +3950,6 @@ tr.visible {
padding-top: 3px; padding-top: 3px;
padding-bottom: 3px; padding-bottom: 3px;
} }
.websiteinputurl { .websiteinputurl {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;

View File

@ -270,9 +270,24 @@ if (GETPOST('refreshsite') || GETPOST('refreshsite_x') || GETPOST('refreshsite.x
} }
if (GETPOST('refreshsite', 'alpha') || GETPOST('refreshsite.x', 'alpha') || GETPOST('refreshsite_x', 'alpha')) // If we change the site, we reset the pageid and cancel addsite action. if (GETPOST('refreshsite', 'alpha') || GETPOST('refreshsite.x', 'alpha') || GETPOST('refreshsite_x', 'alpha')) // If we change the site, we reset the pageid and cancel addsite action.
{ {
$pageid=0;
if ($action == 'addsite') $action = 'preview'; if ($action == 'addsite') $action = 'preview';
if ($action == 'updatesource') $action = 'preview'; if ($action == 'updatesource') $action = 'preview';
$pageid = $object->fk_default_home;
if (empty($pageid))
{
$array=$objectpage->fetchAll($object->id, 'ASC,ASC', 'type_container,pageurl');
if (! is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors);
$atleastonepage=(is_array($array) && count($array) > 0);
$firstpageid=0; $homepageid=0;
foreach($array as $key => $valpage)
{
if (empty($firstpageid)) $firstpageid=$valpage->id;
if ($object->fk_default_home && $key == $object->fk_default_home) $homepageid=$valpage->id;
}
$pageid=($homepageid?$homepageid:$firstpageid); // We choose home page and if not defined yet, we take first page
}
} }
if (GETPOST('refreshpage', 'alpha') && ! in_array($action, array('updatecss'))) $action='preview'; if (GETPOST('refreshpage', 'alpha') && ! in_array($action, array('updatecss'))) $action='preview';
@ -1967,6 +1982,9 @@ if ($action != 'preview' && $action != 'editcontent' && $action != 'editsource')
if (! GETPOST('hide_websitemenu')) if (! GETPOST('hide_websitemenu'))
{ {
$disabled='';
if (empty($user->rights->website->write)) $disabled=' disabled="disabled"';
//var_dump($objectpage);exit; //var_dump($objectpage);exit;
print '<div class="centpercent websitebar">'; print '<div class="centpercent websitebar">';
@ -1978,7 +1996,8 @@ if (! GETPOST('hide_websitemenu'))
print '</span>'; print '</span>';
print '<span class="websiteselection hideonsmartphoneimp">'; print '<span class="websiteselection hideonsmartphoneimp">';
print ' <input type="submit"'.$disabled.' class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'" name="createsite">'; print '<a href="'.$_SERVER["PHP_SEFL"].'?action=createsite&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddWebsite")).'"><span class="fa fa-plus-circle valignmiddle btnTitle-icon"><span></a>';
//print ' <input type="submit"'.$disabled.' class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'" name="createsite">';
print '</span>'; print '</span>';
// List of website // List of website
@ -2024,9 +2043,6 @@ if (! GETPOST('hide_websitemenu'))
if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite'))
{ {
$disabled='';
if (empty($user->rights->website->write)) $disabled=' disabled="disabled"';
print ' &nbsp; '; print ' &nbsp; ';
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditCss")).'" name="editcss">'; print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditCss")).'" name="editcss">';
@ -2146,14 +2162,15 @@ if (! GETPOST('hide_websitemenu'))
print '</span>'; print '</span>';
print '<span class="websiteselection hideonsmartphoneimp">'; print '<span class="websiteselection hideonsmartphoneimp">';
print '<input type="submit"'.$disabled.' class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'" name="createcontainer">'; //print '<input type="submit"'.$disabled.' class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'" name="createcontainer">';
print '<a href="'.$_SERVER["PHP_SEFL"].'?action=createcontainer&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddPage")).'"><span class="fa fa-plus-circle valignmiddle btnTitle-icon"><span></a>';
print '</span>'; print '</span>';
//print '<span class="websiteselection">'; //print '<span class="websiteselection">';
if ($action != 'addcontainer') if ($action != 'addcontainer')
{ {
print $formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action); print '<span class="websiteselection">'.$formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action).'</span>';
} }
else else
{ {