Merge pull request #27 from andydixon/development
Development Sync
This commit was merged in pull request #27.
This commit is contained in:
+14
-16
@@ -15,8 +15,8 @@ body {
|
||||
height: 70px;
|
||||
background-color: #666666;
|
||||
border-bottom: 1px solid #1a1a1a;
|
||||
-webkit-box-shadow: 0px 10px 13px -7px #000000, -1px -1px 15px 5px rgba(0, 0, 0, 0);
|
||||
box-shadow: 0px 10px 13px -7px #000000, -1px -1px 15px 5px rgba(0, 0, 0, 0);
|
||||
-webkit-box-shadow: 0 10px 13px -7px #000000, -1px -1px 15px 5px rgba(0, 0, 0, 0);
|
||||
box-shadow: 0 10px 13px -7px #000000, -1px -1px 15px 5px rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.pageContainer .frame {
|
||||
@@ -55,45 +55,43 @@ body {
|
||||
}
|
||||
|
||||
.blueButton {
|
||||
box-shadow: inset 0px 0px 15px 3px #23395e;
|
||||
background: linear-gradient(to bottom, #2e466e 5%, #415989 100%);
|
||||
background-color: #2e466e;
|
||||
box-shadow: inset 0 0 15px 3px #23395e;
|
||||
background: #2e466e linear-gradient(to bottom, #2e466e 5%, #415989 100%);
|
||||
border-radius: 17px;
|
||||
border: 1px solid #1f2f47;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
color: #ffffff;
|
||||
font-family: Arial;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 15px;
|
||||
padding: 6px 13px;
|
||||
text-decoration: none;
|
||||
text-shadow: 0px 1px 0px #263666;
|
||||
text-shadow: 0 1px 0 #263666;
|
||||
}
|
||||
|
||||
.blueButton:hover {
|
||||
background: linear-gradient(to bottom, #415989 5%, #2e466e 100%);
|
||||
background-color: #415989;
|
||||
background: #415989 linear-gradient(to bottom, #415989 5%, #2e466e 100%);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.greenButton {
|
||||
box-shadow: inset 0px 0px 15px 3px #3e7327;
|
||||
background: linear-gradient(to bottom, #77b55a 5%, #72b352 100%);
|
||||
background-color: #77b55a;
|
||||
box-shadow: inset 0 0 15px 3px #3e7327;
|
||||
background: #77b55a linear-gradient(to bottom, #77b55a 5%, #72b352 100%);
|
||||
border-radius: 17px;
|
||||
border: 1px solid #4b8f29;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
color: #ffffff;
|
||||
font-family: Arial;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 15px;
|
||||
padding: 6px 13px;
|
||||
text-decoration: none;
|
||||
text-shadow: 0px 1px 0px #5b8a3c;
|
||||
text-shadow: 0 1px 0 #5b8a3c;
|
||||
}
|
||||
|
||||
.greenButton:hover {
|
||||
background: linear-gradient(to bottom, #72b352 5%, #77b55a 100%);
|
||||
background-color: #72b352;
|
||||
background: #72b352 linear-gradient(to bottom, #72b352 5%, #77b55a 100%);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.greenButton:active {
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ if (!$_SESSION["core"]->isLoggedIn() && stripos($_SERVER['REQUEST_URI'], "/login
|
||||
|
||||
// str_starts_with compatibility for php 7
|
||||
if (!function_exists('str_starts_with')) {
|
||||
function str_starts_with($haystack, $needle)
|
||||
function str_starts_with($haystack, $needle): bool
|
||||
{
|
||||
//str_starts_with(string $haystack, string $needle): bool
|
||||
|
||||
@@ -40,7 +40,7 @@ if (!function_exists('str_starts_with')) {
|
||||
|
||||
//str_ends_with compatibility for php 7
|
||||
if (!function_exists('str_ends_with')) {
|
||||
function str_ends_with($haystack, $needle)
|
||||
function str_ends_with($haystack, $needle): bool
|
||||
{
|
||||
//str_starts_with(string $haystack, string $needle): bool
|
||||
|
||||
|
||||
+9
-9
@@ -1,12 +1,12 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
var currentDiv;
|
||||
var iframeDoc;
|
||||
let currentDiv;
|
||||
let iframeDoc;
|
||||
|
||||
$('#frameContainer').on('load', function () {
|
||||
|
||||
// Get the iframe document
|
||||
var iframe = document.getElementById('frameContainer');
|
||||
const iframe = document.getElementById('frameContainer');
|
||||
iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
|
||||
|
||||
// Set up click handler on divs with class 'editable' in the iframe
|
||||
@@ -16,7 +16,7 @@ $(document).ready(function () {
|
||||
currentDiv = $(this);
|
||||
|
||||
// Get the content of the div
|
||||
var content = currentDiv.html();
|
||||
const content = currentDiv.html();
|
||||
|
||||
// Set the content in TinyMCE
|
||||
$('#editor').val(content);
|
||||
@@ -47,7 +47,7 @@ $(document).ready(function () {
|
||||
// Save changes made to a div, but not save to the file on the server
|
||||
$('#saveBtn').click(function () {
|
||||
// Get the data from TinyMCE
|
||||
var data = tinymce.get('editor').getContent();
|
||||
const data = tinymce.get('editor').getContent();
|
||||
|
||||
// Set the data back to the div in the iframe
|
||||
$(currentDiv).html(data);
|
||||
@@ -119,7 +119,7 @@ $(document).ready(function () {
|
||||
} else {
|
||||
showMessage("New page Created", "success");
|
||||
$('#frameContainer').contents().get(0).location.href = response.url;
|
||||
$("#newPageForm").dialog("close"); // Close the modal on success
|
||||
$('.ui-dialog-content').dialog('close');
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
@@ -169,7 +169,7 @@ $(document).ready(function () {
|
||||
// Add click event to list items to redirect
|
||||
$("#fileList li").click(function () {
|
||||
$('#frameContainer').contents().get(0).location.href = $(this).data("url"); // Redirect to the clicked file's URL
|
||||
$("#fileListDialog").dialog("close"); // Close the modal
|
||||
$('.ui-dialog-content').dialog('close');
|
||||
});
|
||||
},
|
||||
error: function () {
|
||||
@@ -186,7 +186,7 @@ $(document).ready(function () {
|
||||
width: 500,
|
||||
buttons: {
|
||||
Close: function () {
|
||||
$(this).dialog("close");
|
||||
$('.ui-dialog-content').dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -200,7 +200,7 @@ $(document).ready(function () {
|
||||
* @param type - string "success" or "error"
|
||||
*/
|
||||
function showMessage(message, type) {
|
||||
var messageBar = $('#message-bar');
|
||||
const messageBar = $('#message-bar');
|
||||
|
||||
// Set the text message
|
||||
messageBar.text(message);
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ if (isset($_POST['username']) && isset($_POST['password'])) {
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Login</title>
|
||||
<style>
|
||||
|
||||
+8
-8
@@ -3,11 +3,11 @@
|
||||
class neoCMSCore
|
||||
{
|
||||
|
||||
public $auditEnabled = true;
|
||||
public $users = [];
|
||||
public $loggedIn = false;
|
||||
public $version = '2.0';
|
||||
private $loggedInUser = '';
|
||||
public bool $auditEnabled = true;
|
||||
public array $users = [];
|
||||
public bool $loggedIn = false;
|
||||
public string $version = '2.0';
|
||||
private string $loggedInUser = '';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -27,7 +27,7 @@ class neoCMSCore
|
||||
* @param $value
|
||||
* @return void
|
||||
*/
|
||||
public function writeAudit($value)
|
||||
public function writeAudit($value): void
|
||||
{
|
||||
if ($this->auditEnabled)
|
||||
file_put_contents(__DIR__ . "/logs/" . date('y-m-d-') . "audit.txt", date('Y-m-d H:i:s') . "\t" . $this->loggedInUser . "\t" . trim($value) . "\n", FILE_APPEND);
|
||||
@@ -38,12 +38,12 @@ class neoCMSCore
|
||||
return $this->loggedIn;
|
||||
}
|
||||
|
||||
public function getLoggedinUser()
|
||||
public function getLoggedinUser(): string
|
||||
{
|
||||
return $this->loggedInUser;
|
||||
}
|
||||
|
||||
public function saveContent($uri, $content)
|
||||
public function saveContent($uri, $content): void
|
||||
{
|
||||
$this->writeAudit("Content for " . $uri . " was saved.");
|
||||
$uri = str_replace("../", "./", $uri);
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Iframe Content</title>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user