Use the js_config component in all pages

This commit is contained in:
Alex Tselegidis 2021-12-14 07:52:41 +01:00
parent 1eaa59d192
commit c761f6d37c
5 changed files with 6 additions and 1 deletions

View file

@ -54,13 +54,14 @@
<script src="<?= asset_url('assets/js/layouts/account_layout.js') ?>"></script> <script src="<?= asset_url('assets/js/layouts/account_layout.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php component('config_script') ?>
<?php component('language_script') ?> <?php component('language_script') ?>
<script> <script>
const GlobalVariables = { const GlobalVariables = {
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>, csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>,
baseUrl: <?= json_encode($base_url) ?>, baseUrl: <?= json_encode($base_url) ?>,
destUrl: <?= json_encode($dest_url) ?>, destUrl: <?= json_encode($dest_url) ?>,e
AJAX_SUCCESS: 'SUCCESS', AJAX_SUCCESS: 'SUCCESS',
AJAX_FAILURE: 'FAILURE' AJAX_FAILURE: 'FAILURE'
}; };

View file

@ -58,6 +58,7 @@
<script src="<?= asset_url('assets/js/layouts/backend_layout.js') ?>"></script> <script src="<?= asset_url('assets/js/layouts/backend_layout.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php component('config_script') ?>
<?php component('language_script') ?> <?php component('language_script') ?>
<?php slot('scripts') ?> <?php slot('scripts') ?>

View file

@ -103,6 +103,7 @@
<script src="<?= asset_url('assets/js/layouts/booking_layout.js') ?>"></script> <script src="<?= asset_url('assets/js/layouts/booking_layout.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php component('config_script') ?>
<?php component('language_script') ?> <?php component('language_script') ?>
<script> <script>

View file

@ -59,6 +59,7 @@
<script src="<?= asset_url('assets/js/layouts/message_layout.js') ?>"></script> <script src="<?= asset_url('assets/js/layouts/message_layout.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php component('config_script') ?>
<?php component('language_script') ?> <?php component('language_script') ?>
<?php google_analytics_script() ?> <?php google_analytics_script() ?>

View file

@ -147,6 +147,7 @@
<script src="<?= asset_url('assets/js/pages/installation.js') ?>"></script> <script src="<?= asset_url('assets/js/pages/installation.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php component('config_script') ?>
<?php component('language_script') ?> <?php component('language_script') ?>
</body> </body>