|
@ -72,7 +72,7 @@ $(function() { |
|
|
$('#publish-in-progress').removeClass('hidden'); |
|
|
$('#publish-in-progress').removeClass('hidden'); |
|
|
$('#publish-fields').addClass('hidden'); |
|
|
$('#publish-fields').addClass('hidden'); |
|
|
|
|
|
|
|
|
var category = csv_to_array($("#post-tags").tokenfield('getTokensList')); |
|
|
|
|
|
|
|
|
var category = $("#note_category").tokenfield("getTokens").map(function(t){ return t.value}); |
|
|
|
|
|
|
|
|
$.post('/editor/publish', { |
|
|
$.post('/editor/publish', { |
|
|
name: $("#post-name").val(), |
|
|
name: $("#post-name").val(), |
|
@ -149,14 +149,6 @@ function reset_page() { |
|
|
return localforage.setItem('currentdraft', {}); |
|
|
return localforage.setItem('currentdraft', {}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function csv_to_array(val) { |
|
|
|
|
|
if(val.length > 0) { |
|
|
|
|
|
return val.split(/[, ]+/); |
|
|
|
|
|
} else { |
|
|
|
|
|
return []; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* ************************************************ */ |
|
|
/* ************************************************ */ |
|
|
/* autosave loop */ |
|
|
/* autosave loop */ |
|
|
var autosaveTimeout = false; |
|
|
var autosaveTimeout = false; |
|
|