Commit | Line | Data |
---|---|---|
2f670e13 | 1 | package Reaction::UI::Widget::Action; |
9de685fc | 2 | |
3 | use Reaction::UI::WidgetClass; | |
4 | ||
2f670e13 | 5 | class 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 { | |
28 | if (grep { $_ eq 'cancel' } $_{viewport}->accept_events) { | |
29 | arg 'event_id' => event_id 'cancel'; | |
30 | arg 'label' => $_{viewport}->cancel_label; | |
31 | render 'cancel_button'; | |
32 | } | |
33 | }; | |
9de685fc | 34 | |
35 | }; | |
36 | ||
37 | 1; | |
38 | ||
39 | __END__; | |
40 | ||
5a1a893e | 41 | =head1 NAME |
9de685fc | 42 | |
2f670e13 | 43 | Reaction::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 | ||
57 | See L<Reaction::Class> for authors. | |
58 | ||
59 | =head1 LICENSE | |
60 | ||
61 | See L<Reaction::Class> for the license. | |
9de685fc | 62 | |
63 | =cut | |
5a1a893e | 64 |