mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Complete css to get value unique
This commit is contained in:
@@ -611,7 +611,7 @@ function dol_string_unaccent($str)
|
||||
*/
|
||||
function dol_string_nospecial($str,$newstr='_',$badcharstoreplace='')
|
||||
{
|
||||
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||
$forbidden_chars_to_replace=array(" ", "'", "/", "\\", ":", "*", "?", "\"", "<", ">", "|", "[", "]", ",", ";", "=");
|
||||
$forbidden_chars_to_remove=array();
|
||||
if (is_array($badcharstoreplace)) $forbidden_chars_to_replace=$badcharstoreplace;
|
||||
//$forbidden_chars_to_remove=array("(",")");
|
||||
|
||||
@@ -54,20 +54,20 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m
|
||||
if (empty($noout)) print_start_menu_array_auguria();
|
||||
|
||||
$usemenuhider = (GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER));
|
||||
|
||||
|
||||
// Show/Hide vertical menu
|
||||
if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$showmode=1;
|
||||
$classname = 'class="tmenu menuhider"';
|
||||
$idsel='menu';
|
||||
|
||||
|
||||
if (empty($noout)) print_start_menu_entry_auguria($idsel,$classname,$showmode);
|
||||
if (empty($noout)) print_text_menu_entry_auguria('', 1, '#', $id, $idsel, $classname, $atarget);
|
||||
if (empty($noout)) print_end_menu_entry_auguria($showmode);
|
||||
$menu->add('#', '', 0, $showmode, $atarget, "xxx", '');
|
||||
}
|
||||
|
||||
|
||||
$num = count($newTabMenu);
|
||||
for($i = 0; $i < $num; $i++)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m
|
||||
if ($showmode == 1)
|
||||
{
|
||||
$url = $shorturl = $newTabMenu[$i]['url'];
|
||||
|
||||
|
||||
if (! preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url']))
|
||||
{
|
||||
$tmp=explode('?',$newTabMenu[$i]['url'],2);
|
||||
@@ -85,11 +85,11 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m
|
||||
$param = (isset($tmp[1])?$tmp[1]:'');
|
||||
|
||||
// Complete param to force leftmenu to '' to closed opend menu when we click on a link with no leftmenu defined.
|
||||
if ((! preg_match('/mainmenu/i',$param)) && (! preg_match('/leftmenu/i',$param)) && ! empty($newTabMenu[$i]['url']))
|
||||
if ((! preg_match('/mainmenu/i',$param)) && (! preg_match('/leftmenu/i',$param)) && ! empty($newTabMenu[$i]['url']))
|
||||
{
|
||||
$param.=($param?'&':'').'mainmenu='.$newTabMenu[$i]['url'].'&leftmenu=';
|
||||
}
|
||||
if ((! preg_match('/mainmenu/i',$param)) && (! preg_match('/leftmenu/i',$param)) && empty($newTabMenu[$i]['url']))
|
||||
if ((! preg_match('/mainmenu/i',$param)) && (! preg_match('/leftmenu/i',$param)) && empty($newTabMenu[$i]['url']))
|
||||
{
|
||||
$param.=($param?'&':'').'leftmenu=';
|
||||
}
|
||||
@@ -136,7 +136,7 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$m
|
||||
function print_start_menu_array_auguria()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
print '<div class="tmenudiv">';
|
||||
print '<ul class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?'':' title="Top menu"').'>';
|
||||
}
|
||||
@@ -250,7 +250,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
|
||||
$usemenuhider = (GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER));
|
||||
global $usemenuhider;
|
||||
|
||||
|
||||
// Show logo company
|
||||
if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
@@ -284,7 +284,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
print '</div>'."\n";
|
||||
print "<!-- End SearchForm -->\n";
|
||||
}
|
||||
|
||||
|
||||
// We update newmenu with entries found into database
|
||||
$menuArbo = new Menubase($db,'auguria');
|
||||
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,($user->societe_id?1:0),'auguria',$tabMenu);
|
||||
@@ -401,7 +401,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
for($j = ($i + 1); $j < $num; $j++)
|
||||
{
|
||||
if (empty($menu_array[$j]['level'])) $lastopened=false;
|
||||
}
|
||||
}
|
||||
if ($altok % 2 == 0)
|
||||
{
|
||||
print '<div class="blockvmenuimpair'.($lastopened?' blockvmenulast':'').($altok == 1 ? ' blockvmenufirst':'').'">'."\n";
|
||||
@@ -454,9 +454,12 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
// Menu niveau > 0
|
||||
if ($menu_array[$i]['level'] > 0)
|
||||
{
|
||||
if ($menu_array[$i]['enabled'])
|
||||
$cssmenu = '';
|
||||
if ($menu_array[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$menu_array[$i]['url']));
|
||||
|
||||
if ($menu_array[$i]['enabled'])
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring;
|
||||
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring;
|
||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||
else print '<span class="vsmenu">';
|
||||
print $menu_array[$i]['titre'];
|
||||
@@ -468,7 +471,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
}
|
||||
else if ($showmenu)
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,7 +483,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
if ($blockvmenuopened) { print "</div>\n"; $blockvmenuopened=false; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($altok) print '<div class="blockvmenuend"></div>';
|
||||
}
|
||||
|
||||
@@ -493,7 +496,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
||||
print '</div>'."\n";
|
||||
print "<!-- End Bookmarks -->\n";
|
||||
}
|
||||
|
||||
|
||||
return count($menu_array);
|
||||
}
|
||||
|
||||
|
||||
@@ -1561,9 +1561,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
// Menu niveau > 0
|
||||
if ($menu_array[$i]['level'] > 0)
|
||||
{
|
||||
if ($menu_array[$i]['enabled'])
|
||||
$cssmenu = '';
|
||||
if ($menu_array[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$menu_array[$i]['url']));
|
||||
|
||||
if ($menu_array[$i]['enabled'])
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring;
|
||||
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring;
|
||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||
else print '<span class="vsmenu">';
|
||||
print $menu_array[$i]['titre'];
|
||||
@@ -1575,7 +1578,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
}
|
||||
else if ($showmenu)
|
||||
{
|
||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ class MenuManager
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if ($mode == 'top' || $mode == 'jmobile')
|
||||
{
|
||||
if (empty($noout)) print_start_menu_array_empty();
|
||||
@@ -98,13 +98,13 @@ class MenuManager
|
||||
$showmode=1;
|
||||
$classname = 'class="tmenu menuhider"';
|
||||
$idsel='menu';
|
||||
|
||||
|
||||
if (empty($noout)) print_start_menu_entry($idsel,$classname,$showmode);
|
||||
if (empty($noout)) print_text_menu_entry('', 1, '#', $id, $idsel, $classname, $atarget);
|
||||
if (empty($noout)) print_end_menu_entry($showmode);
|
||||
$menu->add('#', '', 0, $showmode, $atarget, "xxx", '');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (empty($noout)) print_start_menu_entry_empty($idsel, $classname, $showmode);
|
||||
if (empty($noout)) print_text_menu_entry_empty($langs->trans("Home"), 1, dol_buildpath('/index.php',1).'?mainmenu=home&leftmenu=', $id, $idsel, $classname, $this->atarget);
|
||||
if (empty($noout)) print_end_menu_entry_empty($showmode);
|
||||
@@ -201,8 +201,12 @@ class MenuManager
|
||||
print '<div class="menu_top"></div>'."\n";
|
||||
}
|
||||
|
||||
if ($this->menu->liste[$i]['level'] > 0) {
|
||||
print '<div class="menu_contenu">';
|
||||
if ($this->menu->liste[$i]['level'] > 0)
|
||||
{
|
||||
$cssmenu = '';
|
||||
if ($this->menu->liste[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$this->menu->liste[$i]['url']));
|
||||
|
||||
print '<div class="menu_contenu'.$cssmenu.'">';
|
||||
|
||||
if ($this->menu->liste[$i]['enabled'])
|
||||
{
|
||||
@@ -229,7 +233,7 @@ class MenuManager
|
||||
print "</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($altok) print '<div class="blockvmenuend"></div>';
|
||||
}
|
||||
|
||||
@@ -308,7 +312,7 @@ class MenuManager
|
||||
function print_start_menu_array_empty()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
print '<div class="tmenudiv">';
|
||||
print '<ul class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?'':' title="Top menu"').'>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user