BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d925aea9
Unverified
Commit
d925aea9
authored
Jul 07, 2016
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flattened button attributes obj set to build comment button
parent
5ab95ba6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
files_comment_button.js.coffee
app/assets/javascripts/files_comment_button.js.coffee
+14
-17
No files found.
app/assets/javascripts/files_comment_button.js.coffee
View file @
d925aea9
...
...
@@ -40,16 +40,13 @@ class @FilesCommentButton
return
unless
@
shouldRender
e
,
buttonParentElement
buttonParentElement
.
append
@
buildButton
id
:
noteable
:
textFileElement
.
attr
'data-noteable-id'
commit
:
textFileElement
.
attr
'data-commit-id'
discussion
:
lineContentElement
.
attr
(
'data-discussion-id'
)
or
lineHolderElement
.
attr
(
'data-discussion-id'
)
type
:
noteable
:
textFileElement
.
attr
'data-noteable-type'
note
:
textFileElement
.
attr
'data-note-type'
line
:
lineContentElement
.
attr
'data-line-type'
code
:
line
:
lineContentElement
.
attr
(
'data-line-code'
)
or
lineHolderElement
.
attr
(
'id'
)
commit_id
:
textFileElement
.
attr
'data-commit-id'
discussion_id
:
lineContentElement
.
attr
(
'data-discussion-id'
)
or
lineHolderElement
.
attr
(
'data-discussion-id'
)
line_code
:
lineContentElement
.
attr
(
'data-line-code'
)
or
lineHolderElement
.
attr
(
'id'
)
line_type
:
lineContentElement
.
attr
'data-line-type'
note_type
:
textFileElement
.
attr
'data-note-type'
noteable_id
:
textFileElement
.
attr
'data-noteable-id'
noteable_type
:
textFileElement
.
attr
'data-noteable-type'
return
destroy
:
(
e
)
=>
...
...
@@ -61,13 +58,13 @@ class @FilesCommentButton
initializedButtonTemplate
=
@
COMMENT_BUTTON_TEMPLATE
COMMENT_BUTTON_CLASS
:
@
COMMENT_BUTTON_CLASS
.
substr
1
$
(
initializedButtonTemplate
).
attr
'data-noteable-id'
:
buttonAttributes
.
id
.
noteable
'data-commit-id'
:
buttonAttributes
.
id
.
commit
'data-discussion-id'
:
buttonAttributes
.
id
.
discussion
'data-noteable-type'
:
buttonAttributes
.
type
.
noteabl
e
'data-line-type'
:
buttonAttributes
.
type
.
lin
e
'data-note-type'
:
buttonAttributes
.
type
.
not
e
'data-line-code'
:
buttonAttributes
.
code
.
lin
e
'data-noteable-id'
:
buttonAttributes
.
noteable_id
'data-commit-id'
:
buttonAttributes
.
commit_id
'data-discussion-id'
:
buttonAttributes
.
discussion_id
'data-noteable-type'
:
buttonAttributes
.
noteable_typ
e
'data-line-type'
:
buttonAttributes
.
line_typ
e
'data-note-type'
:
buttonAttributes
.
note_typ
e
'data-line-code'
:
buttonAttributes
.
line_cod
e
getTextFileElement
:
(
hoveredElement
)
->
$
(
hoveredElement
.
closest
(
@
TEXT_FILE_SELECTOR
))
...
...
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