[Jifty-commit] jifty branch, master, updated. e009356c6eeaf476c46ac05b74a8fd77b62e2fdc
Jifty commits
jifty-commit at lists.jifty.org
Mon Dec 28 18:59:40 EST 2009
The branch, master has been updated
via e009356c6eeaf476c46ac05b74a8fd77b62e2fdc (commit)
from 4c47c1ff0825571250bfde0e1e90a31c18c15878 (commit)
Summary of changes:
lib/Jifty/Plugin/Halo.pm | 3 ++-
lib/Jifty/View/Mason/Handler.pm | 3 ++-
share/web/templates/_elements/wrapper | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit e009356c6eeaf476c46ac05b74a8fd77b62e2fdc
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Mon Dec 28 18:58:54 2009 -0500
Add a HideHalos config setting so you can have DevelMode sans halos
Halos are not always desirable because they muck up the html.
diff --git a/lib/Jifty/Plugin/Halo.pm b/lib/Jifty/Plugin/Halo.pm
index 7839ab7..d183b4e 100644
--- a/lib/Jifty/Plugin/Halo.pm
+++ b/lib/Jifty/Plugin/Halo.pm
@@ -28,7 +28,8 @@ L<Template::Declare>.
sub init {
my $self = shift;
return if $self->_pre_init;
- return unless Jifty->config->framework('DevelMode');
+ return unless Jifty->config->framework('DevelMode')
+ && !Jifty->config->framework('HideHalos');
warn "Overwriting an existing Template::Declare->around_template"
if Template::Declare->around_template;
diff --git a/lib/Jifty/View/Mason/Handler.pm b/lib/Jifty/View/Mason/Handler.pm
index 220320a..8f129c7 100644
--- a/lib/Jifty/View/Mason/Handler.pm
+++ b/lib/Jifty/View/Mason/Handler.pm
@@ -115,7 +115,8 @@ sub config {
# In developer mode, we want halos, refreshing and all that other good stuff.
if (Jifty->config->framework('DevelMode') ) {
- push @{$config{'plugins'}}, 'Jifty::View::Mason::Halo';
+ push @{$config{'plugins'}}, 'Jifty::View::Mason::Halo'
+ unless Jifty->config->framework('HideHalos');
$config{static_source} = 0;
$config{use_object_files} = 0;
}
diff --git a/share/web/templates/_elements/wrapper b/share/web/templates/_elements/wrapper
index 12331d5..c9ebd04 100644
--- a/share/web/templates/_elements/wrapper
+++ b/share/web/templates/_elements/wrapper
@@ -16,7 +16,7 @@
<& /_elements/keybindings &>
</div>
<div id="jifty-wait-message" style="display: none"><%_('Loading...')%></div>
-% Jifty::View::Mason::Halo->render_component_tree() if (Jifty->config->framework('DevelMode'));
+% Jifty::View::Mason::Halo->render_component_tree() if Jifty->config->framework('DevelMode') && !Jifty->config->framework('HideHalos');
%# This is required for jifty server push. If you maintain your own
%# wrapper, make sure you have this as well.
% if ( Jifty->config->framework('PubSub')->{'Enable'} && Jifty::Subs->list ) {
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list