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
Jérome Perrin
gitlab-ce
Commits
d925aea9
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
app/assets/javascripts/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
...
@@ -40,16 +40,13 @@ class @FilesCommentButton
return
unless
@
shouldRender
e
,
buttonParentElement
return
unless
@
shouldRender
e
,
buttonParentElement
buttonParentElement
.
append
@
buildButton
buttonParentElement
.
append
@
buildButton
id
:
commit_id
:
textFileElement
.
attr
'data-commit-id'
noteable
:
textFileElement
.
attr
'data-noteable-id'
discussion_id
:
lineContentElement
.
attr
(
'data-discussion-id'
)
or
lineHolderElement
.
attr
(
'data-discussion-id'
)
commit
:
textFileElement
.
attr
'data-commit-id'
line_code
:
lineContentElement
.
attr
(
'data-line-code'
)
or
lineHolderElement
.
attr
(
'id'
)
discussion
:
lineContentElement
.
attr
(
'data-discussion-id'
)
or
lineHolderElement
.
attr
(
'data-discussion-id'
)
line_type
:
lineContentElement
.
attr
'data-line-type'
type
:
note_type
:
textFileElement
.
attr
'data-note-type'
noteable
:
textFileElement
.
attr
'data-noteable-type'
noteable_id
:
textFileElement
.
attr
'data-noteable-id'
note
:
textFileElement
.
attr
'data-note-type'
noteable_type
:
textFileElement
.
attr
'data-noteable-type'
line
:
lineContentElement
.
attr
'data-line-type'
code
:
line
:
lineContentElement
.
attr
(
'data-line-code'
)
or
lineHolderElement
.
attr
(
'id'
)
return
return
destroy
:
(
e
)
=>
destroy
:
(
e
)
=>
...
@@ -61,13 +58,13 @@ class @FilesCommentButton
...
@@ -61,13 +58,13 @@ class @FilesCommentButton
initializedButtonTemplate
=
@
COMMENT_BUTTON_TEMPLATE
initializedButtonTemplate
=
@
COMMENT_BUTTON_TEMPLATE
COMMENT_BUTTON_CLASS
:
@
COMMENT_BUTTON_CLASS
.
substr
1
COMMENT_BUTTON_CLASS
:
@
COMMENT_BUTTON_CLASS
.
substr
1
$
(
initializedButtonTemplate
).
attr
$
(
initializedButtonTemplate
).
attr
'data-noteable-id'
:
buttonAttributes
.
id
.
noteable
'data-noteable-id'
:
buttonAttributes
.
noteable_id
'data-commit-id'
:
buttonAttributes
.
id
.
commit
'data-commit-id'
:
buttonAttributes
.
commit_id
'data-discussion-id'
:
buttonAttributes
.
id
.
discussion
'data-discussion-id'
:
buttonAttributes
.
discussion_id
'data-noteable-type'
:
buttonAttributes
.
type
.
noteabl
e
'data-noteable-type'
:
buttonAttributes
.
noteable_typ
e
'data-line-type'
:
buttonAttributes
.
type
.
lin
e
'data-line-type'
:
buttonAttributes
.
line_typ
e
'data-note-type'
:
buttonAttributes
.
type
.
not
e
'data-note-type'
:
buttonAttributes
.
note_typ
e
'data-line-code'
:
buttonAttributes
.
code
.
lin
e
'data-line-code'
:
buttonAttributes
.
line_cod
e
getTextFileElement
:
(
hoveredElement
)
->
getTextFileElement
:
(
hoveredElement
)
->
$
(
hoveredElement
.
closest
(
@
TEXT_FILE_SELECTOR
))
$
(
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