Skip to content

Commit

Permalink
add onclick to buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
ZatolokinPavel committed Aug 31, 2015
1 parent bc62820 commit 10870e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/meta.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-record(document, { ?ITERATOR(feed), name=[], base=[], sections=[], fields=[], buttons=[], access=[], steps=[] }).
-record(validation, { name, type, msg, extract = fun(X) -> X end, options=[], function, field={record,pos} }).
-record(sec, { id, name=[], desc=[], nameClass=[], descClass=small }).
-record(but, { id, href, target, postback, name, title, sources=[], class }).
-record(but, { id, href, target, postback, name, title, sources=[], class, onclick }).
-record(opt, { id, name, title, postback, checked=false, disabled=false, noRadioButton=false }).
-record(sel, { id, name, title, postback }).
-record(field, { id, sec=1, name, pos, title, layout, visible=true, disabled=false, format="~w", curr="",
Expand Down
4 changes: 2 additions & 2 deletions src/forms.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-autor('Maxim Sokhatsky').
-export([start/0, start/1, start/2, stop/1, new/2]).
-include_lib("n2o/include/wf.hrl").
-include_lib("nitro/include/nitro.hrl").
%% -include_lib("nitro/include/nitro.hrl").
-include_lib("step_wizard.hrl").
-include("meta.hrl").

Expand Down Expand Up @@ -153,6 +153,6 @@ new(Document,Object) ->
% buttons

#panel{id=forpreload,class=buttons,body= lists:foldr(fun(#but{}=But,Acc) ->
[#link{id=But#but.id, class=But#but.class, postback=But#but.postback, body=But#but.title,
[#link{id=But#but.id, class=But#but.class, postback=But#but.postback, body=But#but.title, onclick=But#but.onclick,
href=But#but.href, target=But#but.target, source=[wf:atom([S,Name])||S<-But#but.sources]}|Acc] end,[],Buttons)}
]}.

0 comments on commit 10870e1

Please sign in to comment.