]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Updated to Elgg 1.8.16.
authorSem <sembrestels@riseup.net>
Fri, 23 Aug 2013 02:56:15 +0000 (04:56 +0200)
committerSem <sembrestels@riseup.net>
Fri, 23 Aug 2013 02:56:15 +0000 (04:56 +0200)
views/default/js/embed/embed.php

index 394240fa480eb5064ba9374d5bc84dca27afcf63..301ff5a496f25ea00a33949b968b534792b6f00d 100644 (file)
@@ -34,8 +34,7 @@ elgg.embed.init = function() {
 
        // caches the current textarea id
        $(".embed-control").live('click', function() {
-               var textAreaId = /embed-control-(\S)+/.exec($(this).attr('class'))[0];
-               elgg.embed.textAreaId = textAreaId.substr("embed-control-".length);
+               elgg.embed.textAreaId = /embed-control-(\S)+/.exec($(this).attr('class'))[1];
        });
 
        // special pagination helper for lightbox
@@ -115,6 +114,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