Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
zotonic/zotonic
AVert/zotonic
AlainODea/zotonic
ArthurClemens/zotonic
AtillaE/zotonic
Basielienis/zotonic
BillBarnhill/zotonic
CNXTEoEorg/zotonic
CyBeRoni/zotonic
DesmondANIMUS/zotonic
Dirklectisch/zotonic
DissmissCCP/zotonic
DorienD/zotonic
JamesLinus/zotonic
Jasson/zotonic
Jugem/zotonic
LilDash/zotonic
MLucien/zotonic
MarsBighead/zotonic
MechanisM/zotonic
MichaelSB/zotonic
MikeKMiller/zotonic
Pixys/zotonic
Protagores/zotonic
Ruriat/zotonic
SPY/zotonic
Tinirau/zotonic
UIKit0/zotonic
abpin/zotonic
adeazurat/zotonic
agnat/zotonic
albertolopez/zotonic
alvaropag/zotonic
amaudy/zotonic
anant2047/zotonic_master
andelf/zotonic
andreabadesso/zotonic
andrikurniawan/zotonic
arashsc/zotonic
arcusfelis/zotonic
arjan/zotonic
aseidlitz/zotonic
atlantech/zotonic
barcoyou/zotonic
bawerd/zotonic
bboozzoo/zotonic
cambricorp/zotonic
carlopires/zotonic
casp/zotonic
charliequinn/zotonic
chenquanjun/zotonic
chinnurtb/zotonic
chvanikoff/zotonic
cillianderoiste/zotonic
connorsml/zotonic
crownedgrouse/zotonic
cstar/zotonic
cyecp/zotonic
dasimaznG/zotonic
ddeboer/zotonic
dkislov/zotonic
driebit/zotonic
elvinfucom/zotonic
evrenkutar/zotonic
fcardinaux/zotonic
fearlessspider/zotonic
fenek/zotonic
ffringel/zotonic
fredpook/zotonic
frkarl/zotonic
gcnonato/zotonic
ghosthamlet/zotonic
gitter-badger/zotonic
gmpreussner/zotonic.zotonic
goldensurfer/zotonic
gomoripeti/zotonic
gordon-parrott/zotonic
gsdu8g9/zotonic
hacklock/zotonic
hadesain/zotonic
hanikesn/zotonic
hce/zotonic
heiheshang/zotonic
helllamer/zotonic
hfeeki/zotonic
hilerchyn/zotonic
hoosiersoft/zotonic
hscale/zotonic
ifkas/zotonic
ilovejs/zotonic
imagency/zotonic
jacktang/zotonic
jarimatti/zotonic
jcooley/zotonic
jellevandehaterd/zotonic
jerrytaffy/zotonic
jisqyv/zotonic
jnan77/zotonic
jrissler/zotonic
kaos/zotonic
karlsson/zotonic
keyeMyria/zotonic
knodejs/zotonic
kunthar/zotonic
kvbnet/zotonic-1
l1x/zotonic
lazedo/zotonic
leonlee/zotonic
lihongjun/zotonic
liuq4360/zotonic
loetie/zotonic
luantruong/zotonic
machad0/zotonic
magnusadm/zotonic
mgpld/zotonic
michielklonhammer/zotonic
millenaarg/zotonic
mmzeeman/zotonic
motiejus/zotonic
mrzullo/zotonic
mset/zotonic
mulriple/zotonic
namjae/zotonic
niinortey/zotonic
nivertech/zotonic
noname007/zotonic
onnet/zotonic
open-rnd/zotonic
opoku/zotonic
pguyot/zotonic
pmonson711/zotonic
powermedia/zotonic
prannayk/zotonic
rakesh-mohanta/zotonic
rayleyva/zotonic
repos-erlang/zotonic
requirement/zotonic
rethink-kmaroney/zotonic
rl-king/zotonic
rmoorman/zotonic
row-b/zotonic
rpip/zotonic
sarvex/zotonic
seannaswell/zotonic
sgawade/zotonic
shamis/zotonic
simonsmithies/zotonic
stensonb/zotonic
stephb9959/zotonic
taavi013/zotonic
tahteche/zotonic
tasssko/zotonic
tennessine/zotonic
thatpythonguy/zotonic
trigeek38/zotonic
ulrikstrid/zotonic
vilchy/zotonic
wardbekker/zotonic
wayllen/zotonic
wgc1014/zotonic
wikishogi/zotonic
willemdj/zotonic
witeman/zotonic
xee5ch/zotonic
ycfather/zotonic
yiqing95/zotonic
yorivanloo/zotonic
Nothing to show
...
Choose a Head Repository
zotonic/zotonic
AVert/zotonic
AlainODea/zotonic
ArthurClemens/zotonic
AtillaE/zotonic
Basielienis/zotonic
BillBarnhill/zotonic
CNXTEoEorg/zotonic
CyBeRoni/zotonic
DesmondANIMUS/zotonic
Dirklectisch/zotonic
DissmissCCP/zotonic
DorienD/zotonic
JamesLinus/zotonic
Jasson/zotonic
Jugem/zotonic
LilDash/zotonic
MLucien/zotonic
MarsBighead/zotonic
MechanisM/zotonic
MichaelSB/zotonic
MikeKMiller/zotonic
Pixys/zotonic
Protagores/zotonic
Ruriat/zotonic
SPY/zotonic
Tinirau/zotonic
UIKit0/zotonic
abpin/zotonic
adeazurat/zotonic
agnat/zotonic
albertolopez/zotonic
alvaropag/zotonic
amaudy/zotonic
anant2047/zotonic_master
andelf/zotonic
andreabadesso/zotonic
andrikurniawan/zotonic
arashsc/zotonic
arcusfelis/zotonic
arjan/zotonic
aseidlitz/zotonic
atlantech/zotonic
barcoyou/zotonic
bawerd/zotonic
bboozzoo/zotonic
cambricorp/zotonic
carlopires/zotonic
casp/zotonic
charliequinn/zotonic
chenquanjun/zotonic
chinnurtb/zotonic
chvanikoff/zotonic
cillianderoiste/zotonic
connorsml/zotonic
crownedgrouse/zotonic
cstar/zotonic
cyecp/zotonic
dasimaznG/zotonic
ddeboer/zotonic
dkislov/zotonic
driebit/zotonic
elvinfucom/zotonic
evrenkutar/zotonic
fcardinaux/zotonic
fearlessspider/zotonic
fenek/zotonic
ffringel/zotonic
fredpook/zotonic
frkarl/zotonic
gcnonato/zotonic
ghosthamlet/zotonic
gitter-badger/zotonic
gmpreussner/zotonic.zotonic
goldensurfer/zotonic
gomoripeti/zotonic
gordon-parrott/zotonic
gsdu8g9/zotonic
hacklock/zotonic
hadesain/zotonic
hanikesn/zotonic
hce/zotonic
heiheshang/zotonic
helllamer/zotonic
hfeeki/zotonic
hilerchyn/zotonic
hoosiersoft/zotonic
hscale/zotonic
ifkas/zotonic
ilovejs/zotonic
imagency/zotonic
jacktang/zotonic
jarimatti/zotonic
jcooley/zotonic
jellevandehaterd/zotonic
jerrytaffy/zotonic
jisqyv/zotonic
jnan77/zotonic
jrissler/zotonic
kaos/zotonic
karlsson/zotonic
keyeMyria/zotonic
knodejs/zotonic
kunthar/zotonic
kvbnet/zotonic-1
l1x/zotonic
lazedo/zotonic
leonlee/zotonic
lihongjun/zotonic
liuq4360/zotonic
loetie/zotonic
luantruong/zotonic
machad0/zotonic
magnusadm/zotonic
mgpld/zotonic
michielklonhammer/zotonic
millenaarg/zotonic
mmzeeman/zotonic
motiejus/zotonic
mrzullo/zotonic
mset/zotonic
mulriple/zotonic
namjae/zotonic
niinortey/zotonic
nivertech/zotonic
noname007/zotonic
onnet/zotonic
open-rnd/zotonic
opoku/zotonic
pguyot/zotonic
pmonson711/zotonic
powermedia/zotonic
prannayk/zotonic
rakesh-mohanta/zotonic
rayleyva/zotonic
repos-erlang/zotonic
requirement/zotonic
rethink-kmaroney/zotonic
rl-king/zotonic
rmoorman/zotonic
row-b/zotonic
rpip/zotonic
sarvex/zotonic
seannaswell/zotonic
sgawade/zotonic
shamis/zotonic
simonsmithies/zotonic
stensonb/zotonic
stephb9959/zotonic
taavi013/zotonic
tahteche/zotonic
tasssko/zotonic
tennessine/zotonic
thatpythonguy/zotonic
trigeek38/zotonic
ulrikstrid/zotonic
vilchy/zotonic
wardbekker/zotonic
wayllen/zotonic
wgc1014/zotonic
wikishogi/zotonic
willemdj/zotonic
witeman/zotonic
xee5ch/zotonic
ycfather/zotonic
yiqing95/zotonic
yorivanloo/zotonic
Nothing to show
  • 8 commits
  • 17 files changed
  • 0 commit comments
  • 1 contributor
View
7 NEWS
@@ -1,6 +1,13 @@
Welcome to Zotonic!
+Release 0.7.1, released on 2011-08-03
+-------------------------------------
+
+This is a bugfix release. See doc/changelogs/0.7.1.txt for all the
+relevant bugfixes.
+
+
Release 0.7.0, released on 2011-07-28
-------------------------------------
View
@@ -60,8 +60,8 @@ granted CREATEDB in postgres as follows:
zotonic debug
-------------
Launch the Zotonic server interactively and get an EShell on the
-running instance. This command used to be called "./start.sh" in
-Zotonic 0.6 and earlier.
+running instance. There is a "start.sh" command in the root folder
+which is a shortcut for this command.
zotonic restart
View
@@ -0,0 +1,15 @@
+Zotonic 0.7.1
+=============
+
+Released on 2011-08-03 13:17 by arjan.
+
+
+Arjan
+-----
+
+ * Documentation fixes and fixed wrapping of homepage links in the www.zotonic.com site
+ * Fixed the menu editor: Added resource_menu_admin_menu again which was removed by accident.
+ * Reworked the way mod_logging notifies the log pages; it now uses mod_signal.
+ * Fixed quality=xx parameter to {% image %}.
+ * Added mod_signal to the default list of installed modules.
+
@@ -1,9 +1,9 @@
-cd /tmp
+/cd /tmp
rm -rf zotonic-docs
mkdir zotonic-docs
cd zotonic-docs
httrack http://zotonic.com/
cd ..
-zip -r zotonic-html-documentation-20101003.zip zotonic-docs/
+zip -r zotonic-html-documentation-`date +"%Y%m%d"`.zip zotonic-docs/
and upload to google code.
@@ -17,4 +17,4 @@
%% limitations under the License.
%% Release number
--define(ZOTONIC_VERSION, "0.7.0").
+-define(ZOTONIC_VERSION, "0.7.1").
@@ -0,0 +1,41 @@
+%% @author Arjan Scherpenisse <arjan@scherpenisse.net>
+%% @copyright 2010 Arjan Scherpenisse <arjan@scherpenisse.net>
+
+%% Copyright 2010 Arjan Scherpenisse <arjan@scherpenisse.net>
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+
+-module(action_logging_addlog).
+-include("zotonic.hrl").
+-export([
+ render_action/4
+]).
+
+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)}.
+
+
+log_color(debug) -> "#ffffff";
+log_color(info) -> "#ffff99";
+log_color(warning) -> "#ffcc99";
+log_color(bg) -> "#f1f1f1";
+log_color(_) -> "#f1f1f1".
@@ -29,9 +29,7 @@
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-export([start_link/1]).
-export([
- add_admin_log_page/1,
observe_search_query/2,
- pid_observe_add_admin_log_page/3,
pid_observe_log/3
]).
@@ -42,16 +40,9 @@
%% interface functions
-add_admin_log_page(C=#context{page_pid=Pid}) ->
- z_notifier:first({add_admin_log_page, Pid}, C).
-
-
observe_search_query({search_query, Req, OffsetLimit}, Context) ->
search(Req, OffsetLimit, Context).
-pid_observe_add_admin_log_page(Pid, {add_admin_log_page, _Pid} = Msg, _Context) ->
- gen_server:call(Pid, Msg).
-
pid_observe_log(Pid, {log, #log_message{}=Msg}, Context) ->
case Msg#log_message.user_id of
undefined -> gen_server:cast(Pid, {log, Msg#log_message{user_id=z_acl:user(Context)}});
@@ -93,9 +84,6 @@ init(Args) ->
%% {stop, Reason, Reply, State} |
%% {stop, Reason, State}
%% Description: Handling call messages
-handle_call({add_admin_log_page, Pid}, _From, State) ->
- Pids = lists:filter(fun erlang:is_process_alive/1, [Pid|State#state.admin_log_pages]),
- {reply, ok, State#state{admin_log_pages=Pids}};
handle_call(Message, _From, State) ->
{stop, {unknown_call, Message}, State}.
@@ -159,41 +147,14 @@ search(_, _, _) ->
undefined.
-
%% @doc Insert a simple log entry. Send an update to all UA's displaying the log.
handle_simple_log(#log_message{user_id=UserId, type=Type, message=Msg, props=Props}, State) ->
{ok, Id} = z_db:insert(log, [
{user_id, UserId},
{type, Type},
{message, Msg}
] ++ Props, State#state.context),
-
- % Notify admins of any updates
- case State#state.admin_log_pages of
- [] ->
- nop;
- AdminPages ->
- case catch z_template:render_to_iolist("_admin_log_row.tpl", [{id, Id}], State#state.context) of
- {error, {template_not_found,"_admin_log_row.tpl",enoent}} ->
- % We can get a template_not_found error when the system is still starting.
- error;
- {error, Reason} ->
- error_logger:info_msg("[~p] Render error of _admin_log_row.tpl: ~p~n",
- [(State#state.context)#context.host, Reason]),
- error;
- {Tpl, _Ctx} ->
- Tpl2 = lists:flatten(z_string:line(erlang:iolist_to_binary(Tpl))),
- F = fun(Pid) ->
- z_session_page:add_script([
- "$('", z_utils:js_escape(Tpl2),
- "').hide().insertBefore('#log-area li:first').slideDown().css({backgroundColor:'",
- log_color(Type), "'}).animate({backgroundColor:'",
- log_color(bg), "'}, 8000, 'linear');"], Pid)
- end,
- [F(P) || P <- AdminPages],
- ok
- end
- end.
+ mod_signal:emit({log_message, [{log_id, Id}, {user_id, UserId}, {type, Type}, {message, Msg}, {props, Props}]}, State#state.context).
% All non #log_message{} logs are sent to their own log table. If the severity of the log entry is high enough then
@@ -209,7 +170,8 @@ handle_other_log(Record, State) ->
?LOG_FATAL -> handle_simple_log(Log#log_message{type=fatal}, State);
?LOG_ERROR -> handle_simple_log(Log#log_message{type=error}, State);
_Other -> nop
- end;
+ end,
+ mod_signal:emit({LogType, [{log_id, Id}|Fields]}, State#state.context);
false ->
Log = #log_message{
message=z_convert:to_binary(proplists:get_value(message, Fields, LogType)),
@@ -248,10 +210,3 @@ record_to_log_message(_, Fields, LogType, Id) ->
opt_user(undefined) -> [];
opt_user(Id) -> [" (", integer_to_list(Id), ")"].
-
-
-log_color(debug) -> "#ffffff";
-log_color(info) -> "#ffff99";
-log_color(warning) -> "#ffcc99";
-log_color(bg) -> "#f1f1f1";
-log_color(_) -> "#f1f1f1".
@@ -1,28 +0,0 @@
-%% @author Arjan Scherpenisse <arjan@scherpenisse.net>
-%% @copyright 2010 Arjan Scherpenisse <arjan@scherpenisse.net>
-
-%% Copyright 2010 Arjan Scherpenisse <arjan@scherpenisse.net>
-%%
-%% Licensed under the Apache License, Version 2.0 (the "License");
-%% you may not use this file except in compliance with the License.
-%% You may obtain a copy of the License at
-%%
-%% http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS,
-%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-%% See the License for the specific language governing permissions and
-%% limitations under the License.
-
--module(scomp_logging_logwatch).
--behaviour(gen_scomp).
-
--export([vary/2, render/3]).
-
--include("zotonic.hrl").
-
-vary(_Params, _Context) -> nocache.
-render(_Params, _Vars, Context) ->
- mod_logging:add_admin_log_page(Context),
- {ok, []}.
@@ -1,3 +1,4 @@
+{% with signal_props.log_id|default:id as id %}
{% with m.log[id] as l %}
<li id="{{ #li.id }}" class="clearfix">
<span class="zp-5">{{ l.type|default:"-" }}</span>
@@ -21,3 +22,4 @@
<span class="zp-10">{{ l.created|date:"d M Y, H:i" }}</span>
</li>
{% endwith %}
+{% endwith %}
@@ -35,5 +35,6 @@
</div>
{% endwith %}
- {% logwatch %}
+ {% wire action={connect signal={log_message} action={addlog target="log-area"}} %}
+
{% endblock %}
@@ -146,7 +146,6 @@ menu_flat(undefined, _Context) ->
menu_flat(<<>>, _Context) ->
[];
menu_flat(X, Context) ->
- ?DEBUG(X),
menu_flat(X, [1], [], Context).
menu_flat([], _Path, Acc, _Context) ->
@@ -0,0 +1,128 @@
+%% @author Marc Worrell <marc@worrell.nl>
+%% @copyright 2009 Marc Worrell
+%% @doc Callbacks for editing the menu.
+
+%% Copyright 2009 Marc Worrell
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+
+-module(resource_menu_admin_menu).
+-author("Marc Worrell <marc@worrell.nl>").
+
+-export([
+ event/2,
+ test/0
+]).
+
+-include("zotonic.hrl").
+
+event({drop, {dragdrop, ["new", Id], _, _DragEltId}, {dragdrop, [MenuId, "first"], _, _DropEltId}}, Context) ->
+ mod_menu:set_menu(MenuId, [{Id, []}], Context),
+ Html = z_template:render("_admin_menu_menu_view.tpl", [{id, MenuId}], Context),
+ z_render:update("menu-editor", Html, Context);
+
+event({drop, {dragdrop, DragTag, _, _DragEltId}, {dragdrop, [MenuId, "before", TP], _, _DropEltId}}, Context) ->
+ TargetPath = lists:reverse(TP),
+ Menu = mod_menu:get_menu(MenuId, Context),
+ Menu2 = case DragTag of
+ ["new", NewId] ->
+ insert_menuitem(Menu, {NewId, []}, TargetPath);
+ Path ->
+ SourcePath = lists:reverse(Path),
+ MenuItem = get_menuitem(Menu, SourcePath),
+ Menu1 = delete_path(Menu, SourcePath),
+ TargetPath1 = path_after_delete(TargetPath, SourcePath),
+ insert_menuitem(Menu1, MenuItem, TargetPath1)
+ end,
+ mod_menu:set_menu(MenuId, Menu2, Context),
+ Html = z_template:render("_admin_menu_menu_view.tpl", [{id, MenuId}], Context),
+ z_render:update("menu-editor", Html, Context);
+
+event({drop, {dragdrop, DragTag, _, _DragEltId}, {dragdrop, [MenuId, "on", TargetPath], _, _DropEltId}}, Context) ->
+ event({drop, {dragdrop, DragTag, x, x}, {dragdrop, [MenuId, "before", [1|TargetPath]], x, x}}, Context);
+
+event({postback, {delete, Props}, _TriggerId, _TargetId}, Context) ->
+ MenuId = proplists:get_value(menu_id, Props),
+ Path = lists:reverse(proplists:get_value(path, Props)),
+ Menu = mod_menu:get_menu(MenuId, Context),
+ Menu1 = delete_path(Menu, Path),
+ mod_menu:set_menu(MenuId, Menu1, Context),
+ Html = z_template:render("_admin_menu_menu_view.tpl", [{id, MenuId}], Context),
+ z_render:update("menu-editor", Html, Context);
+
+event(_Event, Context) ->
+ Context.
+
+
+delete_path(Menu, Path) ->
+ delete_path(Menu, Path, []).
+delete_path([_|Rest], [1], Acc) ->
+ lists:reverse(Acc) ++ Rest;
+delete_path([Item|Rest], [Idx], Acc) ->
+ delete_path(Rest, [Idx-1], [Item|Acc]);
+delete_path([{Id,SubMenu}|Rest], [1|Path], Acc) ->
+ lists:reverse(Acc)
+ ++ [{Id, delete_path(SubMenu, Path)} | Rest];
+delete_path([Item|Menu], [Idx|Path], Acc) ->
+ delete_path(Menu, [Idx-1|Path], [Item|Acc]).
+
+
+get_menuitem([Item|_Menu], [1]) ->
+ Item;
+get_menuitem([_Item|Menu], [Idx]) ->
+ get_menuitem(Menu, [Idx-1]);
+get_menuitem([{_, SubMenu}|_Rest], [1|PathRest]) ->
+ get_menuitem(SubMenu, PathRest);
+get_menuitem([_|Rest], [Idx|PathRest]) ->
+ get_menuitem(Rest, [Idx-1|PathRest]).
+
+
+insert_menuitem(Menu, Item, DestPath) ->
+ insert_menuitem(Menu, Item, DestPath, []).
+insert_menuitem(Menu, Item, [1], Acc) ->
+ lists:reverse(Acc) ++ [Item | Menu];
+insert_menuitem([First|Rest], Item, [Idx], Acc) ->
+ insert_menuitem(Rest, Item, [Idx-1], [First|Acc]);
+insert_menuitem([{Id, SubMenu} | MenuRest], Item, [1|Path], Acc) ->
+ lists:reverse(Acc)
+ ++ [{Id, insert_menuitem(SubMenu, Item, Path, [])} | MenuRest];
+insert_menuitem([MenuItem|MenuRest], Item, [Idx|Path], Acc) ->
+ insert_menuitem(MenuRest, Item, [Idx-1|Path], [MenuItem|Acc]).
+
+
+path_after_delete(Path, DeletePath) ->
+ path_after_delete(Path, DeletePath, []).
+path_after_delete([], _, Acc) ->
+ lists:reverse(Acc);
+path_after_delete(Path, [], Acc) ->
+ lists:reverse(Acc) ++ Path;
+path_after_delete([X|Rest], [Y|Rest2], Acc) when X > Y ->
+ path_after_delete(Rest, Rest2, [X-1|Acc]);
+path_after_delete([X|Rest], [_|Rest2], Acc) ->
+ path_after_delete(Rest, Rest2, [X|Acc]).
+
+
+test() ->
+ [foo] = insert_menuitem([], foo, [1]),
+ [foo, bar] = insert_menuitem([bar], foo, [1]),
+ [bar, foo, baz] = insert_menuitem([bar, baz], foo, [2]),
+ [bar, baz, foo] = insert_menuitem([bar, baz], foo, [3]),
+ [{x, [foo]}, {y, []}] = insert_menuitem([{x, []}, {y, []}], foo, [1, 1]),
+ [{x, []}, {y, [foo]}] = insert_menuitem([{x, []}, {y, []}], foo, [2, 1]),
+ [{x, []}, {y, [{z, [bleh, foo]}]}] = insert_menuitem([{x, []}, {y, [{z, [bleh]}]}], foo, [2, 1, 2]),
+
+ [b] = delete_path([a, b], [1]),
+ [a] = delete_path([a, b], [2]),
+
+ [a, {b, []}, c] = delete_path([a, {b, [x]}, c], [2, 1]),
+ [a, {b, [x]}, c] = delete_path([a, {b, [x,y]}, c], [2, 2]).
@@ -57,9 +57,10 @@ receive_loop(SignalPrototype, Actions, ConnectorContext) ->
% @doc Render the actions and send the scripts to the page connected to the signal.
%
render_page_actions(Signal, Actions, Context) ->
- Actions1 = [ {Name, [ {signal, Signal} | Props ] } || {Name, Props} <- Actions],
+ {_, SignalProps} = Signal,
+ Actions1 = [ {Name, [ {signal, Signal}, {signal_props, SignalProps} | Props ] } || {Name, Props} <- Actions],
Options = [{action, X} || X <- Actions1],
-
+
%% What parameters should be used here?
Script = z_script:get_script(z_render:wire(undefined, undefined, {event, Options}, Context)),
Oops, something went wrong.

No commit comments for this range