diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index 73dc0fe3b85960be4944da7b10afc9d3fa4f0ca4..471edf58e79f36958a55d63f301f292129b525a7 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -50,25 +50,11 @@ else if ($action == 'disable_hidemenu') exit; } -if ($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 ($action == 'disable_layoutmenu') -{ - dolibarr_del_const($db, "MAIN_MENU_USE_JQUERY_LAYOUT",$conf->entity); - header("Location: ".$_SERVER["PHP_SELF"]); - exit; -} - /* * View */ - llxHeader('',$langs->trans("Setup")); print load_fiche_titre($langs->trans("Menus"),'','title_setup'); @@ -119,25 +105,6 @@ else print "</td>"; print '</tr>'; -// Use a flip-hide menu -if (isset($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL > 1) -{ - $var=!$var; - print "<tr ".$bc[$var].">"; - print '<td colspan="3">'.$langs->trans("MenuUseLayout").'</td>'; - print '<td align="center">'; - if (empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) - { - print '<a href="'.$_SERVER["PHP_SELF"].'?action=activate_layoutmenu">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>'; - } - else - { - print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_layoutmenu">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>'; - } - print "</td>"; - print '</tr>'; -} - print '</table>'; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8652af27d82c337a6fa63dbed268c5df68f722ca..697b2ab9ab956c1585942cf580b1f994c085339a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1033,13 +1033,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui.css'.($ext?'?'.$ext:'').'">'."\n"; // JQuery print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css'.($ext?'?'.$ext:'').'">'."\n"; // Tooltip print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css'.($ext?'?'.$ext:'').'">'."\n"; // JNotify - /*if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || (defined('REQUIRE_JQUERY_FILEUPLOAD') && constant('REQUIRE_JQUERY_FILEUPLOAD'))) // jQuery fileupload - { - print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/css/jquery.fileupload-ui.css'.($ext?'?'.$ext:'').'">'."\n"; - }*/ if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES'))) // jQuery datatables { - //print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/css/jquery.dataTables.css'.($ext?'?'.$ext:'').'">'."\n"; print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/media/css/jquery.dataTables.min.css'.($ext?'?'.$ext:'').'">'."\n"; print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extensions/Buttons/css/buttons.dataTables.min.css'.($ext?'?'.$ext:'').'">'."\n"; print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extensions/ColReorder/css/colReorder.dataTables.min.css'.($ext?'?'.$ext:'').'"></script>'."\n"; @@ -1131,11 +1126,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/jquery.tipTip.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; - // jQuery Layout - if (empty($conf->dol_use_jmobile) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT')) - { - print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/layout/jquery.layout.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; - } // jQuery jnotify if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && ! defined('DISABLE_JQUERY_JNOTIFY')) { @@ -1374,60 +1364,6 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a if ($conf->use_javascript_ajax) { - if (empty($conf->dol_use_jmobile) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) - { - print '<script type="text/javascript"> - jQuery(document).ready(function () { - jQuery("body").layout(layoutSettings); - }); - var layoutSettings = { - name: "mainlayout", - defaults: { - useStateCookie: true, - size: "auto", - resizable: false, - //paneClass: "none", - //resizerClass: "resizer", - //togglerClass: "toggler", - //buttonClass: "button", - //contentSelector: ".content", - //contentIgnoreSelector: "span", - togglerTip_open: "Close This Pane", - togglerTip_closed: "Open This Pane", - resizerTip: "Resize This Pane", - fxSpeed: "fast" - }, - west: { - paneClass: "leftContent", - //spacing_closed: 14, - //togglerLength_closed: 14, - //togglerAlign_closed: "auto", - //togglerLength_open: 0, - // effect defaults - overridden on some panes - //slideTrigger_open: "mouseover", - initClosed: '.(empty($conf->dol_optimize_smallscreen)?'false':'true').', - fxName: "drop", - fxSpeed: "fast", - fxSettings: { easing: "" } - }, - north: { - paneClass: "none", - resizerClass: "none", - togglerClass: "none", - spacing_open: 0, - togglerLength_open: 0, - togglerLength_closed: -1, - slidable: false, - fxName: "none", - fxSpeed: "fast" - }, - center: { - paneSelector: "#mainContent" - } - } - </script>' . "\n"; - } - // Raven.js for client-side Sentry logging support if (array_key_exists('mod_syslog_sentry', $conf->loghandlers) && ! empty($conf->global->SYSLOG_SENTRY_DSN)) { @@ -1448,8 +1384,6 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a */ print "\n".'<!-- Start top horizontal -->'."\n"; - if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n"; - if (empty($conf->dol_hide_topmenu)) { print '<div class="side-nav-vert"><div id="id-top">'; @@ -1579,11 +1513,10 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a //unset($form); } - if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "</div><!-- End top layout -->\n"; print '<div style="clear: both;"></div>'; print "<!-- End top horizontal menu -->\n\n"; - if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile) && empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div id="id-container">'; + if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile)) print '<div id="id-container">'; } @@ -1616,8 +1549,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra // Instantiate hooks of thirdparty module $hookmanager->initHooks(array('searchform','leftblock')); - if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<!-- Begin left layout -->'."\n".'<div class="ui-layout-west">'."\n"; - else print "\n".'<!-- Begin id-left -->'."\n".'<div class="side-nav"><div id="id-left">'."\n"; + print "\n".'<!-- Begin id-left -->'."\n".'<div class="side-nav"><div id="id-left">'."\n"; print "\n"; @@ -1779,8 +1711,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra $reshook=$hookmanager->executeHooks('printLeftBlock',$parameters); // Note that $action and $object may have been modified by some hooks print $hookmanager->resPrint; - if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div> <!-- End left layout -->'."\n"; - else print '</div></div> <!-- end id-left -->'; // End div id="id-left" + print '</div></div> <!-- end id-left -->'; // End div id="id-left" } print "\n"; @@ -1800,7 +1731,6 @@ function main_area($title='') { global $conf, $langs; - if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '<div id="mainContent"><div class="ui-layout-center"> <!-- begin main layout -->'."\n"; if (empty($conf->dol_hide_leftmenu)) print '<div id="id-right">'; print "\n"; @@ -1944,7 +1874,6 @@ if (! function_exists("llxFooter")) print '</div> <!-- End div class="fiche" -->'."\n"; if (! empty($conf->dol_use_jmobile)) print '</div>'; // end data-role="page" - if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div></div> <!-- end main layout -->'."\n"; if (empty($conf->dol_hide_leftmenu)) print '</div> <!-- End div id-right -->'; // End div id-right print "\n"; @@ -1953,7 +1882,7 @@ if (! function_exists("llxFooter")) printCommonFooter($zone); //var_dump($langs); // Uncommment to see the property _tab_loaded to see which language file were loaded - if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile) && empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div> <!-- End div id-container -->'."\n"; // End div container + if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile)) print '</div> <!-- End div id-container -->'."\n"; // End div container if (! empty($delayedhtmlcontent)) print $delayedhtmlcontent; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index b772f7412190416d81ec73606c4f2d667a892119..7454229aec0df1a69d6b103baa396c5536491d46 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -646,7 +646,7 @@ td.showDragHandle { div.fiche { - margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'6':'20'):'24')); ?>px; + margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:($dol_hide_leftmenu?'6':'20')); ?>px; margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->dol_optimize_smallscreen)?'12':'6')); ?>px; <?php if (! empty($conf->dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?> } @@ -683,7 +683,7 @@ div.ficheaddleft { @media only screen and (max-width: 900px) { div.fiche { - margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'6':'20'):'24')); ?>px; + margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:($dol_hide_leftmenu?'6':'20')); ?>px; margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:6); ?>px; <?php if (! empty($conf->dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?> } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 9644232d2c607a617c0b0157db176718134bffdf..78a8eaf79b2416d660fec7db6844dc8945d810fb 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -699,7 +699,7 @@ td.showDragHandle { div.fiche { - margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'20'):'24')); ?>px; + margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:($dol_hide_leftmenu?'4':'20')); ?>px; margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->dol_optimize_smallscreen)?'16':'4')); ?>px; <?php if (! empty($conf->dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?> margin-bottom: 15px; @@ -737,7 +737,7 @@ div.ficheaddleft { @media only screen and (max-width: 900px) { div.fiche { - margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'20'):'24')); ?>px; + margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:($dol_hide_leftmenu?'4':'20')); ?>px; margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:16); ?>px; <?php if (! empty($conf->dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?> margin-bottom: 15px;