[Jifty-commit] r4073 - in jifty/trunk: .
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Sep 10 22:04:54 EDT 2007
Author: jesse
Date: Mon Sep 10 22:04:54 2007
New Revision: 4073
Modified:
jifty/trunk/ (props changed)
jifty/trunk/META.yml
jifty/trunk/lib/Jifty/Plugin/TabView/View.pm
Log:
r67095 at pinglin: jesse | 2007-09-10 22:01:20 -0400
* tabview shouldn't force absolute paths to relative ones
Modified: jifty/trunk/META.yml
==============================================================================
--- jifty/trunk/META.yml (original)
+++ jifty/trunk/META.yml Mon Sep 10 22:04:54 2007
@@ -117,8 +117,9 @@
Test::More: 0.62
Test::Pod::Coverage: 0
Test::WWW::Mechanize: 1.04
+ Test::WWW::Selenium: 0
UNIVERSAL::require: 0
- URI: 0
+ URI: 1.31
WWW::Mechanize: 1.3
XML::Simple: 0
XML::Writer: 0.601
Modified: jifty/trunk/lib/Jifty/Plugin/TabView/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/TabView/View.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/TabView/View.pm Mon Sep 10 22:04:54 2007
@@ -23,7 +23,7 @@
# more flexible tabs
$self->render_tabs('foo', [qw(id)],
{ label => 'This is foo 1', path => 'foo', name => 'foo 1', args => { id => 1}},
- { label => 'This is foo 2', path => 'foo', name => 'foo 2', args => { id => 2}});
+ { label => 'This is foo 2', path => 'foo', name => 'foo 2', defer => 1, args => { id => 2}});
};
template 'foo' => sub { ... };
@@ -39,7 +39,11 @@
sub _tab_path {
my ($self, $name) = @_;
- $self->can('fragment_for') ? $self->fragment_for($name) : "./$name";
+
+ # If the path is already relative or absolute, don't force-relativeize it
+ my $qualified_path = ($name =~ qr|\.?/|) ? $name : "./$name";
+
+ $self->can('fragment_for') ? $self->fragment_for($name) : $qualified_path;
}
sub render_tabs {
More information about the Jifty-commit
mailing list