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
Tatuya Kamada
gitlab-ce
Commits
c7ffc712
Commit
c7ffc712
authored
Jul 15, 2016
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Refactored .prev and .next methods"
This reverts commit
ec37d955
.
parent
ac828424
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
app/assets/javascripts/files_comment_button.js.coffee
app/assets/javascripts/files_comment_button.js.coffee
+3
-7
No files found.
app/assets/javascripts/files_comment_button.js.coffee
View file @
c7ffc712
...
...
@@ -7,7 +7,6 @@ class @FilesCommentButton
UNFOLDABLE_LINE_CLASS
=
'js-unfold'
EMPTY_CELL_CLASS
=
'empty-cell'
OLD_LINE_CLASS
=
'old_line'
NEW_CLASS
=
'new'
LINE_COLUMN_CLASSES
=
".
#{
LINE_NUMBER_CLASS
}
, .line_content"
TEXT_FILE_SELECTOR
=
'.text-file'
DEBOUNCE_TIMEOUT_DURATION
=
100
...
...
@@ -64,20 +63,17 @@ class @FilesCommentButton
getLineContent
:
(
hoveredElement
)
->
return
hoveredElement
if
hoveredElement
.
hasClass
LINE_CONTENT_CLASS
$
(
".
#{
LINE_CONTENT_CLASS
+
@
diffTypeClass
hoveredElement
}
"
,
hoveredElement
.
parent
())
$
(
hoveredElement
).
next
".
#{
LINE_CONTENT_CLASS
}
"
getButtonParent
:
(
hoveredElement
)
->
if
@
VIEW_TYPE
is
'inline'
return
hoveredElement
if
hoveredElement
.
hasClass
OLD_LINE_CLASS
$
(
".
#{
OLD_LINE_CLASS
}
"
,
hoveredElement
.
parent
())
hoveredElement
.
parent
().
find
".
#{
OLD_LINE_CLASS
}
"
else
return
hoveredElement
if
hoveredElement
.
hasClass
LINE_NUMBER_CLASS
$
(
".
#{
LINE_NUMBER_CLASS
+
@
diffTypeClass
hoveredElement
}
"
,
hoveredElement
.
parent
())
diffTypeClass
:
(
hoveredElement
)
->
if
hoveredElement
.
hasClass
(
NEW_CLASS
)
then
'.new'
else
'.old'
$
(
hoveredElement
).
prev
".
#{
LINE_NUMBER_CLASS
}
"
isMovingToSameType
:
(
e
)
->
newButtonParent
=
@
getButtonParent
$
(
e
.
toElement
)
...
...
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