From e4eb2d2aaf2af7fc0f392b119ee05d103054c14e Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis.houssin@capnetworks.com> Date: Mon, 23 Jan 2017 13:36:14 +0100 Subject: [PATCH] Fix: explode array result is 0,1,2 and not 1,2,3 --- htdocs/theme/eldy/style.css.php | 56 ++++++++++---------- htdocs/theme/md/style.css.php | 92 ++++++++++++++++----------------- 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 3fabbf347c0..b09cde24630 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1,7 +1,7 @@ <?php /* 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) 2007-2017 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> * @@ -158,25 +158,25 @@ if (! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) // Set text color to black or white $tmppart=explode(',',$colorbackhmenu1); -$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : ''); +$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : ''); if ($tmpval <= 360) $colortextbackhmenu='FFFFFF'; else $colortextbackhmenu='000000'; $tmppart=explode(',',$colorbackvmenu1); -$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : ''); +$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : ''); if ($tmpval <= 360) { $colortextbackvmenu='FFFFFF'; } else { $colortextbackvmenu='000000'; } $tmppart=explode(',',$colorbacktitle1); if ($colortexttitle == '') { - $tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : ''); + $tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : ''); if ($tmpval <= 360) { $colortexttitle='FFFFFF'; $colorshadowtitle='888888'; } else { $colortexttitle='000000'; $colorshadowtitle='FFFFFF'; } } $tmppart=explode(',',$colorbacktabcard1); -$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : ''); +$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : ''); if ($tmpval <= 340) { $colortextbacktab='FFFFFF'; } else { $colortextbacktab='111111'; } @@ -254,7 +254,7 @@ a.tab { font-weight: bold !important; } a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; font-weight: normal; color: rgb(<?php print $colortextlink; ?>); text-decoration: none; } a:hover { text-decoration: underline; color: rgb(<?php print $colortextlink; ?>); } -a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; } +a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; } input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { background-color: #FFF; @@ -284,7 +284,7 @@ textarea.cke_source:focus input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { font-size: <?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; - + border: 1px solid #C0C0C0; /* v6 border: none; border-bottom: 1px solid #C0C0C0; @@ -309,7 +309,7 @@ textarea { border: solid 1px rgba(0,0,0,.3); border-top:solid 1px rgba(0,0,0,.3); border-bottom:solid 1px rgba(0,0,0,.2); - + padding:4px; margin-left:0px; margin-bottom:1px; @@ -621,12 +621,12 @@ div.myavailability { overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; }*/ -/* Style used for most tables */ +/* Style used for most tables */ .div-table-responsive, .div-table-responsive-no-min { overflow-x: auto; min-height: 0.01%; } -/* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ +/* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { overflow-x: auto; } @@ -715,20 +715,20 @@ div.fiche>form>div.div-table-responsive { .border tbody tr, .border tbody tr td, div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col { height: 40px !important; } - + .quatrevingtpercent, .inputsearch { width: 95%; } - - input, input[type=text], input[type=password], select, textarea { - min-width: 20px; + + input, input[type=text], input[type=password], select, textarea { + min-width: 20px; min-height: 1.4em; line-height: 1.4em; padding: .4em .1em; border: 1px solid #BBB; /* max-width: inherit; why this ? */ } - + .hideonsmartphone { display: none; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; } .maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; } @@ -747,20 +747,20 @@ div.fiche>form>div.div-table-responsive { .minwidth500imp { min-width: 50px !important; } .titlefield { width: auto; } .titlefieldcreate { width: auto; } - + #tooltip { position: absolute; width: <?php print dol_size(300,'width'); ?>px; } - + /* intput, input[type=text], */ select { width: 98%; min-width: 40px; } - + div.divphotoref { - padding-right: 5px; + padding-right: 5px; } img.photoref, div.photoref { border: none; @@ -772,7 +772,7 @@ div.fiche>form>div.div-table-responsive { width: 20px; object-fit: contain; } - + } .linkobject { cursor: pointer; } <?php if (GETPOST("optioncss") == 'print') { ?> @@ -1239,7 +1239,7 @@ div.menu_titre { padding-top: 4px; padding-bottom: 4px; overflow: hidden; - text-overflow: ellipsis; + text-overflow: ellipsis; } .mainmenuaspan { @@ -1442,7 +1442,7 @@ form#login { -moz-box-shadow: 0 2px 23px 2px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(60,60,60,0.15); -webkit-box-shadow: 0 2px 23px 2px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(60,60,60,0.15); box-shadow: 0 2px 23px 2px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(60,60,60,0.15); - + /*-moz-box-shadow: 3px 2px 20px #CCC; -webkit-box-shadow: 3px 2px 20px #CCC; box-shadow: 3px 2px 20px #CCC;*/ @@ -1646,7 +1646,7 @@ a.vsmenu.addbookmarkpicto { { /* border-bottom: 1px solid #BBB; */ } -div.blockvmenusearchphone +div.blockvmenusearchphone { border-bottom: none !important; } @@ -2511,8 +2511,8 @@ div.liste_titre_bydiv .divsearchfield { padding: 2px 1px 2px 0px; /* t r b l */ } -tr.box_titre .nobordernopadding td { - padding: 0px ! important; +tr.box_titre .nobordernopadding td { + padding: 0px ! important; } table.nobordernopadding { border-collapse: collapse !important; @@ -2807,7 +2807,7 @@ div.liste_titre_bydiv { border-top-width: <?php echo $borderwith ?>px; border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); border-top-style: solid; - + border-collapse: collapse; display: table; padding: 2px 0px 2px 0; @@ -3419,7 +3419,7 @@ td.hidden { border-bottom: 1px solid #888; background: #eee; } -.websitebar .button, .websitebar .buttonDelete +.websitebar .button, .websitebar .buttonDelete { padding: 2px 5px 3px 5px !important; margin: 2px 4px 2px 4px !important; @@ -3428,7 +3428,7 @@ td.hidden { .websiteselection { display: inline-block; padding-left: 10px; - vertical-align: middle; + vertical-align: middle; line-height: 29px; } .websitetools { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 236e87abc84..8f0242db8ca 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1,7 +1,7 @@ <?php /* 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) 2007-2017 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> @@ -159,25 +159,25 @@ if (empty($colortopbordertitle1)) $colortopbordertitle1=$colorbackhmenu1; // Set text color to black or white $tmppart=explode(',',$colorbackhmenu1); -$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : ''); +$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : ''); if ($tmpval <= 360) $colortextbackhmenu='FFFFFF'; else $colortextbackhmenu='000000'; $tmppart=explode(',',$colorbackvmenu1); -$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : ''); +$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : ''); if ($tmpval <= 360) { $colortextbackvmenu='FFFFFF'; } else { $colortextbackvmenu='000000'; } $tmppart=explode(',',$colorbacktitle1); if ($colortexttitle == '') { - $tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : ''); + $tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : ''); if ($tmpval <= 260) { $colortexttitle='FFFFFF'; $colorshadowtitle='888888'; } else { $colortexttitle='101010'; $colorshadowtitle='FFFFFF'; } } $tmppart=explode(',',$colorbacktabcard1); -$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : ''); +$tmpval=(! empty($tmppart[0]) ? $tmppart[0] : '')+(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : ''); if ($tmpval <= 340) { $colortextbacktab='FFFFFF'; } else { $colortextbacktab='111111'; } @@ -254,7 +254,7 @@ a.tab { font-weight: bold !important; } a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; font-weight: normal; color: rgb(<?php print $colortextlink; ?>); text-decoration: none; } a:hover { text-decoration: underline; color: rgb(<?php print $colortextlink; ?>); } -a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; } +a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; } input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { background-color: #FDFDFD; @@ -525,7 +525,7 @@ div.divsearchfield { margin-<?php print $left; ?>: 2px; margin-top: 4px; margin-bottom: 4px; - padding-left: 2px; + padding-left: 2px; } div.confirmmessage { padding-top: 6px; @@ -539,8 +539,8 @@ div.myavailability { } .checkallactions { vertical-align: top; - margin-top: 6px; - margin-left: 4px; + margin-top: 6px; + margin-left: 4px; } .selectlimit, .marginrightonly { margin-right: 10px !important; @@ -598,12 +598,12 @@ div.myavailability { overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; }*/ -/* Style used for most tables */ +/* Style used for most tables */ .div-table-responsive, .div-table-responsive-no-min { overflow-x: auto; min-height: 0.01%; } -/* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ +/* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { overflow-x: auto; } @@ -650,7 +650,7 @@ div.fiche>form>div.div-table-responsive { .titlefield { width: 25%; } .titlefieldmiddle { width: 50%; } .imgmaxwidth180 { max-width: 180px; } - + /* Force values for small screen 1400 */ @media only screen and (max-width: 1400px) @@ -693,20 +693,20 @@ div.fiche>form>div.div-table-responsive { .border tbody tr, .border tbody tr td, div.tabBar table.border tr { height: 40px !important; } - + .quatrevingtpercent, .inputsearch { width: 95%; } - - input, input[type=text], input[type=password], select, textarea { - min-width: 20px; + + input, input[type=text], input[type=password], select, textarea { + min-width: 20px; min-height: 1.4em; line-height: 1.4em; padding: .4em .1em; border: 1px solid #BBB; /* max-width: inherit; why this */ } - + .hideonsmartphone { display: none; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; } .maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; } @@ -725,20 +725,20 @@ div.fiche>form>div.div-table-responsive { .minwidth500imp { min-width: 50px !important; } .titlefield { width: auto; } .titlefieldcreate { width: auto; } - + #tooltip { position: absolute; width: <?php print dol_size(300,'width'); ?>px; } - + /* intput, input[type=text], */ select { width: 98%; min-width: 40px; } - + div.divphotoref { - padding-right: 5px; + padding-right: 5px; } img.photoref, div.photoref { border: none; @@ -749,7 +749,7 @@ div.fiche>form>div.div-table-responsive { height: 20px; width: 20px; object-fit: contain; - } + } } .linkobject { cursor: pointer; } <?php if (GETPOST("optioncss") == 'print') { ?> @@ -802,7 +802,7 @@ td.showDragHandle { <?php if (GETPOST("optioncss") != 'print') { ?> padding-left: 229px; padding-top: 12px; -<?php } ?> +<?php } ?> } .side-nav { @@ -1017,7 +1017,7 @@ table.noborder tr.liste_titre td { padding-right: 1px; padding-top: 1px; padding-bottom: 1px; - width: 44px; + width: 44px; } div.attacharea { padding-top: 10px; @@ -1033,7 +1033,7 @@ div.arearefnobottom { padding-bottom: 4px; } div.heightref { - min-height: 80px; + min-height: 80px; } div.divphotoref { padding-right: 20px; @@ -1249,7 +1249,7 @@ div.tmenucenter div.menu_titre { padding-bottom: 2px; overflow: hidden; - text-overflow: ellipsis; + text-overflow: ellipsis; } .mainmenuaspan { @@ -1625,8 +1625,8 @@ div.vmenu, td.vmenu { width: 202px; } -.menu_contenu { - padding-top: 4px; +.menu_contenu { + padding-top: 4px; padding-bottom: 3px; overflow: hidden; text-overflow: ellipsis; @@ -2204,16 +2204,16 @@ span.butAction, span.butActionDelete { text-shadow: none; border-color: #555; cursor: not-allowed; - + background-color: #f5f5f5; background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-repeat: repeat-x + background-repeat: repeat-x } - + .butActionDelete, .buttonDelete { color: #ffffff !important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); @@ -2358,9 +2358,9 @@ table.liste, table.noborder, table.formdoc, div.noborder { border-bottom-width: 1px; border-bottom-color: #BBB; border-bottom-style: solid; - + margin: 0px 0px 8px 0px; - + -moz-border-radius: 0.1em; -webkit-border-radius: 0.1em; border-radius: 0.1em; @@ -2618,7 +2618,7 @@ div.pagination li.paginationafterarrows { margin-bottom: 1px; color: #202020; min-height: 18px; /* seems to not be used */ - + background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>; } #GanttChartDIV { @@ -2685,7 +2685,7 @@ div.liste_titre_bydiv { border-top-width: <?php echo $borderwith ?>px; border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); border-top-style: solid; - + box-shadow: none; border-collapse: collapse; display: table; @@ -2708,7 +2708,7 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list background: rgb(<?php echo $colorbacktitle1; ?>); <?php } ?> font-weight: <?php echo $useboldtitle?'bold':'normal'; ?>; - + color: rgb(<?php echo $colortexttitle; ?>); font-family: <?php print $fontlist ?>; border-bottom: 1px solid #FDFFFF; @@ -2876,7 +2876,7 @@ span.dashboardlineko { tr.box_titre { height: 26px !important; - + /* TO MATCH BOOTSTRAP */ /*background: #ddd; color: #000 !important; */ @@ -2891,7 +2891,7 @@ tr.box_titre { <?php } else { ?> background: rgb(<?php echo $colorbacktitle1; ?>); <?php } ?> - + background-repeat: repeat-x; color: rgb(<?php echo $colortexttitle; ?>); font-family: <?php print $fontlist ?>, sans-serif; @@ -3324,7 +3324,7 @@ td.hidden { border-bottom: 1px solid #888; background: #eee; } -.websitebar .button, .websitebar .buttonDelete +.websitebar .button, .websitebar .buttonDelete { padding: 2px 4px 2px 4px !important; margin: 2px 4px 2px 4px !important; @@ -3333,7 +3333,7 @@ td.hidden { .websiteselection { display: inline-block; padding-left: 10px; - vertical-align: middle; + vertical-align: middle; line-height: 29px; } .websitetools { @@ -4494,12 +4494,12 @@ img.demothumb { @media only screen and (max-width: 767px) { .imgopensurveywizard, .imgautosize { width:95%; height: auto; } - + #tooltip { position: absolute; width: <?php print dol_size(350,'width'); ?>px; } - + img.demothumb { box-shadow: 1px 1px 4px #BBB; margin-right: 6px; @@ -4516,7 +4516,7 @@ img.demothumb { border-right: none; border-left: none; } - + } @@ -4590,7 +4590,7 @@ img.demothumb { div.mainmenu { min-width: 20px; } - + #tooltip { position: absolute; width: <?php print dol_size(300,'width'); ?>px; @@ -4600,7 +4600,7 @@ img.demothumb { min-width: 0 !important; } div.divphotoref { - padding-right: 5px; + padding-right: 5px; } img.photoref, div.photoref { border: none; @@ -4612,7 +4612,7 @@ img.demothumb { width: 20px; object-fit: contain; } - + } -- GitLab