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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2daa6161
Commit
2daa6161
authored
Oct 17, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent double note submit
parent
74a89d9e
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 @
2daa6161
...
@@ -25,4 +25,4 @@
...
@@ -25,4 +25,4 @@
.clear
.clear
%br
%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 @
2daa6161
...
@@ -9,6 +9,15 @@
...
@@ -9,6 +9,15 @@
$
(
'
.delete-note
'
).
live
(
'
ajax:success
'
,
function
()
{
$
(
'
.delete-note
'
).
live
(
'
ajax:success
'
,
function
()
{
$
(
this
).
closest
(
'
li
'
).
fadeOut
();
});
$
(
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
)
-
if
[
"issues"
,
"projects"
].
include?
(
controller
.
controller_name
)
:javascript
:javascript
$
(
function
(){
$
(
function
(){
...
...
app/views/notes/create.js.haml
View file @
2daa6161
...
@@ -6,3 +6,6 @@
...
@@ -6,3 +6,6 @@
-
else
-
else
:plain
:plain
$("#new_note").replaceWith("
#{
escape_javascript
(
render
(
'form'
))
}
");
$("#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