diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index b0c47422806..f1fa5a84d5d 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -113,7 +113,7 @@ class box_produits extends ModeleBoxes $productstatic->entity = $objp->entity; $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', 'text' => $productstatic->getNomUrl(1), 'asis' => 1, ); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 3cc9c569120..cc5c0710fb9 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -393,14 +393,14 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM // Show menu if (empty($noout)) { - $alt=0; $altok=0; $blockvmenuopened=false; + $altok=0; $blockvmenuopened=false; $lastlevel0=''; $num=count($menu_array); - for ($i = 0; $i < $num; $i++) + for ($i = 0; $i < $num; $i++) // Loop on each menu entry { $showmenu=true; if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($menu_array[$i]['enabled'])) $showmenu=false; - $alt++; + // Begin of new left menu block if (empty($menu_array[$i]['level']) && $showmenu) { $altok++; @@ -420,14 +420,14 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM } } - // Place tabulation + // Add tabulation $tabstring=''; $tabul=($menu_array[$i]['level'] - 1); if ($tabul > 0) { for ($j=0; $j < $tabul; $j++) { - $tabstring.='   '; + $tabstring.='   '; } } @@ -445,26 +445,35 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM print ''."\n"; - // Menu niveau 0 + // Menu level 0 if ($menu_array[$i]['level'] == 0) { - if ($menu_array[$i]['enabled']) + if ($menu_array[$i]['enabled']) // Enabled so visible { print ''; + $lastlevel0='enabled'; } - else if ($showmenu) + else if ($showmenu) // Not enabled but visible (so greyed) { print ''."\n"; + $lastlevel0='greyed'; + } + else + { + $lastlevel0='hidden'; } if ($showmenu) + { print ''."\n"; + } } - // Menu niveau > 0 + // Menu level > 0 if ($menu_array[$i]['level'] > 0) { - if ($menu_array[$i]['enabled']) + if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled. { print ''."\n"; } - else if ($showmenu) + else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. { print ''."\n"; } } // If next is a new block or if there is nothing after - if (empty($menu_array[$i+1]['level'])) + if (empty($menu_array[$i+1]['level'])) // End menu block { if ($showmenu) print ''."\n"; - if ($blockvmenuopened) { print "\n"; $blockvmenuopened=false; } + if ($blockvmenuopened) { print ''."\n"; $blockvmenuopened=false; } } } - if ($altok) print '
'; + if ($altok) print '
'; // End menu block } if (is_array($moredata) && ! empty($moredata['bookmarks'])) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 7a1dfcd4ecf..8c83435914b 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -445,7 +445,7 @@ function print_end_menu_array() * @param Menu $menu Object Menu to return back list of menu entries * @param int $noout Disable output (Initialise &$menu only). * @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x' - * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all). If value come being '', we change it to value in session and 'none' if not efined in session. + * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all). If value come being '', we change it to value in session and 'none' if not defined in session. * @param array $moredata An array with more data to output * @return int nb of menu entries */ @@ -1023,7 +1023,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $objp = $db->fetch_object($resql); $nature=''; - // Must match array $sourceList defined into journals_list.php + // Must match array $sourceList defined into journals_list.php if ($objp->nature == 2) $nature="sells"; if ($objp->nature == 3) $nature="purchases"; if ($objp->nature == 4) $nature="bank"; @@ -1558,14 +1558,14 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $invert=empty($conf->global->MAIN_MENU_INVERT)?"":"invert"; if (empty($noout)) { - $alt=0; $altok=0; $blockvmenuopened=false; + $altok=0; $blockvmenuopened=false; $lastlevel0=''; $num=count($menu_array); - for ($i = 0; $i < $num; $i++) + for ($i = 0; $i < $num; $i++) // Loop on each menu entry { $showmenu=true; if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($menu_array[$i]['enabled'])) $showmenu=false; - $alt++; + // Begin of new left menu block if (empty($menu_array[$i]['level']) && $showmenu) { $altok++; @@ -1585,7 +1585,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu } } - // Place tabulation + // Add tabulation $tabstring=''; $tabul=($menu_array[$i]['level'] - 1); if ($tabul > 0) @@ -1625,26 +1625,35 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu print ''."\n"; - // Menu niveau 0 + // Menu level 0 if ($menu_array[$i]['level'] == 0) { - if ($menu_array[$i]['enabled']) + if ($menu_array[$i]['enabled']) // Enabled so visible { print '
'."\n"; + $lastlevel0='enabled'; } - else if ($showmenu) + else if ($showmenu) // Not enabled but visible (so greyed) { print ''."\n"; + $lastlevel0='greyed'; + } + else + { + $lastlevel0='hidden'; } if ($showmenu) + { print ''."\n"; + } } - // Menu niveau > 0 + // Menu level > 0 if ($menu_array[$i]['level'] > 0) { - if ($menu_array[$i]['enabled']) + if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled. { print ''."\n"; } - else if ($showmenu) + else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. { print ''."\n"; } } // If next is a new block or if there is nothing after - if (empty($menu_array[$i+1]['level'])) + if (empty($menu_array[$i+1]['level'])) // End menu block { if ($showmenu) print ''."\n"; @@ -1669,7 +1678,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu } } - if ($altok) print '
'; + if ($altok) print '
'; // End menu block } return count($menu_array); diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 9750811ffa5..b0b7f95c27b 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -105,7 +105,7 @@ class MenuManager $menuArbo = new Menubase($this->db,'eldy'); $menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'eldy', $tabMenu); $this->tabMenu=$tabMenu; - + //if ($forcemainmenu == 'all') { var_dump($this->tabMenu); exit; } } @@ -149,13 +149,13 @@ class MenuManager print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1,$mode); // no output return $this->menu->getNbOfVisibleMenuEntries(); } - + if ($mode == 'jmobile') { print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1,$mode); // Fill this->menu that is empty with top menu // $this->menu->liste is top menu - //var_dump($this->menu->liste);exit; + //var_dump($this->menu->liste);exit; print ''."\n"; foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' { @@ -168,12 +168,12 @@ class MenuManager $relurl=preg_replace('/__LOGIN__/',$user->login,$relurl); $relurl=preg_replace('/__USERID__/',$user->id,$relurl); - + print '
'; - + // Add font-awesome if ($val['level'] == 0 && $val['mainmenu'] == 'home') print ''; - + print $val['titre']; print ''."\n"; // Search submenu fot this mainmenu entry @@ -184,7 +184,7 @@ class MenuManager //if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') { var_dump($submenu); exit; } //if ($tmpmainmenu=='accountancy') { var_dump($submenu->liste); exit; } $nexturl=dol_buildpath($submenu->liste[0]['url'],1); - + $canonrelurl=preg_replace('/\?.*$/','',$relurl); $canonnexturl=preg_replace('/\?.*$/','',$nexturl); //var_dump($canonrelurl); @@ -198,16 +198,16 @@ class MenuManager print ''; - if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") // No translation + if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") // No translation { if (in_array($val['mainmenu'], array('cashdesk', 'websites'))) print $langs->trans("Access"); - else print $langs->trans("Dashboard"); + else print $langs->trans("Dashboard"); } else print $langs->trans(ucfirst($val['mainmenu'])."Dashboard"); print ''; print ''."\n"; } - + foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'] { $showmenu=true; diff --git a/htdocs/public/demo/demo.css b/htdocs/public/demo/demo.css index daf4f20e585..c4624f2d943 100644 --- a/htdocs/public/demo/demo.css +++ b/htdocs/public/demo/demo.css @@ -32,16 +32,15 @@ a:hover { background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,255) 100%); } .csscolumns { - margin-left: 8px; margin-top: 6px; margin-bottom: 5px; - -webkit-column-count: 4; /* Chrome, Safari, Opera */ - -moz-column-count: 4; /* Firefox */ - column-count: 3; + -webkit-column-count: 2; /* Chrome, Safari, Opera */ + -moz-column-count: 2; /* Firefox */ + column-count: 2; text-align: left; } .demomaxoveflow { - max-width: 100px; + max-width: 120px; overflow: hidden; text-overflow: ellipsis; } diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index fe8da7ee072..be844c8a2da 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -328,7 +328,7 @@ foreach ($demoprofiles as $profilearray) print ''."\n"; print ''."\n"; - print '
'."\n"; + print '
'."\n"; print '
';