Author: richter
Date: Sun Feb 27 20:26:01 2011
New Revision: 1075135
URL: http://svn.apache.org/viewvc?rev=1075135&view=rev
Log:
table control
Modified:
perl/embperl/trunk/Embperl/Form/Control/table.pm
Modified: perl/embperl/trunk/Embperl/Form/Control/table.pm
URL:
http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/Control/table.pm?rev=1075135&r1=1075134&r2=1075135&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/table.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/table.pm Sun Feb 27 20:26:01 2011
@@ -63,6 +63,7 @@ $]
[$foreach $o (@$data) $]
[- $i = 0 -]
[$foreach $line (@{$self->{columns}}) $]
+[- $colnum = 0 -]
<tr style="background: white">
[$foreach $c (@$line) $][-
$attr = ref $c?$c -> [0]:$c ;
@@ -76,10 +77,12 @@ $]
die "unknown filter '$filter'" if (!($filtercode = $self ->
{filters}{$filter})) ;
$item = &{$filtercode}($item, $c, $o, $epreq) ;
}
- -]<td colspan="[+ ref $c?$c -> [2] || 1:1 +]" class="[# +$self -> {line2}
|| (@{$self->{columns}} > 1 && $i == 0)?'cGridLabelBox':'cControlBox'+ #]
cLdapReportTd" style="[+ $self -> cellstyle ($item, $o, $r, $i, $attr) +]">[$
if $c -> [3] && ($item =~ /^&(.*?),(.*?),(.*)$/) $]
+ $id = undef ;
+ -]<td colspan="[+ ref $c?$c -> [2] || 1:1 +]" class="[# +$self -> {line2}
|| (@{$self->{columns}} > 1 && $i == 0)?'cGridLabelBox':'cControlBox'+ #]
cLdapReportTd" style="[+ $self -> cellstyle ($item, $o, $r, $i, $attr) +]">
+ [$ if $c -> [3] && ($item =~ /^&(.*?),(.*?),(.*)$/) $]
[$ if $1 eq 'checkbox' $]<input type="checkbox" name="[+ $2 +]"
value="[+ $3 +]">[$endif$]
[$ if $1 eq 'radio' $]<input type="radio" name="[+ $2 +]"
value="[+ $3 +]">[$endif$]
- [$else $][-
+ [$else $][-
$href = undef ;
$link = $c -> [4] ;
if (ref $link eq 'CODE')
@@ -95,8 +98,15 @@ $]
{
$id = &$link ($o) ;
}
- -][$ if ($href) $]<a href="[+ do { local $escmode = 0 ; $href }
+]" target="[+ $c -> [5] +]" [$if ($id) $]id="[+ "$self->{name}_$attr_$i"
+][$endif$]>[+ ref $item?join ('; ',@$item):$item +]</a>
- [$else$][+ ref $item?join ('; ',@$item):$item
+][$endif$][$endif$][$if ($id) $]<script>add_qtip($('[+
"$self->{name}_$attr_$i"+]'), '[+ $id +]')</script>[$endif$]</td>
+ -][$ if ($href)
+ $]<a href="[+ do { local $escmode = 0 ; $href } +]" target="[+
$c -> [5] +]" [$if ($id) $]id="[+ "$self->{name}_${attr}_$r" +]"[$endif$]>[+
ref $item?join ('; ',@$item):$item +]</a>
+ [$else
+ $][+ ref $item?join ('; ',@$item):$item
+ +][$endif$]
+ [$endif$][$
+ if ($id) $]<script>add_qtip($('[+ "#$self->{name}_${attr}_$r"+]'), '[+
$id +]')</script>[$endif$]
+ </td>
+[- $colnum++ -]
[$endforeach$]
[- $i++ -]
</tr>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]