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
ab401a61
Commit
ab401a61
authored
Feb 16, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove note attachment file selector.
parent
d2ebdf66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
30 deletions
+1
-30
app/assets/javascripts/notes.js.coffee
app/assets/javascripts/notes.js.coffee
+0
-13
app/views/projects/notes/_edit_form.html.haml
app/views/projects/notes/_edit_form.html.haml
+1
-9
app/views/projects/notes/_form.html.haml
app/views/projects/notes/_form.html.haml
+0
-8
No files found.
app/assets/javascripts/notes.js.coffee
View file @
ab401a61
...
...
@@ -39,9 +39,6 @@ class @Notes
# reset main target form after submit
$
(
document
).
on
"ajax:complete"
,
".js-main-target-form"
,
@
resetMainTargetForm
# attachment button
$
(
document
).
on
"click"
,
".js-choose-note-attachment-button"
,
@
chooseNoteAttachment
# update the file name when an attachment is selected
$
(
document
).
on
"change"
,
".js-note-attachment-input"
,
@
updateFormAttachment
...
...
@@ -73,7 +70,6 @@ class @Notes
$
(
document
).
off
"click"
,
".js-note-delete"
$
(
document
).
off
"click"
,
".js-note-attachment-delete"
$
(
document
).
off
"ajax:complete"
,
".js-main-target-form"
$
(
document
).
off
"click"
,
".js-choose-note-attachment-button"
$
(
document
).
off
"click"
,
".js-discussion-reply-button"
$
(
document
).
off
"click"
,
".js-add-diff-note-button"
$
(
document
).
off
"visibilitychange"
...
...
@@ -173,15 +169,6 @@ class @Notes
form
.
find
(
".js-note-text"
).
data
(
"autosave"
).
reset
()
###
Called when clicking the "Choose File" button.
Opens the file selection dialog.
###
chooseNoteAttachment
:
->
form
=
$
(
this
).
closest
(
"form"
)
form
.
find
(
".js-note-attachment-input"
).
click
()
###
Shows the main form and does some setup on it.
...
...
app/views/projects/notes/_edit_form.html.haml
View file @
ab401a61
...
...
@@ -11,12 +11,4 @@
.note-form-actions
.buttons
=
f
.
submit
'Save Comment'
,
class:
"btn btn-primary btn-save btn-grouped js-comment-button"
=
link_to
'Cancel'
,
"#"
,
class:
"btn btn-cancel note-edit-cancel"
.note-form-option.hidden-xs
%a
.choose-btn.btn.js-choose-note-attachment-button
%i
.fa.fa-paperclip
%span
Choose File ...
%span
.file_name.js-attachment-filename
=
f
.
file_field
:attachment
,
class:
"js-note-attachment-input hidden"
=
link_to
'Cancel'
,
"#"
,
class:
"btn btn-cancel note-edit-cancel"
\ No newline at end of file
app/views/projects/notes/_form.html.haml
View file @
ab401a61
...
...
@@ -20,13 +20,5 @@
=
yield
(
:note_actions
)
%a
.btn.grouped.js-close-discussion-note-form
Cancel
.note-form-option.hidden-xs
%a
.choose-btn.btn.js-choose-note-attachment-button
%i
.fa.fa-paperclip
%span
Choose File ...
%span
.file_name.js-attachment-filename
=
f
.
file_field
:attachment
,
class:
"js-note-attachment-input hidden"
:javascript
window
.
project_uploads_path
=
"
#{
project_uploads_path
@project
}
"
;
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