4 |
// Dobrica Pavlinusic dpavlin(at)rot13(dot)org 2005-11-22 |
// Dobrica Pavlinusic dpavlin(at)rot13(dot)org 2005-11-22 |
5 |
|
|
6 |
function load_template(template_name) { |
function load_template(template_name) { |
7 |
// alert('load_template '+template_name+' old template is '+$('template_name').value); |
Logger.info('load_template '+template_name+' old template is '+$('template_name').value); |
8 |
|
|
9 |
$('template_name').value = template_name; |
$('template_name').value = template_name; |
10 |
|
|
11 |
|
Logger.debug('results_form '+$('results_form')); |
12 |
|
|
13 |
new Ajax.Updater( 'results', '/results', { |
new Ajax.Updater( 'results', '/results', { |
14 |
parameters: Form.serialize( $('results_form') ), |
parameters: Form.serialize( $('results_form') ), |
15 |
asynchronous: 1, |
asynchronous: 1, |
17 |
show_searching(); |
show_searching(); |
18 |
}, |
}, |
19 |
onLoaded: function(request) { |
onLoaded: function(request) { |
20 |
hide_searching(); |
Element.hide('searching'); |
21 |
|
/* hide_searching(); */ |
22 |
} |
} |
23 |
} ) ; |
} ) ; |
24 |
return false; |
return false; |
26 |
|
|
27 |
function show_searching() { |
function show_searching() { |
28 |
Element.show('searching'); |
Element.show('searching'); |
29 |
|
new Effect.Fade('results', { duration: 0.3 }); |
30 |
} |
} |
31 |
|
|
32 |
function hide_searching() { |
function hide_searching() { |
33 |
Element.hide('searching'); |
Element.hide('searching'); |
34 |
new Effect.Highlight('results'); |
//new Effect.Highlight('results'); |
35 |
|
new Effect.Appear('results', { duration: 0.3 }); |
36 |
} |
} |
37 |
|
|