diff options
Diffstat (limited to 'mod/embed')
-rw-r--r-- | mod/embed/views/default/embed/embed.php | 2 | ||||
-rw-r--r-- | mod/embed/views/default/embed/js.php | 3 | ||||
-rw-r--r-- | mod/embed/views/default/embed/layouts/gallery.php | 4 | ||||
-rw-r--r-- | mod/embed/views/default/embed/layouts/list.php | 4 | ||||
-rw-r--r-- | mod/embed/views/default/embed/lightbox_init.php | 4 | ||||
-rw-r--r-- | mod/embed/views/default/embed/link.php | 11 | ||||
-rw-r--r-- | mod/embed/views/default/embed/upload/content.php | 4 | ||||
-rw-r--r-- | mod/embed/views/default/group/default/embed.php | 2 | ||||
-rw-r--r-- | mod/embed/views/default/object/file/embedlist.php | 9 |
9 files changed, 17 insertions, 26 deletions
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 = '<?php echo elgg_get_site_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 @@ <?php /** * JS interface for inserting content into the active editor. + * + * @todo: 1.8 JS: Ugh */ ?> @@ -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 = "<div class='embed_modal_".$active_section."'>" . elgg_extract('content', $vars, '') . "</div>"; - -echo $content;
\ No newline at end of file +echo "<div class='embed_modal_$active_section'>" . elgg_extract('content', $vars, '') . "</div>"; 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 = "<div class='embed_modal_" . $active_section . "'>" . elgg_extract('content', $vars, '') . "</div>"; - -echo $content;
\ No newline at end of file +echo "<div class='embed_modal_$active_section'>" . elgg_extract('content', $vars, '') . "</div>";
\ 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 @@ <?php //@todo JS 1.8: no ?> <script type="text/javascript"> - jQuery(document).ready(function($) { - $('a[rel*=facebox]').facebox() - }); + $(function() { $('a[rel*=facebox]').facebox() }); </script> 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); -?> -<a class="elgg-longtext-control" href="<?php echo $url; ?>" rel="facebox"> - <?php echo elgg_echo('media:insert'); ?> -</a> +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) { ?> <?php //@todo: JS 1.8: ugly ?> <script type="text/javascript"> - $(document).ready(function() { + $(function() { // change for dropdown $('#embed_upload').change(function() { var upload_section = $(this).val(); - var url = '<?php echo elgg_get_site_url(); ?>pg/embed/embed?active_section=upload&active_upload_section=' + upload_section; + var url = elgg.get_site_url() + 'pg/embed/embed?active_section=upload&active_upload_section=' + upload_section; $('#facebox .body .content').load(url); }); diff --git a/mod/embed/views/default/group/default/embed.php b/mod/embed/views/default/group/default/embed.php index 34a0d0c61..bf51f0a7d 100644 --- a/mod/embed/views/default/group/default/embed.php +++ b/mod/embed/views/default/group/default/embed.php @@ -1,5 +1,5 @@ <?php if ($vars['entity'] instanceof ElggGroup) { - echo '<a href="'. $vars['entity']->getURL() .'">' . $vars['entity']->title . '</a>'; + echo '<a href="'. $vars['entity']->getURL() .'">' . $vars['entity']->name . '</a>'; } ?>
\ No newline at end of file diff --git a/mod/embed/views/default/object/file/embedlist.php b/mod/embed/views/default/object/file/embedlist.php index 724032c38..5a3163e4c 100644 --- a/mod/embed/views/default/object/file/embedlist.php +++ b/mod/embed/views/default/object/file/embedlist.php @@ -7,12 +7,5 @@ $icon = "<a href=\"{$file->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $file->mimetype, 'thumbnail' => $file->thumbnail, 'file_guid' => $file->guid, 'size' => 'small')) . "</a>"; ?> <div id="embed_entity_<?php echo $file->guid; ?>"> - <div class="entity-listing clearfix"> - <div class="entity-listing-icon"> - <?php echo $icon; ?> - </div> - <div class="entity-listing-info"> - <?php echo $info; ?> - </div> - </div> + <?php echo elgg_view_image_block($icon, $info); ?> </div> |