HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/confeduphaar/backip-old-files/components/com_jevents/views/icalevent/tmpl/edit_uikit.php
<?php
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\Factory;
use Joomla\CMS\Component\ComponentHelper;

// In the frontend we need to force the styling of Chosen
$params = ComponentHelper::getParams(JEV_COM_COMPONENT);
if ($params->get("bootstrapchosen", 1))
{
	ob_start();
	?>
        jQuery(function($) {
            'use strict';

            var $w = $(window);

            $(document.body)
                // add color classes to chosen field based on value
                .on('liszt:ready', 'select[class^="chzn-color"], select[class*=" chzn-color"]', function () {
                    var $select = $(this);
                    var cls = this.className.replace(/^.(chzn-color[a-z0-9-_]*)$.*/, '$1');
                    var $container = $select.next('.chzn-container').find('.chzn-single');

                    $container.addClass(cls).attr('rel', 'value_' + $select.val());
                    $select.on('change click', function () {
                        $container.attr('rel', 'value_' + $select.val());
                    });
                })
        });
	<?php
	$script = ob_get_clean();
	Factory::getDocument()->addScriptDeclaration($script);
}

include_once(JEV_ADMINPATH . "/views/icalevent/tmpl/" . basename(__FILE__));