html_page and load_all_script can be called only once. Otherwise, there are problem with calendar.js
This commit is contained in:
parent
835d8f15c7
commit
a400513385
3 changed files with 14 additions and 4 deletions
|
|
@ -30,7 +30,9 @@ require_once('user_common.php');
|
|||
require_once('ac_common.php');
|
||||
require_once 'function_javascript.php';
|
||||
if (isset ($_POST["style_user"])){$_SESSION['g_theme']=$_POST['style_user'];}
|
||||
html_page_start();
|
||||
|
||||
html_page_start($_SESSION['g_theme']);
|
||||
|
||||
global $g_user, $cn;
|
||||
|
||||
// if gDossier is not set redirect to form to choose a folder
|
||||
|
|
@ -50,7 +52,6 @@ if ($g_user->check_dossier(dossier::id()) == 'P')
|
|||
exit();
|
||||
}
|
||||
|
||||
html_page_start($_SESSION['g_theme']);
|
||||
load_all_script();
|
||||
/* Check Browser version if < IE6 then unsupported */
|
||||
$browser = $_SERVER['HTTP_USER_AGENT'];
|
||||
|
|
|
|||
|
|
@ -245,12 +245,16 @@ function isDate($p_date)
|
|||
* \param p_theme default theme
|
||||
* \param $p_script
|
||||
* \param $p_script2 another js script
|
||||
*
|
||||
* Must be called only once
|
||||
* \return none
|
||||
*/
|
||||
|
||||
function html_page_start($p_theme="", $p_script="", $p_script2="")
|
||||
{
|
||||
// check not called twiced
|
||||
static $already_call=0;
|
||||
if ( $already_call==1)return;
|
||||
$already_call=1;
|
||||
|
||||
$cn = new Database();
|
||||
if ($p_theme != "")
|
||||
|
|
|
|||
|
|
@ -2708,7 +2708,7 @@ function unescapebycharacter($str)
|
|||
}
|
||||
/*!\brief When data are transfered thanks ajax in a xml document, the xml
|
||||
* can not contains some character, to escape those characters, we must use this
|
||||
* function
|
||||
* function
|
||||
*\param $p_xml the xml to escape
|
||||
*\return the xml string with the forbidden char escaped
|
||||
*\see ajax_card.js ajaxFid
|
||||
|
|
@ -2728,6 +2728,11 @@ function escape_xml($p_xml)
|
|||
*/
|
||||
function load_all_script()
|
||||
{
|
||||
// check not called twiced
|
||||
static $already_call=0;
|
||||
if ( $already_call==1)return;
|
||||
$already_call=1;
|
||||
|
||||
echo JS_INFOBULLE;
|
||||
echo js_include('prototype.js');
|
||||
echo js_include('scriptaculous.js');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue