X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_controls.inc;h=8546255bf6b4f192859a3dde428e6a0b6fd143ba;hb=67d97bfd7398b932698e254d937f905943412561;hp=7da7e2bcca61c61d98732a8b83c6dd3f79663186;hpb=4657251eed9910c5669c859a54051dc54143aa54;p=fa-stable.git diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index 7da7e2bc..8546255b 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -1,13 +1,13 @@ . + See the License here . ***********************************************************************/ //--------------------------------------------------------------------------------- @@ -56,9 +56,10 @@ function end_table($breaks=0) br($breaks); } -function start_outer_table($extra="", $padding='2', $spacing='0') +function start_outer_table($extra="", $padding='2', $spacing='0', $br=false) { - br(); + if ($br) + br(); start_table($extra, $padding, $spacing); echo "\n"; // outer table } @@ -207,11 +208,11 @@ function table_section_title($msg, $colspan=2) echo "$msg\n"; } -function table_header($labels) +function table_header($labels, $params='') { start_row(); foreach ($labels as $label) - labelheader_cell($label); + labelheader_cell($label, $params); end_row(); } //----------------------------------------------------------------------------------- @@ -337,5 +338,33 @@ function context_reset() if (!isset($_SESSION['Context'])) { context_reset(); } +/* + Redirector for selector F4 calls. + $sel_editors is array of selname=>editor_page +*/ +function editor_redirect($sel_editors, $save_fun='') { + foreach ($sel_editors as $selname=>$editor) + if (isset($_POST['_'.$selname.'_editor'])) { + if (function_exists($save_fun)) + $save_fun(); + unset($_POST['_'.$selname.'_editor']); + context_call($editor, array_keys($_POST)); + } +} +/* + Return procedure for selector F4 calls +*/ +function editor_return($vars, $restore_fun='') { + if (function_exists($restore_fun)) + $restore_fun(); + + if ($ret = context_restore()) { + foreach ($vars as $postname=>$retname) + if (isset($ret[$retname])) { + $_POST[$postname] = $ret[$retname]; + set_focus($postname); + } + } +} ?> \ No newline at end of file