|
@@ -22,7 +22,6 @@ new(Postback, Element, Delegate, Name, Data, Source, Validation) ->
|
|
|
([E]) -> [$'|E]++[$'];
|
|
|
([H|T]) -> [[$'|H]++[$']] ++ [ [$,,$'|E]++[$'] || E <- T ] end,
|
|
|
Event = #ev{name=Name, module=Module, msg=Postback, trigger=Element},
|
|
|
- list_to_binary(["{ if (validateSources([",
|
|
|
- Join([ case is_atom(S) of true -> ?B(S); false -> S end || S <- Source, S =/= []]),
|
|
|
+ list_to_binary(["{ if (validateSources([",Join([ nitro:to_list(S) || S <- Source, S =/= []]),
|
|
|
"])) { ",?B(Validation)," ws.send(enc(tuple(atom('",?B(application:get_env(n2o,event,pickle)),"'),bin('",
|
|
|
- Element,"'),bin('",nitro:pickle(Event),"'),",Data,"))); } else console.log('Validation Error'); }"]).
|
|
|
+ Element,"'),bin('",nitro:pickle(Event),"'),",Data,"))); } else console.log('Validation Error'); }"]).
|