From: Janusz Dobrowolski Date: Thu, 27 Mar 2008 10:44:55 +0000 (+0000) Subject: Removed get_js_set_focus() and get_js_form_entry() X-Git-Tag: v2.4.2~19^2~2139 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=f63c58475b057c9f4a05894a6935ea351b6d7af3;p=fa-stable.git Removed get_js_set_focus() and get_js_form_entry() --- diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index 6c893e0f..3a47f128 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -553,65 +553,27 @@ function get_js_open_window($width, $height) return $js; } -function get_js_form_entry($edit_name, $sel_name, $next_name) -{ - global $comp_path; - $fpath = $comp_path.'/'.user_company().'/js_cache/form_entry.js'; - - if (!file_exists($fpath)) { - - - $js = "\n\n"; - cache_js_file($fpath, $js); - } - add_js_ufile($fpath); - - return ''; +$focus_on = array(); +/* + Setting focus on element $name in $form. + If $form<0 $name is element id. +*/ +function set_focus($name, $form_no=0) { + global $focus_on; + $focus_on['name'] = $name; + $focus_on['form'] = $form_no; } -function get_js_set_focus($name) -{ - $js = "\n\n"; - return $js; +function set_js_focus() { + global $focus_on; + $js = ''; + if (isset($focus_on['name'])) { + $js = ""; + } + return $js; } function get_js_png_fix()