示例#1
0
/**
 * Contao Open Source CMS
 *
 * @copyright  MEN AT WORK 2013
 * @package    semantic_html5
 * @license    GNU/LGPL
 * @filesource
 */
/**
 * Table tl_content
 */
SemanticHTML5Content::initDataContainer();
/**
 * Palettes
 */
if (SemanticHTML5Content::checkForTag()) {
    $GLOBALS['TL_DCA']['tl_content']['palettes']['semantic_html5'] = '{type_legend},type,headline;{html5_legend},sh5_type,sh5_additional;{protected_legend:hide},protected;{expert_legend:hide},guests,invisible,cssID,space';
} else {
    $GLOBALS['TL_DCA']['tl_content']['palettes']['semantic_html5'] = '{type_legend}';
}
/**
 * Callbacks
 */
$GLOBALS['TL_DCA']['tl_content']['config']['onsubmit_callback'][] = array('SemanticHTML5Content', 'onsubmitCallback');
$GLOBALS['TL_DCA']['tl_content']['config']['ondelete_callback'][] = array('SemanticHTML5Content', 'ondeleteCallback');
$GLOBALS['TL_DCA']['tl_content']['config']['oncopy_callback'][] = array('SemanticHTML5Helper', 'onContentCopyCallback');
/**
 * Fields
 */
$GLOBALS['TL_DCA']['tl_content']['fields']['sh5_type'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['sh5_type'], 'inputType' => 'select', 'options_callback' => array('SemanticHTML5Content', 'optionsCallbackType'), 'eval' => array('submitOnChange' => true, 'mandatory' => true, 'includeBlankOption' => true));
$GLOBALS['TL_DCA']['tl_content']['fields']['sh5_additional'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['sh5_additional'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'eval' => array('tl_class' => 'clr', 'columnFields' => array('property' => array('label' => &$GLOBALS['TL_LANG']['tl_content']['sh5_additional']['property'], 'inputType' => 'text', 'eval' => array('style' => 'width:290px', 'nospace' => true, 'rgxp' => 'alnum')), 'value' => array('label' => &$GLOBALS['TL_LANG']['tl_content']['sh5_additional']['value'], 'inputType' => 'text', 'eval' => array('style' => 'width:290px', 'nospace' => true)))));