%% @author Marc Worrell %% @copyright 2010 Marc Worrell %% Date: 2010-09-07 %% @doc Stream template updates to the user agent -module(action_development_development_templates_stream). -author("Marc Worrell "). -include_lib("zotonic_core/include/zotonic.hrl"). %% interface functions -export([ render_action/4, event/2 ]). render_action(TriggerId, TargetId, _Args, Context) -> Postback = {development_templates_stream, [{target, TargetId}]}, {PostbackMsgJS, _PickledPostback} = z_render:make_postback(Postback, none, TriggerId, TargetId, ?MODULE, Context), {PostbackMsgJS, Context}. %% @doc Flush the caches of all sites. event(#postback{message={development_templates_stream, [{target, Target}]}}, Context) -> z_notifier:notify1(#debug_stream{target=Target, what=template}, Context), Context.