[Jifty-commit] r3415 - jifty/trunk/lib/Jifty/View/Declare

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Jun 9 10:44:13 EDT 2007


Author: clkao
Date: Sat Jun  9 10:44:09 2007
New Revision: 3415

Modified:
   jifty/trunk/lib/Jifty/View/Declare/Helpers.pm
   jifty/trunk/lib/Jifty/View/Declare/Page.pm

Log:
Allow spa to be disabled by page class.

Modified: jifty/trunk/lib/Jifty/View/Declare/Helpers.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/Helpers.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Declare/Helpers.pm	Sat Jun  9 10:44:09 2007
@@ -308,7 +308,8 @@
 
     my ($spa) = Jifty->find_plugin('Jifty::Plugin::SinglePage');
 
-    if ($spa) {
+    # XXX: spa hooks should be moved to page handlers
+    if ($spa && $page->allow_single_page) {
 	# If it's a single page app, we want to either render a
 	# wrapper and then get the region or render just the content
         if ( !Jifty->web->current_region ) {

Modified: jifty/trunk/lib/Jifty/View/Declare/Page.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/Page.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Declare/Page.pm	Sat Jun  9 10:44:09 2007
@@ -21,6 +21,7 @@
 use Jifty::View::Declare::Helpers;
 
 __PACKAGE__->mk_accessors(qw(content_code done_header _title));
+use constant allow_single_page => 1;
 
 sub new {
     my $class = shift;


More information about the Jifty-commit mailing list