diff options
author | Gitea <gitea@fake.local> | 2021-11-10 17:53:50 +0100 |
---|---|---|
committer | Gitea <gitea@fake.local> | 2021-11-10 17:53:50 +0100 |
commit | 8fabf77b2a7720a357c63817c07035a9908818a0 (patch) | |
tree | d689fcac1403e2473010fe80bc337599a78c21a4 /Neutron-trunk/cms-special/admin-v2/footer/index.php | |
parent | 7b4af63a90a726b98a59b83e53f040a7a566a11d (diff) | |
download | electrode-8fabf77b2a7720a357c63817c07035a9908818a0.tar.gz electrode-8fabf77b2a7720a357c63817c07035a9908818a0.tar.bz2 electrode-8fabf77b2a7720a357c63817c07035a9908818a0.zip |
Update
Diffstat (limited to 'Neutron-trunk/cms-special/admin-v2/footer/index.php')
-rw-r--r-- | Neutron-trunk/cms-special/admin-v2/footer/index.php | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/Neutron-trunk/cms-special/admin-v2/footer/index.php b/Neutron-trunk/cms-special/admin-v2/footer/index.php deleted file mode 100644 index bc37967..0000000 --- a/Neutron-trunk/cms-special/admin-v2/footer/index.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php require_once "../../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php $loadEditor = false;$pageConfig = [ "domName" => "Apparence", "headerName" => "Apparence" ]; require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/precontent.php"; ?> - <h2><?= $lang["admin-appearance"]["footer"] ?></h2> - <span id="footer-error-box" class="hide"><div id="error"><span id="footer-error"><?= $lang["admin-appearance"]["error"] ?></span></div></span> - <div id="footer-settings"><div style="text-align: center;"> - <div style="text-align: center;"><?= $lang["admin-appearance"]["fdesc"] ?></div> - <div name="content" id="fedit"> - <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/footer") ?> - </div><br> - <a onclick="updateFooter()" class="button"><?= $lang["admin-appearance"]["publish"] ?></a> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/ckeditor5/ckeditor.js"></script><script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/ckeditor5/translations/<?= $langsel ?>.js"></script> - <script> - let editor; - ClassicEditor - .create( document.querySelector( '#fedit' ), { - language: { - ui: '<?= $langsel ?>', - content: '<?= $langsel ?>' - }, - toolbar: [ - 'heading', '|', 'bold', 'italic', 'link', '|', 'mediaembed', 'blockquote', 'inserttable', '|', 'bulletedList', 'numberedList', '|', 'undo', 'redo' - ] - } ) - .then( newEditor => { - editor = newEditor; - } ) - .catch( error => { - console.error( error ); - } ); - </script></div> - <p><table class="message_info"><tbody><tr><td><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/message_info.svg" class="message_img"></td><td style="width:100%;"><p><?= $lang["admin-appearance"]["fdisc"][0] ?></p><p><?= $lang["admin-appearance"]["fdisc"][1] ?></p></td></tr></tbody></table></p> - </div> - <div style="text-align: center;"><div id="footer-loader" class="hide"><img src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/loader.svg" class="loader"></div></div> -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/postcontent.php"; ?> - -<script> - -function updateFooter() { - document.getElementById('footer-loader').classList.remove('hide') - document.getElementById('footer-settings').classList.add('hide') - var formData = new FormData(); - formData.append("footer", editor.getData()); - document.getElementById('footer-error-box').classList.add("hide") - $.ajax({ - type: "POST", - dataType: 'html', - url: "<?= $GLOBALS["SYSTEM_ROOT"] ?>/api/admin/footer.php", - success: function (data) { - if (data == "ok") { - location.href = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$panes/personalization.php"; - } else { - document.getElementById('footer-error').innerHTML = data - document.getElementById('footer-error-box').classList.remove("hide") - document.getElementById('footer-loader').classList.add('hide') - document.getElementById('footer-settings').classList.remove('hide') - } - }, - error: function (error) { - document.getElementById('footer-error').innerHTML = "<?= $lang["admin-errors"]["connerror"] ?>" - document.getElementById('footer-error-box').classList.remove("hide") - document.getElementById('footer-loader').classList.add('hide') - document.getElementById('footer-settings').classList.remove('hide') - }, - data: formData, - cache: false, - contentType: false, - processData: false - }); -} - -</script>
\ No newline at end of file |