X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_view.inc;h=65a9f39341ab8cfcb491ee0aa7b9857d678ff006;hb=c935a4090e3f152dd5549217d69b5b5036197024;hp=ee24d8edd9a5c0b297529330e05cb186b9d7e19d;hpb=bc426821d8ae6319bd9394ac275bb700e6394fc3;p=fa-stable.git diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index ee24d8ed..65a9f393 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -275,7 +275,7 @@ function get_trans_view_str($type, $trans_no, $label="") function exchange_rate_display($from_currency, $to_currency, $date_, $buttons=true) { global $Ajax; - + $hint = _('Get daily ECB exchange rate and save for later use in invoicing process'); if ($from_currency != $to_currency) { if ($buttons && isset($_POST['get_rate'])) @@ -298,7 +298,7 @@ function exchange_rate_display($from_currency, $to_currency, $date_, $buttons=tr $rate = get_exchange_rate_from_to($to_currency, $from_currency, $date_); $rate = number_format2($rate, user_exrate_dec()); label_row(_("Exchange Rate:"),"1 " . $from_currency . " = " . $rate . " " . $to_currency . - ($buttons?" " . submit('get_rate',_("Get"), false, true):"")); + ($buttons?" " . submit('get_rate',_("Get"), false, $hint, true):"")); if($buttons) { $Ajax->addUpdate('get_rate','_ex_rate', $rate); } @@ -536,7 +536,7 @@ function get_js_open_window($width, $height) . "{\n" . " var left = (screen.width - $width) / 2;\n" . " var top = (screen.height - $height) / 2;\n" - . " window.open(url, title, 'width=$width,height=$height,left='+left+',top='+top+',screenX='+left+',screenY='+top+',status=no,scrollbars=yes');\n" + . " return window.open(url, title, 'width=$width,height=$height,left='+left+',top='+top+',screenX='+left+',screenY='+top+',status=no,scrollbars=yes');\n" . "}\n" . "-->\n" . "\n"; @@ -548,6 +548,8 @@ function get_js_open_window($width, $height) If $form<0 $name is element id. */ function set_focus($name, $form_no=0) { + global $Ajax; + $Ajax->addFocus(true, $name); $_POST['_focus'] = $name; } // @@ -555,7 +557,7 @@ function set_focus($name, $form_no=0) { // function default_focus($name, $form_no=0) { if (!isset($_POST['_focus'])) { - $_POST['_focus'] = $name; + set_focus($name); } } @@ -592,15 +594,16 @@ function get_js_date_picker() $fpath = $comp_path.'/'.user_company().'/js_cache/'.'date_picker.js'; $js = "