X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_controls.inc;h=217be194c3642061fa15fc7b5085deac3fda3106;hb=eac78d6c63115a15ca659b0ef27ed76894777814;hp=ad0c8a2468e65e787d7c96bfdbe64a615abdcb54;hpb=f6e1b649fc75750383b17c2ced6a5c1d6f19fe2e;p=fa-stable.git
diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc
index ad0c8a24..217be194 100644
--- a/includes/ui/ui_controls.inc
+++ b/includes/ui/ui_controls.inc
@@ -12,13 +12,13 @@ function start_form($multi=false, $sid=false, $action="", $name="")
{
if (strpos($action, "?"))
$action .= "&" . SID;
- else
+ else
$action .= "?" . SID;
- }
+ }
if ($multi)
- echo "
\n";
}
@@ -38,7 +38,7 @@ function start_table($extra="", $padding='2', $spacing='0')
if ($extra != "")
echo " $extra";
echo " cellpadding=$padding cellspacing=$spacing>\n";
-}
+}
function end_table($breaks=0)
{
@@ -52,7 +52,7 @@ function meta_forward($forward_to, $params="")
global $Ajax;
echo "\n";
echo "
" . _("You should automatically be forwarded.");
- echo " " . _("If this does not happen") . " " . "" . _("click here") . " " . _("to continue") . ".
\n";
+ echo " " . _("If this does not happen") . " " . "" . _("click here") . " " . _("to continue") . ".
\n";
$Ajax->redirect($forward_to.'?'.$params);
exit;
}
@@ -63,10 +63,11 @@ function hyperlink_back($center=true)
{
if ($center)
echo "";
- echo ""._("Back")."\n";
+ //echo ""._("Back")."\n";
+ echo ""._("Back")."
\n";
if ($center)
echo "";
- echo "
";
+ echo "
";
}
function hyperlink_no_params($target, $label, $center=true)
@@ -99,7 +100,7 @@ function hyperlink_params($target, $label, $params, $center=true)
function hyperlink_params_td($target, $label, $params)
{
echo "";
- hyperlink_params($target, $label, $params);
+ hyperlink_params($target, $label, $params, false);
echo " | \n";
}
@@ -129,56 +130,59 @@ function alt_table_row_color(&$k)
{
echo "\n";
$k = 0;
- }
- else
+ }
+ else
{
echo "
\n";
$k++;
}
}
-function table_section_title($msg)
+function table_section_title($msg)
{
echo "
|
\n";
}
-function table_header($labels)
+function table_header($labels)
{
start_row();
foreach ($labels as $label)
labelheader_cell($label);
- end_row();
+ end_row();
}
-function edit_link_cell($param)
+function edit_link_cell($param, $title=false)
{
- label_cell("" . _("Edit") . "", "nowrap");
+ label_cell("" . _("Edit") . "", "nowrap");
}
-function delete_link_cell($param)
+function delete_link_cell($param, $title=false)
{
- label_cell("" . _("Delete") . "", "nowrap");
+ label_cell("" . _("Delete") . "", "nowrap");
}
-function edit_button_cell($name, $value)
+function edit_button_cell($name, $value, $title=false)
{
- label_cell("\n");
+ label_cell("\n");
}
//-----------------------------------------------------------------------------------
-function start_row($param="")
+function start_row($param="")
{
if ($param != "")
echo "
\n";
- else
+ else
echo "
\n";
}
-function end_row()
+function end_row()
{
echo "
\n";
-}
+}
function br($num=1)
{
@@ -188,23 +192,30 @@ function br($num=1)
$ajax_divs = array();
-function div_start($id='')
+function div_start($id='', $trigger=null, $non_ajax=false)
{
global $ajax_divs;
- array_push($ajax_divs, $id);
- echo "";
- ob_start();
+ if ($non_ajax) { // div for non-ajax elements
+ array_push($ajax_divs, array($id, null));
+ echo "
";
+ } else { // ajax ready div
+ array_push($ajax_divs, array($id, $trigger===null ? $id : $trigger));
+ echo "
";
+ ob_start();
+ }
}
function div_end()
{
global $ajax_divs, $Ajax;
- if (count($ajax_divs)) {
- $id = array_pop($ajax_divs);
- $Ajax->addUpdate($id, $id, ob_get_flush());
- echo "
";
+ if (count($ajax_divs))
+ {
+ $div = array_pop($ajax_divs);
+ if ($div[1] !== null)
+ $Ajax->addUpdate($div[1], $div[0], ob_get_flush());
+ echo "
";
}
}
?>
\ No newline at end of file