aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views/default/js
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-10-03 19:56:32 +0200
committerSem <sembrestels@riseup.net>2012-10-03 19:56:32 +0200
commita8a6b1087f09577b9bb5a48cd0874ba0ec90f0fa (patch)
tree9490660744a6aa304d1603efddefc66fb0092c5a /mod/embed/views/default/js
parentf3f3561b7ce6462e4f75649bab874b3112867dc3 (diff)
parent766fe8ebbcc600982dddce4d93b15b65a7b8c1fb (diff)
downloadelgg-a8a6b1087f09577b9bb5a48cd0874ba0ec90f0fa.tar.gz
elgg-a8a6b1087f09577b9bb5a48cd0874ba0ec90f0fa.tar.bz2
Merge branch '1.8' of git://github.com/Elgg/Elgg into lorea-preprod
Diffstat (limited to 'mod/embed/views/default/js')
-rw-r--r--mod/embed/views/default/js/embed/embed.php9
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();