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
Boxiang Sun
gitlab-ce
Commits
92b7c569
Commit
92b7c569
authored
Nov 10, 2013
by
Cornelio Hopmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: note-original-content appending itself too many times
parent
fa323c0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+8
-4
No files found.
app/assets/javascripts/notes.js
View file @
92b7c569
...
@@ -233,10 +233,12 @@ var NoteList = {
...
@@ -233,10 +233,12 @@ var NoteList = {
form
.
show
();
form
.
show
();
var
textarea
=
form
.
find
(
"
textarea
"
);
var
textarea
=
form
.
find
(
"
textarea
"
);
var
p
=
$
(
"
<p></p>
"
).
text
(
textarea
.
val
());
if
(
form
.
find
(
"
.note-original-content
"
).
length
===
0
)
{
var
hidden_div
=
$
(
'
<div class="note-original-content"></div>
'
).
append
(
p
);
var
p
=
$
(
"
<p></p>
"
).
text
(
textarea
.
val
());
form
.
append
(
hidden_div
);
var
hidden_div
=
$
(
'
<div class="note-original-content"></div>
'
).
append
(
p
);
hidden_div
.
hide
();
form
.
append
(
hidden_div
);
hidden_div
.
hide
();
}
textarea
.
focus
();
textarea
.
focus
();
},
},
...
@@ -532,6 +534,8 @@ var NoteList = {
...
@@ -532,6 +534,8 @@ var NoteList = {
note_text
.
html
(
response
.
note
).
show
();
note_text
.
html
(
response
.
note
).
show
();
var
note_form
=
note_li
.
find
(
"
.note-edit-form
"
);
var
note_form
=
note_li
.
find
(
"
.note-edit-form
"
);
var
original_content
=
note_form
.
find
(
"
.note-original-content
"
);
original_content
.
remove
();
note_form
.
hide
();
note_form
.
hide
();
note_form
.
find
(
"
.btn-save
"
).
enableButton
();
note_form
.
find
(
"
.btn-save
"
).
enableButton
();
...
...
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