fix blockquote toggle and use different icons

v1.18.x
barisusakli 11 years ago
parent 94a4abc80f
commit 0cbb440629

@ -128,12 +128,17 @@ define('forum/topic', ['forum/pagination', 'forum/infinitescroll', 'forum/topic/
blockquotes.each(function() { blockquotes.each(function() {
var $this = $(this); var $this = $(this);
if ($this.find(':hidden').length && !$this.find('.toggle').length) { if ($this.find(':hidden').length && !$this.find('.toggle').length) {
$this.append('<i class="fa fa-ellipsis-h pointer toggle"></i>'); $this.append('<i class="fa fa-angle-down pointer toggle"></i>');
} }
}); });
$('.post-container').on('click', 'blockquote .toggle', function() { $('#post-container').on('click', 'blockquote .toggle', function() {
$(this).parent('blockquote').toggleClass('uncollapsed'); var blockQuote = $(this).parent('blockquote');
var toggle = $(this);
blockQuote.toggleClass('uncollapsed');
var collapsed = !blockQuote.hasClass('uncollapsed');
toggle.toggleClass('fa-angle-down', collapsed).toggleClass('fa-angle-up', !collapsed);
}); });
} }

Loading…
Cancel
Save