forked from Snck3rs/contao-leaflet-maps
Switch to short array syntax.
This commit is contained in:
@@ -10,76 +10,76 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_content']['metapalettes']['leaflet'] = array(
|
$GLOBALS['TL_DCA']['tl_content']['metapalettes']['leaflet'] = [
|
||||||
'type' => array('type', 'headline'),
|
'type' => ['type', 'headline'],
|
||||||
'leaflet' => array('leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'),
|
'leaflet' => ['leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'],
|
||||||
'templates' => array(':hide', 'customTpl'),
|
'templates' => [':hide', 'customTpl'],
|
||||||
'protected' => array(':hide', 'protected'),
|
'protected' => [':hide', 'protected'],
|
||||||
'expert' => array(':hide', 'guests', 'cssID', 'space'),
|
'expert' => [':hide', 'guests', 'cssID', 'space'],
|
||||||
'invisible' => array(':hide', 'invisible', 'start', 'start')
|
'invisible' => [':hide', 'invisible', 'start', 'start'],
|
||||||
);
|
];
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_map'] = array(
|
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_map'] = [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_map'],
|
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_map'],
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getMaps'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getMaps'],
|
||||||
'wizard' => array(
|
'wizard' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getEditMapLink'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getEditMapLink'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'w50 wizard',
|
'tl_class' => 'w50 wizard',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
),
|
],
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
);
|
];
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_mapId'] = array(
|
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_mapId'] = [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_mapId'],
|
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_mapId'],
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'maxlength' => 16,
|
'maxlength' => 16,
|
||||||
),
|
],
|
||||||
'sql' => "varchar(16) NOT NULL default ''"
|
'sql' => "varchar(16) NOT NULL default ''",
|
||||||
);
|
];
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_width'] = array(
|
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_width'] = [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_width'],
|
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_width'],
|
||||||
'inputType' => 'inputUnit',
|
'inputType' => 'inputUnit',
|
||||||
'options' => array('px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'),
|
'options' => ['px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'],
|
||||||
'search' => false,
|
'search' => false,
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'eval' => array('rgxp' => 'digit', 'tl_class' => 'clr w50'),
|
'eval' => ['rgxp' => 'digit', 'tl_class' => 'clr w50'],
|
||||||
'sql' => "varchar(64) NOT NULL default ''"
|
'sql' => "varchar(64) NOT NULL default ''",
|
||||||
);
|
];
|
||||||
|
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_height'] = array(
|
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_height'] = [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_height'],
|
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_height'],
|
||||||
'inputType' => 'inputUnit',
|
'inputType' => 'inputUnit',
|
||||||
'options' => array('px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'),
|
'options' => ['px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'],
|
||||||
'search' => false,
|
'search' => false,
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50'),
|
'eval' => ['rgxp' => 'digit', 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(64) NOT NULL default ''"
|
'sql' => "varchar(64) NOT NULL default ''",
|
||||||
);
|
];
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_template'] = array(
|
$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_template'] = [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_template'],
|
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_template'],
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'options_callback' => ['netzmacht.contao_toolkit.dca.listeners.template_options', 'handleOptionsCallback'],
|
'options_callback' => ['netzmacht.contao_toolkit.dca.listeners.template_options', 'handleOptionsCallback'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
),
|
|
||||||
'toolkit' => [
|
|
||||||
'template_options' => [
|
|
||||||
'prefix' => 'leaflet_map_js'
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
'sql' => "varchar(64) NOT NULL default ''"
|
'toolkit' => [
|
||||||
);
|
'template_options' => [
|
||||||
|
'prefix' => 'leaflet_map_js',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'sql' => "varchar(64) NOT NULL default ''",
|
||||||
|
];
|
||||||
|
|||||||
@@ -10,448 +10,400 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
$GLOBALS['TL_DCA']['tl_leaflet_control'] = [
|
||||||
(
|
'config' => [
|
||||||
'config' => array(
|
'dataContainer' => 'Table',
|
||||||
'dataContainer' => 'Table',
|
'enableVersioning' => true,
|
||||||
'enableVersioning' => true,
|
'ptable' => 'tl_leaflet_map',
|
||||||
'ptable' => 'tl_leaflet_map',
|
'sql' => [
|
||||||
'sql' => array
|
'keys' => [
|
||||||
(
|
'id' => 'primary',
|
||||||
'keys' => array
|
'pid' => 'index',
|
||||||
(
|
],
|
||||||
'id' => 'primary',
|
],
|
||||||
'pid' => 'index',
|
'onload_callback' => [
|
||||||
)
|
|
||||||
),
|
|
||||||
'onload_callback' => array(
|
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
|
||||||
),
|
],
|
||||||
'onsubmit_callback' => [
|
'onsubmit_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
// List configuration
|
// List configuration
|
||||||
'list' => array
|
'list' => [
|
||||||
(
|
'sorting' => [
|
||||||
'sorting' => array
|
'mode' => 4,
|
||||||
(
|
'fields' => ['sorting'],
|
||||||
'mode' => 4,
|
'headerFields' => ['title'],
|
||||||
'fields' => array('sorting'),
|
'flag' => 1,
|
||||||
'headerFields' => array('title'),
|
'sorting' => 2,
|
||||||
'flag' => 1,
|
'panelLayout' => 'filter,sort;search,limit',
|
||||||
'sorting' => 2,
|
'child_record_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'generateRow'],
|
||||||
'panelLayout' => 'filter,sort;search,limit',
|
],
|
||||||
'child_record_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'generateRow'],
|
'label' => [
|
||||||
),
|
'fields' => ['title'],
|
||||||
'label' => array
|
'format' => '%s',
|
||||||
(
|
],
|
||||||
'fields' => array('title'),
|
'global_operations' => [
|
||||||
'format' => '%s',
|
'all' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
||||||
'global_operations' => array
|
'href' => 'act=select',
|
||||||
(
|
'class' => 'header_edit_all',
|
||||||
'all' => array
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
],
|
||||||
'href' => 'act=select',
|
'operations' => [
|
||||||
'class' => 'header_edit_all',
|
'edit' => [
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['edit'],
|
||||||
)
|
'href' => 'act=edit',
|
||||||
),
|
'icon' => 'header.gif',
|
||||||
'operations' => array
|
],
|
||||||
(
|
'copy' => [
|
||||||
'edit' => array
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['copy'],
|
||||||
(
|
'href' => 'act=copy',
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['edit'],
|
'icon' => 'copy.gif',
|
||||||
'href' => 'act=edit',
|
],
|
||||||
'icon' => 'header.gif'
|
'delete' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['delete'],
|
||||||
'copy' => array
|
'href' => 'act=delete',
|
||||||
(
|
'icon' => 'delete.gif',
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['copy'],
|
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||||
'href' => 'act=copy',
|
. '\'))return false;Backend.getScrollOffset()"',
|
||||||
'icon' => 'copy.gif'
|
],
|
||||||
),
|
'toggle' => [
|
||||||
'delete' => array
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['toggle'],
|
||||||
(
|
'icon' => 'visible.gif',
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['delete'],
|
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||||
'href' => 'act=delete',
|
|
||||||
'icon' => 'delete.gif',
|
|
||||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
|
||||||
. '\'))return false;Backend.getScrollOffset()"'
|
|
||||||
),
|
|
||||||
'toggle' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['toggle'],
|
|
||||||
'icon' => 'visible.gif',
|
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
|
||||||
'button_callback' => [
|
'button_callback' => [
|
||||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'handleButtonCallback'
|
'handleButtonCallback',
|
||||||
],
|
],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'state_button' => [
|
'state_button' => [
|
||||||
'stateColumn' => ['active']
|
'stateColumn' => ['active'],
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
'show' => array
|
'show' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['show'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['show'],
|
'href' => 'act=show',
|
||||||
'href' => 'act=show',
|
'icon' => 'show.gif',
|
||||||
'icon' => 'show.gif'
|
],
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
),
|
|
||||||
|
|
||||||
'palettes' => array(
|
'palettes' => [
|
||||||
'__selector__' => array('type')
|
'__selector__' => ['type'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'metapalettes' => array(
|
'metapalettes' => [
|
||||||
'default' => array(
|
'default' => [
|
||||||
'name' => array('title', 'alias', 'type', 'position'),
|
'name' => ['title', 'alias', 'type', 'position'],
|
||||||
'config' => array(),
|
'config' => [],
|
||||||
'active' => array('active'),
|
'active' => ['active'],
|
||||||
),
|
],
|
||||||
'zoom extends default' => array(
|
'zoom extends default' => [
|
||||||
'config' => array('zoomInText', 'zoomOutText', 'zoomInTitle', 'zoomOutTitle'),
|
'config' => ['zoomInText', 'zoomOutText', 'zoomInTitle', 'zoomOutTitle'],
|
||||||
),
|
],
|
||||||
'layers extends default' => array(
|
'layers extends default' => [
|
||||||
'config' => array('layers', 'collapsed', 'autoZIndex')
|
'config' => ['layers', 'collapsed', 'autoZIndex'],
|
||||||
),
|
],
|
||||||
'scale extends default' => array(
|
'scale extends default' => [
|
||||||
'config' => array('maxWidth', 'metric', 'imperial', 'updateWhenIdle')
|
'config' => ['maxWidth', 'metric', 'imperial', 'updateWhenIdle'],
|
||||||
),
|
],
|
||||||
'attribution extends default' => array(
|
'attribution extends default' => [
|
||||||
'config' => array('attributions', 'prefix', 'disableDefault')
|
'config' => ['attributions', 'prefix', 'disableDefault'],
|
||||||
),
|
],
|
||||||
'loading extends default' => array(
|
'loading extends default' => [
|
||||||
'config' => array('separate', 'zoomControl', 'spinjs')
|
'config' => ['separate', 'zoomControl', 'spinjs'],
|
||||||
),
|
],
|
||||||
'fullscreen extends default' => array(
|
'fullscreen extends default' => [
|
||||||
'config' => array('buttonTitle', 'separate', 'simulateFullScreen')
|
'config' => ['buttonTitle', 'separate', 'simulateFullScreen'],
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'metasubpalettes' => array(
|
'metasubpalettes' => [
|
||||||
'spinjs' => array('spin')
|
'spinjs' => ['spin'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'fields' => array
|
'fields' => [
|
||||||
(
|
'id' => [
|
||||||
'id' => array
|
'sql' => 'int(10) unsigned NOT NULL auto_increment',
|
||||||
(
|
],
|
||||||
'sql' => 'int(10) unsigned NOT NULL auto_increment'
|
'pid' => [
|
||||||
),
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'pid' => array
|
],
|
||||||
(
|
'tstamp' => [
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
'tstamp' => array
|
'sorting' => [
|
||||||
(
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sorting' => true,
|
||||||
),
|
],
|
||||||
'sorting' => array
|
'title' => [
|
||||||
(
|
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'",
|
|
||||||
'sorting' => true,
|
|
||||||
),
|
|
||||||
'title' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['title'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['title'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'sorting' => true,
|
'sorting' => true,
|
||||||
'search' => true,
|
'search' => true,
|
||||||
'flag' => 1,
|
'flag' => 1,
|
||||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'alias' => array
|
'alias' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['alias'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['alias'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'search' => true,
|
'search' => true,
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'maxlength' => 255,
|
'maxlength' => 255,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'alias_generator' => [
|
'alias_generator' => [
|
||||||
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_parent',
|
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_parent',
|
||||||
'fields' => ['title']
|
'fields' => ['title'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'type' => array
|
'type' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['type'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['type'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'filter' => true,
|
'filter' => true,
|
||||||
'sorting' => true,
|
'sorting' => true,
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'submitOnChange' => true,
|
'submitOnChange' => true,
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'helpwizard' => true,
|
'helpwizard' => true,
|
||||||
),
|
],
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'getControlTypes'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'getControlTypes'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['leaflet_control'],
|
'reference' => &$GLOBALS['TL_LANG']['leaflet_control'],
|
||||||
'sql' => "varchar(32) NOT NULL default ''",
|
'sql' => "varchar(32) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'position' => array
|
'position' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['position'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['position'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'filter' => true,
|
'filter' => true,
|
||||||
'sorting' => true,
|
'sorting' => true,
|
||||||
'options' => array('topleft', 'topright', 'bottomleft', 'bottomright'),
|
'options' => ['topleft', 'topright', 'bottomleft', 'bottomright'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
|
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
|
||||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50', 'helpwizard' => true),
|
'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50', 'helpwizard' => true],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'active' => array
|
'active' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['active'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['active'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'checkbox',
|
||||||
'inputType' => 'checkbox',
|
'filter' => true,
|
||||||
'filter' => true,
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
'sql' => "char(1) NOT NULL default ''",
|
|
||||||
'save_callback' => [
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
'zoomInText' => array
|
'zoomInText' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'zoomOutText' => array
|
'zoomOutText' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'zoomInTitle' => array
|
'zoomInTitle' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInTitle'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInTitle'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'zoomOutTitle' => array
|
'zoomOutTitle' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutTitle'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutTitle'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'collapsed' => array
|
'collapsed' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['collapsed'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['collapsed'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => '1',
|
'default' => '1',
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'autoZIndex' => array
|
'autoZIndex' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['autoZIndex'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['autoZIndex'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => '1',
|
'default' => '1',
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'layers' => array
|
'layers' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layers'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layers'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'multiColumnWizard',
|
||||||
'inputType' => 'multiColumnWizard',
|
'load_callback' => [
|
||||||
'load_callback' => array(
|
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.control', 'loadLayerRelations'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.control', 'loadLayerRelations'],
|
||||||
),
|
],
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.control', 'saveLayerRelations'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.control', 'saveLayerRelations'],
|
||||||
),
|
],
|
||||||
'eval' => array
|
'eval' => [
|
||||||
(
|
|
||||||
'tl_class' => 'clr',
|
'tl_class' => 'clr',
|
||||||
'columnFields' => array
|
'columnFields' => [
|
||||||
(
|
'layer' => [
|
||||||
'layer' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'getLayers'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'getLayers'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'style' => 'width: 300px',
|
'style' => 'width: 300px',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'includeBlankOption' => true
|
'includeBlankOption' => true,
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
'mode' => array
|
'mode' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layerMode'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layerMode'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'select',
|
||||||
'inputType' => 'select',
|
'options' => ['base', 'overlay'],
|
||||||
'options' => array('base', 'overlay'),
|
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
|
'eval' => [
|
||||||
'eval' => array(
|
'style' => 'width: 200px',
|
||||||
'style' => 'width: 200px',
|
|
||||||
'helpwizard' => true,
|
'helpwizard' => true,
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
'sql' => 'mediumblob NULL'
|
'sql' => 'mediumblob NULL',
|
||||||
),
|
],
|
||||||
'maxWidth' => array
|
'maxWidth' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['maxWidth'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['maxWidth'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => 100,
|
'default' => 100,
|
||||||
'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'),
|
'eval' => ['tl_class' => 'w50', 'rgxp' => 'digit'],
|
||||||
'sql' => "int(5) NOT NULL default '100'"
|
'sql' => "int(5) NOT NULL default '100'",
|
||||||
),
|
],
|
||||||
'metric' => array
|
'metric' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['metric'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['metric'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => '1',
|
'default' => '1',
|
||||||
'eval' => array('tl_class' => 'w50 clr'),
|
'eval' => ['tl_class' => 'w50 clr'],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'imperial' => array
|
'imperial' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['imperial'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['imperial'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => '1',
|
'default' => '1',
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'updateWhenIdle' => array
|
'updateWhenIdle' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['updateWhenIdle'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['updateWhenIdle'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'prefix' => array
|
'prefix' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['prefix'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['prefix'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'attributions' => array
|
'attributions' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['attributions'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['attributions'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'listWizard',
|
'inputType' => 'listWizard',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'clr', 'allowHtml' => true),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'clr', 'allowHtml' => true],
|
||||||
'sql' => 'mediumblob NULL'
|
'sql' => 'mediumblob NULL',
|
||||||
),
|
],
|
||||||
'separate' => array
|
'separate' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['separate'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['separate'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'eval' => array('tl_class' => 'w50 m12'),
|
'eval' => ['tl_class' => 'w50 m12'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'zoomControl' => array
|
'zoomControl' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomControl'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomControl'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'getZoomControls'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'getZoomControls'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
|
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'includeBlankOption' => true
|
'includeBlankOption' => true,
|
||||||
),
|
],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'spinjs' => array
|
'spinjs' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['spinjs'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['spinjs'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'w50', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'spin' => array
|
'spin' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['spin'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['spin'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'textarea',
|
'inputType' => 'textarea',
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'style' => 'height:60px',
|
'style' => 'height:60px',
|
||||||
'preserveTags' => true,
|
'preserveTags' => true,
|
||||||
'decodeEntities' => true,
|
'decodeEntities' => true,
|
||||||
'allowHtml' => true,
|
'allowHtml' => true,
|
||||||
'rte' => 'ace|json',
|
'rte' => 'ace|json',
|
||||||
'tl_class' => 'clr'
|
'tl_class' => 'clr',
|
||||||
),
|
],
|
||||||
'sql' => 'mediumtext NULL'
|
'sql' => 'mediumtext NULL',
|
||||||
),
|
],
|
||||||
'simulateFullScreen' => array
|
'simulateFullScreen' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['simulateFullScreen'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['simulateFullScreen'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'eval' => array('tl_class' => 'w50 m12'),
|
'eval' => ['tl_class' => 'w50 m12'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'buttonTitle' => array
|
'buttonTitle' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['buttonTitle'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['buttonTitle'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'disableDefault' => array
|
'disableDefault' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['disableDefault'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['disableDefault'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50 m12'),
|
'eval' => ['tl_class' => 'w50 m12'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
);
|
];
|
||||||
|
|||||||
@@ -10,44 +10,35 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_leaflet_control_layer'] = array
|
$GLOBALS['TL_DCA']['tl_leaflet_control_layer'] = [
|
||||||
(
|
'config' => [
|
||||||
'config' => array(
|
'dataContainer' => 'Table',
|
||||||
'dataContainer' => 'Table',
|
'sql' => [
|
||||||
'sql' => array
|
'keys' => [
|
||||||
(
|
|
||||||
'keys' => array
|
|
||||||
(
|
|
||||||
'id' => 'primary',
|
'id' => 'primary',
|
||||||
'cid,lid' => 'unique',
|
'cid,lid' => 'unique',
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'fields' => array
|
'fields' => [
|
||||||
(
|
'id' => [
|
||||||
'id' => array
|
'sql' => 'int(10) unsigned NOT NULL auto_increment',
|
||||||
(
|
],
|
||||||
'sql' => 'int(10) unsigned NOT NULL auto_increment'
|
'tstamp' => [
|
||||||
),
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'tstamp' => array
|
],
|
||||||
(
|
'sorting' => [
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
'sorting' => array(
|
'cid' => [
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
'cid' => array
|
'lid' => [
|
||||||
(
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
],
|
||||||
),
|
'mode' => [
|
||||||
'lid' => array
|
'sql' => "varchar(16) NOT NULL default ''",
|
||||||
(
|
],
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
],
|
||||||
),
|
];
|
||||||
'mode' => array
|
|
||||||
(
|
|
||||||
'sql' => "varchar(16) NOT NULL default ''"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|||||||
@@ -10,427 +10,388 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
$GLOBALS['TL_DCA']['tl_leaflet_icon'] = [
|
||||||
(
|
'config' => [
|
||||||
'config' => array(
|
'dataContainer' => 'Table',
|
||||||
'dataContainer' => 'Table',
|
'enableVersioning' => true,
|
||||||
'enableVersioning' => true,
|
'sql' => [
|
||||||
'sql' => array
|
'keys' => [
|
||||||
(
|
|
||||||
'keys' => array
|
|
||||||
(
|
|
||||||
'id' => 'primary',
|
'id' => 'primary',
|
||||||
'alias' => 'unique',
|
'alias' => 'unique',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
'onsubmit_callback' => [
|
'onsubmit_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'list' => array
|
'list' => [
|
||||||
(
|
'sorting' => [
|
||||||
'sorting' => array
|
'mode' => 1,
|
||||||
(
|
'fields' => ['title'],
|
||||||
'mode' => 1,
|
'flag' => 1,
|
||||||
'fields' => array('title'),
|
'panelLayout' => 'limit',
|
||||||
'flag' => 1,
|
'headerFields' => ['title', 'type'],
|
||||||
'panelLayout' => 'limit',
|
],
|
||||||
'headerFields' => array('title', 'type'),
|
'label' => [
|
||||||
),
|
'fields' => ['title', 'type'],
|
||||||
'label' => array
|
'format' => '%s <span class="tl_gray">[%s]</span>',
|
||||||
(
|
],
|
||||||
'fields' => array('title', 'type'),
|
'global_operations' => [
|
||||||
'format' => '%s <span class="tl_gray">[%s]</span>',
|
'layers' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['layersBtn'],
|
||||||
'global_operations' => array
|
'href' => 'table=tl_leaflet_layer',
|
||||||
(
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/layers.png',
|
||||||
'layers' => array
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['layersBtn'],
|
'styles' => [
|
||||||
'href' => 'table=tl_leaflet_layer',
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['styles'],
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/layers.png',
|
'href' => 'table=tl_leaflet_style',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/style.png',
|
||||||
),
|
'attributes' => 'onclick="Backend.getScrollOffset();"',
|
||||||
'styles' => array
|
],
|
||||||
(
|
'popups' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['styles'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['popups'],
|
||||||
'href' => 'table=tl_leaflet_style',
|
'href' => 'table=tl_leaflet_popup',
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/style.png',
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();"'
|
'attributes' => 'onclick="Backend.getScrollOffset();"',
|
||||||
),
|
],
|
||||||
'popups' => array
|
'all' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['popups'],
|
'href' => 'act=select',
|
||||||
'href' => 'table=tl_leaflet_popup',
|
'class' => 'header_edit_all',
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();"'
|
],
|
||||||
),
|
],
|
||||||
'all' => array
|
'operations' => [
|
||||||
(
|
'edit' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['edit'],
|
||||||
'href' => 'act=select',
|
'href' => 'act=edit',
|
||||||
'class' => 'header_edit_all',
|
'icon' => 'edit.gif',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
],
|
||||||
),
|
'copy' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['copy'],
|
||||||
'operations' => array
|
'href' => 'act=copy',
|
||||||
(
|
'icon' => 'copy.gif',
|
||||||
'edit' => array
|
],
|
||||||
(
|
'delete' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['edit'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['delete'],
|
||||||
'href' => 'act=edit',
|
'href' => 'act=delete',
|
||||||
'icon' => 'edit.gif'
|
'icon' => 'delete.gif',
|
||||||
),
|
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||||
'copy' => array
|
. '\'))return false;Backend.getScrollOffset()"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['copy'],
|
'toggle' => [
|
||||||
'href' => 'act=copy',
|
|
||||||
'icon' => 'copy.gif'
|
|
||||||
),
|
|
||||||
'delete' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['delete'],
|
|
||||||
'href' => 'act=delete',
|
|
||||||
'icon' => 'delete.gif',
|
|
||||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
|
||||||
. '\'))return false;Backend.getScrollOffset()"'
|
|
||||||
),
|
|
||||||
'toggle' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['toggle'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['toggle'],
|
||||||
'icon' => 'visible.gif',
|
'icon' => 'visible.gif',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||||
'button_callback' => [
|
'button_callback' => [
|
||||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'handleButtonCallback'
|
'handleButtonCallback',
|
||||||
],
|
],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'state_button' => [
|
'state_button' => [
|
||||||
'stateColumn' => ['active']
|
'stateColumn' => ['active'],
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
'show' => array
|
'show' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['show'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['show'],
|
'href' => 'act=show',
|
||||||
'href' => 'act=show',
|
'icon' => 'show.gif',
|
||||||
'icon' => 'show.gif'
|
],
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
),
|
|
||||||
|
|
||||||
'palettes' => array(
|
'palettes' => [
|
||||||
'__selector__' => array('type')
|
'__selector__' => ['type'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'metapalettes' => array(
|
'metapalettes' => [
|
||||||
'default' => array(
|
'default' => [
|
||||||
'title' => array('title', 'alias', 'type'),
|
'title' => ['title', 'alias', 'type'],
|
||||||
),
|
],
|
||||||
'image extends default' => array(
|
'image extends default' => [
|
||||||
'config' => array(
|
'config' => [
|
||||||
'iconImage',
|
'iconImage',
|
||||||
'iconRetinaImage',
|
'iconRetinaImage',
|
||||||
'iconAnchor',
|
'iconAnchor',
|
||||||
'popupAnchor',
|
'popupAnchor',
|
||||||
'className',
|
'className',
|
||||||
),
|
],
|
||||||
'shadow' => array(
|
'shadow' => [
|
||||||
'shadowImage',
|
'shadowImage',
|
||||||
'shadowRetinaImage',
|
'shadowRetinaImage',
|
||||||
'shadowAnchor',
|
'shadowAnchor',
|
||||||
),
|
],
|
||||||
'active' => array(
|
'active' => [
|
||||||
'active'
|
'active',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'div extends default' => array(
|
'div extends default' => [
|
||||||
'config' => array(
|
'config' => [
|
||||||
'html',
|
'html',
|
||||||
'iconSize',
|
'iconSize',
|
||||||
'iconAnchor',
|
'iconAnchor',
|
||||||
'popupAnchor',
|
'popupAnchor',
|
||||||
'className',
|
'className',
|
||||||
),
|
],
|
||||||
'active' => array(
|
'active' => [
|
||||||
'active'
|
'active',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'extra extends default' => array(
|
'extra extends default' => [
|
||||||
'config' => array(
|
'config' => [
|
||||||
'icon',
|
'icon',
|
||||||
'prefix',
|
'prefix',
|
||||||
'shape',
|
'shape',
|
||||||
'markerColor',
|
'markerColor',
|
||||||
'number',
|
'number',
|
||||||
'iconColor',
|
'iconColor',
|
||||||
),
|
],
|
||||||
'active' => array(
|
'active' => [
|
||||||
'active'
|
'active',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'fields' => array
|
'fields' => [
|
||||||
(
|
'id' => [
|
||||||
'id' => array
|
'sql' => 'int(10) unsigned NOT NULL auto_increment',
|
||||||
(
|
],
|
||||||
'sql' => 'int(10) unsigned NOT NULL auto_increment'
|
'tstamp' => [
|
||||||
),
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'tstamp' => array
|
],
|
||||||
(
|
'title' => [
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
|
||||||
),
|
|
||||||
'title' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['title'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['title'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'alias' => array
|
'alias' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['alias'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['alias'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
||||||
),
|
],
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'alias_generator' => [
|
'alias_generator' => [
|
||||||
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
||||||
'fields' => ['title']
|
'fields' => ['title'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'type' => array
|
'type' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['type'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['type'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'select',
|
||||||
'inputType' => 'select',
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'submitOnChange' => true,
|
'submitOnChange' => true,
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
),
|
],
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.icon', 'getIconOptions'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.icon', 'getIconOptions'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['leaflet_icon'],
|
'reference' => &$GLOBALS['TL_LANG']['leaflet_icon'],
|
||||||
'sql' => "varchar(32) NOT NULL default ''"
|
'sql' => "varchar(32) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'active' => array
|
'active' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['active'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['active'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'checkbox',
|
||||||
'inputType' => 'checkbox',
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
'sql' => "char(1) NOT NULL default ''",
|
|
||||||
'save_callback' => [
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
'iconImage' => array
|
'iconImage' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconImage'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconImage'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'fileTree',
|
'inputType' => 'fileTree',
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'filesOnly' => true,
|
'filesOnly' => true,
|
||||||
'fieldType' => 'radio',
|
'fieldType' => 'radio',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'tl_class' => 'clr',
|
'tl_class' => 'clr',
|
||||||
'extensions' => 'gif,png,svg,jpg'
|
'extensions' => 'gif,png,svg,jpg',
|
||||||
),
|
],
|
||||||
'sql' => 'binary(16) NULL',
|
'sql' => 'binary(16) NULL',
|
||||||
),
|
],
|
||||||
'iconRetinaImage' => array
|
'iconRetinaImage' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconRetinaImage'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconRetinaImage'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'fileTree',
|
'inputType' => 'fileTree',
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'filesOnly' => true,
|
'filesOnly' => true,
|
||||||
'fieldType' => 'radio',
|
'fieldType' => 'radio',
|
||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'tl_class' => 'clr',
|
'tl_class' => 'clr',
|
||||||
'extensions' => 'gif,png,svg,jpg'
|
'extensions' => 'gif,png,svg,jpg',
|
||||||
),
|
],
|
||||||
'sql' => 'binary(16) NULL',
|
'sql' => 'binary(16) NULL',
|
||||||
),
|
],
|
||||||
'shadowImage' => array
|
'shadowImage' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowImage'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowImage'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'fileTree',
|
'inputType' => 'fileTree',
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'filesOnly' => true,
|
'filesOnly' => true,
|
||||||
'fieldType' => 'radio',
|
'fieldType' => 'radio',
|
||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'tl_class' => 'clr',
|
'tl_class' => 'clr',
|
||||||
'extensions' => 'gif,png,svg,jpg'
|
'extensions' => 'gif,png,svg,jpg',
|
||||||
),
|
],
|
||||||
'sql' => 'binary(16) NULL',
|
'sql' => 'binary(16) NULL',
|
||||||
),
|
],
|
||||||
'shadowRetinaImage' => array
|
'shadowRetinaImage' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowRetinaImage'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowRetinaImage'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'fileTree',
|
'inputType' => 'fileTree',
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'filesOnly' => true,
|
'filesOnly' => true,
|
||||||
'fieldType' => 'radio',
|
'fieldType' => 'radio',
|
||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'tl_class' => 'clr',
|
'tl_class' => 'clr',
|
||||||
'extensions' => 'gif,png,svg,jpg'
|
'extensions' => 'gif,png,svg,jpg',
|
||||||
),
|
],
|
||||||
'sql' => 'binary(16) NULL',
|
'sql' => 'binary(16) NULL',
|
||||||
),
|
],
|
||||||
'iconAnchor' => array
|
'iconAnchor' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconAnchor'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconAnchor'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates']
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 255,
|
'maxlength' => 255,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'shadowAnchor' => array
|
'shadowAnchor' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowAnchor'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowAnchor'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates']
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 255,
|
'maxlength' => 255,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'popupAnchor' => array
|
'popupAnchor' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['popupAnchor'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['popupAnchor'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates']
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 255,
|
'maxlength' => 255,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'className' => array
|
'className' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['className'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['className'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(64) NOT NULL default ''"
|
'sql' => "varchar(64) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'iconSize' => array
|
'iconSize' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconSize'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconSize'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'text',
|
||||||
'inputType' => 'text',
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'maxlength' => 64,
|
'maxlength' => 64,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(64) NULL'
|
'sql' => 'varchar(64) NULL',
|
||||||
),
|
],
|
||||||
'html' => array
|
'html' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['html'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['html'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'textarea',
|
'inputType' => 'textarea',
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'style' => 'height:60px',
|
'style' => 'height:60px',
|
||||||
'preserveTags' => true,
|
'preserveTags' => true,
|
||||||
'decodeEntities' => true,
|
'decodeEntities' => true,
|
||||||
'allowHtml' => true,
|
'allowHtml' => true,
|
||||||
'rte' => 'ace|html',
|
'rte' => 'ace|html',
|
||||||
'tl_class' => 'clr'
|
'tl_class' => 'clr',
|
||||||
),
|
],
|
||||||
'sql' => 'mediumtext NULL'
|
'sql' => 'mediumtext NULL',
|
||||||
),
|
],
|
||||||
'icon' => array
|
'icon' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['icon'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['icon'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'text',
|
||||||
'inputType' => 'text',
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'maxlength' => 64,
|
'maxlength' => 64,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(64) NULL'
|
'sql' => 'varchar(64) NULL',
|
||||||
),
|
],
|
||||||
'prefix' => array
|
'prefix' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['prefix'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['prefix'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'text',
|
||||||
'inputType' => 'text',
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'maxlength' => 64,
|
'maxlength' => 64,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(64) NULL'
|
'sql' => 'varchar(64) NULL',
|
||||||
),
|
],
|
||||||
'shape' => array
|
'shape' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shape'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shape'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'select',
|
||||||
'inputType' => 'select',
|
'default' => 'circle',
|
||||||
'default' => 'circle',
|
'options' => ['circle', 'square', 'star', 'penta'],
|
||||||
'options' => ['circle', 'square', 'star', 'penta'],
|
'eval' => [
|
||||||
'eval' => array(
|
'tl_class' => 'w50',
|
||||||
'tl_class' => 'w50',
|
],
|
||||||
),
|
'sql' => 'varchar(64) NULL',
|
||||||
'sql' => 'varchar(64) NULL'
|
],
|
||||||
),
|
'iconColor' => [
|
||||||
'iconColor' => array
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconColor'],
|
||||||
(
|
'exclude' => true,
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconColor'],
|
'inputType' => 'text',
|
||||||
'exclude' => true,
|
'wizard' => [
|
||||||
'inputType' => 'text',
|
|
||||||
'wizard' => array(
|
|
||||||
['netzmacht.contao_toolkit.dca.listeners.color_picker', 'handleWizardCallback'],
|
['netzmacht.contao_toolkit.dca.listeners.color_picker', 'handleWizardCallback'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 64,
|
'maxlength' => 64,
|
||||||
'tl_class' => 'w50 wizard',
|
'tl_class' => 'w50 wizard',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(16) NULL'
|
'sql' => 'varchar(16) NULL',
|
||||||
),
|
],
|
||||||
'markerColor' => array
|
'markerColor' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['markerColor'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['markerColor'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'select',
|
||||||
'inputType' => 'select',
|
'default' => 'circle',
|
||||||
'default' => 'circle',
|
'options' => [
|
||||||
'options' => [
|
|
||||||
'blue',
|
'blue',
|
||||||
'red',
|
'red',
|
||||||
'orange-dark',
|
'orange-dark',
|
||||||
@@ -445,13 +406,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
|||||||
'green',
|
'green',
|
||||||
'green-light',
|
'green-light',
|
||||||
'black',
|
'black',
|
||||||
'white'
|
'white',
|
||||||
],
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(16) NULL'
|
'sql' => 'varchar(16) NULL',
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
);
|
];
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
'alias' => 'unique',
|
'alias' => 'unique',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'onload_callback' => array(
|
'onload_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
|
||||||
),
|
],
|
||||||
'onsubmit_callback' => [
|
'onsubmit_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
@@ -114,12 +114,12 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||||
'button_callback' => [
|
'button_callback' => [
|
||||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'handleButtonCallback'
|
'handleButtonCallback',
|
||||||
],
|
],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'state_button' => [
|
'state_button' => [
|
||||||
'stateColumn' => ['active']
|
'stateColumn' => ['active'],
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'show' => [
|
'show' => [
|
||||||
@@ -265,20 +265,20 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
||||||
],
|
],
|
||||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'alias_generator' => [
|
'alias_generator' => [
|
||||||
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
||||||
'fields' => ['title']
|
'fields' => ['title'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'sql' => 'varchar(255) NULL',
|
'sql' => 'varchar(255) NULL',
|
||||||
],
|
],
|
||||||
'type' => [
|
'type' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['type'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['type'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'filter' => true,
|
'filter' => true,
|
||||||
'eval' => [
|
'eval' => [
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
@@ -286,9 +286,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'helpwizard' => true,
|
'helpwizard' => true,
|
||||||
],
|
],
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.layer', 'getLayerOptions'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.layer', 'getLayerOptions'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['leaflet_layer'],
|
'reference' => &$GLOBALS['TL_LANG']['leaflet_layer'],
|
||||||
'sql' => "varchar(32) NOT NULL default ''",
|
'sql' => "varchar(32) NOT NULL default ''",
|
||||||
],
|
],
|
||||||
'active' => [
|
'active' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'],
|
||||||
@@ -302,10 +302,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'tile_provider' => [
|
'tile_provider' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'eval' => [
|
'eval' => [
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'tl_class' => 'w50 clr',
|
'tl_class' => 'w50 clr',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
@@ -313,7 +313,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
],
|
],
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.layer', 'getProviderOptions'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.layer', 'getProviderOptions'],
|
||||||
'sql' => "varchar(32) NOT NULL default ''",
|
'sql' => "varchar(32) NOT NULL default ''",
|
||||||
],
|
],
|
||||||
'tile_provider_variant' => [
|
'tile_provider_variant' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant'],
|
||||||
|
|||||||
@@ -10,577 +10,524 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
$GLOBALS['TL_DCA']['tl_leaflet_map'] = [
|
||||||
(
|
'config' => [
|
||||||
'config' => array(
|
'dataContainer' => 'Table',
|
||||||
'dataContainer' => 'Table',
|
'enableVersioning' => true,
|
||||||
'enableVersioning' => true,
|
'ctable' => ['tl_leaflet_control'],
|
||||||
'ctable' => array('tl_leaflet_control'),
|
'sql' => [
|
||||||
'sql' => array
|
'keys' => [
|
||||||
(
|
|
||||||
'keys' => array
|
|
||||||
(
|
|
||||||
'id' => 'primary',
|
'id' => 'primary',
|
||||||
'alias' => 'unique',
|
'alias' => 'unique',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
'onload_callback' => array(
|
'onload_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
|
||||||
),
|
],
|
||||||
'onsubmit_callback' => [
|
'onsubmit_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'list' => array
|
'list' => [
|
||||||
(
|
'sorting' => [
|
||||||
'sorting' => array
|
'mode' => 1,
|
||||||
(
|
'fields' => ['title'],
|
||||||
'mode' => 1,
|
'panelLayout' => 'search,limit',
|
||||||
'fields' => array('title'),
|
'flag' => 1,
|
||||||
'panelLayout' => 'search,limit',
|
],
|
||||||
'flag' => 1,
|
'label' => [
|
||||||
),
|
'fields' => ['title', 'alias'],
|
||||||
'label' => array
|
'format' => '%s <span class="tl_gray">[%s]</span>',
|
||||||
(
|
],
|
||||||
'fields' => array('title', 'alias'),
|
'global_operations' => [
|
||||||
'format' => '%s <span class="tl_gray">[%s]</span>'
|
'all' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
||||||
'global_operations' => array
|
'href' => 'act=select',
|
||||||
(
|
'class' => 'header_edit_all',
|
||||||
'all' => array
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
],
|
||||||
'href' => 'act=select',
|
'operations' => [
|
||||||
'class' => 'header_edit_all',
|
'edit' => [
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['edit'],
|
||||||
),
|
'href' => 'act=edit',
|
||||||
),
|
'icon' => 'header.gif',
|
||||||
'operations' => array
|
],
|
||||||
(
|
'controls' => [
|
||||||
'edit' => array
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['controls'],
|
||||||
(
|
'href' => 'table=tl_leaflet_control',
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['edit'],
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/control.png',
|
||||||
'href' => 'act=edit',
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
'icon' => 'header.gif'
|
],
|
||||||
),
|
'copy' => [
|
||||||
'controls' => array
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['copy'],
|
||||||
(
|
'href' => 'act=copy',
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['controls'],
|
'icon' => 'copy.gif',
|
||||||
'href' => 'table=tl_leaflet_control',
|
],
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/control.png',
|
'delete' => [
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['delete'],
|
||||||
),
|
'href' => 'act=delete',
|
||||||
'copy' => array
|
'icon' => 'delete.gif',
|
||||||
(
|
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['copy'],
|
. '\'))return false;Backend.getScrollOffset()"',
|
||||||
'href' => 'act=copy',
|
],
|
||||||
'icon' => 'copy.gif'
|
'show' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['show'],
|
||||||
'delete' => array
|
'href' => 'act=show',
|
||||||
(
|
'icon' => 'show.gif',
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['delete'],
|
],
|
||||||
'href' => 'act=delete',
|
],
|
||||||
'icon' => 'delete.gif',
|
],
|
||||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
|
||||||
. '\'))return false;Backend.getScrollOffset()"'
|
|
||||||
),
|
|
||||||
'show' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['show'],
|
|
||||||
'href' => 'act=show',
|
|
||||||
'icon' => 'show.gif'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
'metapalettes' => array(
|
'metapalettes' => [
|
||||||
'default' => array(
|
'default' => [
|
||||||
'title' => array('title', 'alias'),
|
'title' => ['title', 'alias'],
|
||||||
'zoom' => array('center', 'zoom', 'adjustZoomExtra', 'adjustBounds', 'dynamicLoad', 'boundsPadding'),
|
'zoom' => ['center', 'zoom', 'adjustZoomExtra', 'adjustBounds', 'dynamicLoad', 'boundsPadding'],
|
||||||
'locate' => array('locate'),
|
'locate' => ['locate'],
|
||||||
'layers' => array('layers'),
|
'layers' => ['layers'],
|
||||||
'interaction' => array(
|
'interaction' => [
|
||||||
'dragging',
|
'dragging',
|
||||||
'touchZoom',
|
'touchZoom',
|
||||||
'scrollWheelZoom',
|
'scrollWheelZoom',
|
||||||
'doubleClickZoom',
|
'doubleClickZoom',
|
||||||
'boxZoom',
|
'boxZoom',
|
||||||
'tap',
|
'tap',
|
||||||
'keyboard'
|
'keyboard',
|
||||||
),
|
],
|
||||||
'behaviour' => array(
|
'behaviour' => [
|
||||||
'zoomControl',
|
'zoomControl',
|
||||||
'trackResize',
|
'trackResize',
|
||||||
'closeOnClick',
|
'closeOnClick',
|
||||||
'bounceAtZoomLimits'
|
'bounceAtZoomLimits',
|
||||||
),
|
],
|
||||||
'expert' => array(
|
'expert' => [
|
||||||
'options',
|
'options',
|
||||||
'cache',
|
'cache',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
'metasubpalettes' => array(
|
'metasubpalettes' => [
|
||||||
'keyboard' => array(
|
'keyboard' => [
|
||||||
'keyboardPanOffset',
|
'keyboardPanOffset',
|
||||||
'keyboardZoomOffset'
|
'keyboardZoomOffset',
|
||||||
),
|
],
|
||||||
'adjustZoomExtra' => array(
|
'adjustZoomExtra' => [
|
||||||
'minZoom',
|
'minZoom',
|
||||||
'maxZoom',
|
'maxZoom',
|
||||||
'zoomSnap',
|
'zoomSnap',
|
||||||
'zoomDelta',
|
'zoomDelta',
|
||||||
),
|
],
|
||||||
'locate' => array(
|
'locate' => [
|
||||||
':hide',
|
':hide',
|
||||||
'locateWatch',
|
'locateWatch',
|
||||||
'locateSetView',
|
'locateSetView',
|
||||||
'locateMaxZoom',
|
'locateMaxZoom',
|
||||||
'locateTimeout',
|
'locateTimeout',
|
||||||
'locateMaximumAge',
|
'locateMaximumAge',
|
||||||
'enableHighAccuracy'
|
'enableHighAccuracy',
|
||||||
),
|
],
|
||||||
'cache' => array(
|
'cache' => [
|
||||||
'cacheLifeTime'
|
'cacheLifeTime',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'fields' => array
|
'fields' => [
|
||||||
(
|
'id' => [
|
||||||
'id' => array
|
'sql' => 'int(10) unsigned NOT NULL auto_increment',
|
||||||
(
|
],
|
||||||
'sql' => 'int(10) unsigned NOT NULL auto_increment'
|
'tstamp' => [
|
||||||
),
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'tstamp' => array
|
],
|
||||||
(
|
'title' => [
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
|
||||||
),
|
|
||||||
'title' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['title'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['title'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'search' => true,
|
'search' => true,
|
||||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'alias' => array
|
'alias' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['alias'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['alias'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'text',
|
||||||
'inputType' => 'text',
|
'search' => true,
|
||||||
'search' => true,
|
'save_callback' => [
|
||||||
'save_callback' => array(
|
|
||||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias']
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
||||||
),
|
],
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'alias_generator' => [
|
'alias_generator' => [
|
||||||
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
||||||
'fields' => ['title']
|
'fields' => ['title'],
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'center' => array
|
'center' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['center'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['center'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'text',
|
||||||
'inputType' => 'text',
|
'save_callback' => [
|
||||||
'save_callback' => array(
|
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
|
||||||
),
|
],
|
||||||
'wizard' => array(
|
'wizard' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder']
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 255,
|
'maxlength' => 255,
|
||||||
'tl_class' => 'long clr',
|
'tl_class' => 'long clr',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'layers' => array
|
'layers' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['layers'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['layers'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'multiColumnWizard',
|
||||||
'inputType' => 'multiColumnWizard',
|
'load_callback' => [
|
||||||
'load_callback' => array(
|
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.map', 'loadLayerRelations'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.map', 'loadLayerRelations'],
|
||||||
),
|
],
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.map', 'saveLayerRelations'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.map', 'saveLayerRelations'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'doNotSaveEmpty' => true,
|
'doNotSaveEmpty' => true,
|
||||||
'columnFields' => array(
|
'columnFields' => [
|
||||||
'reference' => array
|
'reference' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['reference'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['reference'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.map', 'getLayers'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.map', 'getLayers'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'style' => 'width: 300px'
|
'style' => 'width: 300px',
|
||||||
),
|
],
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'",
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
'flatArray' => true
|
'flatArray' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'mediumblob NULL'
|
'sql' => 'mediumblob NULL',
|
||||||
),
|
],
|
||||||
'zoom' => array
|
'zoom' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 4,
|
'maxlength' => 4,
|
||||||
'rgxp' => 'digit',
|
'rgxp' => 'digit',
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'nullIfEmpty' => true
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'int(4) NULL'
|
'sql' => 'int(4) NULL',
|
||||||
),
|
],
|
||||||
'adjustZoomExtra' => array
|
'adjustZoomExtra' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustZoomExtra'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustZoomExtra'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'w50 m12', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'minZoom' => array
|
'minZoom' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 4,
|
'maxlength' => 4,
|
||||||
'rgxp' => 'digit',
|
'rgxp' => 'digit',
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'nullIfEmpty' => true
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'int(4) NULL'
|
'sql' => 'int(4) NULL',
|
||||||
),
|
],
|
||||||
'maxZoom' => array
|
'maxZoom' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 4,
|
'maxlength' => 4,
|
||||||
'rgxp' => 'digit',
|
'rgxp' => 'digit',
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'nullIfEmpty' => true
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'int(4) NULL'
|
'sql' => 'int(4) NULL',
|
||||||
),
|
],
|
||||||
'zoomSnap' => array
|
'zoomSnap' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomSnap'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomSnap'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'text',
|
||||||
'inputType' => 'text',
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'maxlength' => 4,
|
'maxlength' => 4,
|
||||||
'rgxp' => 'digit',
|
'rgxp' => 'digit',
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'nullIfEmpty' => true
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(4) NULL'
|
'sql' => 'varchar(4) NULL',
|
||||||
),
|
],
|
||||||
'zoomDelta' => array
|
'zoomDelta' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomDelta'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomDelta'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'text',
|
||||||
'inputType' => 'text',
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'maxlength' => 4,
|
'maxlength' => 4,
|
||||||
'rgxp' => 'digit',
|
'rgxp' => 'digit',
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'nullIfEmpty' => true
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(4) NULL'
|
'sql' => 'varchar(4) NULL',
|
||||||
),
|
],
|
||||||
'dragging' => array
|
'dragging' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['dragging'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['dragging'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'touchZoom' => array
|
'touchZoom' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['touchZoom'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['touchZoom'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'scrollWheelZoom' => array
|
'scrollWheelZoom' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['scrollWheelZoom'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['scrollWheelZoom'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options' => array('1', 'center'),
|
'options' => ['1', 'center'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'],
|
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'],
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'helpwizard' => true,
|
'helpwizard' => true,
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'blankOptionLabel' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0]
|
'blankOptionLabel' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0],
|
||||||
),
|
],
|
||||||
'sql' => "char(6) NOT NULL default ''"
|
'sql' => "char(6) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'doubleClickZoom' => array
|
'doubleClickZoom' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['doubleClickZoom'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['doubleClickZoom'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options' => array('1', 'center'),
|
'options' => ['1', 'center'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'],
|
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'],
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'helpwizard' => true,
|
'helpwizard' => true,
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'blankOptionLabel' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0]
|
'blankOptionLabel' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0],
|
||||||
),
|
],
|
||||||
'sql' => "char(6) NOT NULL default ''"
|
'sql' => "char(6) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'boxZoom' => array
|
'boxZoom' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['boxZoom'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['boxZoom'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'tap' => array
|
'tap' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['tap'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['tap'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'trackResize' => array
|
'trackResize' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['trackResize'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['trackResize'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'bounceAtZoomLimits' => array
|
'bounceAtZoomLimits' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['bounceAtZoomLimits'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['bounceAtZoomLimits'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'closeOnClick' => array
|
'closeOnClick' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['closeOnClick'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['closeOnClick'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'keyboard' => array
|
'keyboard' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboard'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboard'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'w50', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'keyboardPanOffset' => array
|
'keyboardPanOffset' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardPanOffset'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardPanOffset'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => 80,
|
'default' => 80,
|
||||||
'eval' => array('mandatory' => true, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'clr w50'),
|
'eval' => ['mandatory' => true, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'clr w50'],
|
||||||
'sql' => "int(4) NOT NULL default '80'"
|
'sql' => "int(4) NOT NULL default '80'",
|
||||||
),
|
],
|
||||||
'keyboardZoomOffset' => array
|
'keyboardZoomOffset' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardZoomOffset'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardZoomOffset'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => 1,
|
'default' => 1,
|
||||||
'eval' => array('mandatory' => true, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => true, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
|
||||||
'sql' => "int(4) NOT NULL default '1'"
|
'sql' => "int(4) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'zoomControl' => array
|
'zoomControl' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomControl'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomControl'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'options' => array
|
'options' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['options'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['options'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'textarea',
|
'inputType' => 'textarea',
|
||||||
'eval' => array('tl_class' => 'clr lng',
|
'eval' => [
|
||||||
'allowHtml' => true,
|
'tl_class' => 'clr lng',
|
||||||
'style' => 'min-height: 40px;',
|
'allowHtml' => true,
|
||||||
'rte' => 'ace|json'
|
'style' => 'min-height: 40px;',
|
||||||
),
|
'rte' => 'ace|json',
|
||||||
'sql' => 'text NULL'
|
],
|
||||||
),
|
'sql' => 'text NULL',
|
||||||
'adjustBounds' => array
|
],
|
||||||
(
|
'adjustBounds' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBounds'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBounds'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'options' => array('load', 'deferred'),
|
'options' => ['load', 'deferred'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions'],
|
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions'],
|
||||||
'eval' => array('tl_class' => 'clr w50', 'multiple' => true, 'helpwizard' => true),
|
'eval' => ['tl_class' => 'clr w50', 'multiple' => true, 'helpwizard' => true],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'dynamicLoad' => array
|
'dynamicLoad' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['dynamicLoad'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['dynamicLoad'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'eval' => array('tl_class' => 'clr w50', 'submitOnChange' => false),
|
'eval' => ['tl_class' => 'clr w50', 'submitOnChange' => false],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'boundsPadding' => array
|
'boundsPadding' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['boundsPadding'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['boundsPadding'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'text',
|
||||||
'inputType' => 'text',
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'maxlength' => 32,
|
'maxlength' => 32,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'nullIfEmpty' => true
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(32) NULL'
|
'sql' => 'varchar(32) NULL',
|
||||||
),
|
],
|
||||||
'locate' => array
|
'locate' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locate'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locate'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'w50', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'locateWatch' => array
|
'locateWatch' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateWatch'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateWatch'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'locateSetView' => array
|
'locateSetView' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateSetView'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateSetView'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => false),
|
'eval' => ['tl_class' => 'w50', 'submitOnChange' => false],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'locateTimeout' => array
|
'locateTimeout' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateTimeout'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateTimeout'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true),
|
'eval' => ['maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true],
|
||||||
'sql' => 'int(9) NULL'
|
'sql' => 'int(9) NULL',
|
||||||
),
|
],
|
||||||
'locateMaximumAge' => array
|
'locateMaximumAge' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaximumAge'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaximumAge'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true),
|
'eval' => ['maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true],
|
||||||
'sql' => 'int(9) NULL'
|
'sql' => 'int(9) NULL',
|
||||||
),
|
],
|
||||||
'enableHighAccuracy' => array
|
'enableHighAccuracy' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['enableHighAccuracy'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['enableHighAccuracy'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'eval' => array('tl_class' => 'w50 m12'),
|
'eval' => ['tl_class' => 'w50 m12'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'locateMaxZoom' => array
|
'locateMaxZoom' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaxZoom'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaxZoom'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 4,
|
'maxlength' => 4,
|
||||||
'rgxp' => 'digit',
|
'rgxp' => 'digit',
|
||||||
'tl_class' => 'clr w50',
|
'tl_class' => 'clr w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'nullIfEmpty' => true
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'int(4) NULL'
|
'sql' => 'int(4) NULL',
|
||||||
),
|
],
|
||||||
'cache' => array
|
'cache' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['cache'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['cache'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'w50 m12', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'cacheLifeTime' => array
|
'cacheLifeTime' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['cacheLifeTime'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['cacheLifeTime'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
'eval' => ['maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50'],
|
||||||
'sql' => "int(9) NOT NULL default '0'"
|
'sql' => "int(9) NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
);
|
];
|
||||||
|
|||||||
@@ -10,40 +10,32 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_leaflet_map_layer'] = array
|
$GLOBALS['TL_DCA']['tl_leaflet_map_layer'] = [
|
||||||
(
|
'config' => [
|
||||||
'config' => array(
|
'dataContainer' => 'Table',
|
||||||
'dataContainer' => 'Table',
|
'sql' => [
|
||||||
'sql' => array
|
'keys' => [
|
||||||
(
|
|
||||||
'keys' => array
|
|
||||||
(
|
|
||||||
'id' => 'primary',
|
'id' => 'primary',
|
||||||
'mid,lid' => 'unique',
|
'mid,lid' => 'unique',
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'fields' => array
|
'fields' => [
|
||||||
(
|
'id' => [
|
||||||
'id' => array
|
'sql' => 'int(10) unsigned NOT NULL auto_increment',
|
||||||
(
|
],
|
||||||
'sql' => 'int(10) unsigned NOT NULL auto_increment'
|
'tstamp' => [
|
||||||
),
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'tstamp' => array
|
],
|
||||||
(
|
'sorting' => [
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
'sorting' => array(
|
'mid' => [
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
'mid' => array
|
'lid' => [
|
||||||
(
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
],
|
||||||
),
|
],
|
||||||
'lid' => array
|
];
|
||||||
(
|
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
|
||||||
),
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|||||||
@@ -10,120 +10,104 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
$GLOBALS['TL_DCA']['tl_leaflet_marker'] = [
|
||||||
(
|
'config' => [
|
||||||
'config' => array(
|
'dataContainer' => 'Table',
|
||||||
'dataContainer' => 'Table',
|
'enableVersioning' => true,
|
||||||
'enableVersioning' => true,
|
'ptable' => 'tl_leaflet_layer',
|
||||||
'ptable' => 'tl_leaflet_layer',
|
'sql' => [
|
||||||
'sql' => array
|
'keys' => [
|
||||||
(
|
|
||||||
'keys' => array
|
|
||||||
(
|
|
||||||
'id' => 'primary',
|
'id' => 'primary',
|
||||||
'pid' => 'index',
|
'pid' => 'index',
|
||||||
'alias' => 'unique',
|
'alias' => 'unique',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
'onload_callback' => array(
|
'onload_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'initialize'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'initialize'],
|
||||||
),
|
],
|
||||||
'onsubmit_callback' => [
|
'onsubmit_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'list' => array
|
'list' => [
|
||||||
(
|
'sorting' => [
|
||||||
'sorting' => array
|
'mode' => 4,
|
||||||
(
|
'fields' => ['sorting'],
|
||||||
'mode' => 4,
|
'flag' => 1,
|
||||||
'fields' => array('sorting'),
|
'panelLayout' => 'sort,filter;search,limit',
|
||||||
'flag' => 1,
|
'headerFields' => ['title', 'type'],
|
||||||
'panelLayout' => 'sort,filter;search,limit',
|
'child_record_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'generateRow'],
|
||||||
'headerFields' => array('title', 'type'),
|
],
|
||||||
'child_record_callback' => array('netzmacht.contao_leaflet_maps.listeners.dca.marker', 'generateRow'),
|
'label' => [
|
||||||
),
|
'fields' => ['title'],
|
||||||
'label' => array
|
'format' => '%s',
|
||||||
(
|
],
|
||||||
'fields' => array('title'),
|
'global_operations' => [
|
||||||
'format' => '%s',
|
'icons' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons'],
|
||||||
'global_operations' => array
|
'href' => 'table=tl_leaflet_icon&id=',
|
||||||
(
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/icons.png',
|
||||||
'icons' => array
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons'],
|
'popups' => [
|
||||||
'href' => 'table=tl_leaflet_icon&id=',
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popups'],
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/icons.png',
|
'href' => 'table=tl_leaflet_popup',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
|
||||||
),
|
'attributes' => 'onclick="Backend.getScrollOffset();"',
|
||||||
'popups' => array
|
],
|
||||||
(
|
'all' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popups'],
|
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
||||||
'href' => 'table=tl_leaflet_popup',
|
'href' => 'act=select',
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
|
'class' => 'header_edit_all',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();"'
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
),
|
],
|
||||||
'all' => array
|
],
|
||||||
(
|
'operations' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
'edit' => [
|
||||||
'href' => 'act=select',
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['edit'],
|
||||||
'class' => 'header_edit_all',
|
'href' => 'act=edit',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
'icon' => 'edit.gif',
|
||||||
),
|
],
|
||||||
),
|
'copy' => [
|
||||||
'operations' => array
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['copy'],
|
||||||
(
|
'href' => 'act=copy',
|
||||||
'edit' => array
|
'icon' => 'copy.gif',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['edit'],
|
'delete' => [
|
||||||
'href' => 'act=edit',
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete'],
|
||||||
'icon' => 'edit.gif'
|
'href' => 'act=delete',
|
||||||
),
|
'icon' => 'delete.gif',
|
||||||
'copy' => array
|
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||||
(
|
. '\'))return false;Backend.getScrollOffset()"',
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['copy'],
|
],
|
||||||
'href' => 'act=copy',
|
'toggle' => [
|
||||||
'icon' => 'copy.gif'
|
|
||||||
),
|
|
||||||
'delete' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete'],
|
|
||||||
'href' => 'act=delete',
|
|
||||||
'icon' => 'delete.gif',
|
|
||||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
|
||||||
. '\'))return false;Backend.getScrollOffset()"'
|
|
||||||
),
|
|
||||||
'toggle' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle'],
|
||||||
'icon' => 'visible.gif',
|
'icon' => 'visible.gif',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||||
'button_callback' => [
|
'button_callback' => [
|
||||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'handleButtonCallback'
|
'handleButtonCallback',
|
||||||
],
|
],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'state_button' => [
|
'state_button' => [
|
||||||
'stateColumn' => ['active']
|
'stateColumn' => ['active'],
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
'show' => array
|
'show' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['show'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['show'],
|
'href' => 'act=show',
|
||||||
'href' => 'act=show',
|
'icon' => 'show.gif',
|
||||||
'icon' => 'show.gif'
|
],
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
),
|
|
||||||
|
|
||||||
'metapalettes' => array(
|
'metapalettes' => [
|
||||||
'default' => array(
|
'default' => [
|
||||||
'title' => array('title', 'alias', 'coordinates'),
|
'title' => ['title', 'alias', 'coordinates'],
|
||||||
'content' => array('tooltip', 'alt', 'addPopup'),
|
'content' => ['tooltip', 'alt', 'addPopup'],
|
||||||
'config' => array(
|
'config' => [
|
||||||
':hide',
|
':hide',
|
||||||
'clickable',
|
'clickable',
|
||||||
'draggable',
|
'draggable',
|
||||||
@@ -133,250 +117,226 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
|||||||
'riseOnHover',
|
'riseOnHover',
|
||||||
'riseOffset',
|
'riseOffset',
|
||||||
'customIcon',
|
'customIcon',
|
||||||
),
|
],
|
||||||
'expert' => array(':hide', 'featureData'),
|
'expert' => [':hide', 'featureData'],
|
||||||
'active' => array('active', 'ignoreForBounds')
|
'active' => ['active', 'ignoreForBounds'],
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
'metasubpalettes' => array(
|
'metasubpalettes' => [
|
||||||
'addPopup' => array('popup', 'popupContent'),
|
'addPopup' => ['popup', 'popupContent'],
|
||||||
'customIcon' => array('icon')
|
'customIcon' => ['icon'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'fields' => array
|
'fields' => [
|
||||||
(
|
'id' => [
|
||||||
'id' => array
|
'sql' => 'int(10) unsigned NOT NULL auto_increment',
|
||||||
(
|
],
|
||||||
'sql' => 'int(10) unsigned NOT NULL auto_increment'
|
'tstamp' => [
|
||||||
),
|
|
||||||
'tstamp' => array
|
|
||||||
(
|
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
|
||||||
),
|
|
||||||
'sorting' => array
|
|
||||||
(
|
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'",
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'sorting' => true,
|
],
|
||||||
),
|
'sorting' => [
|
||||||
'pid' => array
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
(
|
'sorting' => true,
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
],
|
||||||
),
|
'pid' => [
|
||||||
'title' => array
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
(
|
],
|
||||||
|
'title' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['title'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['title'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'search' => true,
|
'search' => true,
|
||||||
'sorting' => true,
|
'sorting' => true,
|
||||||
'flag' => 1,
|
'flag' => 1,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'alias' => array
|
'alias' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['alias'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['alias'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'search' => true,
|
'search' => true,
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
||||||
),
|
],
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'alias_generator' => [
|
'alias_generator' => [
|
||||||
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
||||||
'fields' => ['title']
|
'fields' => ['title'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'coordinates' => array
|
'coordinates' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['coordinates'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['coordinates'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
|
||||||
array('netzmacht.contao_leaflet_maps.listeners.dca.marker', 'saveCoordinates')
|
['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'saveCoordinates'],
|
||||||
),
|
],
|
||||||
'load_callback' => array(
|
'load_callback' => [
|
||||||
array('netzmacht.contao_leaflet_maps.listeners.dca.marker', 'loadCoordinates')
|
['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'loadCoordinates'],
|
||||||
),
|
],
|
||||||
'wizard' => array(
|
'wizard' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder']
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 255,
|
'maxlength' => 255,
|
||||||
'tl_class' => 'long clr',
|
'tl_class' => 'long clr',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
'doNotSaveEmpty' => true,
|
'doNotSaveEmpty' => true,
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
'latitude' => array
|
'latitude' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['latitude'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['latitude'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => 'decimal(10,8) NULL'
|
'sql' => 'decimal(10,8) NULL',
|
||||||
),
|
],
|
||||||
'longitude' => array
|
'longitude' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['longitude'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['longitude'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => 'decimal(11,8) NULL'
|
'sql' => 'decimal(11,8) NULL',
|
||||||
),
|
],
|
||||||
'altitude' => array
|
'altitude' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['altitude'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['altitude'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => 'float NULL'
|
'sql' => 'float NULL',
|
||||||
),
|
],
|
||||||
'active' => array
|
'active' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['active'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['active'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'filter' => true,
|
||||||
'filter' => true,
|
'sorting' => true,
|
||||||
'sorting' => true,
|
'flag' => 12,
|
||||||
'flag' => 12,
|
'inputType' => 'checkbox',
|
||||||
'inputType' => 'checkbox',
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
'sql' => "char(1) NOT NULL default ''",
|
|
||||||
'save_callback' => [
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
'tooltip' => array
|
'tooltip' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['tooltip'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['tooltip'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'alt' => array
|
'alt' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['alt'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['alt'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'addPopup' => array
|
'addPopup' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['addPopup'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['addPopup'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'filter' => true,
|
'filter' => true,
|
||||||
'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'w50 m12', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'popup' => array
|
'popup' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popup'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popup'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'select',
|
||||||
'inputType' => 'select',
|
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'getPopups'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'getPopups'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
),
|
],
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'",
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
'popupContent' => array
|
'popupContent' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupContent'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupContent'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'),
|
'eval' => ['mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'],
|
||||||
'explanation' => 'insertTags',
|
'explanation' => 'insertTags',
|
||||||
'sql' => 'mediumtext NULL'
|
'sql' => 'mediumtext NULL',
|
||||||
),
|
],
|
||||||
'customIcon' => array
|
'customIcon' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['customIcon'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['customIcon'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'eval' => array('tl_class' => 'clr w50 m12', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'clr w50 m12', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'icon' => array
|
'icon' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['icon'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['icon'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'select',
|
||||||
'inputType' => 'select',
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'getIcons'],
|
||||||
'options_callback' => array('netzmacht.contao_leaflet_maps.listeners.dca.marker', 'getIcons'),
|
'eval' => [
|
||||||
'eval' => array(
|
'mandatory' => true,
|
||||||
'mandatory' => true,
|
'tl_class' => 'w50',
|
||||||
'tl_class' => 'w50',
|
'chosen' => true,
|
||||||
'chosen' => true,
|
],
|
||||||
),
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'",
|
],
|
||||||
),
|
'draggable' => [
|
||||||
'draggable' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['draggable'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['draggable'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'clickable' => array
|
'clickable' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['clickable'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['clickable'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'keyboard' => array
|
'keyboard' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['keyboard'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['keyboard'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'zIndexOffset' => array
|
'zIndexOffset' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['zIndexOffset'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['zIndexOffset'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'clr w50', 'nullIfEmpty' => true),
|
'eval' => ['maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'clr w50', 'nullIfEmpty' => true],
|
||||||
'sql' => 'int(5) NULL'
|
'sql' => 'int(5) NULL',
|
||||||
),
|
],
|
||||||
'ignoreForBounds' => array
|
'ignoreForBounds' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['ignoreForBounds'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['ignoreForBounds'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'featureData' => array
|
'featureData' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['featureData'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['featureData'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'textarea',
|
'inputType' => 'textarea',
|
||||||
'eval' => array('tl_class' => 'clr lng',
|
'eval' => [
|
||||||
'allowHtml' => true,
|
'tl_class' => 'clr lng',
|
||||||
'style' => 'min-height: 40px;',
|
'allowHtml' => true,
|
||||||
'rte' => 'ace|json'
|
'style' => 'min-height: 40px;',
|
||||||
),
|
'rte' => 'ace|json',
|
||||||
'sql' => 'text NULL'
|
],
|
||||||
),
|
'sql' => 'text NULL',
|
||||||
),
|
],
|
||||||
);
|
],
|
||||||
|
];
|
||||||
|
|||||||
@@ -10,125 +10,108 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
|
$GLOBALS['TL_DCA']['tl_leaflet_popup'] = [
|
||||||
(
|
'config' => [
|
||||||
'config' => array(
|
'dataContainer' => 'Table',
|
||||||
'dataContainer' => 'Table',
|
'enableVersioning' => true,
|
||||||
'enableVersioning' => true,
|
'sql' => [
|
||||||
'sql' => array
|
'keys' => [
|
||||||
(
|
|
||||||
'keys' => array
|
|
||||||
(
|
|
||||||
'id' => 'primary',
|
'id' => 'primary',
|
||||||
'alias' => 'unique',
|
'alias' => 'unique',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
'onsubmit_callback' => [
|
'onsubmit_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'list' => array
|
'list' => [
|
||||||
(
|
'sorting' => [
|
||||||
'sorting' => array
|
'mode' => 1,
|
||||||
(
|
'fields' => ['title'],
|
||||||
'mode' => 1,
|
'flag' => 1,
|
||||||
'fields' => array('title'),
|
'panelLayout' => 'limit',
|
||||||
'flag' => 1,
|
'headerFields' => ['title', 'type'],
|
||||||
'panelLayout' => 'limit',
|
],
|
||||||
'headerFields' => array('title', 'type'),
|
'label' => [
|
||||||
),
|
'fields' => ['title', 'type'],
|
||||||
'label' => array
|
'format' => '%s <span class="tl_gray">[%s]</span>',
|
||||||
(
|
],
|
||||||
'fields' => array('title', 'type'),
|
'global_operations' => [
|
||||||
'format' => '%s <span class="tl_gray">[%s]</span>',
|
'layers' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'],
|
||||||
'global_operations' => array
|
'href' => 'table=tl_leaflet_layer',
|
||||||
(
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/layers.png',
|
||||||
'layers' => array
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'],
|
'styles' => [
|
||||||
'href' => 'table=tl_leaflet_layer',
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles'],
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/layers.png',
|
'href' => 'table=tl_leaflet_style',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/style.png',
|
||||||
),
|
'attributes' => 'onclick="Backend.getScrollOffset();"',
|
||||||
'styles' => array
|
],
|
||||||
(
|
'icons' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'],
|
||||||
'href' => 'table=tl_leaflet_style',
|
'href' => 'table=tl_leaflet_icon',
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/style.png',
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/icons.png',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();"'
|
'attributes' => 'onclick="Backend.getScrollOffset();"',
|
||||||
),
|
],
|
||||||
'icons' => array
|
'all' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'],
|
'href' => 'act=select',
|
||||||
'href' => 'table=tl_leaflet_icon',
|
'class' => 'header_edit_all',
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/icons.png',
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();"'
|
],
|
||||||
),
|
],
|
||||||
'all' => array
|
'operations' => [
|
||||||
(
|
'edit' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['edit'],
|
||||||
'href' => 'act=select',
|
'href' => 'act=edit',
|
||||||
'class' => 'header_edit_all',
|
'icon' => 'edit.gif',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
],
|
||||||
),
|
'copy' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['copy'],
|
||||||
'operations' => array
|
'href' => 'act=copy',
|
||||||
(
|
'icon' => 'copy.gif',
|
||||||
'edit' => array
|
],
|
||||||
(
|
'delete' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['edit'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['delete'],
|
||||||
'href' => 'act=edit',
|
'href' => 'act=delete',
|
||||||
'icon' => 'edit.gif'
|
'icon' => 'delete.gif',
|
||||||
),
|
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||||
'copy' => array
|
. '\'))return false;Backend.getScrollOffset()"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['copy'],
|
'toggle' => [
|
||||||
'href' => 'act=copy',
|
|
||||||
'icon' => 'copy.gif'
|
|
||||||
),
|
|
||||||
'delete' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['delete'],
|
|
||||||
'href' => 'act=delete',
|
|
||||||
'icon' => 'delete.gif',
|
|
||||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
|
||||||
. '\'))return false;Backend.getScrollOffset()"'
|
|
||||||
),
|
|
||||||
'toggle' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle'],
|
||||||
'icon' => 'visible.gif',
|
'icon' => 'visible.gif',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||||
'button_callback' => [
|
'button_callback' => [
|
||||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'handleButtonCallback'
|
'handleButtonCallback',
|
||||||
],
|
],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'state_button' => [
|
'state_button' => [
|
||||||
'stateColumn' => ['active']
|
'stateColumn' => ['active'],
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
'show' => array
|
'show' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['show'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['show'],
|
'href' => 'act=show',
|
||||||
'href' => 'act=show',
|
'icon' => 'show.gif',
|
||||||
'icon' => 'show.gif'
|
],
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
),
|
|
||||||
|
|
||||||
'palettes' => array(
|
'palettes' => [
|
||||||
'__selector__' => array('type')
|
'__selector__' => ['type'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'metapalettes' => array(
|
'metapalettes' => [
|
||||||
'default' => array(
|
'default' => [
|
||||||
'title' => array('title', 'alias'),
|
'title' => ['title', 'alias'],
|
||||||
'size' => array('maxWidth', 'minWidth', 'maxHeight'),
|
'size' => ['maxWidth', 'minWidth', 'maxHeight'],
|
||||||
'config' => array(
|
'config' => [
|
||||||
':hide',
|
':hide',
|
||||||
'closeButton',
|
'closeButton',
|
||||||
'keepInView',
|
'keepInView',
|
||||||
@@ -136,175 +119,158 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
|
|||||||
'zoomAnimation',
|
'zoomAnimation',
|
||||||
'offset',
|
'offset',
|
||||||
'className',
|
'className',
|
||||||
'autoPan'
|
'autoPan',
|
||||||
),
|
],
|
||||||
'active' => array('active'),
|
'active' => ['active'],
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'metasubpalettes' => array(
|
'metasubpalettes' => [
|
||||||
'autoPan' => array('autoPanPadding')
|
'autoPan' => ['autoPanPadding'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'fields' => array
|
'fields' => [
|
||||||
(
|
'id' => [
|
||||||
'id' => array
|
'sql' => 'int(10) unsigned NOT NULL auto_increment',
|
||||||
(
|
],
|
||||||
'sql' => 'int(10) unsigned NOT NULL auto_increment'
|
'tstamp' => [
|
||||||
),
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'tstamp' => array
|
],
|
||||||
(
|
'title' => [
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
|
||||||
),
|
|
||||||
'title' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['title'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['title'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'alias' => array
|
'alias' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
||||||
),
|
],
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'alias_generator' => [
|
'alias_generator' => [
|
||||||
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
||||||
'fields' => ['title']
|
'fields' => ['title'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'maxWidth' => array
|
'maxWidth' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
|
||||||
'sql' => 'int(4) NULL'
|
'sql' => 'int(4) NULL',
|
||||||
),
|
],
|
||||||
'minWidth' => array
|
'minWidth' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
|
||||||
'sql' => 'int(4) NULL'
|
'sql' => 'int(4) NULL',
|
||||||
),
|
],
|
||||||
'maxHeight' => array
|
'maxHeight' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
|
||||||
'sql' => 'int(4) NULL'
|
'sql' => 'int(4) NULL',
|
||||||
),
|
],
|
||||||
'autoPan' => array
|
'autoPan' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPan'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPan'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'w50 m12', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'keepInView' => array
|
'keepInView' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => false),
|
'eval' => ['tl_class' => 'w50', 'submitOnChange' => false],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'closeButton' => array
|
'closeButton' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeButton'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeButton'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => false),
|
'eval' => ['tl_class' => 'w50', 'submitOnChange' => false],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'offset' => array
|
'offset' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates']
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 255,
|
'maxlength' => 255,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'autoPanPadding' => array
|
'autoPanPadding' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPanPadding'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPanPadding'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'text',
|
||||||
'inputType' => 'text',
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'maxlength' => 255,
|
'maxlength' => 255,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'size' => 2,
|
'size' => 2,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'zoomAnimation' => array
|
'zoomAnimation' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['zoomAnimation'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['zoomAnimation'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => false),
|
'eval' => ['tl_class' => 'w50', 'submitOnChange' => false],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'closeOnClick' => array
|
'closeOnClick' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => false),
|
'eval' => ['tl_class' => 'w50', 'submitOnChange' => false],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'className' => array
|
'className' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['className'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['className'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(64) NOT NULL default ''"
|
'sql' => "varchar(64) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'active' => array
|
'active' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['active'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['active'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'checkbox',
|
||||||
'inputType' => 'checkbox',
|
'filter' => true,
|
||||||
'filter' => true,
|
'sorting' => true,
|
||||||
'sorting' => true,
|
'search' => false,
|
||||||
'search' => false,
|
'flag' => 12,
|
||||||
'flag' => 12,
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
'sql' => "char(1) NOT NULL default ''",
|
|
||||||
'save_callback' => [
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
);
|
];
|
||||||
|
|||||||
@@ -10,309 +10,275 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_leaflet_style'] = array
|
$GLOBALS['TL_DCA']['tl_leaflet_style'] = [
|
||||||
(
|
'config' => [
|
||||||
'config' => array(
|
'dataContainer' => 'Table',
|
||||||
'dataContainer' => 'Table',
|
'enableVersioning' => true,
|
||||||
'enableVersioning' => true,
|
'sql' => [
|
||||||
'sql' => array
|
'keys' => [
|
||||||
(
|
|
||||||
'keys' => array
|
|
||||||
(
|
|
||||||
'id' => 'primary',
|
'id' => 'primary',
|
||||||
'alias' => 'unique',
|
'alias' => 'unique',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
'onsubmit_callback' => [
|
'onsubmit_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'list' => array
|
'list' => [
|
||||||
(
|
'sorting' => [
|
||||||
'sorting' => array
|
'mode' => 1,
|
||||||
(
|
'fields' => ['title'],
|
||||||
'mode' => 1,
|
'flag' => 1,
|
||||||
'fields' => array('title'),
|
'panelLayout' => 'limit',
|
||||||
'flag' => 1,
|
'headerFields' => ['title', 'type'],
|
||||||
'panelLayout' => 'limit',
|
],
|
||||||
'headerFields' => array('title', 'type'),
|
'label' => [
|
||||||
),
|
'fields' => ['title', 'type'],
|
||||||
'label' => array
|
'format' => '%s <span class="tl_gray">[%s]</span>',
|
||||||
(
|
],
|
||||||
'fields' => array('title', 'type'),
|
'global_operations' => [
|
||||||
'format' => '%s <span class="tl_gray">[%s]</span>',
|
'layers' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['layersBtn'],
|
||||||
'global_operations' => array
|
'href' => 'table=tl_leaflet_layer',
|
||||||
(
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/layers.png',
|
||||||
'layers' => array
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['layersBtn'],
|
'icons' => [
|
||||||
'href' => 'table=tl_leaflet_layer',
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['icons'],
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/layers.png',
|
'href' => 'table=tl_leaflet_icon',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/icons.png',
|
||||||
),
|
'attributes' => 'onclick="Backend.getScrollOffset();"',
|
||||||
'icons' => array
|
],
|
||||||
(
|
'popups' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['icons'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'],
|
||||||
'href' => 'table=tl_leaflet_icon',
|
'href' => 'table=tl_leaflet_popup',
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/icons.png',
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();"'
|
'attributes' => 'onclick="Backend.getScrollOffset();"',
|
||||||
),
|
],
|
||||||
'popups' => array
|
'all' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'],
|
'href' => 'act=select',
|
||||||
'href' => 'table=tl_leaflet_popup',
|
'class' => 'header_edit_all',
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();"'
|
],
|
||||||
),
|
],
|
||||||
'all' => array
|
'operations' => [
|
||||||
(
|
'edit' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['edit'],
|
||||||
'href' => 'act=select',
|
'href' => 'act=edit',
|
||||||
'class' => 'header_edit_all',
|
'icon' => 'edit.gif',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
],
|
||||||
),
|
'copy' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['copy'],
|
||||||
'operations' => array
|
'href' => 'act=copy',
|
||||||
(
|
'icon' => 'copy.gif',
|
||||||
'edit' => array
|
],
|
||||||
(
|
'delete' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['edit'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['delete'],
|
||||||
'href' => 'act=edit',
|
'href' => 'act=delete',
|
||||||
'icon' => 'edit.gif'
|
'icon' => 'delete.gif',
|
||||||
),
|
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||||
'copy' => array
|
. '\'))return false;Backend.getScrollOffset()"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['copy'],
|
'toggle' => [
|
||||||
'href' => 'act=copy',
|
|
||||||
'icon' => 'copy.gif'
|
|
||||||
),
|
|
||||||
'delete' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['delete'],
|
|
||||||
'href' => 'act=delete',
|
|
||||||
'icon' => 'delete.gif',
|
|
||||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
|
||||||
. '\'))return false;Backend.getScrollOffset()"'
|
|
||||||
),
|
|
||||||
'toggle' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['toggle'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['toggle'],
|
||||||
'icon' => 'visible.gif',
|
'icon' => 'visible.gif',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||||
'button_callback' => [
|
'button_callback' => [
|
||||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'handleButtonCallback'
|
'handleButtonCallback',
|
||||||
],
|
],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'state_button' => [
|
'state_button' => [
|
||||||
'stateColumn' => ['active']
|
'stateColumn' => ['active'],
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
'show' => array
|
'show' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['show'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['show'],
|
'href' => 'act=show',
|
||||||
'href' => 'act=show',
|
'icon' => 'show.gif',
|
||||||
'icon' => 'show.gif'
|
],
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
),
|
|
||||||
|
|
||||||
'palettes' => array(
|
'palettes' => [
|
||||||
'__selector__' => array('type')
|
'__selector__' => ['type'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'metapalettes' => array(
|
'metapalettes' => [
|
||||||
'default' => array(
|
'default' => [
|
||||||
'title' => array('title', 'alias', 'type'),
|
'title' => ['title', 'alias', 'type'],
|
||||||
'config' => array(),
|
'config' => [],
|
||||||
'active' => array('active'),
|
'active' => ['active'],
|
||||||
),
|
],
|
||||||
'fixed extends default' => array(
|
'fixed extends default' => [
|
||||||
'config' => array('stroke', 'fill'),
|
'config' => ['stroke', 'fill'],
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'metasubpalettes' => array(
|
'metasubpalettes' => [
|
||||||
'stroke' => array('color', 'weight', 'opacity', 'dashArray', 'lineCap', 'lineJoin'),
|
'stroke' => ['color', 'weight', 'opacity', 'dashArray', 'lineCap', 'lineJoin'],
|
||||||
'fill' => array('fillColor', 'fillOpacity',)
|
'fill' => ['fillColor', 'fillOpacity',],
|
||||||
),
|
],
|
||||||
|
|
||||||
'fields' => array
|
'fields' => [
|
||||||
(
|
'id' => [
|
||||||
'id' => array
|
'sql' => 'int(10) unsigned NOT NULL auto_increment',
|
||||||
(
|
],
|
||||||
'sql' => 'int(10) unsigned NOT NULL auto_increment'
|
'tstamp' => [
|
||||||
),
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'tstamp' => array
|
],
|
||||||
(
|
'title' => [
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
|
||||||
),
|
|
||||||
'title' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['title'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['title'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'alias' => array
|
'alias' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['alias'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['alias'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
||||||
),
|
],
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'alias_generator' => [
|
'alias_generator' => [
|
||||||
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
||||||
'fields' => ['title']
|
'fields' => ['title'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'type' => array
|
'type' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['type'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['type'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'select',
|
||||||
'inputType' => 'select',
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'submitOnChange' => true,
|
'submitOnChange' => true,
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
),
|
],
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.style', 'getStyleOptions'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.style', 'getStyleOptions'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['leaflet_style'],
|
'reference' => &$GLOBALS['TL_LANG']['leaflet_style'],
|
||||||
'sql' => "varchar(32) NOT NULL default ''"
|
'sql' => "varchar(32) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'stroke' => array
|
'stroke' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['stroke'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['stroke'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'w50', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default '1'"
|
'sql' => "char(1) NOT NULL default '1'",
|
||||||
),
|
],
|
||||||
'color' => array
|
'color' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['color'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['color'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'wizard' => array(
|
'wizard' => [
|
||||||
['netzmacht.contao_toolkit.dca.listeners.color_picker', 'handleWizardCallback'],
|
['netzmacht.contao_toolkit.dca.listeners.color_picker', 'handleWizardCallback'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'w50 wizard clr',
|
'tl_class' => 'w50 wizard clr',
|
||||||
'maxlength' => 7,
|
'maxlength' => 7,
|
||||||
'decodeEntities' => true
|
'decodeEntities' => true,
|
||||||
),
|
],
|
||||||
'sql' => "varchar(8) NOT NULL default ''"
|
'sql' => "varchar(8) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'weight' => array
|
'weight' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['weight'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['weight'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => 5,
|
'default' => 5,
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
|
||||||
'sql' => "int(4) NOT NULL default '5'"
|
'sql' => "int(4) NOT NULL default '5'",
|
||||||
),
|
],
|
||||||
'opacity' => array
|
'opacity' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['opacity'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['opacity'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => '0.5',
|
'default' => '0.5',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(4) NOT NULL default '0.5'"
|
'sql' => "varchar(4) NOT NULL default '0.5'",
|
||||||
),
|
],
|
||||||
'fill' => array
|
'fill' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['fill'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['fill'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'eval' => array('tl_class' => 'clr w50', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'clr w50', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'fillColor' => array
|
'fillColor' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['fillColor'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['fillColor'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'wizard' => array(
|
'wizard' => [
|
||||||
['netzmacht.contao_toolkit.dca.listeners.color_picker', 'handleWizardCallback'],
|
['netzmacht.contao_toolkit.dca.listeners.color_picker', 'handleWizardCallback'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'clr w50 wizard',
|
'tl_class' => 'clr w50 wizard',
|
||||||
'maxlength' => 7,
|
'maxlength' => 7,
|
||||||
'decodeEntities' => true
|
'decodeEntities' => true,
|
||||||
),
|
],
|
||||||
'sql' => "varchar(8) NOT NULL default ''"
|
'sql' => "varchar(8) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'fillOpacity' => array
|
'fillOpacity' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['fillOpacity'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['fillOpacity'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => '0.2',
|
'default' => '0.2',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(4) NOT NULL default '0.2'"
|
'sql' => "varchar(4) NOT NULL default '0.2'",
|
||||||
),
|
],
|
||||||
'dashArray' => array
|
'dashArray' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['dashArray'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['dashArray'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 32, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 32, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(32) NOT NULL default ''"
|
'sql' => "varchar(32) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'lineCap' => array
|
'lineCap' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCap'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCap'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options' => array('butt', 'round', 'square', 'inherit'),
|
'options' => ['butt', 'round', 'square', 'inherit'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCaps'],
|
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCaps'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'tl_class' => 'w50 clr',
|
'tl_class' => 'w50 clr',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'helpwizard' => true,
|
'helpwizard' => true,
|
||||||
),
|
],
|
||||||
'sql' => "varchar(8) NOT NULL default ''",
|
'sql' => "varchar(8) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'lineJoin' => array
|
'lineJoin' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineJoin'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineJoin'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'options' => array('miter', 'round', 'bevel', 'inherit'),
|
'options' => ['miter', 'round', 'bevel', 'inherit'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineJoins'],
|
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineJoins'],
|
||||||
'eval' => array('mandatory' => false, 'tl_class' => 'w50', 'includeBlankOption' => true, 'helpwizard'),
|
'eval' => ['mandatory' => false, 'tl_class' => 'w50', 'includeBlankOption' => true, 'helpwizard'],
|
||||||
'sql' => "varchar(8) NOT NULL default ''"
|
'sql' => "varchar(8) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'active' => array
|
'active' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['active'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['active'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'checkbox',
|
||||||
'inputType' => 'checkbox',
|
'filter' => true,
|
||||||
'filter' => true,
|
'sorting' => true,
|
||||||
'sorting' => true,
|
'search' => false,
|
||||||
'search' => false,
|
'flag' => 12,
|
||||||
'flag' => 12,
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
'sql' => "char(1) NOT NULL default ''",
|
|
||||||
'save_callback' => [
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
),
|
],
|
||||||
);
|
];
|
||||||
|
|||||||
@@ -10,185 +10,162 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
$GLOBALS['TL_DCA']['tl_leaflet_vector'] = [
|
||||||
(
|
'config' => [
|
||||||
'config' => array(
|
'dataContainer' => 'Table',
|
||||||
'dataContainer' => 'Table',
|
'enableVersioning' => true,
|
||||||
'enableVersioning' => true,
|
'ptable' => 'tl_leaflet_layer',
|
||||||
'ptable' => 'tl_leaflet_layer',
|
'sql' => [
|
||||||
'sql' => array
|
'keys' => [
|
||||||
(
|
|
||||||
'keys' => array
|
|
||||||
(
|
|
||||||
'id' => 'primary',
|
'id' => 'primary',
|
||||||
'pid' => 'index',
|
'pid' => 'index',
|
||||||
'alias' => 'unique',
|
'alias' => 'unique',
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
'onload_callback' => array(
|
'onload_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
|
||||||
),
|
],
|
||||||
'onsubmit_callback' => [
|
'onsubmit_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
|
|
||||||
'list' => array
|
'list' => [
|
||||||
(
|
'sorting' => [
|
||||||
'sorting' => array
|
'mode' => 4,
|
||||||
(
|
'fields' => ['sorting'],
|
||||||
'mode' => 4,
|
'flag' => 1,
|
||||||
'fields' => array('sorting'),
|
'panelLayout' => 'sort,filter;search,limit',
|
||||||
'flag' => 1,
|
'headerFields' => ['title', 'type'],
|
||||||
'panelLayout' => 'sort,filter;search,limit',
|
'child_record_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.vector', 'generateRow'],
|
||||||
'headerFields' => array('title', 'type'),
|
],
|
||||||
'child_record_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.vector', 'generateRow'],
|
'label' => [
|
||||||
),
|
'fields' => ['title'],
|
||||||
'label' => array
|
'format' => '%s',
|
||||||
(
|
],
|
||||||
'fields' => array('title'),
|
'global_operations' => [
|
||||||
'format' => '%s',
|
'styles' => [
|
||||||
),
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['styles'],
|
||||||
'global_operations' => array
|
'href' => 'table=tl_leaflet_style',
|
||||||
(
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/style.png',
|
||||||
'styles' => array
|
'attributes' => 'onclick="Backend.getScrollOffset();"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['styles'],
|
'popups' => [
|
||||||
'href' => 'table=tl_leaflet_style',
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popups'],
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/style.png',
|
'href' => 'table=tl_leaflet_popup',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();"'
|
'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
|
||||||
),
|
'attributes' => 'onclick="Backend.getScrollOffset();"',
|
||||||
'popups' => array
|
],
|
||||||
(
|
'all' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popups'],
|
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
||||||
'href' => 'table=tl_leaflet_popup',
|
'href' => 'act=select',
|
||||||
'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
|
'class' => 'header_edit_all',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();"'
|
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
|
||||||
),
|
],
|
||||||
'all' => array
|
],
|
||||||
(
|
'operations' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
'edit' => [
|
||||||
'href' => 'act=select',
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['edit'],
|
||||||
'class' => 'header_edit_all',
|
'href' => 'act=edit',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
'icon' => 'edit.gif',
|
||||||
),
|
],
|
||||||
),
|
'copy' => [
|
||||||
'operations' => array
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['copy'],
|
||||||
(
|
'href' => 'act=copy',
|
||||||
'edit' => array
|
'icon' => 'copy.gif',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['edit'],
|
'cut' => [
|
||||||
'href' => 'act=edit',
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['cut'],
|
||||||
'icon' => 'edit.gif'
|
'href' => 'act=paste&mode=cut',
|
||||||
),
|
'icon' => 'cut.gif',
|
||||||
'copy' => array
|
'attributes' => 'onclick="Backend.getScrollOffset()"',
|
||||||
(
|
],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['copy'],
|
'delete' => [
|
||||||
'href' => 'act=copy',
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['delete'],
|
||||||
'icon' => 'copy.gif'
|
'href' => 'act=delete',
|
||||||
),
|
'icon' => 'delete.gif',
|
||||||
'cut' => array
|
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||||
(
|
. '\'))return false;Backend.getScrollOffset()"',
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['cut'],
|
],
|
||||||
'href' => 'act=paste&mode=cut',
|
'toggle' => [
|
||||||
'icon' => 'cut.gif',
|
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset()"',
|
|
||||||
),
|
|
||||||
'delete' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['delete'],
|
|
||||||
'href' => 'act=delete',
|
|
||||||
'icon' => 'delete.gif',
|
|
||||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
|
||||||
. '\'))return false;Backend.getScrollOffset()"'
|
|
||||||
),
|
|
||||||
'toggle' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['toggle'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['toggle'],
|
||||||
'icon' => 'visible.gif',
|
'icon' => 'visible.gif',
|
||||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||||
'button_callback' => [
|
'button_callback' => [
|
||||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'handleButtonCallback'
|
'handleButtonCallback',
|
||||||
],
|
],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'state_button' => [
|
'state_button' => [
|
||||||
'stateColumn' => ['active']
|
'stateColumn' => ['active'],
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
'show' => array
|
'show' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['show'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['show'],
|
'href' => 'act=show',
|
||||||
'href' => 'act=show',
|
'icon' => 'show.gif',
|
||||||
'icon' => 'show.gif'
|
],
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
),
|
|
||||||
|
|
||||||
'palettes' => array(
|
'palettes' => [
|
||||||
'__selector__' => array('type')
|
'__selector__' => ['type'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'metapalettes' => array(
|
'metapalettes' => [
|
||||||
'default' => array(
|
'default' => [
|
||||||
'title' => array('title', 'alias', 'type'),
|
'title' => ['title', 'alias', 'type'],
|
||||||
'data' => array(),
|
'data' => [],
|
||||||
'popup' => array(':hide','addPopup'),
|
'popup' => [':hide', 'addPopup'],
|
||||||
'config' => array(':hide', 'style', 'className', 'clickable'),
|
'config' => [':hide', 'style', 'className', 'clickable'],
|
||||||
'expert' => array(':hide', 'featureData'),
|
'expert' => [':hide', 'featureData'],
|
||||||
'active' => array('active', 'ignoreForBounds')
|
'active' => ['active', 'ignoreForBounds'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'polyline extends default' => array(
|
'polyline extends default' => [
|
||||||
'+config' => array('smoothFactor', 'noClip'),
|
'+config' => ['smoothFactor', 'noClip'],
|
||||||
'data' => array('data')
|
'data' => ['data'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'multiPolyline extends polyline' => array(
|
'multiPolyline extends polyline' => [
|
||||||
'data' => array('multiData')
|
'data' => ['multiData'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'polygon extends polyline' => array(),
|
'polygon extends polyline' => [],
|
||||||
|
|
||||||
'multiPolygon extends multiPolyline' => array(
|
'multiPolygon extends multiPolyline' => [
|
||||||
),
|
],
|
||||||
|
|
||||||
'rectangle extends polygon' => array(
|
'rectangle extends polygon' => [
|
||||||
'data' => array('bounds'),
|
'data' => ['bounds'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'circle extends default' => array(
|
'circle extends default' => [
|
||||||
'+data' => array('coordinates', 'radius'),
|
'+data' => ['coordinates', 'radius'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'circleMarker extends circle' => array(),
|
'circleMarker extends circle' => [],
|
||||||
),
|
],
|
||||||
'metasubpalettes' => array(
|
'metasubpalettes' => [
|
||||||
'addPopup' => array('popup', 'popupContent'),
|
'addPopup' => ['popup', 'popupContent'],
|
||||||
),
|
],
|
||||||
|
|
||||||
'fields' => array
|
'fields' => [
|
||||||
(
|
'id' => [
|
||||||
'id' => array
|
'sql' => 'int(10) unsigned NOT NULL auto_increment',
|
||||||
(
|
],
|
||||||
'sql' => 'int(10) unsigned NOT NULL auto_increment'
|
'tstamp' => [
|
||||||
),
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'tstamp' => array
|
],
|
||||||
(
|
'pid' => [
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
'pid' => array
|
'sorting' => [
|
||||||
(
|
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
|
||||||
),
|
|
||||||
'sorting' => array
|
|
||||||
(
|
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'",
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
'sorting' => true,
|
'sorting' => true,
|
||||||
),
|
],
|
||||||
'title' => array
|
'title' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['title'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['title'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
@@ -196,226 +173,209 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
|||||||
'sorting' => true,
|
'sorting' => true,
|
||||||
'search' => true,
|
'search' => true,
|
||||||
'flag' => 1,
|
'flag' => 1,
|
||||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'alias' => array
|
'alias' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['alias'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['alias'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'search' => true,
|
'search' => true,
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
|
||||||
),
|
],
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||||
'toolkit' => [
|
'toolkit' => [
|
||||||
'alias_generator' => [
|
'alias_generator' => [
|
||||||
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
|
||||||
'fields' => ['title']
|
'fields' => ['title'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'type' => array
|
'type' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['type'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['type'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'select',
|
||||||
'inputType' => 'select',
|
'filter' => true,
|
||||||
'filter' => true,
|
'sorting' => true,
|
||||||
'sorting' => true,
|
'search' => false,
|
||||||
'search' => false,
|
'flag' => 1,
|
||||||
'flag' => 1,
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
'submitOnChange' => true,
|
'submitOnChange' => true,
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'helpwizard' => true,
|
'helpwizard' => true,
|
||||||
),
|
],
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.vector', 'getVectorOptions'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.vector', 'getVectorOptions'],
|
||||||
'reference' => &$GLOBALS['TL_LANG']['leaflet_vector'],
|
'reference' => &$GLOBALS['TL_LANG']['leaflet_vector'],
|
||||||
'sql' => "varchar(32) NOT NULL default ''"
|
'sql' => "varchar(32) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'active' => array
|
'active' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['active'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['active'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'checkbox',
|
||||||
'inputType' => 'checkbox',
|
'filter' => true,
|
||||||
'filter' => true,
|
'sorting' => true,
|
||||||
'sorting' => true,
|
'search' => false,
|
||||||
'search' => false,
|
'flag' => 12,
|
||||||
'flag' => 12,
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
'sql' => "char(1) NOT NULL default ''",
|
|
||||||
'save_callback' => [
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
|
||||||
],
|
],
|
||||||
),
|
],
|
||||||
'addPopup' => array
|
'addPopup' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['addPopup'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['addPopup'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'filter' => true,
|
'filter' => true,
|
||||||
'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true),
|
'eval' => ['tl_class' => 'w50 m12', 'submitOnChange' => true],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'popup' => array
|
'popup' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popup'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popup'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'select',
|
||||||
'inputType' => 'select',
|
'options_callback' => ['Netzmacht\Contao\Leaflet\Listener\Dca\MarkerDcaListener', 'getPopups'],
|
||||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Listener\Dca\MarkerDcaListener', 'getPopups'),
|
'eval' => [
|
||||||
'eval' => array(
|
|
||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
),
|
],
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'",
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
'popupContent' => array
|
'popupContent' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popupContent'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popupContent'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'),
|
'eval' => ['mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'],
|
||||||
'explanation' => 'insertTags',
|
'explanation' => 'insertTags',
|
||||||
'sql' => 'mediumtext NULL'
|
'sql' => 'mediumtext NULL',
|
||||||
),
|
],
|
||||||
'style' => array
|
'style' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['style'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['style'],
|
'exclude' => true,
|
||||||
'exclude' => true,
|
'inputType' => 'select',
|
||||||
'inputType' => 'select',
|
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.vector', 'getStyles'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.vector', 'getStyles'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'mandatory' => false,
|
'mandatory' => false,
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'includeBlankOption' => true,
|
'includeBlankOption' => true,
|
||||||
),
|
],
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'",
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
),
|
],
|
||||||
'clickable' => array
|
'clickable' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['clickable'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['clickable'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'eval' => array('tl_class' => 'm12 w50'),
|
'eval' => ['tl_class' => 'm12 w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'className' => array
|
'className' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['className'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['className'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(64) NOT NULL default ''"
|
'sql' => "varchar(64) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'coordinates' => array
|
'coordinates' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['coordinates'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['coordinates'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates']
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
|
||||||
),
|
],
|
||||||
'wizard' => array(
|
'wizard' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder']
|
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 255,
|
'maxlength' => 255,
|
||||||
'tl_class' => 'long clr',
|
'tl_class' => 'long clr',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'varchar(255) NULL'
|
'sql' => 'varchar(255) NULL',
|
||||||
),
|
],
|
||||||
'radius' => array
|
'radius' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['radius'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['radius'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => 5,
|
'default' => 5,
|
||||||
'eval' => array('mandatory' => false, 'maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'clr w50'),
|
'eval' => ['mandatory' => false, 'maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'clr w50'],
|
||||||
'sql' => "int(10) NOT NULL default '5'"
|
'sql' => "int(10) NOT NULL default '5'",
|
||||||
),
|
],
|
||||||
'data' => array
|
'data' => [
|
||||||
(
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['data'],
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['data'],
|
'inputType' => 'textarea',
|
||||||
'inputType' => 'textarea',
|
'search' => false,
|
||||||
'search' => false,
|
'eval' => ['mandatory' => true, 'alwaysSave' => true],
|
||||||
'eval' => array('mandatory' => true, 'alwaysSave' => true),
|
'save_callback' => [
|
||||||
'save_callback' => array(
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateMultipleCoordinates'],
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateMultipleCoordinates']
|
],
|
||||||
),
|
'sql' => 'longblob NULL',
|
||||||
'sql' => 'longblob NULL'
|
],
|
||||||
),
|
'multiData' => [
|
||||||
'multiData' => array
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['multiData'],
|
||||||
(
|
'inputType' => 'multiColumnWizard',
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['multiData'],
|
'search' => false,
|
||||||
'inputType' => 'multiColumnWizard',
|
'eval' => [
|
||||||
'search' => false,
|
|
||||||
'eval' => array(
|
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'alwaysSave' => true,
|
'alwaysSave' => true,
|
||||||
'flatArray' => true,
|
'flatArray' => true,
|
||||||
'columnFields' => array
|
'columnFields' => [
|
||||||
(
|
'data' => [
|
||||||
'data' => array
|
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['data'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['data'],
|
||||||
'inputType' => 'textarea',
|
'inputType' => 'textarea',
|
||||||
'search' => false,
|
'search' => false,
|
||||||
'eval' => array('alwaysSave' => true, 'style' => 'width:600px'),
|
'eval' => ['alwaysSave' => true, 'style' => 'width:600px'],
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
),
|
],
|
||||||
'save_callback' => array(
|
'save_callback' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateMultipleCoordinateSets']
|
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateMultipleCoordinateSets'],
|
||||||
),
|
],
|
||||||
'sql' => 'longblob NULL'
|
'sql' => 'longblob NULL',
|
||||||
),
|
],
|
||||||
'bounds' => array
|
'bounds' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['bounds'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['bounds'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'save_callback' => array(),
|
'save_callback' => [],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'maxlength' => 255,
|
'maxlength' => 255,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'size' => 2,
|
'size' => 2,
|
||||||
'tl_class' => 'long clr',
|
'tl_class' => 'long clr',
|
||||||
'nullIfEmpty' => true,
|
'nullIfEmpty' => true,
|
||||||
),
|
],
|
||||||
'sql' => 'mediumblob NULL'
|
'sql' => 'mediumblob NULL',
|
||||||
),
|
],
|
||||||
'ignoreForBounds' => array
|
'ignoreForBounds' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['ignoreForBounds'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['ignoreForBounds'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'checkbox',
|
'inputType' => 'checkbox',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'eval' => array('tl_class' => 'w50'),
|
'eval' => ['tl_class' => 'w50'],
|
||||||
'sql' => "char(1) NOT NULL default ''"
|
'sql' => "char(1) NOT NULL default ''",
|
||||||
),
|
],
|
||||||
'featureData' => array
|
'featureData' => [
|
||||||
(
|
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['featureData'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['featureData'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'textarea',
|
'inputType' => 'textarea',
|
||||||
'eval' => array('tl_class' => 'clr lng',
|
'eval' => [
|
||||||
'allowHtml' => true,
|
'tl_class' => 'clr lng',
|
||||||
'style' => 'min-height: 40px;',
|
'allowHtml' => true,
|
||||||
'rte' => 'ace|json'
|
'style' => 'min-height: 40px;',
|
||||||
),
|
'rte' => 'ace|json',
|
||||||
'sql' => 'text NULL'
|
],
|
||||||
),
|
'sql' => 'text NULL',
|
||||||
),
|
],
|
||||||
);
|
],
|
||||||
|
];
|
||||||
|
|||||||
@@ -10,76 +10,76 @@
|
|||||||
* @filesource
|
* @filesource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_module']['metapalettes']['leaflet'] = array(
|
$GLOBALS['TL_DCA']['tl_module']['metapalettes']['leaflet'] = [
|
||||||
'type' => array('name', 'type', 'headline'),
|
'type' => ['name', 'type', 'headline'],
|
||||||
'leaflet' => array('leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'),
|
'leaflet' => ['leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'],
|
||||||
'templates' => array(':hide', 'customTpl'),
|
'templates' => [':hide', 'customTpl'],
|
||||||
'protected' => array(':hide', 'protected'),
|
'protected' => [':hide', 'protected'],
|
||||||
'expert' => array(':hide', 'guests', 'cssID', 'space'),
|
'expert' => [':hide', 'guests', 'cssID', 'space'],
|
||||||
'invisible' => array(':hide', 'invisible', 'start', 'start')
|
'invisible' => [':hide', 'invisible', 'start', 'start'],
|
||||||
);
|
];
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_map'] = array(
|
$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_map'] = [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_map'],
|
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_map'],
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getMaps'],
|
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getMaps'],
|
||||||
'wizard' => array(
|
'wizard' => [
|
||||||
['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getEditMapLink'],
|
['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getEditMapLink'],
|
||||||
),
|
],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'w50 wizard',
|
'tl_class' => 'w50 wizard',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
),
|
],
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||||
);
|
];
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_mapId'] = array(
|
$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_mapId'] = [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_mapId'],
|
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_mapId'],
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
'maxlength' => 16,
|
'maxlength' => 16,
|
||||||
),
|
],
|
||||||
'sql' => "varchar(16) NOT NULL default ''"
|
'sql' => "varchar(16) NOT NULL default ''",
|
||||||
);
|
];
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_width'] = array(
|
$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_width'] = [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_width'],
|
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_width'],
|
||||||
'inputType' => 'inputUnit',
|
'inputType' => 'inputUnit',
|
||||||
'options' => array('px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'),
|
'options' => ['px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'],
|
||||||
'search' => false,
|
'search' => false,
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'eval' => array('rgxp' => 'digit', 'tl_class' => 'clr w50'),
|
'eval' => ['rgxp' => 'digit', 'tl_class' => 'clr w50'],
|
||||||
'sql' => "varchar(64) NOT NULL default ''"
|
'sql' => "varchar(64) NOT NULL default ''",
|
||||||
);
|
];
|
||||||
|
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_height'] = array(
|
$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_height'] = [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_height'],
|
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_height'],
|
||||||
'inputType' => 'inputUnit',
|
'inputType' => 'inputUnit',
|
||||||
'options' => array('px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'),
|
'options' => ['px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'],
|
||||||
'search' => false,
|
'search' => false,
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50'),
|
'eval' => ['rgxp' => 'digit', 'tl_class' => 'w50'],
|
||||||
'sql' => "varchar(64) NOT NULL default ''"
|
'sql' => "varchar(64) NOT NULL default ''",
|
||||||
);
|
];
|
||||||
|
|
||||||
$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_template'] = array(
|
$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_template'] = [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_template'],
|
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_template'],
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'options_callback' => ['netzmacht.contao_toolkit.dca.listeners.template_options', 'handleOptionsCallback'],
|
'options_callback' => ['netzmacht.contao_toolkit.dca.listeners.template_options', 'handleOptionsCallback'],
|
||||||
'eval' => array(
|
'eval' => [
|
||||||
'tl_class' => 'w50',
|
'tl_class' => 'w50',
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
),
|
|
||||||
'toolkit' => [
|
|
||||||
'template_options' => [
|
|
||||||
'prefix' => 'leaflet_map_js'
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
'sql' => "varchar(64) NOT NULL default ''"
|
'toolkit' => [
|
||||||
);
|
'template_options' => [
|
||||||
|
'prefix' => 'leaflet_map_js',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'sql' => "varchar(64) NOT NULL default ''",
|
||||||
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user