[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: etemplate/inc class.link_widget.inc.php,1.6,1.7
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: etemplate/inc class.link_widget.inc.php,1.6,1.7 class.nextmatch_widget.inc.php,1.13,1.14 class.uietemplate.inc.php,1.59,1.60 |
Date: |
Sun, 29 Jun 2003 12:59:16 -0400 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv30116
Modified Files:
class.link_widget.inc.php class.nextmatch_widget.inc.php
class.uietemplate.inc.php
Log Message:
nextmatch_widget:
- 2 header-templates left and right from the range-display
- optional nextmatch-line with arrows, search, cats, ... after the rows
link_widget:
- new sub-type link-string
Updateted the documenations and lang-files.
Index: class.link_widget.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.link_widget.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.link_widget.inc.php 22 Feb 2003 12:29:04 -0000 1.6
--- class.link_widget.inc.php 29 Jun 2003 16:59:14 -0000 1.7
***************
*** 16,23 ****
@class link_widget
@author ralfbecker
! @abstract link-to: widget that enable you to make a link to an other
entry of a link-aware app
! @abstract link-list: widget that shows the links to an entry and a
Unlink Button for each entry
@discussion This widget is independent of the UI as it only uses
etemplate-widgets and has therefor no
! @discussion render-function.
*/
class link_widget
--- 16,24 ----
@class link_widget
@author ralfbecker
! @abstract link-to: Widget to create links to an other entries of
link-aware apps
! @abstract link-list: Widget to shows the links to an entry and a Unlink
Button for each link
! @abstract link-string: comma-separated list of link-titles with a link
to its view method, value is like get_links()
@discussion This widget is independent of the UI as it only uses
etemplate-widgets and has therefor no
! render-function.
*/
class link_widget
***************
*** 28,33 ****
);
var $human_name = array( // this are the names for the
editor
! 'link-to' => 'LinkTo',
! 'link-list' => 'LinkList'
);
var $debug = False;
--- 29,35 ----
);
var $human_name = array( // this are the names for the
editor
! 'link-to' => 'LinkTo',
! 'link-list' => 'LinkList',
! 'link-string' => 'LinkString'
);
var $debug = False;
***************
*** 40,43 ****
--- 42,63 ----
function
pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
{
+ if ($cell['type'] == 'link-string')
+ {
+ $str = '';
+ if (is_array($value))
+ {
+ foreach ($value as $link)
+ {
+ $str .= ($str !== '' ? ', ' :
'') . $tmpl->html->a_href(
+
htmlentities($this->link->title($link['app'],$link['id'])),
+
$this->link->view($link['app'],$link['id'],$link));
+ }
+ }
+ $cell['type'] = 'html';
+ $cell['readonly'] = True; // is allways
readonly
+ $value = $str;
+
+ return True;
+ }
if (!is_array($value))
{
Index: class.nextmatch_widget.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.nextmatch_widget.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.nextmatch_widget.inc.php 16 Oct 2002 16:41:17 -0000 1.13
--- class.nextmatch_widget.inc.php 29 Jun 2003 16:59:14 -0000 1.14
***************
*** 71,77 ****
($value['no_filter2'] || !$value['filter2'] ||
$value['filter2'] == 'none'))
{
// disable whole nextmatch line if no scrolling
necessary
! $cell['size'] = $cell['name'].'[rows]';
! $cell['obj'] = &$value['template'];
! $cell['name'] = $value['template']->name;
}
else
--- 71,87 ----
($value['no_filter2'] || !$value['filter2'] ||
$value['filter2'] == 'none'))
{
// disable whole nextmatch line if no scrolling
necessary
! if ($value['header_left'] ||
$value['header_right'])
! {
! $nextmatch = new
etemplate('etemplate.nextmatch_widget.header_only');
! $cell['size'] = $cell['name'];
! $cell['obj'] = &$nextmatch;
! $cell['name'] = $nextmatch->name;
! }
! else
! {
! $cell['size'] = $cell['name'].'[rows]';
! $cell['obj'] = &$value['template'];
! $cell['name'] =
$value['template']->name;
! }
}
else
***************
*** 108,111 ****
--- 118,123 ----
// save values in persistent extension_data to be able
use it in post_process
$extension_data = $value;
+
+ $value['bottom'] = $value; // copy the values for
the bottom-bar
return False; // NO extra Label
***************
*** 121,124 ****
--- 133,156 ----
$value['start'] = $old_value['start']; // need to be
set, to be reported back
+ if (is_array($value['bottom'])) // we
have a second bottom-bar
+ {
+ $inputs =
array('search','cat_id','filter','filter2');
+ foreach($inputs as $name)
+ {
+ if (isset($value['bottom'][$name]) &&
$value['bottom'][$name] != $old_value[$name])
+ {
+ $value[$name] =
$value['bottom'][$name];
+ }
+ }
+ $buttons =
array('start_search','first','left','right','last');
+ foreach($buttons as $name)
+ {
+ if (isset($value['bottom'][$name]) &&
$value['bottom'][$name])
+ {
+ $value[$name] =
$value['bottom'][$name];
+ }
+ }
+ unset($value['bottom']);
+ }
if ($value['start_search'] ||
isset($value['cat_id']) && $value['cat_id'] !=
$old_value['cat_id'] ||
Index: class.uietemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.uietemplate.inc.php,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -r1.59 -r1.60
*** class.uietemplate.inc.php 26 Jun 2003 19:16:12 -0000 1.59
--- class.uietemplate.inc.php 29 Jun 2003 16:59:14 -0000 1.60
***************
*** 501,506 ****
--- 501,512 ----
$extra_label =
$this->extensionPreProcess($ext_type,$form_name,$value,$cell,$readonlys[$name]);
+ $readonly = $readonly || $cell['readonly'];
// might be set be extension
$this->set_array($content,$name,$value);
}
+ $cell_options = $cell['size'];
+ if ($cell_options[0] == '@')
+ {
+ $cell_options =
$this->get_array($content,substr($cell_options,1));
+ }
$label =
$this->expand_name($cell['label'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
$help = $cell['help'];
***************
*** 536,540 ****
if (is_array($value))
break;
! list($style,$extra_link) =
explode(',',$cell['size']);
$value = strlen($value) > 1 &&
!$cell['no_lang'] ? lang($value) : $value;
$value = nl2br(htmlentities($value));
--- 542,546 ----
if (is_array($value))
break;
! list($style,$extra_link) =
explode(',',$cell_options);
$value = strlen($value) > 1 &&
!$cell['no_lang'] ? lang($value) : $value;
$value = nl2br(htmlentities($value));
***************
*** 544,556 ****
break;
case 'html':
! $extra_link = $cell['size'];
$html .= $value;
break;
case 'int': // size:
[min][,[max][,len]]
case 'float':
! list($min,$max,$cell['size']) =
explode(',',$cell['size']);
! if ($cell['size'] == '')
{
! $cell['size'] = $cell['type']
== 'int' ? 5 : 8;
}
// fall-through
--- 550,562 ----
break;
case 'html':
! $extra_link = $cell_options;
$html .= $value;
break;
case 'int': // size:
[min][,[max][,len]]
case 'float':
! list($min,$max,$cell_options) =
explode(',',$cell_options);
! if ($cell_options == '')
{
! $cell_options = $cell['type']
== 'int' ? 5 : 8;
}
// fall-through
***************
*** 563,567 ****
{
$html .=
$this->html->input($form_name,$value,'',
!
$options.$this->html->formatOptions($cell['size'],'SIZE,MAXLENGTH'));
$GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = $cell['type'];
}
--- 569,573 ----
{
$html .=
$this->html->input($form_name,$value,'',
!
$options.$this->html->formatOptions($cell_options,'SIZE,MAXLENGTH'));
$GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = $cell['type'];
}
***************
*** 569,580 ****
case 'textarea': // Multiline Text
Input, size: [rows][,cols]
$html .=
$this->html->textarea($form_name,$value,
!
$options.$this->html->formatOptions($cell['size'],'ROWS,COLS'));
if (!$readonly)
$GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = $cell['type'];
break;
case 'checkbox':
! if (!empty($cell['size']))
{
!
list($true_val,$false_val,$ro_true,$ro_false) = explode(',',$cell['size']);
$value = $value == $true_val;
}
--- 575,586 ----
case 'textarea': // Multiline Text
Input, size: [rows][,cols]
$html .=
$this->html->textarea($form_name,$value,
!
$options.$this->html->formatOptions($cell_options,'ROWS,COLS'));
if (!$readonly)
$GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = $cell['type'];
break;
case 'checkbox':
! if (!empty($cell_options))
{
!
list($true_val,$false_val,$ro_true,$ro_false) = explode(',',$cell_options);
$value = $value == $true_val;
}
***************
*** 597,606 ****
$GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = array(
'type' => $cell['type'],
! 'values' =>
$cell['size']
);
}
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)
--- 603,612 ----
$GLOBALS['phpgw_info']['etemplate']['to_process'][$form_name] = array(
'type' => $cell['type'],
! 'values' =>
$cell_options
);
}
break;
case 'radio': // size: value if
checked
! $set_val =
$this->expand_name($cell_options,$show_c,$show_row,$content['.c'],$content['.row'],$content);
if ($value == $set_val)
***************
*** 636,640 ****
else
{
! list($img,$ro_img) =
explode(',',$cell['size']);
if (!empty($img))
{
--- 642,646 ----
else
{
! list($img,$ro_img) =
explode(',',$cell_options);
if (!empty($img))
{
***************
*** 650,654 ****
break;
case 'hrule':
! $html .= $this->html->hr($cell['size']);
break;
case 'template': // size: index in
content-array (if not full content is past further on)
--- 656,660 ----
break;
case 'hrule':
! $html .= $this->html->hr($cell_options);
break;
case 'template': // size: index in
content-array (if not full content is past further on)
***************
*** 681,685 ****
echo
"<p>show_cell::template(tpl=$this->name,name=$cell[name]): $obj_read</p>\n";
}
! if
($this->autorepeat_idx($cell,$show_c,$show_row,$idx,$idx_cname) ||
$cell['size'] != '')
{
if ($span == '' &&
isset($content[$idx]['span']))
--- 687,691 ----
echo
"<p>show_cell::template(tpl=$this->name,name=$cell[name]): $obj_read</p>\n";
}
! if
($this->autorepeat_idx($cell,$show_c,$show_row,$idx,$idx_cname) ||
$cell_options != '')
{
if ($span == '' &&
isset($content[$idx]['span']))
***************
*** 707,711 ****
case 'select': // size:[linesOnMultiselect]
$sels = array();
! list($multiple) =
explode(',',$cell['size']);
if (!empty($multiple) && 0+$multiple <=
0)
{
--- 713,717 ----
case 'select': // size:[linesOnMultiselect]
$sels = array();
! list($multiple) =
explode(',',$cell_options);
if (!empty($multiple) && 0+$multiple <=
0)
{
***************
*** 761,765 ****
$image,strlen($label) > 1 &&
!$cell['no_lang'] ? lang($label) : $label,'BORDER="0"');
$html .= $image;
! $extra_link = $cell['size'];
$extra_label = False;
break;
--- 767,771 ----
$image,strlen($label) > 1 &&
!$cell['no_lang'] ? lang($label) : $label,'BORDER="0"');
$html .= $image;
! $extra_link = $cell_options;
$extra_label = False;
break;
***************
*** 777,781 ****
$box_col = 'A';
$box_anz = 0;
! for ($n = 1; $n <= $cell['size']; ++$n)
{
$h =
$this->show_cell($cell[$n],$content,$sel_options,$readonlys,$cname,$show_c,$show_row,$nul);
--- 783,787 ----
$box_col = 'A';
$box_anz = 0;
! for ($n = 1; $n <= $cell_options; ++$n)
{
$h =
$this->show_cell($cell[$n],$content,$sel_options,$readonlys,$cname,$show_c,$show_row,$nul);
***************
*** 805,816 ****
{
$html = "\n\n<!-- BEGIN
$cell[type] -->\n\n".
!
$this->html->table($rows,$this->html->formatOptions($cell['size'],',CELLPADDING,CELLSPACING').
! ($cell['align'] ? '
WIDTH="100%"' : '')). // alignment only works if table has full width
"\n\n<!-- END
$cell[type] -->\n\n";
}
break;
case 'deck':
! for ($n = 1; $n <= $cell['size'] &&
(empty($value) || $value != $cell[$n]['name']); ++$n) ;
! if ($n > $cell['size'])
{
$value = $cell[1]['name'];
--- 811,822 ----
{
$html = "\n\n<!-- BEGIN
$cell[type] -->\n\n".
!
$this->html->table($rows,$this->html->formatOptions($cell_options,',CELLPADDING,CELLSPACING').
! ($cell['align'] &&
$type == 'vbox' ? ' WIDTH="100%"' : '')). // alignment only works if table
has full width
"\n\n<!-- END
$cell[type] -->\n\n";
}
break;
case 'deck':
! for ($n = 1; $n <= $cell_options &&
(empty($value) || $value != $cell[$n]['name']); ++$n) ;
! if ($n > $cell_options)
{
$value = $cell[1]['name'];
***************
*** 824,831 ****
$s_height = "height:
$s_height".(substr($s_height,-1) != '%' ? 'px' : '').';';
}
! for ($n = 1; $n <= $cell['size']; ++$n)
{
$h =
$this->show_cell($cell[$n],$content,$sel_options,$readonlys,$cname,$show_c,$show_row,$nul);
! $vis = !empty($value) && $value
== $cell['size'][$n]['name'] || $n == 1 && $first ? 'visible' : 'hidden';
list (,$cl) =
explode(',',$cell[$n]['span']);
$html .=
$this->html->div($h,$this->html->formatOptions(array(
--- 830,837 ----
$s_height = "height:
$s_height".(substr($s_height,-1) != '%' ? 'px' : '').';';
}
! for ($n = 1; $n <= $cell_options; ++$n)
{
$h =
$this->show_cell($cell[$n],$content,$sel_options,$readonlys,$cname,$show_c,$show_row,$nul);
! $vis = !empty($value) && $value
== $cell_options[$n]['name'] || $n == 1 && $first ? 'visible' : 'hidden';
list (,$cl) =
explode(',',$cell[$n]['span']);
$html .=
$this->html->div($h,$this->html->formatOptions(array(
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: etemplate/inc class.link_widget.inc.php,1.6,1.7 class.nextmatch_widget.inc.php,1.13,1.14 class.uietemplate.inc.php,1.59,1.60,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: etemplate/setup etemplates.inc.php,1.34,1.35 phpgw_de.lang,1.6,1.7 phpgw_en.lang,1.29,1.30
- Next by Date:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.105,1.106
- Previous by thread:
[Phpgroupware-cvs] CVS: etemplate/setup etemplates.inc.php,1.34,1.35 phpgw_de.lang,1.6,1.7 phpgw_en.lang,1.29,1.30
- Next by thread:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.105,1.106
- Index(es):