]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3755 adds ajax loader when uploading files in embed plugin
authorCash Costello <cash.costello@gmail.com>
Sun, 17 Jun 2012 12:55:07 +0000 (08:55 -0400)
committerCash Costello <cash.costello@gmail.com>
Sun, 17 Jun 2012 12:55:07 +0000 (08:55 -0400)
mod/embed/views/default/embed/layout.php
mod/embed/views/default/js/embed/embed.php

index e906160b1b8c56b52b768c342f3575a88ceffc7a..1ca26303761324107133629d18316425d884306d 100644 (file)
@@ -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',
index 5fd534a09d2d08f5b7907bc4820d2c6c58042f90..0c8442292877451031f4fa7d76c45b49ee61426f 100644 (file)
@@ -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();