]> git.sur5r.net Git - contagged/blob - scripts/gui.js
JavaScript updates (migration to JQuery + Interface)
[contagged] / scripts / gui.js
1
2
3
4
5
6 /**
7  * Initialize everything when DOM is ready
8  */
9 $(document).ready(function() {
10
11   // autocompletion
12   $('#taglookup').Autocomplete({
13         source: 'ajax.php',
14         delay: 300,
15         helperClass: 'autocompleter',
16         selectClass: 'autocompleterSelect',
17         inputWidth: true,
18         minchars: 1,
19         //multiple: true,
20         //multipleSeperator: ','
21   });
22   $('#tageditlookup').Autocomplete({
23         source: 'ajax.php',
24         delay: 300,
25         helperClass: 'autocompleter',
26         selectClass: 'autocompleterSelect',
27         inputWidth: true,
28         minchars: 1,
29         multiple: true,
30         multipleSeperator: ','
31   });
32   // autocompletion
33   $('input.ac').Autocomplete({
34         source: 'ajax.php',
35         delay: 300,
36         helperClass: 'autocompleter',
37         selectClass: 'autocompleterSelect',
38         inputWidth: true,
39         minchars: 1,
40   });
41
42   $.ImageBox.init({
43         loaderSRC: 'pix/imagebox/loading.gif',
44         closeHTML: '<img src="pix/imagebox/close.jpg" border="0" />'
45   });
46
47   // set focus
48   if($('#searchfield')) $('#searchfield').focus();
49   if($('#firstfield')) $('#firstfield').focus();
50 });