[Jifty-commit] r4346 - in jifty/trunk: . lib/Jifty/Plugin

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Oct 31 13:00:07 EDT 2007


Author: sterling
Date: Wed Oct 31 13:00:05 2007
New Revision: 4346

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/AutoReference.pm
   jifty/trunk/lib/Jifty/Plugin/AutoReference/Widget.pm

Log:
 r13792 at riddle:  andrew | 2007-10-31 11:57:22 -0500
 Fixing POD coverage errors in the AutoReference plugin.


Modified: jifty/trunk/lib/Jifty/Plugin/AutoReference.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/AutoReference.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/AutoReference.pm	Wed Oct 31 13:00:05 2007
@@ -31,6 +31,12 @@
 
 Provides a special autocompletion widget for reference columns. See L<Jifty::Plugin::AutoReference::Widget>.
 
+=head1 METHODS
+
+=head2 init
+
+Adds the F<autoreference.js> file to the JavaScript files to send to the browser.
+
 =cut
 
 sub init {

Modified: jifty/trunk/lib/Jifty/Plugin/AutoReference/Widget.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/AutoReference/Widget.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/AutoReference/Widget.pm	Wed Oct 31 13:00:05 2007
@@ -24,6 +24,12 @@
 
 B<WARNING:> As of this writing, it should be noted that this widget does not degrade gracefully. If you need a widget that operates properly even when JavaScript is unavailable, this widget won't do that job at this time.
 
+=head1 METHODS
+
+=head2 render
+
+Overrides the field renderer to force autocompletion to be turned on.
+
 =cut
 
 sub render {
@@ -74,6 +80,12 @@
     }
 }
 
+=head2 render_widget
+
+Overrides the widget renderer to draw both a hidden field that stores the actual referenced ID and a text field that is autocompleted using the records brief description.
+
+=cut
+
 sub render_widget {
     my $self = shift;
 
@@ -99,6 +111,12 @@
     return '';
 }
 
+=head2 render_value
+
+Overrides the value renderer to show the brief description of the referenced record.
+
+=cut
+
 sub render_value {
     my $self = shift;
 
@@ -109,6 +127,12 @@
     return '';
 }
 
+=head2 autocomplete_javascript
+
+Overrides the JavaScript autocompletion widget to use C<Jifty.Plugin.AutoReference> instead of the regular C<Jifty.Autocompleter>.
+
+=cut
+
 sub autocomplete_javascript {
     my $self = shift;
     return qq{new Jifty.Plugin.AutoReference('@{[$self->element_id]}-display','@{[$self->element_id]}','@{[$self->element_id]}-autocomplete')};


More information about the Jifty-commit mailing list