[Jifty-commit] r3403 - in jifty/branches/fragcont/lib/Jifty: . Plugin

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Jun 8 15:43:49 EDT 2007


Author: clkao
Date: Fri Jun  8 15:43:35 2007
New Revision: 3403

Modified:
   jifty/branches/fragcont/lib/Jifty/Plugin/SinglePage.pm
   jifty/branches/fragcont/lib/Jifty/Web.pm
   jifty/branches/fragcont/lib/Jifty/Web/Form/Clickable.pm

Log:
There's no point removing url in clickable and put in _orig_url anymore,
which also happens to break redirect($clickable).


Modified: jifty/branches/fragcont/lib/Jifty/Plugin/SinglePage.pm
==============================================================================
--- jifty/branches/fragcont/lib/Jifty/Plugin/SinglePage.pm	(original)
+++ jifty/branches/fragcont/lib/Jifty/Plugin/SinglePage.pm	Fri Jun  8 15:43:35 2007
@@ -25,19 +25,14 @@
     return sub {
         my ( $clickable, $args ) = @_;
         my $url = $args->{'url'};
-        if ( $url && $url !~ m/^#/ ) {
-            $args->{'_orig_url'} = delete $args->{'url'};
+        if ( $url && $url !~ m/^#/ && $url !~ m{^https?://} ) {
             # XXX mind the existing onclick
-            warn 'ooops got original onclick' . Dumper( $args->{onclick} )
-                if $args->{onclick};
             $self->_push_onclick($args, {
                 region       => $self->region_name,
                 replace_with => $url,
                 args         => delete $args->{parameters}});
         }
         elsif (exists $args->{submit}) {
-	    use Data::Dumper;
-#	    warn Dumper($args);
 	    $self->_push_onclick($args, { refresh_self => 1, submit => delete $args->{submit} });
 	    $args->{as_button} = 1;
 	}

Modified: jifty/branches/fragcont/lib/Jifty/Web.pm
==============================================================================
--- jifty/branches/fragcont/lib/Jifty/Web.pm	(original)
+++ jifty/branches/fragcont/lib/Jifty/Web.pm	Fri Jun  8 15:43:35 2007
@@ -617,7 +617,7 @@
 redirects to that URL rather than B<next_page>.
 
 It creates a continuation of where you want to be, and then calls it.
-If you want to redirect to a parge with parameters, pass in a
+If you want to redirect to a page with parameters, pass in a
 L<Jifty::Web::Form::Clickable> object.
 
 =cut
@@ -647,8 +647,7 @@
 
     # To submit a Jifty::Action::Redirect, we don't need to serialize a continuation,
     # unlike any other kind of actions.
-    
-    
+
     my $redirect_to_url = '' ;
 
     if (  (grep { not $_->action_class->isa('Jifty::Action::Redirect') }

Modified: jifty/branches/fragcont/lib/Jifty/Web/Form/Clickable.pm
==============================================================================
--- jifty/branches/fragcont/lib/Jifty/Web/Form/Clickable.pm	(original)
+++ jifty/branches/fragcont/lib/Jifty/Web/Form/Clickable.pm	Fri Jun  8 15:43:35 2007
@@ -26,10 +26,10 @@
 
 sub accessors {
     shift->SUPER::accessors,
-        qw(url escape_label tooltip continuation call returns submit target preserve_state render_as_button render_as_link _orig_url);
+        qw(url escape_label tooltip continuation call returns submit target preserve_state render_as_button render_as_link);
 }
 __PACKAGE__->mk_accessors(
-    qw(url escape_label tooltip continuation call returns submit target preserve_state render_as_button render_as_link _orig_url)
+    qw(url escape_label tooltip continuation call returns submit target preserve_state render_as_button render_as_link)
 );
 
 =head2 new PARAMHASH
@@ -468,7 +468,7 @@
 	return { 'type' => 'call', id => $self->call };
     }
     if ($self->returns) {
-	return { 'create' => $self->_orig_url };
+	return { 'create' => $self->url };
     }
 
     return {};


More information about the Jifty-commit mailing list