diff options
author | cash <cash.costello@gmail.com> | 2011-06-18 21:30:01 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-06-18 21:30:01 -0400 |
commit | d462b57edfeab81bd90a5d0321ea3d1fcbbddff3 (patch) | |
tree | 8caaf24aec75f04c9007ebc34889a5146b0dbebb /mod/embed/start.php | |
parent | 755187045527c5c15ea3b9e70fe7a451d7796585 (diff) | |
download | elgg-d462b57edfeab81bd90a5d0321ea3d1fcbbddff3.tar.gz elgg-d462b57edfeab81bd90a5d0321ea3d1fcbbddff3.tar.bz2 |
rewrote the insert javascript as an intermediate step. I'm sure I completely broke ECML integration and uploading files.
Diffstat (limited to 'mod/embed/start.php')
-rw-r--r-- | mod/embed/start.php | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/mod/embed/start.php b/mod/embed/start.php index ce6c6ec11..3b6e58ce1 100644 --- a/mod/embed/start.php +++ b/mod/embed/start.php @@ -13,17 +13,24 @@ elgg_register_event_handler('init', 'system', 'embed_init'); */ function embed_init() { elgg_extend_view('css/elgg', 'embed/css'); - elgg_extend_view('js/elgg', 'embed/js'); - elgg_extend_view('js/elgg', 'embed/lightbox_init'); elgg_register_plugin_hook_handler('register', 'menu:longtext', 'embed_longtext_menu'); // Page handler for the modal media embed elgg_register_page_handler('embed', 'embed_page_handler'); - elgg_register_js('elgg.embed', 'mod/embed/js/embed.js', 'footer'); + elgg_register_js('elgg.embed', 'js/embed/embed.js', 'footer'); } +/** + * Add the embed menu item to the long text menu + * + * @param string $hook + * @param string $type + * @param array $items + * @param array $vars + * @return array + */ function embed_longtext_menu($hook, $type, $items, $vars) { // yeah this is naughty. embed and ecml might want to merge. if (elgg_is_active_plugin('ecml')) { @@ -37,12 +44,13 @@ function embed_longtext_menu($hook, $type, $items, $vars) { 'href' => "embed?{$active_section}internal_id={$vars['id']}", 'text' => elgg_echo('media:insert'), 'rel' => 'lightbox', - 'link_class' => 'elgg-longtext-control elgg-lightbox', - 'priority' => 1, + 'link_class' => "elgg-longtext-control elgg-lightbox embed-control embed-control-{$vars['id']}", + 'priority' => 10, )); elgg_load_js('lightbox'); elgg_load_css('lightbox'); + elgg_load_js('elgg.embed'); return $items; } |