forked from GNUsocial/gnu-social
Updated 'more' anchor for attachments to do an XHR GET
This commit is contained in:
parent
dc71833ce6
commit
d8a533274f
12
js/util.js
12
js/util.js
@ -399,6 +399,17 @@ var SN = { // StatusNet
|
||||
return;
|
||||
}
|
||||
|
||||
var attachment_more = notice.find('.attachment.more');
|
||||
if (attachment_more.length > 0) {
|
||||
attachment_more.click(function() {
|
||||
$.get($(this).attr('href')+'/ajax', null, function(data) {
|
||||
notice.find('.entry-title .entry-content').html($(data).find('#attachment_view .entry-content').html());
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.fn.jOverlay.options = {
|
||||
method : 'GET',
|
||||
data : '',
|
||||
@ -452,6 +463,7 @@ var SN = { // StatusNet
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
NoticeDataAttach: function() {
|
||||
|
@ -368,9 +368,7 @@ class Attachment extends AttachmentListItem
|
||||
{
|
||||
$body = $this->scrubHtmlFile($attachment);
|
||||
if ($body) {
|
||||
$this->out->elementStart('div', array('class' => 'inline-attachment'));
|
||||
$this->out->raw($body);
|
||||
$this->out->elementEnd('div');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -559,7 +559,7 @@ class Ostatus_profile extends Memcached_DataObject
|
||||
htmlspecialchars($attachUrl) .
|
||||
'" class="attachment more">' .
|
||||
// TRANS: expansion link for too-long remote messages
|
||||
htmlspecialchars(_m('(more)')) .
|
||||
htmlspecialchars(_m('more')) .
|
||||
'</a>';
|
||||
}
|
||||
}
|
||||
|
@ -1284,9 +1284,16 @@ height:16px;
|
||||
position:relative;
|
||||
padding-left:16px;
|
||||
}
|
||||
#attachments .attachment {
|
||||
#attachments .attachment,
|
||||
.notice .attachment.more {
|
||||
padding-left:0;
|
||||
}
|
||||
.notice .attachment.more:before {
|
||||
content:'( ';
|
||||
}
|
||||
.notice .attachment.more:after {
|
||||
content:' )';
|
||||
}
|
||||
.notice .attachment img {
|
||||
position:absolute;
|
||||
top:18px;
|
||||
|
@ -410,7 +410,8 @@ background-position: 0 -1714px;
|
||||
.notice .attachment {
|
||||
background-position:0 -394px;
|
||||
}
|
||||
#attachments .attachment {
|
||||
#attachments .attachment,
|
||||
.notice .attachment.more {
|
||||
background:none;
|
||||
}
|
||||
.notice-options .notice_reply {
|
||||
|
@ -409,7 +409,8 @@ background-position: 0 -1714px;
|
||||
.notice .attachment {
|
||||
background-position:0 -394px;
|
||||
}
|
||||
#attachments .attachment {
|
||||
#attachments .attachment,
|
||||
.notice .attachment.more {
|
||||
background:none;
|
||||
}
|
||||
.notice-options .notice_reply {
|
||||
|
Loading…
x
Reference in New Issue
Block a user