From 299f962ffb67534efda5d32816bb8e424b2b2046 Mon Sep 17 00:00:00 2001 From: Maxim Sokhatsky Date: Mon, 19 May 2014 13:21:16 +0300 Subject: [PATCH] rest dep moved to sample. n2o shouldn't depend on rest --- rebar.config | 1 - samples/rebar.config | 17 +++-------------- src/elements/element_dropdown.erl | 9 ++------- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/rebar.config b/rebar.config index fdbafa47..f5092985 100644 --- a/rebar.config +++ b/rebar.config @@ -3,6 +3,5 @@ {deps,[ {cowboy, ".*", {git, "git://github.com/extend/cowboy", {tag,"0.9.0"}}}, {gproc, ".*", {git, "git://github.com/uwiger/gproc.git", {tag,"0.3"}}}, - {rest, ".*", {git, "git://github.com/synrc/rest.git", {tag,"1.5.0"}}}, {erlydtl, ".*", {git, "git://github.com/evanmiller/erlydtl.git", {tag,"0.8.0"}}} ]}. diff --git a/samples/rebar.config b/samples/rebar.config index 1871d06a..5f353375 100644 --- a/samples/rebar.config +++ b/samples/rebar.config @@ -1,20 +1,9 @@ -% {plugins,[ling_builder]}. {sub_dirs,["apps"]}. {lib_dirs,["apps"]}. {deps_dir,"deps"}. {deps, [ -% {ling_builder, ".*", {git,"git://github.com/maximk/ling_builder.git","master"}}, - {gproc, ".*", {git, "git://github.com/uwiger/gproc.git", "HEAD"}}, - {active, ".*", {git, "git://github.com/synrc/active", {tag, "0.5"}}}, + {gproc, ".*", {git, "git://github.com/uwiger/gproc.git", "HEAD"}}, + {active, ".*", {git, "git://github.com/synrc/active", {tag, "0.5"}}}, + {rest, ".*", {git, "git://github.com/synrc/rest.git", {tag,"1.5.0"}}}, {n2o, ".*", {git, "git://github.com/5HT/n2o", "HEAD"}} ]}. - -{ling_builder_opts,[ - {build_host,"build.erlangonxen.org:8080"}, - {username,"test"}, - {password,"test"}, - {import_lib,crypto}, - {import_lib,sasl}, - {import, "deps/n2o_sample/priv/*/*"}, - {import, "deps/n2o_sample/priv/*/*/*"} - ]}. diff --git a/src/elements/element_dropdown.erl b/src/elements/element_dropdown.erl index 18501991..34ca721e 100644 --- a/src/elements/element_dropdown.erl +++ b/src/elements/element_dropdown.erl @@ -8,13 +8,8 @@ render_element(Record = #dropdown{}) -> ID = Record#dropdown.id, case Record#dropdown.postback of undefined -> skip; - %Postback -> %wf:wire(#event{type=click, postback=Postback, target=ID, -% source=Record#button.source, delegate=Record#button.delegate }) end, - Postback -> - wf:wire(#event { type=click, postback=Postback, target=ID, - source=Record#dropdown.source, delegate=Record#dropdown.delegate } ) end, -% target=ID, -% postback=Record#dropdown.postback }) end, + Postback -> wf:wire(#event { type=click, postback=Postback, target=ID, + source=Record#dropdown.source, delegate=Record#dropdown.delegate } ) end, Opts = [wf_tags:emit_tag(<<"option">>, [O#option.label], [ {<<"disabled">>, O#option.disabled},