Asynchronous customer/supplier/item selection now use popup window.
[fa-stable.git] / includes / page / footer.inc
index 61c731186c39b3e407ec06a7ffbb106fcf7449b4..da53a925c1e93e63cdafa7b45aa078d10142f5d0 100644 (file)
@@ -11,7 +11,7 @@
 ***********************************************************************/
 function page_footer($no_menu=false, $is_index=false)
 {
-       global $path_to_root;
+       global $path_to_root, $js_lib, $Validate, $Editors;
 
        if (in_ajax())
                return;// just for speed up
@@ -21,7 +21,19 @@ function page_footer($no_menu=false, $is_index=false)
        include_once($path_to_root."/themes/".user_theme()."/renderer.php");
        $rend = new renderer();
        $rend->menu_footer($no_menu, $is_index);
-       echo "<script>_focus = '".get_post('_focus')."';</script>";
+
+       echo "<script>
+               _focus = '" . get_post('_focus') . "';
+               _validate = " . JsHttpRequest::php2js($Validate).";
+               var editors = ".JsHttpRequest::php2js($Editors).";
+       </script>";
+
+       add_user_js_data();
+       echo "\n<script type=\"text/javascript\"><!--\n";
+
+       foreach($js_lib as $text)
+               echo $text;
+       echo "\n--></script>\n";
     echo "</body></html>\n";
 }