You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by bo...@apache.org on 2012/09/17 02:43:25 UTC
[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
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 <bo...@apache.org>
Authored: Sun Sep 16 20:20:31 2012 -0400
Committer: bharner <bo...@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