X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_view.inc;h=5925579be558ed33433bbbf9d50e31d91c864972;hb=7d9150f4f6ba547f19c789abb7a506bbd4c2bdf4;hp=84eb6fb3fb2569e1fc5e931a57acc7dbd1b521b2;hpb=067ad81914f0b0c7726473f9425644cd9600c250;p=fa-stable.git
diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc
index 84eb6fb3..5925579b 100644
--- a/includes/ui/ui_view.inc
+++ b/includes/ui/ui_view.inc
@@ -1,6 +1,7 @@
" . $rate . " " . $to_currency );
+ $Ajax->addUpdate('_ex_rate','_ex_rate', $rate);
}
}
@@ -312,7 +322,7 @@ function is_voided_display($type, $id, $label)
echo "
$label ";
echo "" . _("Date Voided:") . " " . sql2date($void_entry["date_"]) . " ";
if (strlen($void_entry["memo_"]) > 0)
- echo "" . _("Memo:") . " " . $void_entry["memo_"] . " ";
+ echo "" . _("Memo:") . " " . $void_entry["memo_"] . " ";
echo " |
";
end_table(1);
@@ -453,7 +463,6 @@ function display_edit_tax_items($taxes, $columns, $tax_included, $leftspan=0)
function display_footer_exit()
{
- global $path_to_root;
br(2);
end_page();
exit;
@@ -522,22 +531,6 @@ function display_allocations_from($person_type, $person_id, $type, $type_no, $to
}
}
-function get_js_go_back()
-{
- $js = "\n\n";
- return $js;
-}
-
function get_js_open_window($width, $height)
{
$js = "\n\n";
return $js;
}
-function get_js_form_entry($edit_name, $sel_name, $next_name)
-{
- $js = "\n\n";
- return $js;
+/*
+ Setting focus on element $name in $form.
+ If $form<0 $name is element id.
+*/
+function set_focus($name, $form_no=0) {
+ global $Ajax;
+ $Ajax->addFocus(true, $name);
+ $_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) {
+ if (!isset($_POST['_focus'])) {
+ set_focus($name);
+ }
}
function get_js_png_fix()
@@ -633,29 +593,20 @@ function get_js_png_fix()
function get_js_date_picker()
{
- global $dateseps, $date_system;
-
- $how = user_date_format(); // 0 = us/ca, 1 = eu, au, nz, 2 = jp, sw
- $sep = $dateseps[user_date_sep()]; // date separator
- $wstart = (($date_system == 1 || $date_system == 2) ? 6 : ($how == 0 ? 0 : 1)); // weekstart (sun = 0, mon = 1)
- $months = array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
- $wdays = array(_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa"));
- $back = _("Back");
- if ($date_system == 1)
- list($cyear, $cmon, $cday) = gregorian_to_jalali(date("Y"), date("n"), date("j"));
- else if ($date_system == 2)
- list($cyear, $cmon, $cday) = gregorian_to_islamic(date("Y"), date("n"), date("j"));
+ global $comp_path, $go_debug;
+ $fpath = $comp_path.'/'.user_company().'/js_cache/'.'date_picker.js';
$js = "
";
- $js .= "
-";
- return $js;
-}
-//
-// Javascript conversions to/from user numeric format.
-//
-function get_js_user_num() {
- global $thoseps, $decseps;
- $ts = $thoseps[user_tho_sep()];
- $ds = $decseps[user_dec_sep()];
-
- $js =
- "";
+document.write(\"\");";
- return $js;
-}
+ cache_js_file($fpath, $js);
+ }
+ add_js_ufile($fpath);
-function get_js_allocate() {
- return get_js_user_num() .
- "";
+ return '';
}
function alert($msg)