two problems fixed:

- tab-widget was not always submitting AND restoreing the selected tab
- now you can use the short, relative name to select a tab too
This commit is contained in:
Ralf Becker 2005-05-25 14:10:27 +00:00
parent dc7cd8cae1
commit e435c63ad7

View File

@ -92,6 +92,10 @@
$tab_widget = new etemplate('etemplate.tab_widget');
$tab_widget->no_onclick = true;
if ($value && !strstr($value,'.'))
{
$value = $tmpl->name . '.' . $value;
}
foreach($names as $k => $name)
{
if (!strstr($name,'.'))
@ -107,6 +111,8 @@
{
$value = $selected_tab = $names[0];
}
$extension_data = $value; // remember the active tab in the extension_data
foreach($names as $k => $name)
{
if (!strstr($name,'.'))
@ -207,6 +213,11 @@
{
$value = $value_in;
}
// if value not set (other button pressed), set the value we remembered in the extension_data
if (!$value)
{
$value = $extension_data;
}
return True;
}
}