Archived
1
0

Show/hide full comment.

This commit is contained in:
Matthias Mees
2013-06-09 16:16:59 +02:00
parent daf199c520
commit 60657014ea
3 changed files with 13 additions and 4 deletions

View File

@@ -103,7 +103,7 @@
<label for="serendipity_multidelete_comment_{$comment.id}" class="visuallyhidden">Multiselect this comment</label> {* i18n *}
</div>
<h4 id="c{$comment.id}">{($comment.type == 'NORMAL') ? $CONST.COMMENT : (($comment.type == 'TRACKBACK') ? $CONST.TRACKBACK : $CONST.PINGBACK )} #{$comment.id}, {$CONST.IN_REPLY_TO} <a href="{$comment.entry_url}">{$comment.title|escape}</a> {$CONST.ON} {$comment.timestamp|@formatTime:'%b %e %Y, %H:%M'}</h4>
<h4 id="c{$comment.id}">{($comment.type == 'NORMAL') ? $CONST.COMMENT : (($comment.type == 'TRACKBACK') ? $CONST.TRACKBACK : $CONST.PINGBACK )} #{$comment.id} {$CONST.IN_REPLY_TO} <a href="{$comment.entry_url}">{$comment.title|escape}</a> {$CONST.ON} {$comment.timestamp|@formatTime:'%b %e %Y, %H:%M'}</h4>
<dl class="comment_data clearfix">
{* TODO: This should not emit any images *}
@@ -119,9 +119,9 @@
<dd>{if empty($comment.referer)}N/A{else}<a href="{$comment.referer|escape}" title="{$comment.referer|escape}">{$comment.referer|escape|truncate:30:"&hellip;"}</a>{/if} {$comment.action_referer}</dd>
</dl>
<div id="{$comment.id}_summary" class="comment_summary">{$comment.fullBody|truncate:120:"&hellip;"}</div>
<div id="c{$comment.id}_summary" class="comment_summary">{$comment.fullBody|truncate:120:"&hellip;"}</div>
<div id="{$comment.id}_full" class="comment_full hidden">{$comment.fullBody}</div>
<div id="c{$comment.id}_full" class="comment_full additional_info">{$comment.fullBody}</div>
<ul class="plainList clearfix actions">
{if ($comment.status == 'pending') || ($comment.status == 'confirm')}
@@ -131,7 +131,7 @@
<li><a class="button_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=pending&amp;serendipity[id]={$comment.id}&amp;{$urltoken}" title="{$CONST.SET_TO_MODERATED}"><span class="icon-lock"></span><span class="visuallyhidden"> {$CONST.SET_TO_MODERATED}</span></a></li>
{/if}
{if $comment.excerpt}
<li><a class="button_link" href="#c{$comment.id}" onclick="FT_toggle({$comment.id}); return false;" title="{$CONST.TOGGLE_ALL}"><span id="{$comment.id}_text">{$CONST.TOGGLE_ALL}</span></a></li>
<li><a class="button_link toggle_comment_full" href="#c{$comment.id}_full" title="{$CONST.TOGGLE_ALL}">{$CONST.TOGGLE_ALL}</a></li>
{/if}
<li><a class="button_link" href="{$comment.entrylink}" title="{$CONST.VIEW}"><span class="icon-eye"></span><span class="visuallyhidden"> {$CONST.VIEW}</span></a></li>
<li><a class="button_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=edit&amp;serendipity[id]={$comment.id}&amp;serendipity[entry_id]={$comment.entry_id}&amp;{$urltoken}" title="{$CONST.EDIT}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li>

View File

@@ -770,6 +770,14 @@ function highlightComment(id, checkvalue) {
e.preventDefault();
});
// Show extended comment
$('.toggle_comment_full').click(function(e) {
var $toggles = $($(this).attr('href'));
$toggles.toggleClass('additional_info');
$toggles.prev().toggleClass('additional_info');
e.preventDefault();
});
// MediaDB-Filter-Buttons should react instantly
$('input[name="serendipity[filter][fileCategory]"]').on('change', function() {
$('#media_library_control').submit();

View File

@@ -1660,6 +1660,7 @@ form > .button_link:first-of-type {
width: 100%;
}
.no-js .comment_summary,
.js .additional_info {
display: none;
visibility: hidden;