diff options
Diffstat (limited to 'mod/embed')
-rw-r--r-- | mod/embed/manifest.xml | 4 | ||||
-rw-r--r-- | mod/embed/start.php | 2 | ||||
-rw-r--r-- | mod/embed/views/default/embed/layout.php | 3 | ||||
-rw-r--r-- | mod/embed/views/default/js/embed/embed.php | 10 |
4 files changed, 14 insertions, 5 deletions
diff --git a/mod/embed/manifest.xml b/mod/embed/manifest.xml index 46ab2df9e..81ca9194e 100644 --- a/mod/embed/manifest.xml +++ b/mod/embed/manifest.xml @@ -13,10 +13,10 @@ <type>elgg_release</type> <version>1.8</version> </requires> - <suggests> + <requires> <type>plugin</type> <name>file</name> <version>1.8.1</version> - </suggests> + </requires> <activate_on_install>true</activate_on_install> </plugin_manifest> diff --git a/mod/embed/start.php b/mod/embed/start.php index a3ccab66b..e8a3f8c14 100644 --- a/mod/embed/start.php +++ b/mod/embed/start.php @@ -47,7 +47,7 @@ function embed_longtext_menu($hook, $type, $items, $vars) { 'name' => 'embed', 'href' => $url, 'text' => elgg_echo('embed:media'), - 'rel' => 'lightbox', + 'rel' => "embed-lightbox-{$vars['id']}", 'link_class' => "elgg-longtext-control elgg-lightbox embed-control embed-control-{$vars['id']}", 'priority' => 10, )); 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..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,11 +84,15 @@ 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(); } } }, - error: function(xhr, status) { - // nothing for now + error : function(xhr, status) { + // @todo nothing for now } }); |