Return-Path: Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: (qmail 45518 invoked from network); 6 Mar 2009 04:44:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2009 04:44:07 -0000 Received: (qmail 67481 invoked by uid 500); 6 Mar 2009 04:44:05 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 67455 invoked by uid 500); 6 Mar 2009 04:44:05 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 67446 invoked by uid 99); 6 Mar 2009 04:44:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2009 20:44:05 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 04:44:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D1B212388962; Fri, 6 Mar 2009 04:43:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r750768 - in /struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources: org/apache/struts2/static/jqueryUtils.js template/jquery/validation.js Date: Fri, 06 Mar 2009 04:43:42 -0000 To: commits@struts.apache.org From: wesw@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090306044342.D1B212388962@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: wesw Date: Fri Mar 6 04:43:42 2009 New Revision: 750768 URL: http://svn.apache.org/viewvc?rev=750768&view=rev Log: jquery-ifying javascript files Modified: struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/org/apache/struts2/static/jqueryUtils.js struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/validation.js Modified: struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/org/apache/struts2/static/jqueryUtils.js URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/org/apache/struts2/static/jqueryUtils.js?rev=750768&r1=750767&r2=750768&view=diff ============================================================================== --- struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/org/apache/struts2/static/jqueryUtils.js (original) +++ struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/org/apache/struts2/static/jqueryUtils.js Fri Mar 6 04:43:42 2009 @@ -50,6 +50,7 @@ } }; +/* StrutsJQueryUtils.firstElement = function(parentNode, tagName) { var node = parentNode.firstChild; while(node && node.nodeType != 1){ @@ -85,7 +86,7 @@ } return node; }; - +*/ StrutsJQueryUtils.addOnLoad = function(func) { $().ready(func); }; Modified: struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/validation.js URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/validation.js?rev=750768&r1=750767&r2=750768&view=diff ============================================================================== --- struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/validation.js (original) +++ struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/validation.js Fri Mar 6 04:43:42 2009 @@ -41,6 +41,16 @@ } function addErrorJquery(e, errorText) { + var parentRow = $(e).parent("tr").get(0); + $(parentRow).before( + $("").attr("errorFor", e).html( + $("").attr("colspan", "2").html( + $("").addClass("errorMessage").html(errorText) + ) + ) + ); + $("label[for="+ e +"]").addClass('errorLabel'); + /* try { var row = (e.type ? e : e[0]); while(row.nodeName.toUpperCase() != "TR") { @@ -73,4 +83,5 @@ } catch (e) { alert(e); } + */ }