[Jifty-commit] r4470 - jifty/trunk/lib/Jifty/Web/Form
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Nov 20 01:48:19 EST 2007
Author: ishigaki
Date: Tue Nov 20 01:48:17 2007
New Revision: 4470
Modified:
jifty/trunk/lib/Jifty/Web/Form/Element.pm
jifty/trunk/lib/Jifty/Web/Form/Link.pm
Log:
added "rel" attribute to Jifty::Web::Form::Link/Element, to allow <a rel="nofollow"...> or <a rel="next"...>
Modified: jifty/trunk/lib/Jifty/Web/Form/Element.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Element.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Element.pm Tue Nov 20 01:48:17 2007
@@ -167,11 +167,11 @@
=cut
-sub accessors { shift->handlers, qw(class title key_binding key_binding_label id label tooltip continuation) }
+sub accessors { shift->handlers, qw(class title key_binding key_binding_label id label tooltip continuation rel) }
__PACKAGE__->mk_accessors(qw(_onclick _onchange _ondblclick _onmousedown _onmouseup _onmouseover
_onmousemove _onmouseout _onfocus _onblur _onkeypress _onkeydown
_onkeyup _onselect
- class title key_binding key_binding_label id label tooltip continuation));
+ class title key_binding key_binding_label id label tooltip continuation rel));
=head2 new PARAMHASH OVERRIDE
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 Tue Nov 20 01:48:17 2007
@@ -31,8 +31,8 @@
=cut
-sub accessors { shift->SUPER::accessors(), qw(url escape_label tooltip target); }
-__PACKAGE__->mk_accessors(qw(url escape_label tooltip target));
+sub accessors { shift->SUPER::accessors(), qw(url escape_label tooltip target rel); }
+__PACKAGE__->mk_accessors(qw(url escape_label tooltip target rel));
=head2 new PARAMHASH
@@ -75,6 +75,7 @@
tooltip => undef,
escape_label => 1,
class => '',
+ rel => '',
target => '' }, $args );
return $self;
@@ -110,6 +111,7 @@
$output .= (qq( title="@{[$tooltip]}")) if defined $tooltip;
$output .= (qq( target="@{[$self->target]}")) if $self->target;
$output .= (qq( accesskey="@{[$self->key_binding]}")) if $self->key_binding;
+ $output .= (qq( rel="@{[$self->rel]}")) if $self->rel;
$output .= (qq( href="@{[Jifty->web->escape($self->url)]}"));
$output .= ( $self->javascript() );
$output .= (qq(>$label</a>));
More information about the Jifty-commit
mailing list