PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.21
VikAppointments Services Booking Calendar v1.2.21
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / admin / views / editconfigapp / tmpl / default_customizer_addcss.php
vikappointments / admin / views / editconfigapp / tmpl Last commit date
default.php 3 days ago default_api.php 3 days ago default_api_basic.php 3 days ago default_api_users.php 3 days ago default_backup.php 3 days ago default_backup_basic.php 3 days ago default_customizer.php 3 days ago default_customizer_addcss.php 3 days ago default_customizer_form.php 3 days ago default_customizer_preview.php 3 days ago default_customizer_toolbar.php 3 days ago default_webhooks.php 3 days ago default_webhooks_basic.php 3 days ago index.html 3 days ago
default_customizer_addcss.php
63 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage core
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 $vik = VAPApplication::getInstance();
15
16 ?>
17
18 <div class="config-fieldset">
19
20 <div class="config-fieldset-body">
21 <?php
22 // display CSS code editor
23 echo $vik->getCodeMirror('custom_css_code', $this->customizerModel->getCustomCSS(), ['syntax' => 'css']);
24 ?>
25 </div>
26
27 </div>
28
29 <script>
30 (function($) {
31 'use strict';
32
33 let editor;
34
35 $(function() {
36 onInstanceReady(() => {
37 // wait until the editor is accessible
38 return Joomla.editors.instances.custom_css_code;
39 }).then((e) => {
40 // register internal property
41 editor = e;
42
43 // check if we have a code mirror
44 if (editor.element && editor.element.codemirror) {
45 editor = editor.element.codemirror;
46 }
47
48 if (editor.on) {
49 editor.on('keyup', VikTimer.debounce('customizer-preview-custom-css', applyCustomizerPreviewCSS, 1000));
50 }
51
52 $('li[data-id="vap_customizer_tab_additionalcss"]').on('click', function() {
53 setTimeout(() => {
54 if (editor.refresh) {
55 editor.refresh();
56 }
57 }, 256);
58 });
59 });
60 });
61 })(jQuery);
62 </script>
63