Test: use jquery layout for the left menu
This commit is contained in:
parent
e1cecca39a
commit
f677f2e72c
@ -50,6 +50,19 @@ else if ($_GET["action"] == 'disable_hidemenu')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_GET["action"] == 'activate_layoutmenu')
|
||||||
|
{
|
||||||
|
dolibarr_set_const($db, "MAIN_MENU_USE_JQUERY_LAYOUT", '1','chaine',0,'',$conf->entity);
|
||||||
|
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else if ($_GET["action"] == 'disable_layoutmenu')
|
||||||
|
{
|
||||||
|
dolibarr_del_const($db, "MAIN_MENU_USE_JQUERY_LAYOUT",$conf->entity);
|
||||||
|
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -105,7 +118,22 @@ if($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED == 1)
|
|||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_hidemenu">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_hidemenu">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// hide unauthorized menu
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td colspan="3">'.$langs->trans("MenuUseLayout").'</td>';
|
||||||
|
print '<td align="center">';
|
||||||
|
if ($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT == 0)
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=activate_layoutmenu">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
|
}
|
||||||
|
if($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT == 1)
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_layoutmenu">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||||
|
}
|
||||||
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -1010,8 +1010,6 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
return jQuery(this).attr("tooltipText"); }
|
return jQuery(this).attr("tooltipText"); }
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery("body").layout({ applyDefaultStyles: true });
|
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user