[Jifty-commit] r3438 - in jifty/trunk: .
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jun 11 02:37:43 EDT 2007
Author: jesse
Date: Mon Jun 11 02:37:40 2007
New Revision: 3438
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/TabView/View.pm
Log:
r58206 at pinglin: jesse | 2007-06-11 02:29:31 -0400
* Got the tabview plugin working with non-CRUD code.
* got the tabview plugin preloading the first tab, even if it's marked as a region rather than a static tab
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 Jun 11 02:37:40 2007
@@ -49,17 +49,20 @@
$tab =~ s/_tab$// ?
(onclick =>
{ region => Jifty->web->current_region->qualified_name."-$tab-tab",
- replace_with => $self->fragment_for($tab),
+ replace_with => $tab,#$self->fragment_for($tab),
args => { map { $_ => get($_)} @$args },
}) : ()
) }
}
};
div { {class is 'yui-content' };
+ my $default_shown;
for (@tabs) {
div {
if (s/_tab$//) {
- render_region(name => $_.'-tab');
+ render_region(name => $_.'-tab',
+ ($default_shown++)? () : ( path => $_, args => { map { $_ => get($_)} @$args })
+ )
}
else {
die "$self $_" unless $self->has_template($_);
More information about the Jifty-commit
mailing list