From eb6966723dea987c52d110aa573ea535a174307b Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Tue, 8 May 2018 00:15:40 +0200 Subject: [PATCH] Autosave function --- bl-kernel/admin/controllers/new-content.php | 2 +- bl-kernel/admin/themes/booty/css/bludit.css | 12 ++++ bl-kernel/admin/themes/booty/html/alert.php | 17 +++++ bl-kernel/admin/themes/booty/html/media.php | 12 ++-- bl-kernel/admin/themes/booty/index.php | 12 +++- bl-kernel/admin/views/edit-content.php | 52 ++++++++++---- bl-kernel/admin/views/new-content.php | 53 ++++++++++---- bl-kernel/admin/views/settings.php | 2 +- .../ajax/{slug.php => generate-slug.php} | 0 bl-kernel/ajax/save-as-draft.php | 56 +++++++++++++++ bl-kernel/boot/admin.php | 5 +- bl-kernel/boot/init.php | 3 +- bl-kernel/dbpages.class.php | 27 +++++++- bl-kernel/functions.php | 12 ++++ bl-kernel/js/bludit-ajax.php | 69 +++++++++++++++++++ bl-kernel/js/functions.php | 36 +++++++++- bl-kernel/page.class.php | 2 +- bl-plugins/quill/plugin.php | 8 ++- 18 files changed, 336 insertions(+), 44 deletions(-) create mode 100644 bl-kernel/admin/themes/booty/html/alert.php rename bl-kernel/ajax/{slug.php => generate-slug.php} (100%) create mode 100644 bl-kernel/ajax/save-as-draft.php create mode 100644 bl-kernel/js/bludit-ajax.php diff --git a/bl-kernel/admin/controllers/new-content.php b/bl-kernel/admin/controllers/new-content.php index 5c16c132..f4531771 100644 --- a/bl-kernel/admin/controllers/new-content.php +++ b/bl-kernel/admin/controllers/new-content.php @@ -26,4 +26,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // ============================================================================ // Title of the page -$layout['title'] .= ' - '.$Language->g('New content'); \ No newline at end of file +$layout['title'] = $Language->g('New content').' - '.$layout['title']; \ No newline at end of file diff --git a/bl-kernel/admin/themes/booty/css/bludit.css b/bl-kernel/admin/themes/booty/css/bludit.css index a1297998..fdfff2a6 100644 --- a/bl-kernel/admin/themes/booty/css/bludit.css +++ b/bl-kernel/admin/themes/booty/css/bludit.css @@ -3,6 +3,18 @@ html { font-size: 0.9em; } +/* + ALERT +*/ +#alert { + display: none; + position: absolute; + right: 0px; + padding: 16px 90px; + border-radius: 0px; + border: 0; +} + /* SIDEBAR */ diff --git a/bl-kernel/admin/themes/booty/html/alert.php b/bl-kernel/admin/themes/booty/html/alert.php new file mode 100644 index 00000000..ee30000a --- /dev/null +++ b/bl-kernel/admin/themes/booty/html/alert.php @@ -0,0 +1,17 @@ + + + +
\ No newline at end of file diff --git a/bl-kernel/admin/themes/booty/html/media.php b/bl-kernel/admin/themes/booty/html/media.php index e442972f..bd55fa31 100644 --- a/bl-kernel/admin/themes/booty/html/media.php +++ b/bl-kernel/admin/themes/booty/html/media.php @@ -3,8 +3,10 @@ $listOfFiles = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS, '*', '*', $GLOBALS['BLUDIT_MEDIA_MANAGER_SORT_BY_DATE'], false); $listOfFilesByPage = array_chunk($listOfFiles, $GLOBALS['BLUDIT_MEDIA_MANAGER_AMOUNT_OF_FILES']); $preLoadFiles = array(); -foreach ($listOfFilesByPage[0] as $file) { - array_push($preLoadFiles, basename($file)); +if (!empty($listOfFilesByPage[0])) { + foreach ($listOfFilesByPage[0] as $file) { + array_push($preLoadFiles, basename($file)); + } } // Amount of pages for the paginator $amountOfPages = count($listOfFilesByPage); @@ -42,7 +44,7 @@ $amountOfPages = count($listOfFilesByPage);

Manage

-
+ There are not images.