phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: etemplate/inc class.boetemplate.inc.php,1.31,1.3


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: etemplate/inc class.boetemplate.inc.php,1.31,1.32 class.link_widget.inc.php,1.2,1.3 class.uietemplate.inc.php,1.45,1.46
Date: Thu, 17 Oct 2002 18:08:52 -0400

Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv3133

Modified Files:
        class.boetemplate.inc.php class.link_widget.inc.php 
        class.uietemplate.inc.php 
Log Message:
made more attributes loadable from the content-array


Index: class.boetemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.boetemplate.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** class.boetemplate.inc.php   14 Oct 2002 00:36:36 -0000      1.31
--- class.boetemplate.inc.php   17 Oct 2002 22:08:24 -0000      1.32
***************
*** 107,125 ****
                function expand_name($name,$c,$row,$c_='',$row_='',$cont='')
                {
!                       if (strstr($name,'$') === False)
                        {
!                               return $name;
                        }
!                       if (!$cont)
                        {
!                               $cont = array();
                        }
-                       $col = $this->num2chrs($c-1);   // $c-1 to get: 0:'@', 
1:'A', ...
-                       $col_ = $this->num2chrs($c_-1);
-                       $row_cont = $cont[$row];
-                       $col_row_cont = $cont[$col.$row];
- 
-                       eval('$name = "'.$name.'";');
- 
                        return $name;
                }
--- 107,127 ----
                function expand_name($name,$c,$row,$c_='',$row_='',$cont='')
                {
!                       if (strstr($name,'$') !== False)
                        {
!                               if (!$cont)
!                               {
!                                       $cont = array();
!                               }
!                               $col = $this->num2chrs($c-1);   // $c-1 to get: 
0:'@', 1:'A', ...
!                               $col_ = $this->num2chrs($c_-1);
!                               $row_cont = $cont[$row];
!                               $col_row_cont = $cont[$col.$row];
! 
!                               eval('$name = "'.$name.'";');
                        }
!                       if ($name[0] == '@')
                        {
!                               $name = $this->get_array($cont,substr($name,1));
                        }
                        return $name;
                }

Index: class.link_widget.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.link_widget.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.link_widget.inc.php   9 Oct 2002 11:50:46 -0000       1.2
--- class.link_widget.inc.php   17 Oct 2002 22:08:24 -0000      1.3
***************
*** 83,89 ****
                                        $value['title'] = 
$this->link->title($app,$id);
                                }
                                $extension_data = $value;
  
-                               $links = $this->link->get_links($app,$id);
                                if (!count($links))
                                {
--- 83,90 ----
                                        $value['title'] = 
$this->link->title($app,$id);
                                }
+                               $links = $this->link->get_links($app,$id);
+                               $value['anz_links'] = count($links);
                                $extension_data = $value;
  
                                if (!count($links))
                                {
***************
*** 98,101 ****
--- 99,103 ----
                                        $value[$row] = $link;
                                        $value[$row]['title'] = 
$this->link->title($link['app'],$link['id']);
+                                       $value[$row]['view']  = 
$this->link->view($link['app'],$link['id']);
                                }
                                break;
***************
*** 141,144 ****
--- 143,150 ----
                                                
$this->link->link($value['to_app'],$value['to_id'],$value['app'],$value['id'],$value['remark']);
                                                //echo 
"<p>link($value[to_app],$value[to_id],$value[app],$value[id],'$value[remark]')</p>\n";
+                                               if (isset($value['primary']) && 
!$value['anz_links'] )
+                                               {
+                                                       $value['primary'] = 
$value['app'].'/'.$value['id'];
+                                               }
                                        }
                                        // fall-trough

Index: class.uietemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.uietemplate.inc.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** class.uietemplate.inc.php   16 Oct 2002 00:19:36 -0000      1.45
--- class.uietemplate.inc.php   17 Oct 2002 22:08:24 -0000      1.46
***************
*** 150,154 ****
                        {
                                echo parse_navbar() . $html;
-                               $GLOBALS['phpgw']->common->phpgw_footer();
                        }
                        else
--- 150,153 ----
***************
*** 360,368 ****
                                        $row_data[".$col"] .= 
$this->html->formatOptions($cell['align'],'ALIGN');
                                        list(,$cl) = explode(',',$cell['span']);
!                                       $cl = isset($this->class_conf[$cl]) ? 
$this->class_conf[$cl] : $cl;
!                                       if (strstr($cl,'$') !== False)
!                                       {
!                                               $cl = 
$this->expand_name($cl,$c,$r,'','',$content);
!                                       }
                                        $row_data[".$col"] .= 
$this->html->formatOptions($cl,'CLASS');
                                }
--- 359,364 ----
                                        $row_data[".$col"] .= 
$this->html->formatOptions($cell['align'],'ALIGN');
                                        list(,$cl) = explode(',',$cell['span']);
!                                       $cl = 
$this->expand_name(isset($this->class_conf[$cl]) ? $this->class_conf[$cl] : $cl,
!                                               
$c,$r,$show_c,$show_row,$content);
                                        $row_data[".$col"] .= 
$this->html->formatOptions($cl,'CLASS');
                                }
***************
*** 419,423 ****
                        $value = $this->get_array($content,$name);
  
!                       if ($readonly = $cell['readonly'] || $readonlys[$name] 
|| $readonlys['__ALL__'])
                        {
                                $options .= ' READONLY';
--- 415,419 ----
                        $value = $this->get_array($content,$name);
  
!                       if ($readonly = $cell['readonly'] || @$readonlys[$name] 
|| $readonlys['__ALL__'])
                        {
                                $options .= ' READONLY';
***************
*** 442,449 ****
                        }
                        $label = 
$this->expand_name($cell['label'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
-                       if ($label[0] == '@')
-                       {
-                               $label = 
$this->get_array($content,substr($label,1));
-                       }
                        $help = $cell['help'];
                        if ($help[0] == '@')
--- 438,441 ----
***************
*** 543,547 ****
                                        break;
                                case 'radio':           // size: value if 
checked
!                                       if ($value == $cell['size'])
                                        {
                                                $options .= ' CHECKED';
--- 535,541 ----
                                        break;
                                case 'radio':           // size: value if 
checked
!                                       $set_val = 
$this->expand_name($cell['size'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
! 
!                                       if ($value == $set_val)
                                        {
                                                $options .= ' CHECKED';
***************
*** 549,557 ****
                                        if ($readonly)
                                        {
!                                               $html .= $value == 
$cell['size'] ? $this->html->bold('x') : '';
                                        }
                                        else
                                        {
!                                               $html .= 
$this->html->input($form_name,$cell['size'],'RADIO',$options);
                                                
$GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = $cell['type'];
                                        }
--- 543,551 ----
                                        if ($readonly)
                                        {
!                                               $html .= $value == $set_val ? 
$this->html->bold('x') : '';
                                        }
                                        else
                                        {
!                                               $html .= 
$this->html->input($form_name,$set_val,'RADIO',$options);
                                                
$GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = $cell['type'];
                                        }
***************
*** 728,731 ****
--- 722,729 ----
                                                                
$rows[$box_row]['.'.$box_col] = 
$this->html->formatOptions($cell[$n]['align'],'ALIGN');
                                                        }
+                                                       list(,$cl) = 
explode(',',$cell[$n]['span']);
+                                                       $cl = 
$this->expand_name(isset($this->class_conf[$cl]) ? $this->class_conf[$cl] : $cl,
+                                                               
$show_c,$show_row,$content['.c'],$content['.row'],$content);
+                                                       
$rows[$box_row]['.'.$box_col] .= $this->html->formatOptions($cl,'CLASS');
                                                }
                                        }
***************
*** 776,784 ****
                        if ($extra_link)
                        {
                                if ($extra_link[0] == '@')
                                {
                                        $extra_link = 
$this->get_array($content,substr($extra_link,1));
                                }
!                               return 
$this->html->a_href($html,$extra_link,'',$help != '' ? 
'TITLE="'.lang($help).'"' : '');
                        }
                        return $html;
--- 774,788 ----
                        if ($extra_link)
                        {
+                               $extra_link = 
$this->expand_name($extra_link,$show_c,$show_row,$content['.c'],$content['.row'],$content);
                                if ($extra_link[0] == '@')
                                {
                                        $extra_link = 
$this->get_array($content,substr($extra_link,1));
                                }
!                               if ($extra_link)
!                               {
!                                       $options = " 
onMouseOver=\"self.status='".addslashes(lang($help))."'; return true;\"";
!                                       $options .= " 
onMouseOut=\"self.status=''; return true;\"";
!                                       return 
$this->html->a_href($html,$extra_link,'',$help != '' ? $options : '');
!                               }
                        }
                        return $html;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]