From d415c4b31baaa6379a0c360a93a1f78f983df4e7 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 16 Mar 2008 17:33:54 +0000 Subject: [PATCH] Added including javascript source from collecting arrays; conditional display for ajax --- includes/page/footer.inc | 4 +++- includes/page/header.inc | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/includes/page/footer.inc b/includes/page/footer.inc index bb2759c6..8f3db720 100644 --- a/includes/page/footer.inc +++ b/includes/page/footer.inc @@ -4,9 +4,11 @@ include_once($path_to_root . "/includes/date_functions.inc"); function page_footer($no_menu=false, $is_index=false) { - global $local_path_to_root, $version, $allow_demo_mode; + global $version, $allow_demo_mode; global $app_title, $power_url, $power_by; + if (isset($_GET['ajax'])) return; + if (function_exists('hyperlink_back')) hyperlink_back(); if ($no_menu == false) diff --git a/includes/page/header.inc b/includes/page/header.inc index 12b99eba..d71f39fe 100644 --- a/includes/page/header.inc +++ b/includes/page/header.inc @@ -31,7 +31,11 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="" { // titles and screen header global $db_connections, $path_to_root, $def_app, $applications, - $help_base_url, $help_page_url, $use_popup_windows; + $help_base_url, $help_page_url, $use_popup_windows, + $js_lib, $js_static, $js_path; + + if (isset($_GET['ajax'])) return; + $theme = user_theme(); $local_path_to_root = $path_to_root; @@ -44,6 +48,16 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="" $js = get_js_open_window(900, 500); } + // javascript includes collect + add_js_source($js); + $js =''; + foreach($js_static as $jsfile) { + $js .= ''; + } + foreach($js_lib as $text) { + $js .= $text; + } if (!isset($no_menu)) { $no_menu = false; @@ -74,6 +88,8 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="" echo ""; else echo ""; + echo "\n"; echo "\n"; echo "\n"; echo "
\n"; -- 2.30.2