Author: richter Date: Tue Apr 2 11:05:39 2013 New Revision: 1463481 URL: http://svn.apache.org/r1463481 Log: dynlink
Modified: perl/embperl/trunk/Embperl/Form/Control/dynlink.pm Modified: perl/embperl/trunk/Embperl/Form/Control/dynlink.pm URL: http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/Control/dynlink.pm?rev=1463481&r1=1463480&r2=1463481&view=diff ============================================================================== --- perl/embperl/trunk/Embperl/Form/Control/dynlink.pm (original) +++ perl/embperl/trunk/Embperl/Form/Control/dynlink.pm Tue Apr 2 11:05:39 2013 @@ -55,13 +55,19 @@ $] <div [+ do { local $escmode = 0 ; $self -> get_std_control_attr($req) } +]> [$ foreach $field (@$fields) $] <a class="[+ $state +]" [+ do { local $escmode = 0 ; $self -> {eventattrs} } +] _ef_attach="ef_dynlink" - _dyntext="[+ $field -> {dyntext} +]" + _ef_text="[+ $field -> {dyntext} +]" + _ef_name="[+ $name +]" + _ef_linkname="[+ $field -> {name} +]" [$if $field -> {target} $]target="[+ $field -> {target} +]" [$endif$] - [$if $field -> {href} $]href="[+ do { local $escmode = 0 ; $field -> {href} } +]" _hreforg="[+ do { local $escmode = 0 ; $field -> {href} } +]" [$endif$] + [$if $field -> {href} $]href="[+ do { local $escmode = 0 ; $field -> {href} } +]" _ef_xref="[+ do { local $escmode = 0 ; $field -> {href} } +]" [$endif$] + [$if $field -> {click} $]_ef_click="[+ do { local $escmode = 0 ; $field -> {click} } +]" [$if !$field -> {href} $]href="#"[$endif$][$endif$] [+ do { local $escmode = 0 ; $self -> {eventattrs} } +]> - [$ if $showoptions < 0 $][+ do { local $escmode = 0 ; $field -> {text} } +][$else$][+ $showoptions?$field -> {text}:$form -> convert_text ($self, $field -> {name}) +][$endif$] + [$ if $showoptions < 0 $][+ do { local $escmode = 0 ; $field -> {text} } +][$else$][+ $showoptions?$field -> {text}:$form -> convert_text ($self, $field -> {name}) +][$endif$] </a> [$endforeach$] +[$ if $self->{hidden} $] +<input type="hidden" name="[+ $name +]"> +[$endif$] </div> __END__ @@ -114,13 +120,13 @@ Text to display for the link =head4 dyntext -Dynamic text to display for the link. Same replacements as for href take place. +Dynamic text to display for the link. Same replacements as for href takes place. =head4 href Link destination -<name> is replaced by with the content of the field inside the same form with name name. +<name> is replaced by with the content of the field inside the same form with name <name>. This is done when the link is clicked, so modifing the content of the input field, will modify the link. The content is url escaped before it it inserted inside the link. @@ -128,10 +134,33 @@ will modify the link. The content is url Link target -<name> is replaced by with the content of the field inside the same form with name name. -This is done when the link is clicked, so modifing the content of the input field, -will modify the link. The content is url escaped before it it inserted inside the link. +=head4 click + +Javascript code that should be executed when the link is clicked. It get passed the three +variables 'name', 'linkname' and 'formelement' which represents the name of the control, +the name of the link and the dhtml form object. + +=head4 hidden + +Adds a hidden field + +=head4 showoptions + +=over + +=item -1 + +Show unescaped text. Can be used to embbed HTML + +=item 0 (default) + +Translate text + +=item 1 + +Show untranslated text +=back =head1 Author --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-cvs-unsubscr...@perl.apache.org For additional commands, e-mail: embperl-cvs-h...@perl.apache.org