|
|
@ -73,7 +73,7 @@ $(function() { |
|
|
|
$('#publish-fields').addClass('hidden'); |
|
|
|
|
|
|
|
var category = $("#post-tags").tokenfield("getTokens").map(function(t){ return t.value}); |
|
|
|
|
|
|
|
|
|
|
|
$.post('/editor/publish', { |
|
|
|
name: $("#post-name").val(), |
|
|
|
description: $("#post-description").val(), |
|
|
@ -143,6 +143,7 @@ function reset_page() { |
|
|
|
$("#post-name").val(''); |
|
|
|
$("#post-description").val(''); |
|
|
|
$("#post-image").val(''); |
|
|
|
$("#post-imagealt").val(''); |
|
|
|
$("#post-slug").val(''); |
|
|
|
$("#post-tags").tokenfield('setTokens',[]); |
|
|
|
$("#post-status").val('published'); |
|
|
@ -167,6 +168,7 @@ function doAutoSave() { |
|
|
|
title: $("#post-name").val(), |
|
|
|
description: $("#post-description").val(), |
|
|
|
image: $("#post-image").val(), |
|
|
|
imagealt: $("#post-imagealt").val(), |
|
|
|
body: editor.serialize().content.value, |
|
|
|
tags: $("#post-tags").tokenfield('getTokensList'), |
|
|
|
slug: $("#post-slug").val(), |
|
|
@ -197,6 +199,7 @@ $(function(){ |
|
|
|
$("#post-publish-date").val(val.publish); |
|
|
|
$("#post-description").val(val.description); |
|
|
|
$("#post-image").val(val.image); |
|
|
|
$("#post-imagealt").val(val.image); |
|
|
|
// drop the cursor into the editor which clears the placeholder text
|
|
|
|
$("#content").focus().click(); |
|
|
|
activateTokenField(); |
|
|
@ -218,5 +221,5 @@ editor.on(document.getElementById('content'), 'input', function(){ |
|
|
|
contentChanged(); |
|
|
|
}); |
|
|
|
$(function(){ |
|
|
|
$('#post-name, #post-description, #post-image, #post-tags, #post-slug, #post-publish-date').on('keyup', contentChanged); |
|
|
|
$('#post-name, #post-description, #post-image, #post-imagealt, #post-tags, #post-slug, #post-publish-date').on('keyup', contentChanged); |
|
|
|
}); |