]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Touch ups for the embed plugin -- this one needs some serious work still, though...
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 22 Feb 2011 08:19:21 +0000 (08:19 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 22 Feb 2011 08:19:21 +0000 (08:19 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8425 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/embed/views/default/embed/embed.php
mod/embed/views/default/embed/js.php
mod/embed/views/default/embed/layouts/gallery.php
mod/embed/views/default/embed/layouts/list.php
mod/embed/views/default/embed/lightbox_init.php
mod/embed/views/default/embed/link.php
mod/embed/views/default/embed/upload/content.php
mod/embed/views/default/group/default/embed.php
mod/embed/views/default/object/file/embedlist.php

index 8f4ee4cb2a2d09841fed782fc5453b7d44bcc3af..b27c53f6b89ac73e5891451ad7939439d3d6e064 100644 (file)
@@ -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;
index fbc6a0340307c50b2cdb198893298f03b4ce842e..fc34c24422774b636244c8f85bb6619c60ad914d 100644 (file)
@@ -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');
        ?>
        
index 5ef56401737dd32edb138de19ff9cb83fbb40de1..70b6d33a54a415ec8c5b206c4d78e6af4ff47ccc 100644 (file)
@@ -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>";
index 1a98ece5cf7029849fba8411331d6810dd837a57..5d62e572be135ab9d08de0c3b3763ea1ea121322 100644 (file)
@@ -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
index 9f271067b25988bf2c17a9ed23dafe1235da02a5..2c385a5784933e434dcd60f71fa90b4bb98f4e4d 100644 (file)
@@ -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>
index 2bcf4830070e3a929319432a9713c1621bffbdde..dc3b3313e75d9c3792d906bf7f40b34e6359810f 100644 (file)
@@ -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',
+));
index f314c26d2cc9616913886d00b695b1b547b2d7ef..e738f85708194101190acdfdf67af41b02a66080 100644 (file)
@@ -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);
                });
 
index 34a0d0c61affea9759489402a0b8c4e817e74887..bf51f0a7d20368f969ccd336d7d29ac8c88d98f4 100644 (file)
@@ -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
index 724032c389717e0d440b409748cd21ffd50ee9ef..5a3163e4c70ea55101224f05bd09835c0123ada9 100644 (file)
@@ -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>