<?php /* ==================== [BEGIN_COT_EXT] Hooks=rc [END_COT_EXT] ==================== */ /** * Head resources * * @package Tags * @copyright (c) Cotonti Team * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt */ defined('COT_CODE') or die('Wrong URL'); if ($cfg['jquery'] && $cfg['turnajax'] && $cfg['plugin']['autocomplete']['autocomplete'] > 0) { cot_rc_add_embed('tags.autocomplete', '$(document).ready(function(){ $(".autotags").autocomplete("' . cot_url('plug', 'r=tags') . '", {multiple: true, minChars: ' . $cfg['plugin']['autocomplete']['autocomplete'] . '}); });'); } if ($cfg['plugin']['tags']['css']) { cot_rc_add_file($cfg['plugins_dir'] . '/tags/tpl/tags.css'); }
<?php /* ==================== [BEGIN_COT_EXT] Hooks=rc [END_COT_EXT] ==================== */ /** * Header file for Autocomplete plugin * * @package Autocomplete * @copyright (c) Cotonti Team * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt */ defined('COT_CODE') or die('Wrong URL'); if ($cfg['jquery'] && $cfg['turnajax'] && $cfg['plugin']['autocomplete']['autocomplete'] > 0) { cot_rc_add_file($cfg['plugins_dir'] . '/autocomplete/lib/jquery.autocomplete.min.js'); if ($cfg['plugin']['autocomplete']['css']) { cot_rc_add_file($cfg['plugins_dir'] . '/autocomplete/lib/jquery.autocomplete.css'); } cot_rc_add_embed('autocomplete', ' $(document).ready(function(){ $( document ).on( "focus", ".userinput", function() { $(".userinput").autocomplete("index.php?r=autocomplete", {multiple: true, minChars: ' . $cfg['plugin']['autocomplete']['autocomplete'] . '}); }); }); '); }
$lang_file = './js/jquery_ui/i18n/jquery.ui.datepicker-' . $usr['lang'] . '.js'; } $rc_link_func($lang_file); } } if ($uidt_cfg['enable_timepicker']) { $timepicker_path = pathinfo($uidt_cfg['timepicker_js'], PATHINFO_DIRNAME); cot_rc_add_file($uidt_cfg['timepicker_css'], 'global', 70); $rc_link_func($uidt_cfg['timepicker_js']); if ($usr['lang'] != 'en') { $lang_file = $timepicker_path . "/i18n/jquery-ui-timepicker-{$usr['lang']}.js"; $rc_link_func($lang_file); } if ($uidt_cfg['support_touch']) { $rc_link_func($timepicker_path . "/jquery-ui-sliderAccess.min.js"); } } else { $ui_off_code = 'var ui_time_off = true;'; } if (!$uidt_cfg['enable_datepicker']) { $ui_off_code .= 'var ui_date_off = true;'; } $rc_link_func($cfg['plugins_dir'] . "/{$plug_name}/js/{$plug_name}.js"); if ($admintools) { $rc_link_func($cfg['plugins_dir'] . "/{$plug_name}/js/{$plug_name}.tools.js"); } if ($ui_off_code) { cot_rc_add_embed($plug_name, $ui_off_code); } } }