/[webpac2]/Webpacus/root/js/webpac.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /Webpacus/root/js/webpac.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 138 - (show annotations)
Thu Nov 24 22:29:44 2005 UTC (18 years, 5 months ago) by dpavlin
File MIME type: text/cpp
File size: 1084 byte(s)
 r9112@llin:  dpavlin | 2005-11-24 23:30:01 +0100
 changing of templates again work. with a little more testing this will be
 0.02 version :-)

1 // WebPAC AJAX API
2 //
3 // Documented in this code only, I'm afraid. Beware of dragons!
4 // Dobrica Pavlinusic dpavlin(at)rot13(dot)org 2005-11-22
5
6 function load_template(template_name) {
7 Logger.info('load_template '+template_name+' old template is '+$('template_name').value);
8
9 $('template_name').value = template_name;
10
11 var results_form = $('results_form');
12
13 if (results_form) {
14 Logger.debug('Ajax.Updater(results,/results)');
15
16 new Ajax.Updater( 'results', '/results', {
17 parameters: Form.serialize( results_form ),
18 asynchronous: 1,
19 onLoading: function(request) {
20 show_searching();
21 },
22 onLoaded: function(request) {
23 hide_searching();
24 }
25 } ) ;
26 return false;
27 } else {
28 Logger.debug('no results_form element');
29 return undef;
30 }
31 }
32
33 function show_searching() {
34 Logger.debug('show_searching');
35 Element.show('searching');
36 new Effect.Fade('results', { duration: 0.3 });
37 }
38
39 function hide_searching() {
40 Logger.debug('hide_searching');
41 Element.hide('searching');
42 //new Effect.Highlight('results');
43 new Effect.Appear('results', { duration: 0.3 });
44 }
45

Properties

Name Value
svn:mime-type text/cpp

  ViewVC Help
Powered by ViewVC 1.1.26