[Jifty-commit] r4216 - in jifty/trunk: lib/Jifty lib/Jifty/Web/Form

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue Oct 9 17:42:27 EDT 2007


Author: sartak
Date: Tue Oct  9 17:42:26 2007
New Revision: 4216

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Config.pm
   jifty/trunk/lib/Jifty/Continuation.pm
   jifty/trunk/lib/Jifty/Web/Form/Link.pm

Log:


Modified: jifty/trunk/lib/Jifty/Config.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Config.pm	(original)
+++ jifty/trunk/lib/Jifty/Config.pm	Tue Oct  9 17:42:26 2007
@@ -16,7 +16,7 @@
 
 This class is automatically loaded during Jifty startup. It contains the configuration information loaded from the F<config.yml> file (generally stored in the F<etc> directory of your application, but see L</load> for the details). This configuration file is stored in L<YAML> format.
 
-This configuration file contains two major sections named "C<framework>" and "C<application>". The framework section contains Jifty-specific configuration options and the application section contains whatever configuration options you want to use with your application. (I.e., if there's any configuration information your application needs to know at startup, this is a good place to put it.)
+This configuration file contains two major sections named "C<framework>" and "C<application>". The framework section contains Jifty-specific configuration options and the application section contains whatever configuration options you want to use with your application. (I.e., if there's any configuration information your application needs to know at startup, this is a good place top put it.)
 
 =cut
 

Modified: jifty/trunk/lib/Jifty/Continuation.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Continuation.pm	(original)
+++ jifty/trunk/lib/Jifty/Continuation.pm	Tue Oct  9 17:42:26 2007
@@ -41,7 +41,7 @@
 
 Continuations are generally created just before their request would
 take effect, activated by the presence of certain query parameters.
-The rest of the request is saved, its execution is to be continued at a
+The rest of the request is saved, its execution to be continued at a
 later time.
 
 Continuations are run after any actions have run.  When a continuation

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 Oct  9 17:42:26 2007
@@ -86,14 +86,15 @@
 
 =cut
 
-=head2 as_string
+=head2 render
 
-Returns the string of the link, including any necessary javascript.
+Render the string of the link, including any necessary javascript.
 
 =cut
 
-sub as_string {
+sub render {
     my $self = shift;
+
     my $label = $self->label;
     $label = Jifty->web->escape( $label )
         if ( $self->escape_label );
@@ -102,38 +103,17 @@
     $tooltip = Jifty->web->escape( $tooltip )
         if ( defined $tooltip and $self->escape_label );
 
-    my $output = '';
-
-    $output .= (qq(<a));
-    $output .= (qq( id="@{[$self->id]}"))         if $self->id;
-    $output .= (qq( class="@{[$self->class]}"))   if $self->class;
-    $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( href="@{[Jifty->web->escape($self->url)]}"));
-    $output .= ( $self->javascript() );
-    $output .= (qq(>$label</a>));
-
-    $output .= (
-        '<script type="text/javascript"><!--' .
-        "\n" .
-        Jifty->web->escape($self->key_binding_javascript).
-        "\n" .
-        "--></script>") if $self->key_binding;
-
-    return $output;
-}
-
-=head2 render
-
-Render the string of the link, including any necessary javascript.
-
-=cut
-
-sub render {
-    my $self = shift;
+    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( title="@{[$tooltip]}"))       if defined $tooltip;
+    Jifty->web->out(qq( target="@{[$self->target]}")) if $self->target;
+    Jifty->web->out(qq( accesskey="@{[$self->key_binding]}")) if $self->key_binding;
+    Jifty->web->out(qq( href="@{[Jifty->web->escape($self->url)]}"));
+    Jifty->web->out( $self->javascript() );
+    Jifty->web->out(qq(>$label</a>));
+    $self->render_key_binding();
 
-    Jifty->web->out($self->as_string);
     return ('');
 }
 


More information about the Jifty-commit mailing list