aboutsummaryrefslogtreecommitdiff
path: root/mod/embed
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-06-17 08:55:07 -0400
committerCash Costello <cash.costello@gmail.com>2012-06-17 08:55:07 -0400
commit03b11429979e2bc35233af695ae98414ef9a4fd4 (patch)
treecc9b0fd443af1040d8c727c50ef41e6529bcb965 /mod/embed
parentf817ef90978ba19aee2273872ff2d75c4b4c2c65 (diff)
downloadelgg-03b11429979e2bc35233af695ae98414ef9a4fd4.tar.gz
elgg-03b11429979e2bc35233af695ae98414ef9a4fd4.tar.bz2
Fixes #3755 adds ajax loader when uploading files in embed plugin
Diffstat (limited to 'mod/embed')
-rw-r--r--mod/embed/views/default/embed/layout.php3
-rw-r--r--mod/embed/views/default/js/embed/embed.php7
2 files changed, 8 insertions, 2 deletions
diff --git a/mod/embed/views/default/embed/layout.php b/mod/embed/views/default/embed/layout.php
index e906160b1..1ca263037 100644
--- a/mod/embed/views/default/embed/layout.php
+++ b/mod/embed/views/default/embed/layout.php
@@ -21,6 +21,9 @@ if ($selected->getData('view')) {
}
}
+$tab .= elgg_view('graphics/ajax_loader', array(
+ 'class' => 'embed-throbber mtl',
+));
$container_info = elgg_view('input/hidden', array(
'name' => 'embed_container_guid',
diff --git a/mod/embed/views/default/js/embed/embed.php b/mod/embed/views/default/js/embed/embed.php
index 5fd534a09..0c8442292 100644
--- a/mod/embed/views/default/js/embed/embed.php
+++ b/mod/embed/views/default/js/embed/embed.php
@@ -85,11 +85,14 @@ elgg.embed.submit = function(event) {
}
}
},
- error: function(xhr, status) {
- // nothing for now
+ error : function(xhr, status) {
+ // @todo nothing for now
}
});
+ $('.elgg-form-file-upload').hide();
+ $('.embed-throbber').show();
+
// this was bubbling up the DOM causing a submission
event.preventDefault();
event.stopPropagation();