From 09de8ca167410a10e1d7fba567092ea69aae9768 Mon Sep 17 00:00:00 2001 From: Andy Dixon Date: Tue, 12 Nov 2024 18:48:00 +0000 Subject: [PATCH 1/2] Added option to show full URL in the control bar. Probably could do with styling a bit better though. --- cms/controller/index.php | 4 ++-- cms/css/editor.css | 17 ++++++++++++++++- cms/index.php | 1 + cms/init.php | 4 ++++ cms/js/cms.js | 2 ++ 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/cms/controller/index.php b/cms/controller/index.php index 2c3a4f6..7bb07b5 100644 --- a/cms/controller/index.php +++ b/cms/controller/index.php @@ -6,8 +6,8 @@ switch ($_REQUEST["action"]) { case "save": header('Content-type: application/json'); if (!empty($_POST['uri']) && !empty($_POST['content'])) { - $_SESSION['core']->saveContent($_POST['uri'], $_POST['content']); - echo json_encode(array('message' => 'Page has been saved')); + $filename=$_SESSION['core']->saveContent($_POST['uri'], $_POST['content']); + echo json_encode(array('message' => 'Page has been saved','destination'=>$filename)); } else { echo json_encode(array('error' => 'Unable to save page')); } diff --git a/cms/css/editor.css b/cms/css/editor.css index 993749f..8d46c46 100644 --- a/cms/css/editor.css +++ b/cms/css/editor.css @@ -34,7 +34,22 @@ body { .controls .buttonContainer { width: 400px; - margin: 12px auto; + margin: 12px 0; + position: absolute; + right: 110px; +} + +.controls #urlbox { + margin: 15px 150px; + text-align: center; + font-size: 1.5em; + color: black; + position: absolute; +} + +.controls #urlbox div { + float: right; + margin-left:10px; } .controls .loggedInDetails { diff --git a/cms/index.php b/cms/index.php index 025722e..b9da0c9 100644 --- a/cms/index.php +++ b/cms/index.php @@ -28,6 +28,7 @@ require_once "init.php";
+
';?>
  • Select Page
  • diff --git a/cms/init.php b/cms/init.php index 5afba44..d5c6f8a 100644 --- a/cms/init.php +++ b/cms/init.php @@ -11,6 +11,10 @@ $authentication = [ // Set to true if you do not want to see the welcome page and want to go straight to your site $skipWelcomePage = false; +// Show full URL of the page being edited on the control bar +$showFullUrl = true; + + /** * DO NOT CHANGE ANYTHING BENEATH THIS LINE - IT WILL BUGGER STUFF UP */ diff --git a/cms/js/cms.js b/cms/js/cms.js index eed81a9..ade06f6 100644 --- a/cms/js/cms.js +++ b/cms/js/cms.js @@ -43,6 +43,7 @@ $(document).ready(function () { images_upload_credentials: true, force_br_newlines: false, force_p_newlines: false, + license_key: 'gpl', forced_root_block: 'aaa', newline_behavior: 'linebreak' }); @@ -265,6 +266,7 @@ $(document).ready(function () { $(this).find('.buttonContainer').remove(); addButtonsToNeoDupe(this); }); + $('#urlbox').html("Editing:
    "+$(iframeDoc)[0].URL+"
    "); } // Function to add buttons to a neo-dupe element inside the iframe From 5a02c25074e953ac99e40423ebf55e42fdd05bee Mon Sep 17 00:00:00 2001 From: Andy Dixon Date: Tue, 12 Nov 2024 19:32:56 +0000 Subject: [PATCH 2/2] Force button text styles --- cms/css/editor.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/css/editor.css b/cms/css/editor.css index 8d46c46..0bbafac 100644 --- a/cms/css/editor.css +++ b/cms/css/editor.css @@ -76,11 +76,11 @@ body { border: 1px solid #1f2f47; display: inline-block; cursor: pointer; - color: #ffffff; + color: #ffffff !important; font-family: Arial, Helvetica, sans-serif; font-size: 15px; padding: 6px 13px; - text-decoration: none; + text-decoration: none !important; text-shadow: 0 1px 0 #263666; }