Fix: compatibility between bureau2crea theme and multicompany module
This commit is contained in:
parent
63564f8d50
commit
ac5e201829
@ -34,6 +34,23 @@ print '<head>
|
|||||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
||||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
||||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||||
|
// CSS forced by modules (relative url starting with /)
|
||||||
|
if (isset($conf->modules_parts['css']))
|
||||||
|
{
|
||||||
|
$arraycss=(array) $conf->modules_parts['css'];
|
||||||
|
foreach($arraycss as $modcss => $filescss)
|
||||||
|
{
|
||||||
|
$filescss=(array) $filescss; // To be sure filecss is an array
|
||||||
|
foreach($filescss as $cssfile)
|
||||||
|
{
|
||||||
|
// cssfile is a relative path
|
||||||
|
print '<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1);
|
||||||
|
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used.
|
||||||
|
if (!preg_match('/\.css$/i',$cssfile)) print $themeparam;
|
||||||
|
print '"><!-- Added by module '.$modcss. '-->'."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// JQuery. Must be before other includes
|
// JQuery. Must be before other includes
|
||||||
$ext='.js';
|
$ext='.js';
|
||||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz';
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz';
|
||||||
@ -98,11 +115,13 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (! empty($hookmanager->resArray['options'])) {
|
if (! empty($hookmanager->resArray['options'])) {
|
||||||
foreach ($hookmanager->resArray['options'] as $option)
|
foreach ($hookmanager->resArray['options'] as $format => $option)
|
||||||
{
|
{
|
||||||
|
if ($format == 'table') {
|
||||||
echo '<!-- Option by hook -->';
|
echo '<!-- Option by hook -->';
|
||||||
echo $option;
|
echo $option;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,23 @@ print '<head>
|
|||||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
||||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
||||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||||
|
// CSS forced by modules (relative url starting with /)
|
||||||
|
if (isset($conf->modules_parts['css']))
|
||||||
|
{
|
||||||
|
$arraycss=(array) $conf->modules_parts['css'];
|
||||||
|
foreach($arraycss as $modcss => $filescss)
|
||||||
|
{
|
||||||
|
$filescss=(array) $filescss; // To be sure filecss is an array
|
||||||
|
foreach($filescss as $cssfile)
|
||||||
|
{
|
||||||
|
// cssfile is a relative path
|
||||||
|
print '<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1);
|
||||||
|
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used.
|
||||||
|
if (!preg_match('/\.css$/i',$cssfile)) print $themeparam;
|
||||||
|
print '"><!-- Added by module '.$modcss. '-->'."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// JQuery. Must be before other includes
|
// JQuery. Must be before other includes
|
||||||
$ext='.js';
|
$ext='.js';
|
||||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz';
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz';
|
||||||
@ -72,11 +89,13 @@ print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (! empty($hookmanager->resArray['options'])) {
|
if (! empty($hookmanager->resArray['options'])) {
|
||||||
foreach ($hookmanager->resArray['options'] as $option)
|
foreach ($hookmanager->resArray['options'] as $format => $option)
|
||||||
{
|
{
|
||||||
|
if ($format == 'table') {
|
||||||
echo '<!-- Option by hook -->';
|
echo '<!-- Option by hook -->';
|
||||||
echo $option;
|
echo $option;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -35,6 +35,7 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
|||||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
|
||||||
|
session_cache_limiter(FALSE);
|
||||||
|
|
||||||
require_once '../../main.inc.php';
|
require_once '../../main.inc.php';
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2009-2010 Regis Houssin <regis@dolibarr.fr>
|
/* Copyright (C) 2009-2012 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
|
||||||
@ -33,6 +33,23 @@ print '<head>
|
|||||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
||||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
||||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||||
|
// CSS forced by modules (relative url starting with /)
|
||||||
|
if (isset($conf->modules_parts['css']))
|
||||||
|
{
|
||||||
|
$arraycss=(array) $conf->modules_parts['css'];
|
||||||
|
foreach($arraycss as $modcss => $filescss)
|
||||||
|
{
|
||||||
|
$filescss=(array) $filescss; // To be sure filecss is an array
|
||||||
|
foreach($filescss as $cssfile)
|
||||||
|
{
|
||||||
|
// cssfile is a relative path
|
||||||
|
print '<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1);
|
||||||
|
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used.
|
||||||
|
if (!preg_match('/\.css$/i',$cssfile)) print $themeparam;
|
||||||
|
print '"><!-- Added by module '.$modcss. '-->'."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// JQuery. Must be before other includes
|
// JQuery. Must be before other includes
|
||||||
$ext='.js';
|
$ext='.js';
|
||||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz';
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz';
|
||||||
@ -97,12 +114,14 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (! empty($hookmanager->resArray['options'])) {
|
if (! empty($hookmanager->resArray['options'])) {
|
||||||
foreach ($hookmanager->resArray['options'] as $option)
|
foreach ($hookmanager->resArray['options'] as $format => $option)
|
||||||
{
|
{
|
||||||
|
if ($format == 'div') {
|
||||||
echo '<!-- Option by hook -->';
|
echo '<!-- Option by hook -->';
|
||||||
echo $option;
|
echo $option;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ($captcha) { ?>
|
<?php if ($captcha) { ?>
|
||||||
|
|||||||
@ -34,6 +34,23 @@ print '<head>
|
|||||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
||||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
||||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||||
|
// CSS forced by modules (relative url starting with /)
|
||||||
|
if (isset($conf->modules_parts['css']))
|
||||||
|
{
|
||||||
|
$arraycss=(array) $conf->modules_parts['css'];
|
||||||
|
foreach($arraycss as $modcss => $filescss)
|
||||||
|
{
|
||||||
|
$filescss=(array) $filescss; // To be sure filecss is an array
|
||||||
|
foreach($filescss as $cssfile)
|
||||||
|
{
|
||||||
|
// cssfile is a relative path
|
||||||
|
print '<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1);
|
||||||
|
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used.
|
||||||
|
if (!preg_match('/\.css$/i',$cssfile)) print $themeparam;
|
||||||
|
print '"><!-- Added by module '.$modcss. '-->'."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// JQuery. Must be before other includes
|
// JQuery. Must be before other includes
|
||||||
$ext='.js';
|
$ext='.js';
|
||||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz';
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz';
|
||||||
@ -59,16 +76,21 @@ print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="parameterBox">
|
<div id="parameterBox">
|
||||||
<div id="logBox"><strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong><input type="text" <?php echo $disabled; ?> id="username" name="username" class="flat" size="15" maxlength="25" value="<?php echo $login; ?>" tabindex="1" /></div>
|
<div id="logBox">
|
||||||
|
<strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong>
|
||||||
|
<input type="text" <?php echo $disabled; ?> id="username" name="username" class="flat" size="15" maxlength="25" value="<?php echo $login; ?>" tabindex="1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (! empty($hookmanager->resArray['options'])) {
|
if (! empty($hookmanager->resArray['options'])) {
|
||||||
foreach ($hookmanager->resArray['options'] as $option)
|
foreach ($hookmanager->resArray['options'] as $format => $option)
|
||||||
{
|
{
|
||||||
|
if ($format == 'div') {
|
||||||
echo '<!-- Option by hook -->';
|
echo '<!-- Option by hook -->';
|
||||||
echo $option;
|
echo $option;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ($captcha) { ?>
|
<?php if ($captcha) { ?>
|
||||||
|
|||||||
@ -176,6 +176,9 @@ else
|
|||||||
$conf->css = "/theme/".$conf->theme."/style.css.php?lang=".$langs->defaultlang;
|
$conf->css = "/theme/".$conf->theme."/style.css.php?lang=".$langs->defaultlang;
|
||||||
$conf_css = DOL_URL_ROOT.$conf->css;
|
$conf_css = DOL_URL_ROOT.$conf->css;
|
||||||
|
|
||||||
|
$jquerytheme = 'smoothness';
|
||||||
|
if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
|
||||||
|
|
||||||
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/login_background.png'))
|
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/login_background.png'))
|
||||||
{
|
{
|
||||||
$login_background = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/login_background.png';
|
$login_background = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/login_background.png';
|
||||||
@ -205,11 +208,13 @@ elseif (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
|
|||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode($mysoc->logo);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode($mysoc->logo);
|
||||||
$width=128;
|
$width=128;
|
||||||
}elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'))
|
}
|
||||||
{
|
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'))
|
||||||
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png';
|
$urllogo=DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png';
|
||||||
}elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))
|
}
|
||||||
{
|
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))
|
||||||
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png';
|
$urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user