mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-10 07:05:57 +08:00
Merge pull request #4227 from aignatov-bio/ai-sci-6971-fix-step-comments
Fix step comments [SCI-6971]
This commit is contained in:
commit
63c54d9005
3 changed files with 10 additions and 1 deletions
|
@ -52,6 +52,7 @@ var CommentsSidebar = (function() {
|
|||
$(document).on('click', `${SIDEBAR} .scroll-page-with-anchor`, function(e) {
|
||||
e.preventDefault();
|
||||
$($(this).attr('href'))[0].scrollIntoView();
|
||||
window.scrollBy(0, -130);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
.comments-subject-title {
|
||||
@include font-h3;
|
||||
flex-basis: calc(100% - 36px);
|
||||
flex-grow: 1;
|
||||
height: 2em;
|
||||
line-height: 2em;
|
||||
|
@ -211,7 +212,9 @@
|
|||
justify-content: flex-end;
|
||||
|
||||
.user-avatar {
|
||||
border-radius: 50%;
|
||||
order: 3;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
class="open-comments-sidebar btn icon-btn btn-light"
|
||||
data-turbolinks="false"
|
||||
data-object-type="Step"
|
||||
@click="showCommentsSidebar = true"
|
||||
@click="openCommentsSidebar"
|
||||
:data-object-id="step.id">
|
||||
<i class="fas fa-comment"></i>
|
||||
<span class="comments-counter"
|
||||
|
@ -236,6 +236,7 @@
|
|||
},
|
||||
mounted() {
|
||||
$(this.$refs.comments).data('closeCallback', this.closeCommentsSidebar);
|
||||
$(this.$refs.comments).data('openCallback', this.closeCommentsSidebar);
|
||||
$(this.$refs.actionsDropdownButton).on('shown.bs.dropdown hidden.bs.dropdown', this.handleDropdownPosition);
|
||||
},
|
||||
computed: {
|
||||
|
@ -373,6 +374,10 @@
|
|||
addAttachment(attachment) {
|
||||
this.attachments.push(attachment);
|
||||
},
|
||||
openCommentsSidebar() {
|
||||
$('.comments-sidebar .close-btn').click();
|
||||
this.showCommentsSidebar = true
|
||||
},
|
||||
closeCommentsSidebar() {
|
||||
this.showCommentsSidebar = false
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue