Commit 14710f77 authored by Phil Hughes's avatar Phil Hughes

Shows tooltip for resolved even if user cant resolve comments

parent a678fef8
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment