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
f976078c
Commit
f976078c
authored
Oct 17, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent double note submit
parent
e5502790
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
app/views/notes/_form.html.haml
app/views/notes/_form.html.haml
+1
-1
app/views/notes/_notes.html.haml
app/views/notes/_notes.html.haml
+9
-0
app/views/notes/create.js.haml
app/views/notes/create.js.haml
+3
-0
No files found.
app/views/notes/_form.html.haml
View file @
f976078c
...
...
@@ -25,4 +25,4 @@
.clear
%br
=
f
.
submit
'Add note'
,
:class
=>
"lbutton vm"
=
f
.
submit
'Add note'
,
:class
=>
"lbutton vm"
,
:id
=>
"submit_note"
app/views/notes/_notes.html.haml
View file @
f976078c
...
...
@@ -9,6 +9,15 @@
$
(
'
.delete-note
'
).
live
(
'
ajax:success
'
,
function
()
{
$
(
this
).
closest
(
'
li
'
).
fadeOut
();
});
$
(
"
#new_note
"
).
live
(
"
ajax:before
"
,
function
(){
$
(
"
#submit_note
"
).
attr
(
"
disabled
"
,
"
disabled
"
);
})
$
(
"
#new_note
"
).
live
(
"
ajax:complete
"
,
function
(){
$
(
"
#submit_note
"
).
removeAttr
(
"
disabled
"
);
})
-
if
[
"issues"
,
"projects"
].
include?
(
controller
.
controller_name
)
:javascript
$
(
function
(){
...
...
app/views/notes/create.js.haml
View file @
f976078c
...
...
@@ -6,3 +6,6 @@
-
else
:plain
$("#new_note").replaceWith("
#{
escape_javascript
(
render
(
'form'
))
}
");
:plain
$("#submit_note").removeAttr("disabled");
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