summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-07-26 15:57:14 +0100
committerPhil Hughes <me@iamphill.com>2016-07-26 15:57:14 +0100
commit14710f7704f7c4a54bdf216c77b2168bcab46f90 (patch)
tree969f7299613919c604d8b48f446e20ffd1213154 /app/assets
parenta678fef83611ea873d252941586c18171cd6ba07 (diff)
downloadgitlab-ce-14710f7704f7c4a54bdf216c77b2168bcab46f90.tar.gz
Shows tooltip for resolved even if user cant resolve comments
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/diff_notes/components/resolve_btn.js.es622
-rw-r--r--app/assets/stylesheets/pages/notes.scss4
2 files changed, 13 insertions, 13 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;