You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2011/09/10 13:13:27 UTC
svn commit: r1167497 - /perl/embperl/trunk/Embperl/Form.pm
Author: richter
Date: Sat Sep 10 11:13:26 2011
New Revision: 1167497
URL: http://svn.apache.org/viewvc?rev=1167497&view=rev
Log:
Fix hide/show of sublines
Modified:
perl/embperl/trunk/Embperl/Form.pm
Modified: perl/embperl/trunk/Embperl/Form.pm
URL: http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form.pm?rev=1167497&r1=1167496&r2=1167497&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form.pm (original)
+++ perl/embperl/trunk/Embperl/Form.pm Sat Sep 10 11:13:26 2011
@@ -489,11 +489,11 @@ sub show_controls
my $linelevel = @$line?$line->[0]{level}:0 ;
my $lineid = @$line && $line->[0]{parentid}?"$line->[0]{parentid}":'id' ;
$n{$lineid} ||= 10 ;
-
my $visible = $self -> show_line_begin ($req, $lineno, "$lineid-$n{$lineid}", $activesubid[$linelevel-1] || $activeid);
foreach my $control (@$line)
{
- my $newactivesubid = $control -> {subobjects} && $visible?$control -> get_active_id ($req):'-' ;
+# my $newactivesubid = $control -> {subobjects} && $visible?$control -> get_active_id ($req):'-' ;
+ my $newactivesubid = ($control -> {subobjects} || $control -> {sublines}) && $visible?$control -> get_active_id ($req):'' ;
$control -> show ($req);
$activesubid[$control -> {level}] = $newactivesubid if ($newactivesubid) ;
if ($control -> {subobjects})
@@ -960,12 +960,20 @@ $]
[$ sub show_line_begin ($self, $req, $lineno, $id, $activeid)
- $id =~ /^(.+)-(\d+?)-(\d+?)$/ ;
- my $baseid = $1 ;
- my $baseidn = $2 ;
- $activeid =~ /^(.+)-(\d+?)$/ ;
- my $baseaid = $1 ;
- my $baseaidn = $2 ;
+ my $baseid ;
+ my $baseidn ;
+ my $baseaid ;
+ my $baseaidn ;
+ if ($id =~ /^(.+)-(\d+?)-(\d+?)$/)
+ {
+ $baseid = $1 ;
+ $baseidn = $2 ;
+ }
+ if ($activeid =~ /^(.+)-(\d+?)$/)
+ {
+ $baseaid = $1 ;
+ $baseaidn = $2 ;
+ }
my $class = $lineno == 0?'cTableRow1':'cTableRow' ;
$]
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org