fix double click on "Save". See #22

pull/29/head
Henrique Dias 2015-09-29 21:54:44 +01:00
parent 77aff61d70
commit 98de25c81a
2 changed files with 6 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -210,6 +210,11 @@ $(document).on('ready pjax:success', function() {
$('#preview').data("previewing", "false");
$('.CodeMirror').fadeIn();
// Save editor values
if (typeof editor !== 'undefined') {
editor.save();
}
var data = JSON.stringify($(this).serializeJSON()),
button = $(this).find("input[type=submit]:focus");