X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_view.inc;h=d76dd824a34ef138c096182a6d26a0f28df5a85b;hb=b0a033a1a2db727664018c496730a8be240879ec;hp=84eb6fb3fb2569e1fc5e931a57acc7dbd1b521b2;hpb=067ad81914f0b0c7726473f9425644cd9600c250;p=fa-stable.git
diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc
index 84eb6fb3..d76dd824 100644
--- a/includes/ui/ui_view.inc
+++ b/includes/ui/ui_view.inc
@@ -553,57 +553,46 @@ function get_js_open_window($width, $height)
return $js;
}
-function get_js_form_entry($edit_name, $sel_name, $next_name)
-{
- $js = "\n\n";
- return $js;
+//$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 = "
-";
- return $js;
+document.write(\"\");";
+
+ cache_js_file($fpath, $js);
+ }
+ add_js_ufile($fpath);
+
+ return '';
}
+
//
// Javascript conversions to/from user numeric format.
//
-function get_js_user_num() {
+function add_js_user_num() {
+
+ global $comp_path;
+ $fpath = $comp_path.'/'.user_company().'/js_cache/'.'user_num.js';
+
+ if (!file_exists($fpath)) {
+
global $thoseps, $decseps;
$ts = $thoseps[user_tho_sep()];
$ds = $decseps[user_dec_sep()];
- $js =
- "";
+ ";
- return $js;
+ cache_js_file($fpath, $js);
+ }
+ add_js_ufile($fpath);
}
-function get_js_allocate() {
- return get_js_user_num() .
- "";
+ left = get_amount('left_to_allocate', 1);
+ total = get_amount('total_allocated', 1);
+ price_format('left_to_allocate',amount+left, ".user_price_dec().", 1);
+ price_format('amount'+doc, 0, ".user_price_dec().");
+ price_format('total_allocated', total-amount, ".user_price_dec().", 1);
+ }";
+
+ cache_js_file($fpath, $js);
+ }
+ add_js_ufile($fpath);
+ add_js_user_num();
}
function alert($msg)