[Jifty-commit] r7455 - in jifty/trunk: share/web/static/js

Jifty commits jifty-commit at lists.jifty.org
Thu Aug 27 03:56:31 EDT 2009


Author: sartak
Date: Thu Aug 27 03:56:31 2009
New Revision: 7455

Modified:
   jifty/trunk/lib/Jifty/Web/Form/Element.pm
   jifty/trunk/share/web/static/js/jifty.js

Log:
Add basic support for popout for a region update

Modified: jifty/trunk/lib/Jifty/Web/Form/Element.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Element.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/Form/Element.pm	Thu Aug 27 03:56:31 2009
@@ -39,6 +39,10 @@
 CSS selector given by L</element>, which defaults to the start of the
 current region.
 
+=item popout => PATH
+
+Displays the given C<PATH> as a new fragment in a lightbox-style popout.
+
 =item replace_with => PATH
 
 Replaces the region specified by the C<region> parameter (which
@@ -457,6 +461,9 @@
             } elsif (exists $hook->{prepend}) {
                 @args{qw/mode path/} = ('Top', $hook->{prepend});
                 $hook->{element} ||= "#region-".$hook->{region};
+            } elsif (exists $hook->{popout}) {
+                @args{qw/mode path/} = ('Popout', $hook->{popout});
+                $hook->{element} ||= "#region-".$hook->{region};
             } elsif (exists $hook->{replace_with}) {
                 if (defined $hook->{replace_with}) {
                     @args{qw/mode path region/} = ('Replace', $hook->{replace_with}, $hook->{region});

Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js	(original)
+++ jifty/trunk/share/web/static/js/jifty.js	Thu Aug 27 03:56:31 2009
@@ -1031,7 +1031,9 @@
                 textContent = textContentWithoutScript + scripts;
 
                 // Once we find it, do the insertion
-                if (f['mode'] && (f['mode'] != 'Replace')) {
+                if (f['mode'] == 'Popout') {
+                    jQuery.facebox(textContent);
+                } else if (f['mode'] && (f['mode'] != 'Replace')) {
                     var method = ({
                         After: 'after',
                         Before: 'before',


More information about the Jifty-commit mailing list