]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into...
authorSarven Capadisli <csarven@csarven-laptop.(none)>
Mon, 25 May 2009 19:53:49 +0000 (15:53 -0400)
committerSarven Capadisli <csarven@csarven-laptop.(none)>
Mon, 25 May 2009 19:53:49 +0000 (15:53 -0400)
actions/attachment.php
actions/attachment_ajax.php
js/util.js
lib/attachmentlist.php
lib/noticelist.php
theme/base/css/display.css

index c51c7512005329993709bbc5251227ed3ae062f6..16ee723d96bb35c000008b64f0d8ee13a19cc786 100644 (file)
@@ -176,10 +176,8 @@ class AttachmentAction extends Action
 
     function showContent()
     {
-        $this->elementStart('ul', array('class' => 'attachments'));
         $ali = new Attachment($this->attachment, $this);
         $cnt = $ali->show();
-        $this->elementEnd('ul');
     }
 
     /**
index 6930dc112d13380fb586067eb3afed2059c3b9f8..3d83393c51613c22f976974d52be67fd73083319 100644 (file)
@@ -67,7 +67,7 @@ class Attachment_ajaxAction extends AttachmentAction
      */
     function showCore()
     {
-        $this->elementStart('div', array('id' => 'ajaxcore'));
+        $this->elementStart('div', array('id' => 'core'));
         if (Event::handle('StartShowContentBlock', array($this))) {
             $this->showContentBlock();
             Event::handle('EndShowContentBlock', array($this));
index ffaedc690d1e6b51149b4bbecef8b9b336509e64..cba6f822ebf86f4e79df91f799f28a70ed5ec204 100644 (file)
  */
 
 $(document).ready(function(){
-// attachments and attachment pages not used at the moment except for attachment_ajax version
-//    $('.attachments').click(function() {$().jOverlay({zIndex:999, success:function(html) {$('.attachment').click(function() {$().jOverlay({url:$(this).attr('href') + '/ajax'}); return false; });
-//        }, url:$(this).attr('href') + '/ajax'}); return false; });
-
-    //FIXME
-    //need to link to proper url depending on site config (path name and theme, for instance)
     $('a.attachment').click(function() {$().jOverlay({url: $('address .url')[0].href+'/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'}); return false; });
     $('a.thumbnail').hover(
         function() {
index 2a0114b12773d5fd89ba1e3ef8a6006ea9504a9a..d0478bad354e2b2004b2954285915d5ffd833cc3 100644 (file)
@@ -80,9 +80,9 @@ class AttachmentList extends Widget
 
     function show()
     {
-//        $this->out->elementStart('div', array('id' =>'attachments_primary'));
-        $this->out->elementStart('div', array('id' =>'content'));
-        $this->out->element('h2', null, _('Attachments'));
+        $this->out->elementStart('dl', array('id' =>'attachment'));
+        $this->out->element('dt', null, _('Attachments'));
+        $this->out->elementStart('dd');
         $this->out->elementStart('ul', array('class' => 'attachments'));
 
         $atts = new File;
@@ -92,8 +92,9 @@ class AttachmentList extends Widget
             $item->show();
         }
 
+        $this->out->elementEnd('dd');
         $this->out->elementEnd('ul');
-        $this->out->elementEnd('div');
+        $this->out->elementEnd('dl');
 
         return count($att);
     }
@@ -195,14 +196,10 @@ class AttachmentListItem extends Widget
     }
 
     function showLink() {
-        $attr = $this->linkAttr();
-        $text = $this->linkTitle();
-        $this->out->elementStart('h4');
-        $this->out->elementStart('a', $attr);
-        $this->out->element('span', null, $text);
+        $this->out->elementStart('a', $this->linkAttr());
+        $this->out->element('span', null, $this->linkTitle());
         $this->showRepresentation();
         $this->out->elementEnd('a');
-        $this->out->elementEnd('h4');
     }
 
     function showNoticeAttachment()
index ae143889218caf15df47ac8ca4652ec3faa7d245..50a95cfcbb2a96e2a707a350119f518f0513859f 100644 (file)
@@ -180,9 +180,9 @@ class NoticeListItem extends Widget
     {
         $this->showStart();
         $this->showNotice();
+        $this->showNoticeAttachments();
         $this->showNoticeInfo();
         $this->showNoticeOptions();
-        $this->showNoticeAttachments();
         $this->showEnd();
     }
 
@@ -214,18 +214,6 @@ class NoticeListItem extends Widget
         return intval($file_oembed->c);
     }
 
-    function showNoticeAttachmentsIcon()
-    {
-        if (!($this->isUsedInList() && ($count = $this->attachmentCount()))) {
-            return;
-        }
-
-        $href = common_local_url('shownotice', array('notice' => $this->notice->id)) . '#attachments';
-        $this->out->elementStart('p', 'entry-attachments');
-        $this->out->element('a', array('href' => $href, 'title' => "# of attachments: $count"), $count === 1 ? '' : $count);
-        $this->out->elementEnd('p');
-    }
-
     function showNoticeInfo()
     {
         $this->out->elementStart('div', 'entry-content');
index 74f36914257a44f07410b422820b31b7609402df..aa76910f0b4ea899801ea9514ea4f29df8a71856 100644 (file)
@@ -861,6 +861,9 @@ top:11px;
 left:0;
 z-index:99;
 }
+#shownotice .notice .attachment img {
+position:static;
+}
 
 
 .notice-options {