X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_view.inc;h=d76dd824a34ef138c096182a6d26a0f28df5a85b;hb=b0a033a1a2db727664018c496730a8be240879ec;hp=f34a443b47a45205922ffd9aa7d4acbba3fec8bf;hpb=7a50c189ea995d5fe6785feb7710c00396065d2b;p=fa-stable.git
diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc
index f34a443b..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 '';
}
-function get_js_allocate() {
- return "";
+ amount = get_amount('amount'+doc);
+ 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)
@@ -1113,17 +1182,4 @@ if (!function_exists('_vd'))
}
}
-/* ************************************** Backward compatible */
-function do_clone($object)
-{
- if (version_compare(phpversion(), '5.0') < 0)
- {
- return $object;
- }
- else
- {
- return @clone($object);
- }
-}
-
?>
\ No newline at end of file