<commit_before><?
defined('C5_EXECUTE') or die("Access Denied.");
$valt = Loader::helper('validation/token');
$token = '&' . $valt->getParameter();
$html = Loader::helper('html');

if (isset($cp)) {
	if ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage() || $cp->canApproveCollection()) {

?>

<script type="text/javascript">
<?
$valt = Loader::helper('validation/token');
print "var CCM_SECURITY_TOKEN = '" . $valt->generate() . "';";
?>
</script>

<?
$this->addHeaderItem($html->css('ccm.ui.css'));
$this->addHeaderItem($html->css('jquery.rating.css'));
$this->addHeaderItem($html->css('ccm.dialog.css'));
$this->addHeaderItem($html->css('ccm.menus.css'));
$this->addHeaderItem($html->css('ccm.forms.css'));
$this->addHeaderItem($html->css('ccm.search.css'));
$this->addHeaderItem($html->css('ccm.filemanager.css'));
$this->addHeaderItem($html->css('ccm.colorpicker.css'));
$this->addHeaderItem($html->css('jquery.ui.css'));

$this->addHeaderItem('<script type="text/javascript" src="' . REL_DIR_FILES_TOOLS_REQUIRED . '/i18n_js"></script>'); 
$this->addHeaderItem($html->javascript('jquery.js'));
$this->addHeaderItem($html->javascript('jquery.form.js'));
$this->addHeaderItem($html->javascript('jquery.metadata.js'));
$this->addHeaderItem($html->javascript('jquery.ui.js'));
$this->addHeaderItem($html->javascript('quicksilver.js'));
$this->addHeaderItem($html->javascript('jquery.liveupdate.js'));
$this->addHeaderItem($html->javascript('jquery.rating.js'));
$this->addHeaderItem($html->javascript('jquery.colorpicker.js'));
	
if (ACTIVE_LOCALE != 'en_US') {
	$dlocale = str_replace('_', '-', ACTIVE_LOCALE);
	$this->addHeaderItem($html->javascript('i18n/ui.datepicker-' . $dlocale . '.js'));
	$this->addHeaderItem('<script type="text/javascript">$(function() { jQuery.datepicker.setDefaults({dateFormat: \'yy-mm-dd\'}); });</script>');
}

$this->addHeaderItem($html->javascript('ccm.dialog.js'));
$this->addHeaderItem($html->javascript('ccm.themes.js'));
$this->addHeaderItem($html->javascript('ccm.filemanager.js'));
$this->addHeaderItem($html->javascript('ccm.search.js'));
$this->addHeaderItem($html->javascript('ccm.ui.js'));
$this->addHeaderItem($html->javascript('ccm.layout.js'));<commit_msg>jQuery UI datepicker uses LANGUAGE instead of ACTIVE_LOCALE<commit_after><?
defined('C5_EXECUTE') or die("Access Denied.");
$valt = Loader::helper('validation/token');
$token = '&' . $valt->getParameter();
$html = Loader::helper('html');

if (isset($cp)) {
	if ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage() || $cp->canApproveCollection()) {

?>

<script type="text/javascript">
<?
$valt = Loader::helper('validation/token');
print "var CCM_SECURITY_TOKEN = '" . $valt->generate() . "';";
?>
</script>

<?
$this->addHeaderItem($html->css('ccm.ui.css'));
$this->addHeaderItem($html->css('jquery.rating.css'));
$this->addHeaderItem($html->css('ccm.dialog.css'));
$this->addHeaderItem($html->css('ccm.menus.css'));
$this->addHeaderItem($html->css('ccm.forms.css'));
$this->addHeaderItem($html->css('ccm.search.css'));
$this->addHeaderItem($html->css('ccm.filemanager.css'));
$this->addHeaderItem($html->css('ccm.colorpicker.css'));
$this->addHeaderItem($html->css('jquery.ui.css'));

$this->addHeaderItem('<script type="text/javascript" src="' . REL_DIR_FILES_TOOLS_REQUIRED . '/i18n_js"></script>'); 
$this->addHeaderItem($html->javascript('jquery.js'));
$this->addHeaderItem($html->javascript('jquery.form.js'));
$this->addHeaderItem($html->javascript('jquery.metadata.js'));
$this->addHeaderItem($html->javascript('jquery.ui.js'));
$this->addHeaderItem($html->javascript('quicksilver.js'));
$this->addHeaderItem($html->javascript('jquery.liveupdate.js'));
$this->addHeaderItem($html->javascript('jquery.rating.js'));
$this->addHeaderItem($html->javascript('jquery.colorpicker.js'));
	
if (ACTIVE_LOCALE != 'en_US') {
	$dlocale = str_replace('_', '-', LANGUAGE);
	$this->addHeaderItem($html->javascript('i18n/ui.datepicker-' . $dlocale . '.js'));
	$this->addHeaderItem('<script type="text/javascript">$(function() { jQuery.datepicker.setDefaults({dateFormat: \'yy-mm-dd\'}); });</script>');
}

$this->addHeaderItem($html->javascript('ccm.dialog.js'));
$this->addHeaderItem($html->javascript('ccm.themes.js'));
$this->addHeaderItem($html->javascript('ccm.filemanager.js'));
$this->addHeaderItem($html->javascript('ccm.search.js'));
$this->addHeaderItem($html->javascript('ccm.ui.js'));
$this->addHeaderItem($html->javascript('ccm.layout.js'));
{'fraction_non_alphanumeric': 0.2557464851595626, 'fraction_numerical': 0.0022316447221602323, 'mean_word_length': 8.222222222222221, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '362848', 'n_tokens_mistral': 1553, 'n_tokens_neox': 1534, 'n_words': 144}