Skip to content
Browse files

mod_logging: Fix live display of log messages

Got broken in Bootstrap update.

Fixes #540
  • Loading branch information...
1 parent 26c15b5 commit 8cb72bae871e1a3f1cd660f9e0c923748002031f @arjan arjan committed Mar 16, 2013
Showing with 5 additions and 14 deletions.
  1. +5 −14 modules/mod_logging/actions/action_logging_addlog.erl
View
19 modules/mod_logging/actions/action_logging_addlog.erl
@@ -22,20 +22,11 @@
]).
render_action(_TriggerId, TargetId, Args, Context) ->
- SignalProps = proplists:get_value(signal_props, Args),
- Type = proplists:get_value(type, SignalProps),
-
{Tpl, Context1} = z_template:render_to_iolist(proplists:get_value(template, Args, "_admin_log_row.tpl"), Args, Context),
Tpl2 = lists:flatten(z_string:line(erlang:iolist_to_binary(Tpl))),
- {[], z_script:add_script([
- "$('", z_utils:js_escape(Tpl2),
- "').hide().insertBefore('#", TargetId, " li:first').fadeIn().css({backgroundColor:'",
- log_color(Type), "'}).animate({backgroundColor:'",
- log_color(bg), "'}, 8000, 'linear');"], Context1)}.
-
+ {[], z_script:add_script(
+ ["$('", z_utils:js_escape(Tpl2),
+ "').hide().prependTo('#", TargetId, "').fadeIn();",
+ "$('h3').effect('shake', {direction: 'up', distance: 5, times: 2});"],
+ Context1)}.
-log_color(debug) -> "#ffffff";
-log_color(info) -> "#ffff99";
-log_color(warning) -> "#ffcc99";
-log_color(bg) -> "#f1f1f1";
-log_color(_) -> "#f1f1f1".

1 comment on commit 8cb72ba

@mmzeeman
Zotonic member

Thanks, noticed it yesterday when I was testing the update to controller_comet.

Please sign in to comment.
Something went wrong with that request. Please try again.