From 4420af683d206ae06a1956f4ada932efcbec39e2 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 14 Sep 2019 05:44:28 +0200 Subject: [PATCH 1/4] Fix Bank entries - nowrap on amount --- htdocs/compta/bank/bankentries_list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 5609bb6b598..0a63e70d992 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1356,7 +1356,7 @@ if ($resql) // Debit if (! empty($arrayfields['b.debit']['checked'])) { - print ''; + print ''; if ($objp->amount < 0) { print price($objp->amount * -1); @@ -1370,7 +1370,7 @@ if ($resql) // Credit if (! empty($arrayfields['b.credit']['checked'])) { - print ''; + print ''; if ($objp->amount > 0) { print price($objp->amount); From e0238705cc89222c1ecce9b8319f09c1b21f1f91 Mon Sep 17 00:00:00 2001 From: TuxGasy Date: Sat, 14 Sep 2019 19:04:43 +0200 Subject: [PATCH 2/4] Check if childtablesoncascade is not empty --- htdocs/core/class/commonobject.class.php | 26 +++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index d20a8d2785b..f08be052e96 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7536,18 +7536,20 @@ abstract class CommonObject } // Delete cascade first - foreach($this->childtablesoncascade as $table) - { - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$table.' WHERE '.$this->fk_element.' = '.$this->id; - $resql = $this->db->query($sql); - if (! $resql) - { - $this->error=$this->db->lasterror(); - $this->errors[]=$this->error; - $this->db->rollback(); - return -1; - } - } + if (! empty($this->childtablesoncascade)) { + foreach($this->childtablesoncascade as $table) + { + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$table.' WHERE '.$this->fk_element.' = '.$this->id; + $resql = $this->db->query($sql); + if (! $resql) + { + $this->error=$this->db->lasterror(); + $this->errors[]=$this->error; + $this->db->rollback(); + return -1; + } + } + } if (! $error) { if (! $notrigger) { From 544a1237bc0cc0d65cf3150d536e8f23a0d9cced Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 15 Sep 2019 15:09:36 +0200 Subject: [PATCH 3/4] FIX regression with option to hide picto on top menu --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/theme/eldy/global.inc.php | 51 ++++++++++++++++++++++++++----- htdocs/theme/md/style.css.php | 46 +++++++++++++++++++++++++++- 3 files changed, 89 insertions(+), 10 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3d7c9ad0ae2..b6b691117a5 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7226,7 +7226,7 @@ function printCommonFooter($zone = 'private') { print "\n"; print '/* JS CODE TO ENABLE to manage handler to switch left menu page (menuhider) */'."\n"; - print 'jQuery(".menuhider").click(function(event) {'; + print 'jQuery("li.menuhider").click(function(event) {'; print ' if (!$( "body" ).hasClass( "sidebar-collapse" )){ event.preventDefault(); }'."\n"; print ' console.log("We click on .menuhider");'."\n"; print ' $("body").toggleClass("sidebar-collapse")'."\n"; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 82001a31a41..c3ddd4ff7e2 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1026,6 +1026,41 @@ div.blockvmenulogo { border-bottom: 0 !important; } +.backgroundforcompanylogo { + margin: px; + margin-left: 6px; + margin-right: 8px; + background-color: rgba(255,255,255,0.7); + padding: 0; + border-radius: 5px; + height: px; + /* width: 100px; */ + max-width: 100px; + vertical-align: middle; +} +.backgroundforcompanylogo img.mycompany { + object-fit: contain; + width: inherit; + height: inherit; +} +#mainmenutd_companylogo::after, #mainmenutd_menu::after { + content: unset !important; +} +li#mainmenutd_companylogo .tmenucenter { + width: unset; +} +li#mainmenutd_companylogo { + min-width: unset !important; +} + + li#mainmenutd_home { + min-width: unset !important; + } + li#mainmenutd_home .tmenucenter { + width: unset; + } + + div.blockvmenupair, div.blockvmenuimpair { border-top: none !important; border-left: none !important; @@ -1469,9 +1504,6 @@ li.tmenu, li.tmenusel { li.menuhider:hover { background-image: none !important; } -li.tmenusel, li.tmenu:hover { - /* background: rgba(0, 0, 0, 0.1); */ -} li.tmenusel::after, li.tmenu:hover::after{ content: ""; @@ -1524,7 +1556,7 @@ div.tmenucenter padding-top: 2px; height: px; - width: 100%; + /* width: 100%; */ } #menu_titre_logo { padding-top: 0; @@ -1930,8 +1962,8 @@ div.login_block_other { padding-top: 0; text-align: right; margin-right: 8px; } float: right; vertical-align: top; padding: 0px 3px 0px 4px !important; - line-height: 50px; - height: 50px; + line-height: px; + height: px; } .atoplogin, .atoplogin:hover { color: # !important; @@ -1968,8 +2000,8 @@ img.login, img.printer, img.entity { font-weight: bold; } .userimg.atoplogin img.userphoto, .userimgatoplogin img.userphoto { /* size for user photo in login bar */ - width: 32px; - height: 32px; + width: px; + height: px; border-radius: 50%; background-size: contain; background-size: contain; @@ -5621,6 +5653,9 @@ div.tabsElem a.tab { /* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */ @media only screen and (max-width: global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2) ? round($nbtopmenuentries * 69, 0) + 40 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2; ?>px) /* reduction 2 */ { + li.tmenucompanylogo { + display: none; + } div.mainmenu { height: 23px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 3b9064e51a1..ee0515da6fe 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1938,6 +1938,11 @@ foreach($mainmenuusedarray as $val) display: none; } +.topmenuimage { + + display: none; + +} a.tmenuimage { display: block; } @@ -2222,6 +2227,41 @@ div.blockvmenulogo { border-bottom: 0 !important; } +.backgroundforcompanylogo { + margin: px; + margin-left: 12px; + margin-right: 6px; + background-color: rgba(255,255,255,0.7); + padding: 0; + border-radius: 5px; + height: px; + /* width: 100px; */ + max-width: 100px; + vertical-align: middle; +} +.backgroundforcompanylogo img.mycompany { + object-fit: contain; + width: inherit; + height: inherit; +} +#mainmenutd_companylogo::after { + content: unset; +} +li#mainmenutd_companylogo .tmenucenter { + width: unset; +} +li#mainmenutd_companylogo { + min-width: unset !important; +} + + li#mainmenutd_home { + min-width: unset !important; + } + li#mainmenutd_home .tmenucenter { + width: unset; + } + + div.blockvmenupair, div.blockvmenuimpair { font-family: ; @@ -5743,7 +5783,7 @@ border-top-right-radius: 6px; } .menuhider { - width: 40px; + width: px; } /* nboftopmenuentries = , fontsize= */ @@ -5778,6 +5818,10 @@ border-top-right-radius: 6px; /* rule to reduce top menu - 2nd reduction */ @media only screen and (max-width: px) { + li.tmenucompanylogo { + display: none; + } + div.tmenucenter { max-width: px; /* size of viewport */ text-overflow: clip; From 76b366836877de877796f9bf99cac21488c241ff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 15 Sep 2019 15:15:59 +0200 Subject: [PATCH 4/4] FIX regression with option to hide picto on top menu --- htdocs/core/menus/standard/eldy.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index b1c3111034f..dbf3ede88f9 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -55,14 +55,14 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = $usemenuhider = 1; - // Show/Hide vertical menu - if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + // Show/Hide vertical menu. The hamburger icon for .menuhider action. + if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $showmode=1; $classname = 'class="tmenu menuhider"'; $idsel='menu'; - $menu->add('#', '', 0, $showmode, $atarget, "xxx", '', 0, $id, $idsel, $classname); + $menu->add('#', (! empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE) ? '' : ''), 0, $showmode, $atarget, "xxx", '', 0, $id, $idsel, $classname); } $menu_arr = array(); @@ -70,7 +70,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = $menu_arr[] = array( 'name' => 'Home', 'link' => '/index.php?mainmenu=home&leftmenu=home', - 'title' => (! empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)? '   ' : "Home") , + 'title' => (! empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE) ? '' : "Home") , 'level' => 0, 'enabled' => $showmode = 1, 'target' => $atarget,