From 8020b606e2eb9569010fcbb52752dd0b9e2d4e3c Mon Sep 17 00:00:00 2001 From: danpros Date: Fri, 15 Dec 2023 13:47:38 +0700 Subject: [PATCH] Simple Image Gallery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows us to reuse previous uploaded images. ​ --- system/admin/editor/js/editor.js | 2 + system/admin/views/add-content.html.php | 71 ++++++++++++++++++++++++++++---- system/admin/views/add-page.html.php | 50 +++++++++++++++++++--- system/admin/views/edit-content.html.php | 70 +++++++++++++++++++++++++++---- system/admin/views/edit-page.html.php | 49 +++++++++++++++++++--- system/includes/functions.php | 16 +++++++ system/resources/js/media.uploader.js | 2 + 7 files changed, 232 insertions(+), 28 deletions(-) diff --git a/system/admin/editor/js/editor.js b/system/admin/editor/js/editor.js index d4560e6..3a19298 100644 --- a/system/admin/editor/js/editor.js +++ b/system/admin/editor/js/editor.js @@ -9,6 +9,8 @@ $('#insertImageDialog').modal('hide'); $('#insertImageDialogURL').val(''); $('#insertImageDialogFile').val(''); + $('#insertMediaDialogURL').val(''); + $('#insertMediaDialogFile').val(''); }; $('#insertImageDialogInsert').click( function() { callbackFunc( $('#insertImageDialogURL').val().length > 0 ? $('#insertImageDialogURL').val() : null ); diff --git a/system/admin/views/add-content.html.php b/system/admin/views/add-content.html.php index 2ee6c7d..4c7702c 100644 --- a/system/admin/views/add-content.html.php +++ b/system/admin/views/add-content.html.php @@ -25,6 +25,8 @@ if (file_exists($tagslang)) { file_put_contents($tagslang, print_r($tmp, true)); } +$images = get_gallery(); + ?> @@ -193,12 +195,32 @@ $( function() { - + + - + +