From: <tri...@us...> - 2007-10-08 09:55:18
|
Revision: 111 http://equanda.svn.sourceforge.net/equanda/?rev=111&view=rev Author: triathlon98 Date: 2007-10-08 02:55:15 -0700 (Mon, 08 Oct 2007) Log Message: ----------- Fix to focus the first record in forms Modified Paths: -------------- trunk/equanda-t4-template/src/main/webapp/AutoFocus.js trunk/equanda-t4-template/src/main/webapp/FormScript.js Modified: trunk/equanda-t4-template/src/main/webapp/AutoFocus.js =================================================================== --- trunk/equanda-t4-template/src/main/webapp/AutoFocus.js 2007-10-08 08:31:18 UTC (rev 110) +++ trunk/equanda-t4-template/src/main/webapp/AutoFocus.js 2007-10-08 09:55:15 UTC (rev 111) @@ -7,12 +7,12 @@ elem=form.elements[i]; if (((elem.tagName=="INPUT" ) && ((elem.type=="text") || (elem.type=="checkbox"))) || (elem.tagName=="SELECT")) { - if ((elem.style.display!="none") && (elem.disabled==false)) + if ((elem.style.display!="none") && (elem.disabled==false) && (elem.className!="displayNone")) { td=elem.parentNode; tr=td.parentNode; tbody=tr.parentNode; - if ((td.style.display!="none") && (tr.style.display!="none") && (tbody.style.display!="none")) + if ((td.style.display!="none") && (td.className!="displayNone") && (tr.style.display!="none") && (tr.className!="displayNone") && (tbody.style.display!="none") && (tbody.className!="displayNone")) { elem.focus(); if (elem.tagName=="INPUT") elem.select(); Modified: trunk/equanda-t4-template/src/main/webapp/FormScript.js =================================================================== --- trunk/equanda-t4-template/src/main/webapp/FormScript.js 2007-10-08 08:31:18 UTC (rev 110) +++ trunk/equanda-t4-template/src/main/webapp/FormScript.js 2007-10-08 09:55:15 UTC (rev 111) @@ -140,7 +140,7 @@ if ( event.which == 13 && ( (( input.type == "submit" ) || ( input.type == "button" )) && hasClass(input, SUBMIT_CLASS) ) ) { - input.form[pos].click(); + input.click(); return false; } if ( event.which == 13 && input.tagName == 'TEXTAREA' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |