Fix: compatibility with ecm layout
This commit is contained in:
parent
baed7507fa
commit
aa4b890bfd
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2008-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2008-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -25,6 +25,8 @@
|
|||||||
* \author Laurent Destailleur
|
* \author Laurent Destailleur
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (! defined('REQUIRE_JQUERY_LAYOUT')) define('REQUIRE_JQUERY_LAYOUT','1');
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/ecm.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/ecm.lib.php");
|
||||||
@ -290,10 +292,11 @@ if (GETPOST("action") == 'refreshmanual')
|
|||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
* View
|
* View
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
/*
|
||||||
$morejs=array(
|
$morejs=array(
|
||||||
"/includes/jquery/plugins/layout/jquery.layout-latest.js"
|
"/includes/jquery/plugins/layout/jquery.layout-latest.js"
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
$morehead="<style type=\"text/css\">
|
$morehead="<style type=\"text/css\">
|
||||||
html, body {
|
html, body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -343,7 +346,7 @@ html, body {
|
|||||||
});
|
});
|
||||||
</SCRIPT>";
|
</SCRIPT>";
|
||||||
|
|
||||||
llxHeader($morehead,$langs->trans("ECM"),'','','','',$morejs,'',0,0);
|
llxHeader($morehead,$langs->trans("ECM"),'','','','','','',0,0);
|
||||||
|
|
||||||
// Ajout rubriques automatiques
|
// Ajout rubriques automatiques
|
||||||
$rowspan=0;
|
$rowspan=0;
|
||||||
|
|||||||
@ -863,8 +863,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui-1.8.5.custom.min'.$ext.'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui-1.8.5.custom.min'.$ext.'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd_0_5'.$ext.'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd_0_5'.$ext.'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tooltip/jquery.tooltip.min'.$ext.'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tooltip/jquery.tooltip.min'.$ext.'"></script>'."\n";
|
||||||
|
|
||||||
if ($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)
|
if ($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-latest'.$ext.'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/layout/jquery.layout-latest'.$ext.'"></script>'."\n";
|
||||||
}
|
}
|
||||||
@ -942,9 +942,9 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
|
|
||||||
// For backward compatibility with old modules
|
// For backward compatibility with old modules
|
||||||
if (empty($conf->headerdone)) top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
if (empty($conf->headerdone)) top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
||||||
|
|
||||||
print '<body id="mainbody">';
|
print '<body id="mainbody">';
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
if ($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)
|
if ($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)
|
||||||
@ -997,7 +997,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
}
|
}
|
||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION)
|
if ($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION)
|
||||||
{
|
{
|
||||||
print "\n".'<script type="text/javascript">
|
print "\n".'<script type="text/javascript">
|
||||||
@ -1046,8 +1046,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "\n".'<!-- Start top horizontal menu '.$top_menu.' -->'."\n";
|
print "\n".'<!-- Start top horizontal menu '.$top_menu.' -->'."\n";
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n";
|
print '<div class="ui-layout-north"> <!-- Begin top layout -->'."\n";
|
||||||
|
|
||||||
print '<div id="tmenu_tooltip" class="tmenu">'."\n";
|
print '<div id="tmenu_tooltip" class="tmenu">'."\n";
|
||||||
|
|
||||||
@ -1141,9 +1141,13 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "\n</div>\n<!-- End top horizontal menu -->\n";
|
print "\n</div>\n<!-- End top horizontal menu -->\n";
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print "</div><!-- End top layout -->\n";
|
print "</div><!-- End top layout -->\n";
|
||||||
else print '<table width="100%" class="notopnoleftnoright" summary="leftmenutable" id="undertopmenu"><tr>';
|
|
||||||
|
if (! $conf->use_javascript_ajax || ! $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)
|
||||||
|
{
|
||||||
|
print '<table width="100%" class="notopnoleftnoright" summary="leftmenutable" id="undertopmenu"><tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1164,9 +1168,10 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
$bookmarks='';
|
$bookmarks='';
|
||||||
|
|
||||||
// print '<div class="vmenuplusfiche">'."\n";
|
// print '<div class="vmenuplusfiche">'."\n";
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
|
print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
|
||||||
else print '<td class="vmenu" valign="top">';
|
|
||||||
|
if (! $conf->use_javascript_ajax || ! $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '<td class="vmenu" valign="top">';
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
@ -1226,7 +1231,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
|
|
||||||
// Left column
|
// Left column
|
||||||
print '<!-- Begin left vertical menu '.$left_menu.' -->'."\n";
|
print '<!-- Begin left vertical menu '.$left_menu.' -->'."\n";
|
||||||
|
|
||||||
print '<div class="vmenu">'."\n";
|
print '<div class="vmenu">'."\n";
|
||||||
|
|
||||||
$menuleft=new MenuLeft($db,$menu_array_before,$menu_array_after);
|
$menuleft=new MenuLeft($db,$menu_array_before,$menu_array_after);
|
||||||
@ -1310,9 +1315,10 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
print "<!-- End left vertical menu -->\n";
|
print "<!-- End left vertical menu -->\n";
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '</div> <!-- End left layout -->'."\n";
|
if (! $conf->use_javascript_ajax || ! $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '</td>';
|
||||||
else print '</td>';
|
|
||||||
|
print '</div> <!-- End left layout -->'."\n";
|
||||||
|
|
||||||
print '<!-- End of left column, begin right area -->'."\n";
|
print '<!-- End of left column, begin right area -->'."\n";
|
||||||
// print '</div>'."\n";
|
// print '</div>'."\n";
|
||||||
@ -1325,16 +1331,15 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
function main_area()
|
function main_area()
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)
|
print '<div id="mainContent"><div class="ui-layout-center"> <!-- begin main layout -->'."\n";
|
||||||
{
|
|
||||||
print '<div id="mainContent"><div class="ui-layout-center"> <!-- begin main layout -->'."\n";
|
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '<table width="100%" class="notopnoleftnoright" summary="leftmenutable" id="undertopmenu"><tr>';
|
||||||
print '<table width="100%" class="notopnoleftnoright" summary="leftmenutable" id="undertopmenu"><tr><td valign="top">'."\n";
|
|
||||||
}
|
print '<td valign="top">'."\n";
|
||||||
else print '<td valign="top">'."\n";
|
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
print '<div class="fiche"> <!-- begin main area -->'."\n";
|
print '<div class="fiche"> <!-- begin main area -->'."\n";
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print info_admin($langs->trans("WarningYouAreInMaintenanceMode",$conf->global->MAIN_ONLY_LOGIN_ALLOWED));
|
if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print info_admin($langs->trans("WarningYouAreInMaintenanceMode",$conf->global->MAIN_ONLY_LOGIN_ALLOWED));
|
||||||
@ -1491,8 +1496,7 @@ if (! function_exists("llxFooter"))
|
|||||||
|
|
||||||
// print "\n".'</div> <!-- end div class="vmenuplusfiche" -->'."\n";
|
// print "\n".'</div> <!-- end div class="vmenuplusfiche" -->'."\n";
|
||||||
print "\n".'</td></tr></table> <!-- end right area -->'."\n";
|
print "\n".'</td></tr></table> <!-- end right area -->'."\n";
|
||||||
|
print '</div></div> <!-- end main layout -->'."\n";
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '</div></div> <!-- end main layout -->'."\n";
|
|
||||||
|
|
||||||
if (! empty($_SERVER['DOL_TUNING']))
|
if (! empty($_SERVER['DOL_TUNING']))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user