tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bobhar...@apache.org
Subject [2/2] git commit: Fixed TAP5-1903 ("Bug that affects the javascript when a zone which contains an upload component is re render"). Thanks to Boris Horvat for the patch
Date Mon, 17 Sep 2012 00:43:25 GMT
Fixed TAP5-1903
("Bug that affects the javascript when a zone which
contains an upload component is re render"). Thanks to Boris Horvat for
the patch

Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/32efc0de
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/32efc0de
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/32efc0de

Branch: refs/heads/master
Commit: 32efc0dee12412fe6a54b6bf536b658c45941a52
Parents: aa3ee48
Author: bharner <bobharner@apache.org>
Authored: Sun Sep 16 20:20:31 2012 -0400
Committer: bharner <bobharner@apache.org>
Committed: Sun Sep 16 20:41:08 2012 -0400

----------------------------------------------------------------------
 .../apache/tapestry5/upload/components/upload.js   |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32efc0de/tapestry-upload/src/main/resources/org/apache/tapestry5/upload/components/upload.js
----------------------------------------------------------------------
diff --git a/tapestry-upload/src/main/resources/org/apache/tapestry5/upload/components/upload.js
b/tapestry-upload/src/main/resources/org/apache/tapestry5/upload/components/upload.js
index 274e35d..595dc39 100644
--- a/tapestry-upload/src/main/resources/org/apache/tapestry5/upload/components/upload.js
+++ b/tapestry-upload/src/main/resources/org/apache/tapestry5/upload/components/upload.js
@@ -17,9 +17,11 @@
  * component is dynamically added to the form via Ajax.
  */
 Tapestry.Initializer.injectedUpload = function(element)
-{
-	var form = $(element).form;
-	  
-    form.enctype = "multipart/form-data";
-    form.encoding = "multipart/form-data"; 
+{	
+    var form = $(element).form; 
+    if (form)
+    {
+        form.enctype = "multipart/form-data";
+        form.encoding = "multipart/form-data";
+    } 
 }
\ No newline at end of file


Mime
View raw message