// $HeadURL: http://joomlacode.org/svn/joomgallery/JG-1.5/JG/trunk/components/com_joomgallery/assets/js/joomscript.js $ // $Id: joomscript.js 502 2009-11-09 18:26:36Z mab $ /******************************************************************************\ ** JoomGallery 1.5.0.4 ** ** By: JoomGallery::ProjectTeam ** ** Copyright (C) 2008 - 2009 M. Andreas Boettcher ** ** Based on: JoomGallery 1.0.0 by JoomGallery::ProjectTeam ** ** Released under GNU GPL Public License ** ** License: http://www.gnu.org/copyleft/gpl.html or have a look ** ** at administrator/components/com_joomgallery/LICENSE.TXT ** \******************************************************************************/ //Javascript for SmilieInsert and Form Check function joom_getcoordinates(){ document.nameshieldform.xvalue.value=document.getElementById("u1").offsetTop; document.nameshieldform.yvalue.value=document.getElementById("u1").offsetLeft; document.nameshieldform.submit(); } function joom_validatecomment(){ if (document.commentform.cmttext.value==''){ alert(joomgallery_enter_comment); } else if(jg_use_code==1) { if (document.commentform.jgcode != null && document.commentform.jg_code.value==''){ alert(joomgallery_enter_code); } else { document.commentform.submit(); } } else { document.commentform.submit(); } } function joom_smilie(thesmile) { document.commentform.cmttext.value += thesmile+' '; document.commentform.cmttext.focus(); } function joom_validatesend2friend(){ if ((document.send2friend.send2friendname.value=='') || (document.send2friend.send2friendemail.value=='')){ alert(joomgallery_enter_name_email); } else { document.send2friend.submit(); } } function joom_checkme() { var form = document.adminForm; form.imgtitle.style.backgroundColor = ''; form.catid.style.backgroundColor = ''; var doublefiles = false; // do field validation if (form.imgtitle.value == ''|| form.imgtitle.value == null) { alert(joomgallery_pic_must_have_title); form.imgtitle.style.backgroundColor = jg_ffwrong; form.imgtitle.focus(); return false; } else if (form.catid.value == "0") { alert(joomgallery_select_category); form.catid.style.backgroundColor = jg_ffwrong; form.catid.focus(); return false; //Prueft ob ueberhaupt Dateien angeben wurden. } else { var zaehl = 0; var arenofiles = true; var fullfields = new Array(); var screenshotfieldname = new Array(); var screenshotfieldvalue = new Array(); for(i=0;i1) { var feld1 = new Number(); var feld2 = new Number(); for(i=0;ii;j--) { if(screenshotfieldvalue[fullfields[i]].indexOf(screenshotfieldvalue[fullfields[j]])==0) { doublefiles = true; document.getElementsByName(screenshotfieldname[fullfields[i]])[0].style.backgroundColor = jg_ffwrong; document.getElementsByName(screenshotfieldname[fullfields[j]])[0].style.backgroundColor = jg_ffwrong; feld1 = i+1; feld2 = j+1 alert(joomgallery_filename_double1+' ' +feld1+' '+joomgallery_filename_double2+' '+feld2+'.'); } } } } if(doublefiles) { document.getElementsByName(screenshotfieldname[0])[0].focus(); return false; } else { form.submit(); return true; } } function joom_checkme2() { var form = document.adminForm; form.imgtitle.style.backgroundColor = ''; form.catid.style.backgroundColor = ''; // do field validation if (form.imgtitle.value == '' || form.imgtitle.value == null) { alert(joomgallery_pic_must_have_title); form.imgtitle.style.backgroundColor = jg_ffwrong; form.imgtitle.focus(); return false; } else if (form.catid.value == '0') { alert(joomgallery_select_category); form.catid.style.backgroundColor = jg_ffwrong; form.catid.focus(); return false; } else { form.submit(); return true; } } function joom_openjswindow(imgsource, imgtitle, imgwidth, imgheight) { var imgwidth = parseInt(imgwidth); var imgheight = parseInt(imgheight); var scrbar = (resizeJsImage>0) ? 0 : 1; pgwindow = window.open('', 'JoomGallery', 'toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars='+scrbar+',width='+imgwidth+',height='+imgheight+''); with(pgwindow.document) { write("