Have limited display height for messages on dossiers#show

This commit is contained in:
JC 2016-11-29 16:26:06 +01:00
parent 53692be01d
commit 53f4c52435
3 changed files with 11 additions and 2 deletions

View file

@ -21,6 +21,7 @@ function init_default_data_block() {
var block = $(element).parents('.show-block');
if (block.attr('id') == 'messages') {
block.children('.last-commentaire').toggle();
$(".commentaires").animate({ scrollTop: $(this).height() }, "slow");
}
block.children('.body').slideToggle(duration);

View file

@ -8,6 +8,13 @@
margin-bottom: 20px;
}
}
.body {
.commentaires {
max-height: 350px;
overflow-y: scroll;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.075) 0%, rgba(219, 219, 219, 0) 50%, rgba(250, 251, 253, 0.18) 51%, #ffffff 100%);
}
}
.last-commentaire, .commentaire {
padding: 20px 0 0 20px;
.comment-header {

View file

@ -11,8 +11,9 @@
- message_count = @facade.commentaires.count
= (message_count == 1) ? "1 message" : "#{message_count} messages"
%div.body
- @facade.commentaires.object.sort.each do |commentaire|
= render partial: commentaire
%div.commentaires
- @facade.commentaires.object.sort.each do |commentaire|
= render partial: commentaire
.row
.col-lg-12.col-md-12
%div.split-hr