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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
010ba5ec
Commit
010ba5ec
authored
Aug 04, 2014
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicated setupNoteForm method
parent
2600d08f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
24 deletions
+0
-24
app/assets/javascripts/notes.js.coffee
app/assets/javascripts/notes.js.coffee
+0
-24
No files found.
app/assets/javascripts/notes.js.coffee
View file @
010ba5ec
...
@@ -404,30 +404,6 @@ class Notes
...
@@ -404,30 +404,6 @@ class Notes
form
.
find
(
".js-note-text"
).
focus
()
form
.
find
(
".js-note-text"
).
focus
()
form
.
addClass
"js-discussion-note-form"
form
.
addClass
"js-discussion-note-form"
###
General note form setup.
deactivates the submit button when text is empty
hides the preview button when text is empty
setup GFM auto complete
show the form
###
setupNoteForm
:
(
form
)
=>
disableButtonIfEmptyField
form
.
find
(
".js-note-text"
),
form
.
find
(
".js-comment-button"
)
form
.
removeClass
"js-new-note-form"
form
.
removeClass
"js-new-note-form"
GitLab
.
GfmAutoComplete
.
setup
()
# setup preview buttons
previewButton
=
form
.
find
(
".js-note-preview-button"
)
form
.
find
(
".js-note-text"
).
on
"input"
,
->
if
$
(
this
).
val
().
trim
()
isnt
""
previewButton
.
removeClass
(
"turn-off"
).
addClass
"turn-on"
else
previewButton
.
removeClass
(
"turn-on"
).
addClass
"turn-off"
form
.
show
()
###
###
Called when clicking on the "add a comment" button on the side of a diff line.
Called when clicking on the "add a comment" button on the side of a diff line.
...
...
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