mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-11 23:54:43 +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) {
|
$(document).on('click', `${SIDEBAR} .scroll-page-with-anchor`, function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$($(this).attr('href'))[0].scrollIntoView();
|
$($(this).attr('href'))[0].scrollIntoView();
|
||||||
|
window.scrollBy(0, -130);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
.comments-subject-title {
|
.comments-subject-title {
|
||||||
@include font-h3;
|
@include font-h3;
|
||||||
|
flex-basis: calc(100% - 36px);
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
height: 2em;
|
height: 2em;
|
||||||
line-height: 2em;
|
line-height: 2em;
|
||||||
|
@ -211,7 +212,9 @@
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
|
border-radius: 50%;
|
||||||
order: 3;
|
order: 3;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
class="open-comments-sidebar btn icon-btn btn-light"
|
class="open-comments-sidebar btn icon-btn btn-light"
|
||||||
data-turbolinks="false"
|
data-turbolinks="false"
|
||||||
data-object-type="Step"
|
data-object-type="Step"
|
||||||
@click="showCommentsSidebar = true"
|
@click="openCommentsSidebar"
|
||||||
:data-object-id="step.id">
|
:data-object-id="step.id">
|
||||||
<i class="fas fa-comment"></i>
|
<i class="fas fa-comment"></i>
|
||||||
<span class="comments-counter"
|
<span class="comments-counter"
|
||||||
|
@ -236,6 +236,7 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
$(this.$refs.comments).data('closeCallback', this.closeCommentsSidebar);
|
$(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);
|
$(this.$refs.actionsDropdownButton).on('shown.bs.dropdown hidden.bs.dropdown', this.handleDropdownPosition);
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -373,6 +374,10 @@
|
||||||
addAttachment(attachment) {
|
addAttachment(attachment) {
|
||||||
this.attachments.push(attachment);
|
this.attachments.push(attachment);
|
||||||
},
|
},
|
||||||
|
openCommentsSidebar() {
|
||||||
|
$('.comments-sidebar .close-btn').click();
|
||||||
|
this.showCommentsSidebar = true
|
||||||
|
},
|
||||||
closeCommentsSidebar() {
|
closeCommentsSidebar() {
|
||||||
this.showCommentsSidebar = false
|
this.showCommentsSidebar = false
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue