diff --git a/controllers/editor.php b/controllers/editor.php index 936af75..191885a 100644 --- a/controllers/editor.php +++ b/controllers/editor.php @@ -51,11 +51,6 @@ $app->post('/editor/publish', function() use($app) { $micropub_request['post-status'] = $params['status']; } - if(array_key_exists('syndicate', $params) && $params['syndicate']) { - if($params['syndicate'] == 'yes') - $micropub_request['mp_syndicate_to'] = "gts"; - } - if(array_key_exists('publish', $params) && $params['publish'] != 'now') { $micropub_request['published'] = $params['publish']; } diff --git a/public/editor-files/editor.js b/public/editor-files/editor.js index 016fa43..0474b7f 100644 --- a/public/editor-files/editor.js +++ b/public/editor-files/editor.js @@ -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); }); diff --git a/views/editor.php b/views/editor.php index 51023bd..5364fe2 100644 --- a/views/editor.php +++ b/views/editor.php @@ -127,6 +127,7 @@ +
Syndicate?