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 2010/07/20 19:15:04 UTC
svn commit: r965917 - in /tapestry/tapestry5/trunk/tapestry-core/src/main:
java/org/apache/tapestry5/corelib/components/LinkSubmit.java
resources/org/apache/tapestry5/corelib/components/linksubmit.js
resources/org/apache/tapestry5/tapestry.js
Author: hlship
Date: Tue Jul 20 17:15:04 2010
New Revision: 965917
URL: http://svn.apache.org/viewvc?rev=965917&view=rev
Log:
TAP5-1211: LinkSubmit broken in IE 7 mode
Removed:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/linksubmit.js
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/LinkSubmit.java
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/LinkSubmit.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/LinkSubmit.java?rev=965917&r1=965916&r2=965917&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/LinkSubmit.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/LinkSubmit.java Tue Jul 20 17:15:04 2010
@@ -23,7 +23,6 @@ import org.apache.tapestry5.MarkupWriter
import org.apache.tapestry5.TrackableComponentEventCallback;
import org.apache.tapestry5.annotations.Environmental;
import org.apache.tapestry5.annotations.Events;
-import org.apache.tapestry5.annotations.Import;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.SupportsInformalParameters;
import org.apache.tapestry5.corelib.SubmitMode;
@@ -41,7 +40,6 @@ import org.apache.tapestry5.services.jav
* .
*/
@SupportsInformalParameters
-@Import(library = "linksubmit.js")
@Events(EventConstants.SELECTED + " by default, may be overridden")
public class LinkSubmit implements ClientElement
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=965917&r1=965916&r2=965917&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js Tue Jul 20 17:15:04 2010
@@ -624,7 +624,7 @@ var Tapestry = {
remove : function(element) {
Tapestry.purge(element);
- element.remove();
+ Element.remove(element);
},
/**
@@ -977,6 +977,25 @@ Tapestry.Initializer = {
spec.zoneId, spec.url);
},
+ linkSubmit : function(spec) {
+
+ Tapestry.replaceElementTagName(spec.clientId, "A");
+
+ $(spec.clientId).writeAttribute("href", "#");
+
+ $(spec.clientId).observeAction("click", function(event) {
+
+ var form = $(spec.form);
+
+ if (!spec.validate)
+ form.skipValidation();
+
+ form.setSubmittingElement(this);
+
+ form.performSubmit(event);
+ });
+ },
+
updateZoneOnEvent : function(eventName, element, zoneId, url) {
element = $(element);