You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2007/11/14 00:02:32 UTC
svn commit: r594693 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js
Author: hlship
Date: Tue Nov 13 15:02:32 2007
New Revision: 594693
URL: http://svn.apache.org/viewvc?rev=594693&view=rev
Log:
TAPESTRY-1748: Field validators continue to generate client-side JavaScript even though the Form is configured to not do client-side validation
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js?rev=594693&r1=594692&r2=594693&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js Tue Nov 13 15:02:32 2007
@@ -22,9 +22,8 @@
if (form.errorDiv)
{
- Tapestry.hideInvisible(form.errorDiv);
-
form.errorList = form.errorDiv.getElementsBySelector("ul").first();
+
if (! form.errorList)
{
// create it now
@@ -132,21 +131,7 @@
});
},
- // Checks the element; if it has the "t-invisible" CSS class, then
- // the element is hidden,and the t-invisible CSS class is removed. This is necessary
- // for Prototype's visible() method, which can't determine visibility when it's defined via
- // CSS.
- hideInvisible : function(element)
- {
- element = $(element);
-
- if (element.classNames().include("t-invisible"))
- {
- element.hide();
- element.removeClassName("t-invisible");
- }
- },
FormEvent : Class.create(),
@@ -286,9 +271,6 @@
var id = field.id;
this.label = $(id + ':label');
this.icon = $(id + ':icon');
- if (this.icon)
- Tapestry.hideInvisible(this.icon);
-
},
// Adds a validator. acceptBlank is true if the validator should be invoked regardless of
@@ -379,5 +361,13 @@
}
};
+Event.observe(window, "load", function()
+{
+ $$(".t-invisible").each(function(element)
+ {
+ element.hide();
+ element.removeClassName("t-invisible");
+ });
+});