forked from GNUsocial/gnu-social
Markup cleanup for attachments
This commit is contained in:
parent
a11d6260cc
commit
01dad57298
@ -176,10 +176,8 @@ class AttachmentAction extends Action
|
|||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$this->elementStart('ul', array('class' => 'attachments'));
|
|
||||||
$ali = new Attachment($this->attachment, $this);
|
$ali = new Attachment($this->attachment, $this);
|
||||||
$cnt = $ali->show();
|
$cnt = $ali->show();
|
||||||
$this->elementEnd('ul');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,7 +67,7 @@ class Attachment_ajaxAction extends AttachmentAction
|
|||||||
*/
|
*/
|
||||||
function showCore()
|
function showCore()
|
||||||
{
|
{
|
||||||
$this->elementStart('div', array('id' => 'ajaxcore'));
|
$this->elementStart('div', array('id' => 'core'));
|
||||||
if (Event::handle('StartShowContentBlock', array($this))) {
|
if (Event::handle('StartShowContentBlock', array($this))) {
|
||||||
$this->showContentBlock();
|
$this->showContentBlock();
|
||||||
Event::handle('EndShowContentBlock', array($this));
|
Event::handle('EndShowContentBlock', array($this));
|
||||||
|
@ -17,12 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(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.attachment').click(function() {$().jOverlay({url: $('address .url')[0].href+'/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'}); return false; });
|
||||||
$('a.thumbnail').hover(
|
$('a.thumbnail').hover(
|
||||||
function() {
|
function() {
|
||||||
|
@ -80,9 +80,9 @@ class AttachmentList extends Widget
|
|||||||
|
|
||||||
function show()
|
function show()
|
||||||
{
|
{
|
||||||
// $this->out->elementStart('div', array('id' =>'attachments_primary'));
|
$this->out->elementStart('dl', array('id' =>'attachment'));
|
||||||
$this->out->elementStart('div', array('id' =>'content'));
|
$this->out->element('dt', null, _('Attachments'));
|
||||||
$this->out->element('h2', null, _('Attachments'));
|
$this->out->elementStart('dd');
|
||||||
$this->out->elementStart('ul', array('class' => 'attachments'));
|
$this->out->elementStart('ul', array('class' => 'attachments'));
|
||||||
|
|
||||||
$atts = new File;
|
$atts = new File;
|
||||||
@ -92,8 +92,9 @@ class AttachmentList extends Widget
|
|||||||
$item->show();
|
$item->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->out->elementEnd('dd');
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
$this->out->elementEnd('div');
|
$this->out->elementEnd('dl');
|
||||||
|
|
||||||
return count($att);
|
return count($att);
|
||||||
}
|
}
|
||||||
@ -195,14 +196,10 @@ class AttachmentListItem extends Widget
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showLink() {
|
function showLink() {
|
||||||
$attr = $this->linkAttr();
|
$this->out->elementStart('a', $this->linkAttr());
|
||||||
$text = $this->linkTitle();
|
$this->out->element('span', null, $this->linkTitle());
|
||||||
$this->out->elementStart('h4');
|
|
||||||
$this->out->elementStart('a', $attr);
|
|
||||||
$this->out->element('span', null, $text);
|
|
||||||
$this->showRepresentation();
|
$this->showRepresentation();
|
||||||
$this->out->elementEnd('a');
|
$this->out->elementEnd('a');
|
||||||
$this->out->elementEnd('h4');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showNoticeAttachment()
|
function showNoticeAttachment()
|
||||||
|
@ -180,9 +180,9 @@ class NoticeListItem extends Widget
|
|||||||
{
|
{
|
||||||
$this->showStart();
|
$this->showStart();
|
||||||
$this->showNotice();
|
$this->showNotice();
|
||||||
|
$this->showNoticeAttachments();
|
||||||
$this->showNoticeInfo();
|
$this->showNoticeInfo();
|
||||||
$this->showNoticeOptions();
|
$this->showNoticeOptions();
|
||||||
$this->showNoticeAttachments();
|
|
||||||
$this->showEnd();
|
$this->showEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,18 +214,6 @@ class NoticeListItem extends Widget
|
|||||||
return intval($file_oembed->c);
|
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()
|
function showNoticeInfo()
|
||||||
{
|
{
|
||||||
$this->out->elementStart('div', 'entry-content');
|
$this->out->elementStart('div', 'entry-content');
|
||||||
|
@ -861,6 +861,9 @@ top:11px;
|
|||||||
left:0;
|
left:0;
|
||||||
z-index:99;
|
z-index:99;
|
||||||
}
|
}
|
||||||
|
#shownotice .notice .attachment img {
|
||||||
|
position:static;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.notice-options {
|
.notice-options {
|
||||||
|
Loading…
Reference in New Issue
Block a user