X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fmain.inc;h=11746a288b386bc254d0ea2b6ab4fdd6b436480e;hb=5ac9ea61baac0cf298b07317051da51e781645b7;hp=6ac3fc14837a177c57974203b947a01f91f949d0;hpb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;p=fa-stable.git diff --git a/includes/main.inc b/includes/main.inc index 6ac3fc14..11746a28 100644 --- a/includes/main.inc +++ b/includes/main.inc @@ -23,6 +23,12 @@ include_once($path_to_root . "/includes/ui/ui_view.inc"); include_once($path_to_root . "/includes/ui/ui_controls.inc"); $page_nested = -1; +// static js files path +$js_path = $path_to_root.'/js/'; +// standard external js scripts included in all files +$js_static = array('JsHttpRequest.js', 'behaviour.js', 'utils.js', 'inserts.js'); +// additional js source included in header +$js_lib = $js_userlib = array(); function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $script_only=false, $css='') { @@ -64,9 +70,9 @@ function end_page($no_menu=false, $is_index=false, $final_screen=false, $type_no function cache_js_file($fpath, $text) { - global $go_debug; + global $SysPrefs; - if(!$go_debug) $text = js_compress($text); + if (!$SysPrefs->go_debug) $text = js_compress($text); $file = force_open($fpath); if (!$file) return false; @@ -117,7 +123,7 @@ function add_js_ufile($filename) function add_js_source($text) { global $js_lib; - + $search = array_search($text, $js_lib); if ($search === false || $search === null) // php>4.2.0 returns null $js_lib[] = $text;