[Jifty-commit] r903 - in jifty/trunk: lib/Jifty/Web/Form
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Apr 23 15:53:06 EDT 2006
Author: trs
Date: Sun Apr 23 15:53:05 2006
New Revision: 903
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Web/Form/Link.pm
Log:
r9970 at zot: tom | 2006-04-23 15:52:41 -0400
Support setting link targets
Modified: jifty/trunk/lib/Jifty/Web/Form/Link.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Link.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Link.pm Sun Apr 23 15:53:05 2006
@@ -25,8 +25,8 @@
=cut
-sub accessors { shift->SUPER::accessors(), qw(url escape_label tooltip); }
-__PACKAGE__->mk_accessors(qw(url escape_label tooltip));
+sub accessors { shift->SUPER::accessors(), qw(url escape_label tooltip target); }
+__PACKAGE__->mk_accessors(qw(url escape_label tooltip target));
=head2 new PARAMHASH
@@ -41,7 +41,12 @@
=item tooltip
-Additional information about the link target.
+Additional information about the link.
+
+=item target
+
+Target of the link. Mostly useful when specified as "_blank" to open
+a new window or as the name of a already existing window.
=item escape_label
@@ -65,6 +70,7 @@
tooltip => undef,
escape_label => 1,
class => '',
+ target => '',
@_
);
@@ -99,9 +105,10 @@
if ( $tooltip and $self->escape_label );
Jifty->web->out(qq(<a));
- Jifty->web->out(qq( id="@{[$self->id]}")) if $self->id;
- Jifty->web->out(qq( class="@{[$self->class]}")) if $self->class;
+ Jifty->web->out(qq( id="@{[$self->id]}")) if $self->id;
+ Jifty->web->out(qq( class="@{[$self->class]}")) if $self->class;
Jifty->web->out(qq( title="@{[$self->tooltip]}")) if $tooltip;
+ Jifty->web->out(qq( target="@{[$self->target]}")) if $self->target;
Jifty->web->out(qq( href="@{[$self->url]}"));
Jifty->web->out( $self->javascript() );
Jifty->web->out(qq(>$label</a>));
More information about the Jifty-commit
mailing list