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
75303241
Commit
75303241
authored
Nov 11, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5575 from chopmann/patch-1
FIX: note-original-content appending itself too many times
parents
79afb001
92b7c569
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 @
75303241
...
...
@@ -233,10 +233,12 @@ var NoteList = {
form
.
show
();
var
textarea
=
form
.
find
(
"
textarea
"
);
var
p
=
$
(
"
<p></p>
"
).
text
(
textarea
.
val
());
var
hidden_div
=
$
(
'
<div class="note-original-content"></div>
'
).
append
(
p
);
form
.
append
(
hidden_div
);
hidden_div
.
hide
();
if
(
form
.
find
(
"
.note-original-content
"
).
length
===
0
)
{
var
p
=
$
(
"
<p></p>
"
).
text
(
textarea
.
val
());
var
hidden_div
=
$
(
'
<div class="note-original-content"></div>
'
).
append
(
p
);
form
.
append
(
hidden_div
);
hidden_div
.
hide
();
}
textarea
.
focus
();
},
...
...
@@ -532,6 +534,8 @@ var NoteList = {
note_text
.
html
(
response
.
note
).
show
();
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
.
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