2014-12-29 12:17:40 +01:00
|
|
|
<?php
|
|
|
|
|
|
2015-01-12 19:03:29 +01:00
|
|
|
/**
|
2016-10-11 10:40:15 +02:00
|
|
|
* @package contao-leaflet-maps
|
2015-01-12 19:03:29 +01:00
|
|
|
* @author David Molineus <david.molineus@netzmacht.de>
|
2016-10-11 10:40:15 +02:00
|
|
|
* @copyright 2014-2016 netzmacht David Molineus
|
2015-01-12 19:03:29 +01:00
|
|
|
* @license LGPL 3.0
|
|
|
|
|
* @filesource
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2014-12-29 12:17:40 +01:00
|
|
|
$GLOBALS['TL_DCA']['tl_content']['metapalettes']['leaflet'] = array(
|
|
|
|
|
'type' => array('type', 'headline'),
|
2015-01-30 17:44:24 +01:00
|
|
|
'leaflet' => array('leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'),
|
2014-12-29 12:17:40 +01:00
|
|
|
'templates' => array(':hide', 'customTpl'),
|
|
|
|
|
'protected' => array(':hide', 'protected'),
|
|
|
|
|
'expert' => array(':hide', 'guests', 'cssID', 'space'),
|
|
|
|
|
'invisible' => array(':hide', 'invisible', 'start', 'start')
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_map'] = array(
|
|
|
|
|
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_map'],
|
|
|
|
|
'inputType' => 'select',
|
|
|
|
|
'exclude' => true,
|
2016-10-06 08:34:55 +02:00
|
|
|
'options_callback' => \Netzmacht\Contao\Leaflet\Dca\FrontendIntegration::callback('getMaps'),
|
2015-01-07 11:13:15 +01:00
|
|
|
'wizard' => array(
|
2016-10-06 08:34:55 +02:00
|
|
|
\Netzmacht\Contao\Leaflet\Dca\FrontendIntegration::callback('getEditMapLink'),
|
2015-01-07 11:13:15 +01:00
|
|
|
),
|
2014-12-29 12:17:40 +01:00
|
|
|
'eval' => array(
|
2015-01-07 11:13:15 +01:00
|
|
|
'tl_class' => 'w50 wizard',
|
2014-12-29 12:17:40 +01:00
|
|
|
'chosen' => true,
|
|
|
|
|
),
|
|
|
|
|
'sql' => "int(10) unsigned NOT NULL default '0'"
|
|
|
|
|
);
|
2015-01-06 21:40:53 +01:00
|
|
|
|
2015-01-30 17:44:24 +01:00
|
|
|
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_mapId'] = array(
|
|
|
|
|
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_mapId'],
|
|
|
|
|
'inputType' => 'text',
|
|
|
|
|
'exclude' => true,
|
|
|
|
|
'eval' => array(
|
|
|
|
|
'tl_class' => 'w50',
|
|
|
|
|
'chosen' => true,
|
|
|
|
|
'maxlength' => 16,
|
|
|
|
|
),
|
|
|
|
|
'sql' => "varchar(16) NOT NULL default ''"
|
|
|
|
|
);
|
|
|
|
|
|
2015-01-06 21:40:53 +01:00
|
|
|
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_width'] = array(
|
|
|
|
|
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_width'],
|
|
|
|
|
'inputType' => 'inputUnit',
|
|
|
|
|
'options' => array('px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'),
|
|
|
|
|
'search' => false,
|
|
|
|
|
'exclude' => true,
|
|
|
|
|
'eval' => array('rgxp' => 'digit', 'tl_class' => 'clr w50'),
|
|
|
|
|
'sql' => "varchar(64) NOT NULL default ''"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_height'] = array(
|
|
|
|
|
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_height'],
|
|
|
|
|
'inputType' => 'inputUnit',
|
|
|
|
|
'options' => array('px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'),
|
|
|
|
|
'search' => false,
|
|
|
|
|
'exclude' => true,
|
|
|
|
|
'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50'),
|
|
|
|
|
'sql' => "varchar(64) NOT NULL default ''"
|
|
|
|
|
);
|
2015-01-30 17:44:24 +01:00
|
|
|
|
|
|
|
|
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_template'] = array(
|
|
|
|
|
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_template'],
|
|
|
|
|
'inputType' => 'select',
|
|
|
|
|
'exclude' => true,
|
2016-10-04 16:07:05 +02:00
|
|
|
'options_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::getTemplates('leaflet_map_js'),
|
2015-01-30 17:44:24 +01:00
|
|
|
'eval' => array(
|
|
|
|
|
'tl_class' => 'w50',
|
|
|
|
|
'chosen' => true,
|
|
|
|
|
),
|
|
|
|
|
'sql' => "varchar(64) NOT NULL default ''"
|
|
|
|
|
);
|