Skip to content
Snippets Groups Projects
Commit 0e5dbd1c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge pull request #1231 from NARKOZ/preview_notes

Preview window is not closed after post
parents 07fe78b3 0b7e67ad
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -72,7 +72,7 @@ $(document).ready(function(){
* Note markdown preview
*
*/
$('#preview-link').on('click', function(e) {
$(document).on('click', '#preview-link', function(e) {
$('#preview-note').text('Loading...');
 
var previewLinkText = ($(this).text() == 'Preview' ? 'Edit' : 'Preview');
Loading
Loading
- if note.valid?
:plain
$("#new_note .errors").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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment