X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_view.inc;h=d76dd824a34ef138c096182a6d26a0f28df5a85b;hb=7792e42d75607b7e2dbaf73c318b8b7d9367dd17;hp=6c893e0f7f12fa9f2bf98f2d6629061393203e30;hpb=be2f084444559f98377583ea35807a4c672122c6;p=fa-stable.git diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index 6c893e0f..d76dd824 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -553,67 +553,46 @@ 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; + $_POST['_focus'] = $name; } - -function get_js_set_focus($name) -{ - $js = "\n\n"; - return $js; +// +// Set default focus on first field $name if not set yet +// +function default_focus($name, $form_no=0) { +// global $focus_on; +// if (!isset($focus_on['name']) && (!isset($_POST['_focus']) || $_POST['_focus']=='') ) { +//echo "

$name

"; +// $focus_on['name'] = $name; +// $focus_on['form'] = $form_no; +// } + if (!isset($_POST['_focus'])) { + $_POST['_focus'] = $name; + } } - +/* +function set_js_focus() { + global $focus_on; + $js = ''; + +// if (isset($focus_on['name'])) { + + $js = ""; +// } + return $js; +} +*/ function get_js_png_fix() { $js = "