From f8797c313b9500e5d6af512786412601d7d641f0 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Tue, 22 Feb 2011 08:19:21 +0000 Subject: Touch ups for the embed plugin -- this one needs some serious work still, though... git-svn-id: http://code.elgg.org/elgg/trunk@8425 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/embed/views/default/embed/embed.php | 2 +- mod/embed/views/default/embed/js.php | 3 +++ mod/embed/views/default/embed/layouts/gallery.php | 4 +--- mod/embed/views/default/embed/layouts/list.php | 4 +--- mod/embed/views/default/embed/lightbox_init.php | 4 +--- mod/embed/views/default/embed/link.php | 11 ++++++----- mod/embed/views/default/embed/upload/content.php | 4 ++-- mod/embed/views/default/group/default/embed.php | 2 +- mod/embed/views/default/object/file/embedlist.php | 9 +-------- 9 files changed, 17 insertions(+), 26 deletions(-) (limited to 'mod/embed') diff --git a/mod/embed/views/default/embed/embed.php b/mod/embed/views/default/embed/embed.php index 8f4ee4cb2..b27c53f6b 100644 --- a/mod/embed/views/default/embed/embed.php +++ b/mod/embed/views/default/embed/embed.php @@ -137,7 +137,7 @@ $(document).ready(function() { // tabs $('.embed_section').click(function() { var section = $(this).attr('id'); - var url = 'pg/embed/embed?active_section=' + section + '&internal_name=' + internal_name; + var url = elgg.config.wwwroot + 'pg/embed/embed?active_section=' + section + '&internal_name=' + internal_name; $('#facebox .body .content').load(url); return false; diff --git a/mod/embed/views/default/embed/js.php b/mod/embed/views/default/embed/js.php index fbc6a0340..fc34c2442 100644 --- a/mod/embed/views/default/embed/js.php +++ b/mod/embed/views/default/embed/js.php @@ -1,6 +1,8 @@ @@ -23,6 +25,7 @@ function elggEmbedInsertContent(content, textAreaName) { echo elgg_view('embed/addcontentjs'); // the one you should extend. + //@todo This should fire a plugin hook or event, not require extending the view! >_< echo elgg_view('embed/custom_insert_js'); ?> diff --git a/mod/embed/views/default/embed/layouts/gallery.php b/mod/embed/views/default/embed/layouts/gallery.php index 5ef564017..70b6d33a5 100644 --- a/mod/embed/views/default/embed/layouts/gallery.php +++ b/mod/embed/views/default/embed/layouts/gallery.php @@ -7,6 +7,4 @@ */ $active_section = elgg_extract('section', $vars, array()); -$content = "
" . elgg_extract('content', $vars, '') . "
"; - -echo $content; \ No newline at end of file +echo "
" . elgg_extract('content', $vars, '') . "
"; diff --git a/mod/embed/views/default/embed/layouts/list.php b/mod/embed/views/default/embed/layouts/list.php index 1a98ece5c..5d62e572b 100644 --- a/mod/embed/views/default/embed/layouts/list.php +++ b/mod/embed/views/default/embed/layouts/list.php @@ -7,6 +7,4 @@ */ $active_section = elgg_extract('section', $vars, array()); -$content = "
" . elgg_extract('content', $vars, '') . "
"; - -echo $content; \ No newline at end of file +echo "
" . elgg_extract('content', $vars, '') . "
"; \ No newline at end of file diff --git a/mod/embed/views/default/embed/lightbox_init.php b/mod/embed/views/default/embed/lightbox_init.php index 9f271067b..2c385a578 100644 --- a/mod/embed/views/default/embed/lightbox_init.php +++ b/mod/embed/views/default/embed/lightbox_init.php @@ -1,6 +1,4 @@ diff --git a/mod/embed/views/default/embed/link.php b/mod/embed/views/default/embed/link.php index 2bcf48300..dc3b3313e 100644 --- a/mod/embed/views/default/embed/link.php +++ b/mod/embed/views/default/embed/link.php @@ -11,9 +11,10 @@ if (elgg_is_active_plugin('ecml')) { } $url = "pg/embed/?{$active_section}internal_name={$vars['name']}"; -$url = elgg_normalize_url($url); -?> - - - +echo elgg_view('output/url', array( + 'href' => $url, + 'text' => elgg_echo('media:insert'), + 'rel' => 'facebox', + 'class' => 'elgg-longtext-control', +)); diff --git a/mod/embed/views/default/embed/upload/content.php b/mod/embed/views/default/embed/upload/content.php index f314c26d2..e738f8570 100644 --- a/mod/embed/views/default/embed/upload/content.php +++ b/mod/embed/views/default/embed/upload/content.php @@ -31,12 +31,12 @@ if ($upload_sections) { ?>