[phpcvsview-cvs-updates] phpcvsview phpcvsview.js,1.1,1.2
Status: Pre-Alpha
Brought to you by:
bcheesem
From: Brian C. <bch...@us...> - 2005-01-23 04:56:18
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv717 Modified Files: phpcvsview.js Log Message: Added javascript function for posting back the File Diff request. Index: phpcvsview.js =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/phpcvsview.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** phpcvsview.js 22 Jan 2005 14:01:39 -0000 1.1 --- phpcvsview.js 23 Jan 2005 04:56:09 -0000 1.2 *************** *** 13,14 **** --- 13,36 ---- location=newlocation; } + + function postBackDiffRequest(form) + { + var ddRev1=form.DiffRev1.value; + var ddRev2=form.DiffRev2.value; + if (ddRev1 > ddRev2) + { + // Swap the values. + var ddTemp = ddRev1; + ddRev1 = ddRev2; + ddRev2 = ddTemp; + } + if (ddRev1 == ddRev2) + { + alert('Cannot generate a diff of a revision to itself!') + } + else + { + var dfDiffReq=form.URLDiffReq.value; + location=dfDiffReq+'&r1='+ddRev1+'&r2='+ddRev2+'&df'; + } + } |