diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index 1bab2b70f9a0972efafe94992acd805f6def0a4a..e0e8dbe422b0bf555c7fe25940a04bdf3b5aa0bf 100644 (file)
--- a/include/class_tabs.inc
+++ b/include/class_tabs.inc
var $disabled= "";
var $by_name= array();
var $by_object= array();
var $disabled= "";
var $by_name= array();
var $by_object= array();
+ var $SubDialog = false;
function tabs($config, $data, $dn)
{
function tabs($config, $data, $dn)
{
$display= $this->gen_tabs();
/* Show object */
$display= $this->gen_tabs();
/* Show object */
- $display.= "<table cellpadding=4 cellspacing=0 border=0 style=\"width:100%; background-color:#F0F0F0; border-style:solid; border-color:black; border-top-width:0px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px;\">\n";
+ $display.= "<table summary=\"\" cellpadding=4 cellspacing=0 border=0 style=\"width:100%; background-color:#F0F0F0; border-style:solid; border-color:black; border-top-width:0px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px;\">\n";
$display.= "<tr><td>\n";
$obj= $this->by_object[$this->current];
$display.= "<tr><td>\n";
$obj= $this->by_object[$this->current];
- $display.= $obj->execute ();
+ $display.= $obj->execute();
$this->by_object[$this->current]= $obj;
/* Footer for tabbed dialog */
$this->by_object[$this->current]= $obj;
/* Footer for tabbed dialog */
function gen_tabs()
{
$display= "<input type=\"hidden\" name=\"arg\" value=\"\">";
function gen_tabs()
{
$display= "<input type=\"hidden\" name=\"arg\" value=\"\">";
- $display.= "<table cellpadding=0 cellspacing=0 border=0 style=\"width:100%;\"><tr>";
+ $display.= "<table summary=\"\" cellpadding=0 cellspacing=0 border=0 style=\"width:100%;\"><tr>";
$index= 0;
$style= array("tab_left", "tab_active", "tab_near_active", "tab_right");
foreach ($this->by_name as $class => $name){
$index= 0;
$style= array("tab_left", "tab_active", "tab_near_active", "tab_right");
foreach ($this->by_name as $class => $name){
/* Paint tab */
$display.= "<td style=\"vertical-align:bottom; width:100px;\">";
/* Paint tab */
$display.= "<td style=\"vertical-align:bottom; width:100px;\">";
+
+ /* Shorten string if its too long for the tab headers*/
$title= _($name);
$title= _($name);
- if (mb_strlen($title) > 14){
- $title= mb_substr($title,0, 11, 'UTF-8')."...";
+ if (mb_strlen($title, 'UTF-8') > 14){
+ $title= mb_substr($title,0, 12, 'UTF-8')."...";
}
}
+
if ($_SESSION['js']==FALSE){
$display.= "<div class=\"$style[$index]\"><input type=\"submit\" name=\"$class\"".
" class=\"$style[$index]\" value=\"$title\"";
if ($_SESSION['js']==FALSE){
$display.= "<div class=\"$style[$index]\"><input type=\"submit\" name=\"$class\"".
" class=\"$style[$index]\" value=\"$title\"";
function delete()
{
function delete()
{
+ /* Check if all plugins will ACK for deletion */
+ foreach (array_reverse($this->by_object) as $key => $obj){
+ $reason= $obj->allow_remove();
+ if ($reason != ""){
+ print_red(sprintf(_("Delete process has been canceled by plugin '%s': %s"), $key, $reason));
+ return;
+ }
+ }
+
/* Delete for all plugins */
foreach (array_reverse($this->by_object) as $key => $obj){
$obj->remove_from_parent();
/* Delete for all plugins */
foreach (array_reverse($this->by_object) as $key => $obj){
$obj->remove_from_parent();
}
}
}
}
+
+ /* Save attributes posted by copy & paste dialog
+ */
+ function saveCopyDialog()
+ {
+ foreach ($this->by_object as $key => $obj){
+ if($obj->is_account){
+ $this->by_object[$key]->saveCopyDialog();
+ }
+ }
+ }
+
+
+ /* return copy & paste dialog
+ */
+ function getCopyDialog()
+ {
+ $ret = "";
+ $this->SubDialog = false;
+ foreach ($this->by_object as $key => $obj){
+ if($obj->is_account){
+ $tmp = $this->by_object[$key]->getCopyDialog();
+ if($tmp['status'] == "SubDialog"){
+ $this->SubDialog = true;
+ return($tmp['string']);
+ }else{
+ $ret .= $tmp['string'];
+ }
+ }
+ }
+ return($ret);
+ }
+
}
?>
}
?>