Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/diff_notes/components/resolve_btn.js.es622
-rw-r--r--app/assets/stylesheets/pages/notes.scss4
-rw-r--r--app/views/projects/notes/_note.html.haml1
3 files changed, 13 insertions, 14 deletions
diff --git a/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6 b/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6
index 8709d8cf417..072acd90833 100644
--- a/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6
+++ b/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6
@@ -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);
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss
index 7220e513536..b6c4d158f6e 100644
--- a/app/assets/stylesheets/pages/notes.scss
+++ b/app/assets/stylesheets/pages/notes.scss
@@ -411,6 +411,10 @@ ul.notes {
outline: 0;
vertical-align: middle;
+ &.is-disabled {
+ cursor: default;
+ }
+
&:not(.is-disabled):hover,
&.is-active {
color: #fff;
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index d939a17f0b8..69b770b62b7 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -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",