struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r751534 - in /struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources: org/apache/struts2/static/ template/jquery-simple/ template/jquery/
Date Sun, 08 Mar 2009 21:14:26 GMT
Author: wesw
Date: Sun Mar  8 21:14:25 2009
New Revision: 751534

URL: http://svn.apache.org/viewvc?rev=751534&view=rev
Log:
Changing form submission js function name
fixing label coloring problem on ajax responses and reset

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-simple/form-close-validate.ftl
    struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery-simple/form-validate.ftl
    struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/form-close-validate.ftl

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=751534&r1=751533&r2=751534&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
Sun Mar  8 21:14:25 2009
@@ -33,6 +33,7 @@
 
 StrutsJQueryUtils.clearValidationErrors = function(formId) {
   clearErrorMessages(formId);
+  clearErrorLabels(formId);
 };  
 
 // shows validation errors using functions from xhtml/validation.js

Modified: struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery-simple/form-close-validate.ftl
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery-simple/form-close-validate.ftl?rev=751534&r1=751533&r2=751534&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery-simple/form-close-validate.ftl
(original)
+++ struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery-simple/form-close-validate.ftl
Sun Mar  8 21:14:25 2009
@@ -25,7 +25,7 @@
 <#--TODO add tests for funky datatypes like Date obj returned from the datepicker
     TODO consider ids that contain a period... valid for struts, invalid for jquery
     -->
-    function validateForm_${parameters.id}() {
+    function handleForm_${parameters.id}() {
         var formData = StrutsJQueryUtils.keyValueizeForm("${parameters.id}");
 <#if parameters.method?contains("post") >
         $.post("${parameters.action}", formData, ${parameters.ajaxResultHandler} );

Modified: struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery-simple/form-validate.ftl
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery-simple/form-validate.ftl?rev=751534&r1=751533&r2=751534&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery-simple/form-validate.ftl
(original)
+++ struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery-simple/form-validate.ftl
Sun Mar  8 21:14:25 2009
@@ -25,8 +25,8 @@
 <#if parameters.validate?default(true) == true>
 	<script type="text/javascript" src="${base}/struts/jquery/validation.js"></script>
 	<#if parameters.onsubmit??>
-		${tag.addParameter('onsubmit', "${parameters.onsubmit}; return validateForm_${parameters.id}();")}
+		${tag.addParameter('onsubmit', "${parameters.onsubmit}; return handleForm_${parameters.id}();")}
 	<#else>
-		${tag.addParameter('onsubmit', "return validateForm_${parameters.id}();")}
+		${tag.addParameter('onsubmit', "return handleForm_${parameters.id}();")}
 	</#if>
 </#if>

Modified: struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/form-close-validate.ftl
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/form-close-validate.ftl?rev=751534&r1=751533&r2=751534&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/form-close-validate.ftl
(original)
+++ struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/form-close-validate.ftl
Sun Mar  8 21:14:25 2009
@@ -25,18 +25,18 @@
 <#--TODO add tests for funky datatypes like Date obj returned from the datepicker
     TODO consider ids that contain a period... valid for struts, invalid for jquery
     -->
-    function validateForm_${parameters.id}() {
+    function handleForm_${parameters.id}() {
         var formData = StrutsJQueryUtils.keyValueizeForm("${parameters.id}");
         formData['struts.enableJSONValidation'] = true;
 <#if parameters.method?contains("post") >
-        $.post("${parameters.action}", formData, validateFormCb_${parameters.id} );
+        $.post("${parameters.action}", formData, handleFormCb_${parameters.id} );
 <#else>
-        $.get("${parameters.action}", formData, validateFormCb_${parameters.id} );
+        $.get("${parameters.action}", formData, handleFormCb_${parameters.id} );
 </#if>
         return false;
     }
 
-    function validateFormCb_${parameters.id}( responseText, textStatus ) {
+    function handleFormCb_${parameters.id}( responseText, textStatus ) {
         
         //clear previous validation errors, if any
         StrutsJQueryUtils.clearValidationErrors("${parameters.id}");



Mime
View raw message