aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2013-02-27 09:44:43 -0500
committerBrett Profitt <brett.profitt@gmail.com>2013-02-27 09:44:43 -0500
commit3cefc94d2a2a77402742098adc999e70cfc4b764 (patch)
tree7b13f93d39f5c58dac3a9bf1e7513de847904de5 /mod/embed/views
parent171daf39f93dc9428118bd9ab0fe012e26a82f46 (diff)
downloadelgg-3cefc94d2a2a77402742098adc999e70cfc4b764.tar.gz
elgg-3cefc94d2a2a77402742098adc999e70cfc4b764.tar.bz2
Fixes #5114. IE 7 and 8 forward to the embed items list after an upload.
Diffstat (limited to 'mod/embed/views')
-rw-r--r--mod/embed/views/default/js/embed/embed.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/mod/embed/views/default/js/embed/embed.php b/mod/embed/views/default/js/embed/embed.php
index eb6153abf..e84427f24 100644
--- a/mod/embed/views/default/js/embed/embed.php
+++ b/mod/embed/views/default/js/embed/embed.php
@@ -1,3 +1,4 @@
+//<script>
elgg.provide('elgg.embed');
elgg.embed.init = function() {
@@ -90,6 +91,18 @@ elgg.embed.submit = function(event) {
$('.embed-wrapper .elgg-form-file-upload').show();
}
}
+
+ // ie 7 and 8 have a null response because of the use of an iFrame
+ // so just show the list after upload.
+ // http://jquery.malsup.com/form/#file-upload claims you can wrap JSON
+ // in a textarea, but a quick test didn't work, and that is fairly
+ // intrusive to the rest of the ajax system.
+ else if (response === undefined && $.browser.msie) {
+ var forward = $('input[name=embed_forward]').val();
+ var url = elgg.normalize_url('embed/tab/' + forward);
+ url = elgg.embed.addContainerGUID(url);
+ $('.embed-wrapper').parent().load(url);
+ }
},
error : function(xhr, status) {
// @todo nothing for now