Author: richter Date: Mon May 4 07:36:55 2015 New Revision: 1677540 URL: http://svn.apache.org/r1677540 Log: Extent controls
Modified: perl/embperl/trunk/Embperl/Form/Control/grid.pm perl/embperl/trunk/Embperl/Form/Control/textarea.pm Modified: perl/embperl/trunk/Embperl/Form/Control/grid.pm URL: http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/Control/grid.pm?rev=1677540&r1=1677539&r2=1677540&view=diff ============================================================================== --- perl/embperl/trunk/Embperl/Form/Control/grid.pm (original) +++ perl/embperl/trunk/Embperl/Form/Control/grid.pm Mon May 4 07:36:55 2015 @@ -176,7 +176,7 @@ sub init_data my @rowclass ; foreach my $entry (@entries) { - $data = ref $entry eq 'ARRAY'?$entry:[$ldap?ecos::LdapBase -> splitAttrValue($entry):$entry]; + $data = ref $entry?$entry:[$ldap?ecos::LdapBase -> splitAttrValue($entry):$entry]; if (ref $self -> {rowclass} eq 'CODE') { $rowclass[$i] = &{$self -> {rowclass}}($data, $self) ; @@ -186,16 +186,23 @@ sub init_data $j = 0 ; foreach my $field ((@$fields, ($line2?($line2):()))) { - $col = exists $field -> {col}?$field -> {col}:$j ; - if ($colval = $field -> {colval}) + if (ref $data eq 'HASH') { - $fdat->{"__${name}_${j}_$i"} = $data->[$col+$coloffset] =~ /\Q$colval\E/?1:0 ; + $fdat->{"__${name}_${j}_$i"} = $data->{$field->{name}} ; } else { - $fdat->{"__${name}_${j}_$i"} = $data->[$col+$coloffset] ; + $col = exists $field -> {col}?$field -> {col}:$j ; + if ($colval = $field -> {colval}) + { + $fdat->{"__${name}_${j}_$i"} = $data->[$col+$coloffset] =~ /\Q$colval\E/?1:0 ; + } + else + { + $fdat->{"__${name}_${j}_$i"} = $data->[$col+$coloffset] ; + } } - + if ($field -> can ('init_data')) { local $field->{name} = "__${name}_${j}_$i" ; @@ -506,6 +513,7 @@ __EMBPERL__ my $nsprefix = $self -> form -> {jsnamespace} ; my $max = $fdat{"__${name}_max"} ||= 1 ; $self -> {fullid} = $req -> {uuid} . '_' . $self -> {id} ; + $]<table class="ef-element ef-element-width-[+ $self -> {width_percent} +][+ ' ' +][+ $self -> {state} +] ef-attach-always" _ef_attach="ef_grid"> <tr> <td class="ui-label-box" colspan="[+ $span +]"> @@ -521,12 +529,14 @@ $]<table class="ef-element ef-element-wi </table> [- $self -> show_grid_title ($req) if ($max > $self -> {header_bottom} && !$self -> {disable_controls}) -] + [$ if (!$self -> {no_addrow}) $] <table class="ef-control-grid-newrow" style="display: none"> [- local $req -> {epf_no_script} = 1 ; $self -> show_grid_table_row ($req, '%row%') ; -] </table> + [$endif$] </td> </tr> </table> Modified: perl/embperl/trunk/Embperl/Form/Control/textarea.pm URL: http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/Control/textarea.pm?rev=1677540&r1=1677539&r2=1677540&view=diff ============================================================================== --- perl/embperl/trunk/Embperl/Form/Control/textarea.pm (original) +++ perl/embperl/trunk/Embperl/Form/Control/textarea.pm Mon May 4 07:36:55 2015 @@ -184,7 +184,7 @@ $] my $text = $self -> get_display_text ($req, $value) ; $text =~ s/\s*$// ; $text =~ s/^\s*// ; -@$text = split (/\n/, $text) ; +my @text = split (/\n/, $text) ; my $name = $self -> {force_name} || $self -> {name} ; $] <div [+ do { local $escmode = 0 ; $self -> get_std_control_attr($req, '', 'readonly') } +] _ef_divname="[+ $name +]"> --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-cvs-unsubscr...@perl.apache.org For additional commands, e-mail: embperl-cvs-h...@perl.apache.org