Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
14710f77
Commit
14710f77
authored
Jul 26, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shows tooltip for resolved even if user cant resolve comments
parent
a678fef8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
14 deletions
+13
-14
app/assets/javascripts/diff_notes/components/resolve_btn.js.es6
...sets/javascripts/diff_notes/components/resolve_btn.js.es6
+9
-13
app/assets/stylesheets/pages/notes.scss
app/assets/stylesheets/pages/notes.scss
+4
-0
app/views/projects/notes/_note.html.haml
app/views/projects/notes/_note.html.haml
+0
-1
No files found.
app/assets/javascripts/diff_notes/components/resolve_btn.js.es6
View file @
14710f77
...
@@ -20,11 +20,9 @@
...
@@ -20,11 +20,9 @@
},
},
computed: {
computed: {
buttonText: function () {
buttonText: function () {
if (!this.canResolve) return;
if (this.isResolved) {
if (this.isResolved) {
return `Resolved by ${this.resolvedByName}`;
return `Resolved by ${this.resolvedByName}`;
} else {
} else
if (this.canResolve)
{
return 'Mark as resolved';
return 'Mark as resolved';
}
}
},
},
...
@@ -33,13 +31,13 @@
...
@@ -33,13 +31,13 @@
},
},
methods: {
methods: {
updateTooltip: function () {
updateTooltip: function () {
if (this.canResolve) {
$(this.$els.button)
$(this.$els.button)
.tooltip('hide')
.tooltip('hide')
.tooltip('fixTitle');
.tooltip('fixTitle');
}
},
},
resolve: function () {
resolve: function () {
if (!this.canResolve) return;
let promise;
let promise;
this.loading = true;
this.loading = true;
...
@@ -65,11 +63,9 @@
...
@@ -65,11 +63,9 @@
}
}
},
},
compiled: function () {
compiled: function () {
if (this.canResolve) {
$(this.$els.button).tooltip({
$(this.$els.button).tooltip({
container: 'body'
container: 'body'
});
});
}
},
},
destroyed: function () {
destroyed: function () {
CommentsStore.delete(this.discussionId, this.noteId);
CommentsStore.delete(this.discussionId, this.noteId);
...
...
app/assets/stylesheets/pages/notes.scss
View file @
14710f77
...
@@ -411,6 +411,10 @@ ul.notes {
...
@@ -411,6 +411,10 @@ ul.notes {
outline
:
0
;
outline
:
0
;
vertical-align
:
middle
;
vertical-align
:
middle
;
&
.is-disabled
{
cursor
:
default
;
}
&
:not
(
.is-disabled
)
:hover
,
&
:not
(
.is-disabled
)
:hover
,
&
.is-active
{
&
.is-active
{
color
:
#fff
;
color
:
#fff
;
...
...
app/views/projects/notes/_note.html.haml
View file @
14710f77
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
class:
(
"is-disabled"
if
!
can?
(
current_user
,
:resolve_note
,
note
)),
class:
(
"is-disabled"
if
!
can?
(
current_user
,
:resolve_note
,
note
)),
":class"
=>
"{ 'is-active': isResolved }"
,
":class"
=>
"{ 'is-active': isResolved }"
,
":aria-label"
=>
"buttonText"
,
":aria-label"
=>
"buttonText"
,
":disabled"
=>
!
can?
(
current_user
,
:resolve_note
,
note
),
"@click"
=>
"resolve"
,
"@click"
=>
"resolve"
,
":title"
=>
"buttonText"
,
":title"
=>
"buttonText"
,
"v-show"
=>
"!loading"
,
"v-show"
=>
"!loading"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment