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
0e5dbd1c
Commit
0e5dbd1c
authored
Aug 23, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1231 from NARKOZ/preview_notes
Preview window is not closed after post
parents
07fe78b3
0b7e67ad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
app/assets/javascripts/application.js
app/assets/javascripts/application.js
+1
-1
app/views/notes/_create_common.js.haml
app/views/notes/_create_common.js.haml
+3
-1
No files found.
app/assets/javascripts/application.js
View file @
0e5dbd1c
...
...
@@ -72,7 +72,7 @@ $(document).ready(function(){
* Note markdown preview
*
*/
$
(
'
#preview-link
'
).
on
(
'
clic
k
'
,
function
(
e
)
{
$
(
document
).
on
(
'
click
'
,
'
#preview-lin
k
'
,
function
(
e
)
{
$
(
'
#preview-note
'
).
text
(
'
Loading...
'
);
var
previewLinkText
=
(
$
(
this
).
text
()
==
'
Preview
'
?
'
Edit
'
:
'
Preview
'
);
...
...
app/views/notes/_create_common.js.haml
View file @
0e5dbd1c
-
if
note
.
valid?
:plain
$("#new_note .error
s
").remove();
$("#new_note .error").remove();
$('#new_note textarea').val("");
$('#preview-link').text('Preview');
$('#preview-note').hide(); $('#note_note').show();
NoteList.prepend(
#{
note
.
id
}
, "
#{
escape_javascript
(
render
partial:
"notes/show"
,
locals:
{
note:
note
})
}
");
-
else
:plain
...
...
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