r20434@hades (orig r549): groditi | 2008-01-30 18:09:54 -0300
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Action.pm
CommitLineData
2f670e13 1package Reaction::UI::Widget::Action;
9de685fc 2
3use Reaction::UI::WidgetClass;
4
2f670e13 5class Action is 'Reaction::UI::Widget::Object', which {
664d660c 6
2f670e13 7 #before fragment widget {
664d660c 8 # arg form_id => $_{viewport}->location;
9 #};
10
664d660c 11 implements fragment ok_button_fragment {
12 if (grep { $_ eq 'ok' } $_{viewport}->accept_events) {
13 arg 'event_id' => event_id 'ok';
14 arg 'label' => $_{viewport}->ok_label;
15 render 'ok_button';
16 }
17 };
18
19 implements fragment apply_button_fragment {
20 if (grep { $_ eq 'apply' } $_{viewport}->accept_events) {
21 arg 'event_id' => event_id 'apply';
22 arg 'label' => $_{viewport}->apply_label;
23 render 'apply_button';
24 }
25 };
26
27 implements fragment cancel_button_fragment {
cf272446 28 if (grep { $_ eq 'close' } $_{viewport}->accept_events) {
29 arg 'event_id' => event_id 'close';
30 arg 'label' => $_{viewport}->close_label;
664d660c 31 render 'cancel_button';
32 }
33 };
9de685fc 34
35};
36
371;
38
39__END__;
40
5a1a893e 41=head1 NAME
9de685fc 42
2f670e13 43Reaction::UI::Widget::Action
9de685fc 44
5a1a893e 45=head1 DESCRIPTION
9de685fc 46
5a1a893e 47=head1 FRAGMENTS
9de685fc 48
cc44a337 49=head2 ok_button_fragment
5a1a893e 50
cc44a337 51=head2 apply_button_fragment
5a1a893e 52
cc44a337 53=head2 cancel_button_fragment
5a1a893e 54
55=head1 AUTHORS
56
57See L<Reaction::Class> for authors.
58
59=head1 LICENSE
60
61See L<Reaction::Class> for the license.
9de685fc 62
63=cut
5a1a893e 64