diff options
author | vdigital <vdigital@piwigo.org> | 2008-05-23 21:05:41 +0000 |
---|---|---|
committer | vdigital <vdigital@piwigo.org> | 2008-05-23 21:05:41 +0000 |
commit | 77fd1f51a3c5f5a52f72ef8a299fe368228e2285 (patch) | |
tree | a67ede42904657ccf3349ecdaef1cec8b8e36ff8 /BSF/template-common/scripts.js | |
parent | 553727dffacc48e8337c1d141f2a25af359e74b1 (diff) |
git-svn-id: http://piwigo.org/svn/trunk@2357 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | BSF/template-common/scripts.js | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/BSF/template-common/scripts.js b/BSF/template-common/scripts.js new file mode 100644 index 000000000..83f4815e7 --- /dev/null +++ b/BSF/template-common/scripts.js @@ -0,0 +1,74 @@ +function SelectAll( formulaire ) +{ +var len = formulaire.elements.length; +var i=0; +for( i = 0; i < len; i++) +{ + if ( formulaire.elements[i].type=='checkbox' + && formulaire.elements[i].name != 'copie') + { + formulaire.elements[i].checked = true; + } +} +} + +function DeselectAll( formulaire ) +{ +var len = formulaire.elements.length; +var i=0; +for( i = 0; i < len; i++) +{ + if ( formulaire.elements[i].type=='checkbox' + && formulaire.elements[i].name != 'copie') + { + formulaire.elements[i].checked = false; + } +} +} + +function Inverser( formulaire ) +{ +var len = formulaire.elements.length; +var i=0; +for( i=0; i<len; i++) +{ + if ( formulaire.elements[i].type=='checkbox' + && formulaire.elements[i].name != 'copie') + { + formulaire.elements[i].checked = !formulaire.elements[i].checked; + } +} +} + +function phpWGOpenWindow(theURL,winName,features) +{ + img = new Image(); + img.src = theURL; + if (img.complete) + { + var width=img.width +40; + var height=img.height +40; + } + else + { + var width=640; + var height=480; + img.onload = resizeWindowToFit; + } + newWin = window.open(theURL,winName,features+',left=2,top=1,width=' + width + ',height=' + height); +} + +function resizeWindowToFit() +{ + newWin.resizeTo( img.width+50, img.height+100); +} + +function popuphelp(url) +{ + window.open( + url, + 'dc_popup', + 'alwaysRaised=yes,dependent=yes,toolbar=no,height=420,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no' + ); +} + |