From d86fc28aba46f06221fc0877e673b2d2a1d24eba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 19 May 2019 13:01:11 +0200 Subject: [PATCH] Fix CSS --- htdocs/bom/bom_card.php | 2 +- htdocs/bom/class/bom.class.php | 4 +-- htdocs/core/tpl/commonfields_view.tpl.php | 8 +++-- htdocs/core/tpl/extrafields_view.tpl.php | 1 - htdocs/theme/eldy/global.inc.php | 36 +++++++++++------------ htdocs/theme/md/style.css.php | 24 +++++++-------- 6 files changed, 36 insertions(+), 39 deletions(-) diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 42dd3ba7d95..8052b80da20 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -310,7 +310,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''."\n"; // Common attributes - //$keyforbreak='fieldkeytoswithonsecondcolumn'; + $keyforbreak='description'; include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; // Other attributes diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 9646b5d0d2e..2ee6399ba65 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -16,7 +16,7 @@ */ /** - * \file class/bom.class.php + * \file bom/class/bom.class.php * \ingroup bom * \brief This file is a CRUD class file for BOM (Create/Read/Update/Delete) */ @@ -98,7 +98,7 @@ class BOM extends CommonObject 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>-1, 'position'=>62, 'notnull'=>-1,), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>1,), - 'date_valid' => array('type'=>'datetime', 'label'=>'DateValid', 'enabled'=>1, 'visible'=>-2, 'position'=>502, 'notnull'=>0,), + 'date_valid' => array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>502, 'notnull'=>0,), 'fk_user_creat' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'llx_user.rowid',), 'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1,), 'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>512, 'notnull'=>0,), diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index 129c1a70575..7c30aa0ce86 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -48,7 +48,7 @@ foreach($object->fields as $key => $val) $value=$object->$key; print ' 0) print ' fieldrequired'; // No fieldrequired on the view output if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop'; print '">'; @@ -65,9 +65,11 @@ foreach($object->fields as $key => $val) } print '
'; + +// We close div and reopen for second column print ''; print '
'; -print '
'; + print '
'; print ''; @@ -87,7 +89,7 @@ foreach($object->fields as $key => $val) $value=$object->$key; print ' 0) print ' fieldrequired'; if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop'; print '">'; diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index db0d6a4897d..a34308432e4 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -155,7 +155,6 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] print ''; print $extrafields->showInputField($key, $value, '', '', '', 0, $object->id); - print ''; print ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index c1167524bf5..efd47a94631 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1126,15 +1126,14 @@ div.fichetwothirdright { } div.fichehalfleft { browser->layout != 'phone') { print "float: ".$left.";\n"; } ?> - browser->layout != 'phone') { print "width: 50%;\n"; } ?> + browser->layout != 'phone') { print "width: calc(50% - 10px);\n"; } ?> } div.fichehalfright { browser->layout != 'phone') { print "float: ".$right.";\n"; } ?> - browser->layout != 'phone') { print "width: 50%;\n"; } ?> + browser->layout != 'phone') { print "width: calc(50% - 10px);\n"; } ?> } -div.ficheaddleft { - browser->layout != 'phone') { print "padding-".$left.": 16px;\n"; } - else print "margin-top: 10px;\n"; ?> +div.fichehalfright { + browser->layout == 'phone') { print "margin-top: 10px;\n"; } ?> } div.firstcolumn div.box { padding-right: 10px; @@ -1174,8 +1173,7 @@ div.secondcolumn div.box { float: none; width: auto; } - div.ficheaddleft { - + div.fichehalfright { margin-top: 10px; } div.firstcolumn div.box { @@ -1198,13 +1196,13 @@ div.secondcolumn div.box { width: auto; } - .fichehalfright-lg .ficheaddleft{ + .fichehalfright-lg .fichehalfright { padding-left:0; } } /* For table into table into card */ -div.ficheaddleft tr.liste_titre:first-child td table.nobordernopadding td { +div.fichehalfright tr.liste_titre:first-child td table.nobordernopadding td { padding: 0 0 0 0; } div.nopadding { @@ -2466,9 +2464,9 @@ td.border, div.tagtable div div.border { } -/*.ficheaddleft table.noborder { +.fichehalfright table.noborder { margin: 0px 0px 0px 0px; -}*/ +} table.liste, table.noborder, table.formdoc, div.noborder { width: 100%; @@ -2498,7 +2496,7 @@ table.liste tr:last-of-type td, table.noborder:not(#tablelines) tr:last-of-type border-bottom-color: rgb(); border-bottom-style: solid; } -div.tabBar div.ficheaddleft table.noborder:not(.margintable):not(.paymenttable):last-of-type { +div.tabBar div.fichehalfright table.noborder:not(.margintable):not(.paymenttable):last-of-type { border-bottom: 1px solid rgb(); } div.tabBar table.border>tbody>tr:last-of-type>td { @@ -2506,7 +2504,7 @@ div.tabBar table.border>tbody>tr:last-of-type>td { border-bottom-color: rgb(); border-bottom-style: solid; } -div.tabBar div.ficheaddleft table.noborder { +div.tabBar div.fichehalfright table.noborder { border-bottom: none; } @@ -3013,8 +3011,8 @@ div.tabBar .noborder { /* Prepare to remove class pair - impair */ .noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre), -div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre), -div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre) +div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre), +div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre) { background: linear-gradient(bottom, rgb() 85%, rgb() 100%); background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); @@ -3029,8 +3027,8 @@ div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth- } .noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre), -div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre), -div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre) +div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre), +div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre) { background: linear-gradient(bottom, rgb() 85%, rgb() 100%); background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); @@ -3057,9 +3055,9 @@ ul.noborder li:nth-child(even):not(.liste_titre) { overflow-x: auto; min-height: 40px; } -/*.ficheaddleft div.boxstats, .ficheaddright div.boxstats { +.ficheaddleft div.boxstats, .ficheaddright div.boxstats { border: none; -}*/ +} .boxstatsborder { /* border: 1px solid #CCC !important; */ } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 3aea173df6c..6e569fa93d3 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1364,9 +1364,8 @@ div.fichehalfright { browser->layout != 'phone') { print "float: ".$right.";\n"; } ?> browser->layout != 'phone') { print "width: 50%;\n"; } ?> } -div.ficheaddleft { - browser->layout != 'phone') { print "padding-".$left.": 16px;\n"; } - else print "margin-top: 10px;\n"; ?> +div.fichehalfright { + browser->layout == 'phone') { print "margin-top: 10px;\n"; } ?> } div.firstcolumn div.box { padding-right: 10px; @@ -1408,8 +1407,7 @@ div.secondcolumn div.box { float: none; width: auto; } - div.ficheaddleft { - + div.fichehalfright { margin-top: 10px; } div.firstcolumn div.box { @@ -1421,7 +1419,7 @@ div.secondcolumn div.box { } /* For table into table into card */ -div.ficheaddleft tr.liste_titre:first-child td table.nobordernopadding td, div.nopadding { +div.fichehalfright tr.liste_titre:first-child td table.nobordernopadding td, div.nopadding { padding: 0 0 0 0; } div.nopadding { @@ -2736,7 +2734,7 @@ td.border, div.tagtable div div.border { border-bottom: 1px solid rgb(); } -.ficheaddleft table.noborder { +.fichehalfright table.noborder { margin: 0px 0px 0px 0px; } div.colorback @@ -3275,8 +3273,8 @@ div .tdtop { /* Prepare to remove class pair - impair */ .noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre), -div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre), -div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre) +div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre), +div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre) { background: linear-gradient(to bottom, rgb() 85%, rgb() 100%); background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); @@ -3291,8 +3289,8 @@ div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth- } .noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre), -div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre), -div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre) +div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre), +div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre) { background: linear-gradient(to bottom, rgb() 85%, rgb() 100%); background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); @@ -3319,9 +3317,9 @@ ul.noborder li:nth-child(even):not(.liste_titre) { overflow-x: auto; min-height: 40px; } -/*.ficheaddleft div.boxstats, .ficheaddright div.boxstats { +.ficheaddleft div.boxstats, .ficheaddright div.boxstats { border: none; -}*/ +} .boxstatsborder { /* border: 1px solid #CCC !important; */ }