source: branches/1.6/include/scripts.js @ 6349

Last change on this file since 6349 was 1469, checked in by chrisaga, 18 years ago

merge from trunk r1467:1468 into branch 1.6 (bug 437 popup-window size )

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1function SelectAll( formulaire )
2{
3len = formulaire.elements.length;
4var i=0;
5for( i = 0; i < len; i++)
6{
7  if ( formulaire.elements[i].type=='checkbox'
8           && formulaire.elements[i].name != 'copie')
9  {
10        formulaire.elements[i].checked = true;
11  }
12}
13}
14
15function DeselectAll( formulaire )
16{
17len = formulaire.elements.length;
18var i=0;
19for( i = 0; i < len; i++)
20{
21  if ( formulaire.elements[i].type=='checkbox'
22           && formulaire.elements[i].name != 'copie')
23  {
24        formulaire.elements[i].checked = false;
25  }
26}
27}
28
29function Inverser( formulaire )
30{
31len = formulaire.elements.length;
32var i=0;
33for( i=0; i<len; i++)
34{
35  if ( formulaire.elements[i].type=='checkbox'
36           && formulaire.elements[i].name != 'copie')
37  {
38        formulaire.elements[i].checked = !formulaire.elements[i].checked;
39  }
40}
41}
42
43function verifieAndOpen()
44{
45  var ok=1;
46  if (!img.complete)
47  {
48    // sometime the image loading is not complete
49    // especially with KHTML and Opera
50    setTimeout("verifieAndOpen()",200)
51  }
52  else
53  {
54  /* give more space for scrollbars (10 for FF, 40 for IE) */
55    width=img.width +40;
56    height=img.height +40;
57    window.open(owURL,owName,owFeatures  + ',width=' + width + ',height=' + height);
58  }
59}
60
61function phpWGOpenWindow(theURL,winName,features)
62{
63  img = new Image()
64  img.src = theURL;
65  owURL=theURL;
66  owName=winName;
67  owFeatures=features;
68  verifieAndOpen();
69}
70
71function popuphelp(url)
72{
73  window.open(
74    url,
75    'dc_popup',
76    'alwaysRaised=yes,dependent=yes,toolbar=no,height=420,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no'
77  );
78}
79
Note: See TracBrowser for help on using the repository browser.