Parent Directory | Revision Log
refactoring: after testing IPC::PubSub with vairous back-ends, it seems that COMET isn't a good choice if you want predictible delivery. It also has problems with delay, because it's a, uh, bus.... However, this refactoring has a good side: code size is reduced and is now easier to handle.
1 | <%init> |
2 | |
3 | my $results = Jifty::Web::PageRegion->new( |
4 | name => 'results', |
5 | ); |
6 | |
7 | my $search = Jifty->web->new_action( |
8 | class => 'Search', |
9 | moniker => 'search', |
10 | arguments => { %ARGS }, |
11 | sticky_on_success => 1, |
12 | ); |
13 | |
14 | my $q = $search->argument_value('content_contains'); |
15 | |
16 | my $feeds = Jifty::Web::PageRegion->new( |
17 | name => 'feeds', |
18 | path => '/fragments/feeds', |
19 | force_arguments => { |
20 | q => $q, |
21 | feed => undef, |
22 | }, |
23 | ); |
24 | |
25 | use Data::Dump qw/dump/; |
26 | |
27 | </%init> |
28 | |
29 | <&| '/_elements/wrapper', title => 'Grep - powerful RSS searcher' &> |
30 | |
31 | <div class="right"> |
32 | % if ( $q ) { |
33 | <% $feeds->render %> |
34 | <hr/> |
35 | % } |
36 | </div> |
37 | |
38 | <div class="left"> |
39 | <& '/fragments/bookmarklet' &> |
40 | |
41 | <% Jifty->web->form->start %> |
42 | |
43 | <% $search->form_field('content_contains', label => 'Search for', q => $q ) %> |
44 | |
45 | <% $search->button( label => 'Grep' ) %> |
46 | |
47 | <% Jifty->web->form->end %> |
48 | |
49 | <% $results->render %> |
50 | |
51 | % if ( $q ) { |
52 | <& '/fragments/results', item_fragment => 'long', q => $q &> |
53 | % } |
54 | |
55 | </div> |
56 | |
57 | </&> |
ViewVC Help | |
Powered by ViewVC 1.1.26 |