Shows tooltip for resolved even if user cant resolve comments
This commit is contained in:
parent
a678fef836
commit
14710f7704
3 changed files with 13 additions and 14 deletions
|
@ -20,11 +20,9 @@
|
|||
},
|
||||
computed: {
|
||||
buttonText: function () {
|
||||
if (!this.canResolve) return;
|
||||
|
||||
if (this.isResolved) {
|
||||
return `Resolved by ${this.resolvedByName}`;
|
||||
} else {
|
||||
} else if (this.canResolve) {
|
||||
return 'Mark as resolved';
|
||||
}
|
||||
},
|
||||
|
@ -33,13 +31,13 @@
|
|||
},
|
||||
methods: {
|
||||
updateTooltip: function () {
|
||||
if (this.canResolve) {
|
||||
$(this.$els.button)
|
||||
.tooltip('hide')
|
||||
.tooltip('fixTitle');
|
||||
}
|
||||
$(this.$els.button)
|
||||
.tooltip('hide')
|
||||
.tooltip('fixTitle');
|
||||
},
|
||||
resolve: function () {
|
||||
if (!this.canResolve) return;
|
||||
|
||||
let promise;
|
||||
this.loading = true;
|
||||
|
||||
|
@ -65,11 +63,9 @@
|
|||
}
|
||||
},
|
||||
compiled: function () {
|
||||
if (this.canResolve) {
|
||||
$(this.$els.button).tooltip({
|
||||
container: 'body'
|
||||
});
|
||||
}
|
||||
$(this.$els.button).tooltip({
|
||||
container: 'body'
|
||||
});
|
||||
},
|
||||
destroyed: function () {
|
||||
CommentsStore.delete(this.discussionId, this.noteId);
|
||||
|
|
|
@ -411,6 +411,10 @@ ul.notes {
|
|||
outline: 0;
|
||||
vertical-align: middle;
|
||||
|
||||
&.is-disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&:not(.is-disabled):hover,
|
||||
&.is-active {
|
||||
color: #fff;
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
class: ("is-disabled" if !can?(current_user, :resolve_note, note)),
|
||||
":class" => "{ 'is-active': isResolved }",
|
||||
":aria-label" => "buttonText",
|
||||
":disabled" => !can?(current_user, :resolve_note, note),
|
||||
"@click" => "resolve",
|
||||
":title" => "buttonText",
|
||||
"v-show" => "!loading",
|
||||
|
|
Loading…
Reference in a new issue