[WTF CVS] wtf/static tracking.js,1.9,1.10
Brought to you by:
gryphonshafer
|
From: Gryphon S. <gry...@us...> - 2006-12-06 16:09:40
|
Update of /cvsroot/wtf-tracker/wtf/static In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14298/static Modified Files: tracking.js Log Message: After someone pointed out that index() is faster than substr(), time to refactor a few lines of code across the application. Index: tracking.js =================================================================== RCS file: /cvsroot/wtf-tracker/wtf/static/tracking.js,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tracking.js 2 Dec 2006 00:09:09 -0000 1.9 --- tracking.js 6 Dec 2006 16:09:35 -0000 1.10 *************** *** 488,492 **** var inputs = document.getElementsByTagName("input"); for ( var i in inputs ) { ! if ( inputs[i].name && inputs[i].name.substr( 0, 9 ) == "activity_" ) { inputs[i].disabled = state; } --- 488,492 ---- var inputs = document.getElementsByTagName("input"); for ( var i in inputs ) { ! if ( inputs[i].name && inputs[i].name.indexOf("activity_") == 0 ) { inputs[i].disabled = state; } |