diff --git a/bl-kernel/admin/controllers/new-content.php b/bl-kernel/admin/controllers/new-content.php index 38486fbc..b8239dc7 100644 --- a/bl-kernel/admin/controllers/new-content.php +++ b/bl-kernel/admin/controllers/new-content.php @@ -45,9 +45,6 @@ if (IMAGE_RESTRICT) { define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.DS.'thumbnails'.DS); define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/'); define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/'); - - // Create the directory to store the images - Filesystem::mkdir(PAGE_THUMBNAILS_DIRECTORY, true); } else { define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS)); define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS)); diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php index 5018f4b9..1c5f8bc6 100644 --- a/bl-kernel/admin/views/edit-content.php +++ b/bl-kernel/admin/views/edit-content.php @@ -61,7 +61,7 @@ echo Bootstrap::formOpen(array(
- + draft()?$L->g('Draft'):$L->g('Publish')) ?>
@@ -394,6 +394,16 @@ $(document).ready(function() { } }); + // Button preview + $("#jsbuttonPreview").on("click", function() { + var uuid = $("#jsuuid").val(); + var title = $("#jstitle").val(); + var content = editorGetContent(); + var ajax = new bluditAjax(); + ajax.autosave(uuid, title, content, false); + window.open("uuid().'?preview='.md5('autosave-'.$page->uuid()) ?>", "_blank"); + }); + // Button Save $("#jsbuttonSave").on("click", function() { // If the switch is setted to "published", get the value from the selector diff --git a/bl-kernel/admin/views/new-content.php b/bl-kernel/admin/views/new-content.php index 32e4ae82..763f0d80 100644 --- a/bl-kernel/admin/views/new-content.php +++ b/bl-kernel/admin/views/new-content.php @@ -54,9 +54,9 @@ echo Bootstrap::formOpen(array(
- - - p('Publish') ?> + + + p('Publish') ?>