Fix: compatibility with ecm layout

This commit is contained in:
Regis Houssin 2010-11-02 09:10:43 +00:00
parent baed7507fa
commit aa4b890bfd
2 changed files with 38 additions and 31 deletions

View File

@ -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;

View File

@ -864,7 +864,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
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";
} }
@ -1047,7 +1047,7 @@ 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";
@ -1142,8 +1142,12 @@ 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>';
}
} }
@ -1165,8 +1169,9 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
// 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";
@ -1311,8 +1316,9 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
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";
@ -1326,12 +1332,11 @@ 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";
@ -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']))
{ {