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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
bcbae358
Commit
bcbae358
authored
Apr 22, 2021
by
jboyson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply patch fix disabled and event handling
parent
6511e9fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
app/assets/javascripts/diffs/components/diff_row.vue
app/assets/javascripts/diffs/components/diff_row.vue
+14
-12
No files found.
app/assets/javascripts/diffs/components/diff_row.vue
View file @
bcbae358
...
@@ -157,8 +157,8 @@ export default {
...
@@ -157,8 +157,8 @@ export default {
table
.
classList
.
add
(
`
${
lineClass
}
-selected`
);
table
.
classList
.
add
(
`
${
lineClass
}
-selected`
);
}
}
},
},
handleCommentButton
(
line
,
disabled
)
{
handleCommentButton
(
line
)
{
if
(
!
disabled
)
this
.
showCommentForm
({
lineCode
:
line
.
line_code
,
fileHash
:
this
.
fileHash
});
this
.
showCommentForm
({
lineCode
:
line
.
line_code
,
fileHash
:
this
.
fileHash
});
},
},
conflictText
(
line
)
{
conflictText
(
line
)
{
return
line
.
type
===
CONFLICT_MARKER_THEIR
return
line
.
type
===
CONFLICT_MARKER_THEIR
...
@@ -218,16 +218,17 @@ export default {
...
@@ -218,16 +218,17 @@ export default {
<div
<div
role=
"button"
role=
"button"
tabindex=
"0"
tabindex=
"0"
:draggable=
"glFeatures.dragCommentSelection"
:draggable=
"
!line.left.commentsDisabled &&
glFeatures.dragCommentSelection"
type=
"button"
type=
"button"
class=
"add-diff-note unified-diff-components-diff-note-button note-button js-add-diff-note-button qa-diff-comment"
class=
"add-diff-note unified-diff-components-diff-note-button note-button js-add-diff-note-button qa-diff-comment"
data-qa-selector=
"diff_comment_button"
data-qa-selector=
"diff_comment_button"
:class=
"
{ 'gl-cursor-grab': dragging }"
:class=
"
{ 'gl-cursor-grab': dragging }"
:disabled="line.left.commentsDisabled"
:aria-disabled="line.left.commentsDisabled"
:aria-disabled="line.left.commentsDisabled"
@click="
handleCommentButton(line.left, line.left.commentsDisabled
)"
@click="
!line.left.commentsDisabled
&&
handleCommentButton(line.left
)"
@keydown.enter="
handleCommentButton(line.left, line.left.commentsDisabled
)"
@keydown.enter="
!line.left.commentsDisabled
&&
handleCommentButton(line.left
)"
@keydown.space="
handleCommentButton(line.left, line.left.commentsDisabled
)"
@keydown.space="
!line.left.commentsDisabled
&&
handleCommentButton(line.left
)"
@dragstart="onDragStart({ ...line.left, index })"
@dragstart="
!line.left.commentsDisabled
&&
onDragStart({ ...line.left, index })"
>
</div>
>
</div>
</span>
</span>
</
template
>
</
template
>
...
@@ -324,15 +325,16 @@ export default {
...
@@ -324,15 +325,16 @@ export default {
<div
<div
role=
"button"
role=
"button"
tabindex=
"0"
tabindex=
"0"
:draggable=
"glFeatures.dragCommentSelection"
:draggable=
"
!line.right.commentsDisabled &&
glFeatures.dragCommentSelection"
type=
"button"
type=
"button"
class=
"add-diff-note unified-diff-components-diff-note-button note-button js-add-diff-note-button qa-diff-comment"
class=
"add-diff-note unified-diff-components-diff-note-button note-button js-add-diff-note-button qa-diff-comment"
:class=
"
{ 'gl-cursor-grab': dragging }"
:class=
"
{ 'gl-cursor-grab': dragging }"
:disabled="line.right.commentsDisabled"
:aria-disabled="line.right.commentsDisabled"
:aria-disabled="line.right.commentsDisabled"
@click="
handleCommentButton(line.right, line.right.commentsDisabled
)"
@click="
!line.right.commentsDisabled
&&
handleCommentButton(line.right
)"
@keydown.enter="
handleCommentButton(line.right, line.right.commentsDisabled
)"
@keydown.enter="
!line.right.commentsDisabled
&&
handleCommentButton(line.right
)"
@keydown.space="
handleCommentButton(line.right, line.right.commentsDisabled
)"
@keydown.space="
!line.right.commentsDisabled
&&
handleCommentButton(line.right
)"
@dragstart="onDragStart({ ...line.right, index })"
@dragstart="
!line.right.commentsDisabled
&&
onDragStart({ ...line.right, index })"
>
</div>
>
</div>
</span>
</span>
</
template
>
</
template
>
...
...
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