diff options
author | Steve Clay <steve@mrclay.org> | 2012-09-23 20:32:44 -0700 |
---|---|---|
committer | Steve Clay <steve@mrclay.org> | 2012-09-23 20:32:44 -0700 |
commit | 766fe8ebbcc600982dddce4d93b15b65a7b8c1fb (patch) | |
tree | 78988c4c04c87c26efd715323857afb1388befbc /mod/embed/views/default | |
parent | 9ccbd106a87a1742a61cc4df0e9ead921046772a (diff) | |
parent | d8da958e206b8f9b8b2e578a6572bcae1c08df0d (diff) | |
download | elgg-766fe8ebbcc600982dddce4d93b15b65a7b8c1fb.tar.gz elgg-766fe8ebbcc600982dddce4d93b15b65a7b8c1fb.tar.bz2 |
Merge pull request #328 from beck24/#4725-embed-file-form
Fixes #4725 - embed form on file upload textarea removes file upload form
Diffstat (limited to 'mod/embed/views/default')
-rw-r--r-- | mod/embed/views/default/js/embed/embed.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/embed/views/default/js/embed/embed.php b/mod/embed/views/default/js/embed/embed.php index 0c8442292..eb6153abf 100644 --- a/mod/embed/views/default/js/embed/embed.php +++ b/mod/embed/views/default/js/embed/embed.php @@ -67,6 +67,8 @@ echo elgg_view('embed/custom_insert_js'); * @return bool */ elgg.embed.submit = function(event) { + $('.embed-wrapper .elgg-form-file-upload').hide(); + $('.embed-throbber').show(); $(this).ajaxSubmit({ dataType : 'json', @@ -82,6 +84,10 @@ elgg.embed.submit = function(event) { var url = elgg.normalize_url('embed/tab/' + forward); url = elgg.embed.addContainerGUID(url); $('.embed-wrapper').parent().load(url); + } else { + // incorrect response, presumably an error has been displayed + $('.embed-throbber').hide(); + $('.embed-wrapper .elgg-form-file-upload').show(); } } }, @@ -90,9 +96,6 @@ elgg.embed.submit = function(event) { } }); - $('.elgg-form-file-upload').hide(); - $('.embed-throbber').show(); - // this was bubbling up the DOM causing a submission event.preventDefault(); event.stopPropagation(); |