Apply coding standards.

This commit is contained in:
David Molineus
2017-10-05 16:14:46 +02:00
parent 84294686a5
commit 20b9144b89
18 changed files with 654 additions and 709 deletions

View File

@@ -1,29 +1,26 @@
language: php language: php
php: php:
- "5.4" - "7.1"
- "5.5"
- "5.6"
- "7.0"
- "nightly"
env: env:
- CONTAO_VERSION=~3.5.1 - CONTAO_VERSION=contao/core-bundle ~4.4.0
matrix:
exclude:
sudo: false sudo: false
install: install:
- travis_retry composer self-update && composer --version - travis_retry composer self-update && composer --version
- travis_retry composer require contao/core $CONTAO_VERSION --no-update - travis_retry composer require $CONTAO_VERSION --no-update
- travis_retry composer update --prefer-dist --no-interaction - travis_retry composer update --prefer-dist --no-interaction
script: ant -keep-going script: ant -keep-going
matrix:
allow_failures:
- php: "7.0"
- php: "nightly"
# Hack to make things work again - we can not use a shallow repository.
git: git:
depth: 2147483647 depth: 2147483647
cache:
directories:
- vendor

View File

@@ -40,6 +40,11 @@
"Netzmacht\\Contao\\Leaflet\\": "src/" "Netzmacht\\Contao\\Leaflet\\": "src/"
} }
}, },
"autoload-dev": {
"files": [
"vendor/phpcq/autoload-validation/hacks/contao-hack.php"
]
},
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.0.x-dev", "dev-master": "2.0.x-dev",

View File

@@ -123,7 +123,7 @@ class ControlCallbacks extends Callbacks
/** /**
* Save layer relations. * Save layer relations.
* *
* @param $layers $layers The layer id values. * @param mixed $layers The layer id values.
* @param \DataContainer $dataContainer The dataContainer driver. * @param \DataContainer $dataContainer The dataContainer driver.
* *
* @return null * @return null
@@ -171,7 +171,7 @@ class ControlCallbacks extends Callbacks
->execute($values[$layer['layer']]['id']); ->execute($values[$layer['layer']]['id']);
$sorting += 128; $sorting += 128;
unset ($values[$layer['layer']]); unset($values[$layer['layer']]);
} }
} }

View File

@@ -134,7 +134,6 @@ class LayerCallbacks extends Callbacks
{ {
if (!empty($this->layers[$row['type']]['icon'])) { if (!empty($this->layers[$row['type']]['icon'])) {
$src = $this->layers[$row['type']]['icon']; $src = $this->layers[$row['type']]['icon'];
} else { } else {
$src = 'iconPLAIN.gif'; $src = 'iconPLAIN.gif';
} }
@@ -230,7 +229,6 @@ class LayerCallbacks extends Callbacks
$this->translator->translate('pasteinto.1', $table, [$row['id']]) $this->translator->translate('pasteinto.1', $table, [$row['id']])
) )
); );
} elseif ($row['id'] > 0) { } elseif ($row['id'] > 0) {
$buffer .= \Image::getHtml('pasteinto_.gif'); $buffer .= \Image::getHtml('pasteinto_.gif');
} }

View File

@@ -124,7 +124,7 @@ class MapCallbacks extends Callbacks
} }
$sorting += 128; $sorting += 128;
unset ($values[$layerId]); unset($values[$layerId]);
} }
} }

View File

@@ -13,6 +13,7 @@
/* /*
* Backend module. * Backend module.
*/ */
array_insert( array_insert(
$GLOBALS['BE_MOD'], $GLOBALS['BE_MOD'],
1, 1,
@@ -57,18 +58,21 @@ array_insert(
/* /*
* Content elements. * Content elements.
*/ */
$GLOBALS['TL_CTE']['includes']['leaflet'] = 'Netzmacht\Contao\Toolkit\Component\ContentElement\ContentElementDecorator'; $GLOBALS['TL_CTE']['includes']['leaflet'] = 'Netzmacht\Contao\Toolkit\Component\ContentElement\ContentElementDecorator';
/* /*
* Frontend modules * Frontend modules
*/ */
$GLOBALS['FE_MOD']['includes']['leaflet'] = 'Netzmacht\Contao\Toolkit\Component\Module\ModuleDecorator'; $GLOBALS['FE_MOD']['includes']['leaflet'] = 'Netzmacht\Contao\Toolkit\Component\Module\ModuleDecorator';
/* /*
* Models. * Models.
*/ */
$GLOBALS['TL_MODELS']['tl_leaflet_control'] = 'Netzmacht\Contao\Leaflet\Model\ControlModel'; $GLOBALS['TL_MODELS']['tl_leaflet_control'] = 'Netzmacht\Contao\Leaflet\Model\ControlModel';
$GLOBALS['TL_MODELS']['tl_leaflet_icon'] = 'Netzmacht\Contao\Leaflet\Model\IconModel'; $GLOBALS['TL_MODELS']['tl_leaflet_icon'] = 'Netzmacht\Contao\Leaflet\Model\IconModel';
$GLOBALS['TL_MODELS']['tl_leaflet_layer'] = 'Netzmacht\Contao\Leaflet\Model\LayerModel'; $GLOBALS['TL_MODELS']['tl_leaflet_layer'] = 'Netzmacht\Contao\Leaflet\Model\LayerModel';
@@ -84,6 +88,7 @@ $GLOBALS['TL_MODELS']['tl_leaflet_vector'] = 'Netzmacht\Contao\Leaflet\Model\Ve
* *
* Mappers do the translations between the database models and the leaflet definition. * Mappers do the translations between the database models and the leaflet definition.
*/ */
$GLOBALS['LEAFLET_MAPPERS'] = array(); $GLOBALS['LEAFLET_MAPPERS'] = array();
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\MapMapper'; $GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\MapMapper';
@@ -173,6 +178,7 @@ $GLOBALS['LEAFLET_MAPPERS'][] = function () {
* *
* @see https://github.com/contao-community-alliance/event-dispatcher#event-subscriber-per-configuration * @see https://github.com/contao-community-alliance/event-dispatcher#event-subscriber-per-configuration
*/ */
$GLOBALS['LEAFLET_ENCODERS'] = array(); $GLOBALS['LEAFLET_ENCODERS'] = array();
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\MapEncoder'; $GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\MapEncoder';
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\ControlEncoder'; $GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\ControlEncoder';
@@ -188,6 +194,7 @@ $GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\Contao\Leaflet\Subscriber\EncoderSub
* *
* The type is used for the database driven definitions. * The type is used for the database driven definitions.
*/ */
$GLOBALS['LEAFLET_LAYERS'] = array $GLOBALS['LEAFLET_LAYERS'] = array
( (
'provider' => array 'provider' => array
@@ -295,6 +302,7 @@ $GLOBALS['LEAFLET_LAYERS'] = array
* *
* Supported leaflet control types. Register your type for the database driven definition here. * Supported leaflet control types. Register your type for the database driven definition here.
*/ */
$GLOBALS['LEAFLET_CONTROLS'] = array('zoom', 'layers', 'scale', 'attribution', 'loading', 'fullscreen'); $GLOBALS['LEAFLET_CONTROLS'] = array('zoom', 'layers', 'scale', 'attribution', 'loading', 'fullscreen');
@@ -303,6 +311,7 @@ $GLOBALS['LEAFLET_CONTROLS'] = array('zoom', 'layers', 'scale', 'attribution',
* *
* Supported leaflet icon types. Register you type for the database driven definition here. * Supported leaflet icon types. Register you type for the database driven definition here.
*/ */
$GLOBALS['LEAFLET_ICONS'] = array('image', 'div', 'extra'); $GLOBALS['LEAFLET_ICONS'] = array('image', 'div', 'extra');
@@ -313,6 +322,7 @@ $GLOBALS['LEAFLET_ICONS'] = array('image', 'div', 'extra');
* The goal is to provide different style strategies. For instance a random style chooser, one which uses a color * The goal is to provide different style strategies. For instance a random style chooser, one which uses a color
* range and so one. * range and so one.
*/ */
$GLOBALS['LEAFLET_STYLES'] = array('fixed'); $GLOBALS['LEAFLET_STYLES'] = array('fixed');
/* /*
@@ -320,6 +330,7 @@ $GLOBALS['LEAFLET_STYLES'] = array('fixed');
* *
* Supported leaflet vector types. Register you type for the database driven definition here. * Supported leaflet vector types. Register you type for the database driven definition here.
*/ */
$GLOBALS['LEAFLET_VECTORS'] = array $GLOBALS['LEAFLET_VECTORS'] = array
( (
'polyline', 'polyline',
@@ -335,6 +346,7 @@ $GLOBALS['LEAFLET_VECTORS'] = array
/* /*
* Leaflet tile layer providers. * Leaflet tile layer providers.
*/ */
require_once TL_ROOT . '/system/modules/leaflet/config/leaflet_providers.php'; require_once TL_ROOT . '/system/modules/leaflet/config/leaflet_providers.php';
/* /*
@@ -351,6 +363,7 @@ require_once TL_ROOT . '/system/modules/leaflet/config/leaflet_providers.php';
* You don't have to define it as array if you simply add a file. Do not add |static and or media type flag to it. * You don't have to define it as array if you simply add a file. Do not add |static and or media type flag to it.
* It's getting added by default if not being in debug mode. * It's getting added by default if not being in debug mode.
*/ */
if (!isset($GLOBALS['LEAFLET_LIBRARIES'])) { if (!isset($GLOBALS['LEAFLET_LIBRARIES'])) {
$GLOBALS['LEAFLET_LIBRARIES'] = array(); $GLOBALS['LEAFLET_LIBRARIES'] = array();
} }
@@ -367,6 +380,7 @@ if (!isset($GLOBALS['LEAFLET_LIBRARIES'])) {
* - file: Thread value a uuid and find the path. * - file: Thread value a uuid and find the path.
* - files: Thread values as a list of file uuids and get an array of paths. * - files: Thread values as a list of file uuids and get an array of paths.
*/ */
$GLOBALS['LEAFLET_FEATURE_MODEL_PROPERTIES']['tl_leaflet_marker'][] = 'id'; $GLOBALS['LEAFLET_FEATURE_MODEL_PROPERTIES']['tl_leaflet_marker'][] = 'id';
$GLOBALS['LEAFLET_FEATURE_MODEL_PROPERTIES']['tl_leaflet_marker'][] = 'title'; $GLOBALS['LEAFLET_FEATURE_MODEL_PROPERTIES']['tl_leaflet_marker'][] = 'title';
$GLOBALS['LEAFLET_FEATURE_MODEL_PROPERTIES']['tl_leaflet_marker'][] = 'alias'; $GLOBALS['LEAFLET_FEATURE_MODEL_PROPERTIES']['tl_leaflet_marker'][] = 'alias';
@@ -379,5 +393,6 @@ $GLOBALS['LEAFLET_FEATURE_MODEL_PROPERTIES']['tl_leaflet_vector'][] = 'alias';
/* /*
* Filters can be passed to a data request to get only specific data from a layer. * Filters can be passed to a data request to get only specific data from a layer.
*/ */
$GLOBALS['LEAFLET_FILTERS']['bbox'] = 'Netzmacht\Contao\Leaflet\Filter\BboxFilter'; $GLOBALS['LEAFLET_FILTERS']['bbox'] = 'Netzmacht\Contao\Leaflet\Filter\BboxFilter';
$GLOBALS['LEAFLET_FILTERS']['distance'] = 'Netzmacht\Contao\Leaflet\Filter\DistanceFilter'; $GLOBALS['LEAFLET_FILTERS']['distance'] = 'Netzmacht\Contao\Leaflet\Filter\DistanceFilter';

View File

@@ -48,11 +48,14 @@ use Netzmacht\LeafletPHP\Leaflet;
use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcher;
/** @var \Pimple $container */ /** @var \Pimple $container */
// @codingStandardsIgnoreStart
global $container; global $container;
// @codingStandardsIgnoreEnd
/* /*
* Leaflet map provider is a simply api entry to to get the leaflet map from the database. * Leaflet map provider is a simply api entry to to get the leaflet map from the database.
*/ */
$container[LeafletServices::MAP_PROVIDER] = $container->share(function ($container) { $container[LeafletServices::MAP_PROVIDER] = $container->share(function ($container) {
return new MapProvider( return new MapProvider(
$container[LeafletServices::DEFINITION_MAPPER], $container[LeafletServices::DEFINITION_MAPPER],
@@ -69,6 +72,7 @@ $container[LeafletServices::MAP_PROVIDER] = $container->share(function ($contain
/* /*
* Contao assets handler. Loads Leaflet assets as contao (static) assets. * Contao assets handler. Loads Leaflet assets as contao (static) assets.
*/ */
$container[LeafletServices::MAP_ASSETS] = $container->share(function ($container) { $container[LeafletServices::MAP_ASSETS] = $container->share(function ($container) {
return new ContaoAssets($container[Services::ASSETS_MANAGER]); return new ContaoAssets($container[Services::ASSETS_MANAGER]);
}); });
@@ -76,6 +80,7 @@ $container[LeafletServices::MAP_ASSETS] = $container->share(function ($container
/* /*
* The leaflet boot. * The leaflet boot.
*/ */
$container[LeafletServices::BOOT] = $container->share(function ($container) { $container[LeafletServices::BOOT] = $container->share(function ($container) {
return new Boot($container[Services::EVENT_DISPATCHER]); return new Boot($container[Services::EVENT_DISPATCHER]);
}); });
@@ -93,6 +98,7 @@ $container['leaflet.boot.subscriber'] = $container->share(function ($container)
/* /*
* The definition mapper. * The definition mapper.
*/ */
$container[LeafletServices::DEFINITION_MAPPER] = $container->share(function ($container) { $container[LeafletServices::DEFINITION_MAPPER] = $container->share(function ($container) {
/** @var Boot $boot */ /** @var Boot $boot */
$boot = $container[LeafletServices::BOOT]; $boot = $container[LeafletServices::BOOT];
@@ -105,6 +111,7 @@ $container[LeafletServices::DEFINITION_MAPPER] = $container->share(function ($co
/* /*
* The local event dispatcher is used for the leaflet javascript encoding system. * The local event dispatcher is used for the leaflet javascript encoding system.
*/ */
$container[LeafletServices::DEFINITION_BUILDER_EVENT_DISPATCHER] = $container->share(function ($container) { $container[LeafletServices::DEFINITION_BUILDER_EVENT_DISPATCHER] = $container->share(function ($container) {
/** @var Boot $boot */ /** @var Boot $boot */
$boot = $container[LeafletServices::BOOT]; $boot = $container[LeafletServices::BOOT];
@@ -116,6 +123,7 @@ $container[LeafletServices::DEFINITION_BUILDER_EVENT_DISPATCHER] = $container->s
/* /*
* The javascript encoder factory being used for building the map javascript. * The javascript encoder factory being used for building the map javascript.
*/ */
$container[LeafletServices::DEFINITION_ENCODER_FACTORY] = function ($container) { $container[LeafletServices::DEFINITION_ENCODER_FACTORY] = function ($container) {
$dispatcher = $container[LeafletServices::DEFINITION_BUILDER_EVENT_DISPATCHER]; $dispatcher = $container[LeafletServices::DEFINITION_BUILDER_EVENT_DISPATCHER];
@@ -133,27 +141,27 @@ $container[LeafletServices::DEFINITION_ENCODER_FACTORY] = function ($container)
/* /*
* The leaflet builder transforms the definition to javascript. * The leaflet builder transforms the definition to javascript.
*/ */
$container[LeafletServices::DEFINITION_BUILDER] = $container->share(function($container) {
$container[LeafletServices::DEFINITION_BUILDER] = $container->share(function ($container) {
/** @var Boot $boot */ /** @var Boot $boot */
$boot = $container[LeafletServices::BOOT]; $boot = $container[LeafletServices::BOOT];
$dispatcher = $container[LeafletServices::DEFINITION_BUILDER_EVENT_DISPATCHER]; $dispatcher = $container[LeafletServices::DEFINITION_BUILDER_EVENT_DISPATCHER];
$factory = $container[LeafletServices::DEFINITION_ENCODER_FACTORY]; $factory = $container[LeafletServices::DEFINITION_ENCODER_FACTORY];
$builder = new Builder($factory); $builder = new Builder($factory);
$leaflet = new Leaflet($builder, $dispatcher, array(), JSON_UNESCAPED_SLASHES ^ Flags::BUILD_STACK); $leaflet = new Leaflet($builder, $dispatcher, array(), (JSON_UNESCAPED_SLASHES ^ Flags::BUILD_STACK));
return $boot->initializeLeafletBuilder($leaflet); return $boot->initializeLeafletBuilder($leaflet);
}); });
$container[LeafletServices::FRONTEND_VALUE_FILTER] = $container->share(function($container) { $container[LeafletServices::FRONTEND_VALUE_FILTER] = $container->share(function ($container) {
return new ValueFilter($container[Services::INSERT_TAG_REPLACER]); return new ValueFilter($container[Services::INSERT_TAG_REPLACER]);
}); });
/** /*
* Internal used leaflet cache. * Internal used leaflet cache.
*
* @var Cache
*/ */
$container[LeafletServices::CACHE] = $container->share( $container[LeafletServices::CACHE] = $container->share(
function ($container) { function ($container) {
if ($container[Services::PRODUCTION_MODE]) { if ($container[Services::PRODUCTION_MODE]) {
@@ -164,11 +172,10 @@ $container[LeafletServices::CACHE] = $container->share(
} }
); );
/** /*
* Leaflet alias generator. * Leaflet alias generator.
*
* @return \Netzmacht\Contao\Toolkit\Data\Alias\AliasGenerator
*/ */
$container[LeafletServices::ALIAS_GENERATOR] = $container->share( $container[LeafletServices::ALIAS_GENERATOR] = $container->share(
function ($container) { function ($container) {
return function ($dataContainerName, $aliasField, $fields) use ($container) { return function ($dataContainerName, $aliasField, $fields) use ($container) {
@@ -190,11 +197,11 @@ $container[LeafletServices::ALIAS_GENERATOR] = $container->share(
} }
); );
/** /*
* Leaflet alias generator. * Leaflet alias generator.
*
* @return \Netzmacht\Contao\Toolkit\Data\Alias\AliasGenerator * @return \Netzmacht\Contao\Toolkit\Data\Alias\AliasGenerator
*/ */
$container[LeafletServices::PARENT_ALIAS_GENERATOR] = $container->share( $container[LeafletServices::PARENT_ALIAS_GENERATOR] = $container->share(
function ($container) { function ($container) {
return function ($dataContainerName, $aliasField, $fields) use ($container) { return function ($dataContainerName, $aliasField, $fields) use ($container) {
@@ -217,11 +224,10 @@ $container[LeafletServices::PARENT_ALIAS_GENERATOR] = $container->share(
} }
); );
/** /*
* Callback helper class for tl_leaflet_map. * Callback helper class for tl_leaflet_map.
*
* @return MapCallbacks
*/ */
$container['leaflet.dca.map-callbacks'] = $container->share( $container['leaflet.dca.map-callbacks'] = $container->share(
function ($container) { function ($container) {
return new MapCallbacks( return new MapCallbacks(
@@ -231,11 +237,10 @@ $container['leaflet.dca.map-callbacks'] = $container->share(
} }
); );
/** /*
* Callback helper class for tl_leaflet_layer. * Callback helper class for tl_leaflet_layer.
*
* @return LayerCallbacks
*/ */
$container['leaflet.dca.layer-callbacks'] = $container->share( $container['leaflet.dca.layer-callbacks'] = $container->share(
function ($container) { function ($container) {
return new LayerCallbacks( return new LayerCallbacks(
@@ -249,11 +254,10 @@ $container['leaflet.dca.layer-callbacks'] = $container->share(
} }
); );
/** /*
* Callback helper class for tl_leaflet_control. * Callback helper class for tl_leaflet_control.
*
* @return ControlCallbacks
*/ */
$container['leaflet.dca.control-callbacks'] = $container->share( $container['leaflet.dca.control-callbacks'] = $container->share(
function ($container) { function ($container) {
return new ControlCallbacks( return new ControlCallbacks(
@@ -263,22 +267,20 @@ $container['leaflet.dca.control-callbacks'] = $container->share(
} }
); );
/** /*
* Callback helper class for tl_leaflet_control. * Callback helper class for tl_leaflet_control.
*
* @return ControlCallbacks
*/ */
$container['leaflet.dca.vector-callbacks'] = $container->share( $container['leaflet.dca.vector-callbacks'] = $container->share(
function ($container) { function ($container) {
return new VectorCallbacks($container[Services::DCA_MANAGER]); return new VectorCallbacks($container[Services::DCA_MANAGER]);
} }
); );
/** /*
* Callback helper class for frontend integration. * Callback helper class for frontend integration.
*
* @return FrontendIntegration
*/ */
$container['leaflet.dca.frontend-integration'] = $container->share( $container['leaflet.dca.frontend-integration'] = $container->share(
function ($container) { function ($container) {
return new FrontendIntegration( return new FrontendIntegration(
@@ -287,11 +289,10 @@ $container['leaflet.dca.frontend-integration'] = $container->share(
} }
); );
/** /*
* Common callback helpers. * Common callback helpers.
*
* @return LeafletCallbacks
*/ */
$container['leaflet.dca.common'] = $container->share( $container['leaflet.dca.common'] = $container->share(
function ($container) { function ($container) {
return new LeafletCallbacks( return new LeafletCallbacks(
@@ -300,11 +301,10 @@ $container['leaflet.dca.common'] = $container->share(
} }
); );
/** /*
* Validator helper class. * Validator helper class.
*
* @return Validator
*/ */
$container['leaflet.dca.validator'] = $container->share( $container['leaflet.dca.validator'] = $container->share(
function ($container) { function ($container) {
return new Validator( return new Validator(
@@ -313,15 +313,10 @@ $container['leaflet.dca.validator'] = $container->share(
} }
); );
/** /*
* Component factory for content element. * Component factory for content element.
*
* @param ContentModel $model Content model.
* @param string $column Template section.
* @param ContainerInterface $container Container.
*
* @return MapElement
*/ */
$container[Services::CONTENT_ELEMENTS_MAP]['leaflet'] = function ($model, $column, ContainerInterface $container) { $container[Services::CONTENT_ELEMENTS_MAP]['leaflet'] = function ($model, $column, ContainerInterface $container) {
return new MapElement( return new MapElement(
$model, $model,
@@ -334,15 +329,10 @@ $container[Services::CONTENT_ELEMENTS_MAP]['leaflet'] = function ($model, $colum
); );
}; };
/** /*
* Component factory for frontend module. * Component factory for frontend module.
*
* @param ModuleModel $model Module model.
* @param string $column Template section.
* @param ContainerInterface $container Container.
*
* @return MapModule
*/ */
$container[Services::MODULES_MAP]['leaflet'] = function ($model, $column, ContainerInterface $container) { $container[Services::MODULES_MAP]['leaflet'] = function ($model, $column, ContainerInterface $container) {
return new MapModule( return new MapModule(
$model, $model,

View File

@@ -31,7 +31,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
], ],
), ),
// List // List configuration
'list' => array 'list' => array
( (
'sorting' => array 'sorting' => array
@@ -78,14 +78,18 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['delete'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['delete'],
'href' => 'act=delete', 'href' => 'act=delete',
'icon' => 'delete.gif', 'icon' => 'delete.gif',
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"' 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
. '\'))return false;Backend.getScrollOffset()"'
), ),
'toggle' => array 'toggle' => array
( (
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['toggle'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['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' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton('tl_leaflet_control', 'active') 'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
'tl_leaflet_control',
'active'
)
), ),
'show' => array 'show' => array
( (
@@ -134,7 +138,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
( (
'id' => array 'id' => array
( (
'sql' => "int(10) unsigned NOT NULL auto_increment" 'sql' => 'int(10) unsigned NOT NULL auto_increment'
), ),
'pid' => array 'pid' => array
( (
@@ -175,8 +179,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
), ),
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
), ),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'nullIfEmpty' => true), 'eval' => array(
'sql' => "varchar(255) NULL" 'mandatory' => false,
'maxlength' => 255,
'tl_class' => 'w50',
'nullIfEmpty' => true,
),
'sql' => 'varchar(255) NULL'
), ),
'type' => array 'type' => array
( (
@@ -313,7 +322,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
), ),
) )
), ),
'sql' => "mediumblob NULL" 'sql' => 'mediumblob NULL'
), ),
'maxWidth' => array 'maxWidth' => array
( (
@@ -364,7 +373,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'exclude' => true, 'exclude' => true,
'inputType' => 'listWizard', 'inputType' => 'listWizard',
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'clr', 'allowHtml' => true), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'clr', 'allowHtml' => true),
'sql' => "mediumblob NULL" 'sql' => 'mediumblob NULL'
), ),
'separate' => array 'separate' => array
( (
@@ -410,7 +419,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'rte' => 'ace|json', 'rte' => 'ace|json',
'tl_class' => 'clr' 'tl_class' => 'clr'
), ),
'sql' => "mediumtext NULL" 'sql' => 'mediumtext NULL'
), ),
'simulateFullScreen' => array 'simulateFullScreen' => array
( (

View File

@@ -28,7 +28,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control_layer'] = array
( (
'id' => array 'id' => array
( (
'sql' => "int(10) unsigned NOT NULL auto_increment" 'sql' => 'int(10) unsigned NOT NULL auto_increment'
), ),
'tstamp' => array 'tstamp' => array
( (

View File

@@ -93,7 +93,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['delete'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['delete'],
'href' => 'act=delete', 'href' => 'act=delete',
'icon' => 'delete.gif', 'icon' => 'delete.gif',
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"' 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
. '\'))return false;Backend.getScrollOffset()"'
), ),
'toggle' => array 'toggle' => array
( (
@@ -172,7 +173,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
( (
'id' => array 'id' => array
( (
'sql' => "int(10) unsigned NOT NULL auto_increment" 'sql' => 'int(10) unsigned NOT NULL auto_increment'
), ),
'tstamp' => array 'tstamp' => array
( (
@@ -201,7 +202,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
), ),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'type' => array 'type' => array
( (
@@ -242,7 +243,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'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' => array
( (
@@ -256,7 +257,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'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' => array
( (
@@ -270,7 +271,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'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' => array
( (
@@ -284,7 +285,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'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' => array
( (
@@ -299,7 +300,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'tl_class' => 'w50', 'tl_class' => 'w50',
'nullIfEmpty' => true, 'nullIfEmpty' => true,
), ),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'shadowAnchor' => array 'shadowAnchor' => array
( (
@@ -314,7 +315,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'tl_class' => 'w50', 'tl_class' => 'w50',
'nullIfEmpty' => true, 'nullIfEmpty' => true,
), ),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'popupAnchor' => array 'popupAnchor' => array
( (
@@ -329,7 +330,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'tl_class' => 'w50', 'tl_class' => 'w50',
'nullIfEmpty' => true, 'nullIfEmpty' => true,
), ),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'className' => array 'className' => array
( (
@@ -349,7 +350,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'tl_class' => 'w50', 'tl_class' => 'w50',
'nullIfEmpty' => true, 'nullIfEmpty' => true,
), ),
'sql' => "varchar(64) NULL" 'sql' => 'varchar(64) NULL'
), ),
'html' => array 'html' => array
( (
@@ -364,7 +365,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'rte' => 'ace|html', 'rte' => 'ace|html',
'tl_class' => 'clr' 'tl_class' => 'clr'
), ),
'sql' => "mediumtext NULL" 'sql' => 'mediumtext NULL'
), ),
'icon' => array 'icon' => array
( (
@@ -376,7 +377,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'tl_class' => 'w50', 'tl_class' => 'w50',
'nullIfEmpty' => true, 'nullIfEmpty' => true,
), ),
'sql' => "varchar(64) NULL" 'sql' => 'varchar(64) NULL'
), ),
'prefix' => array 'prefix' => array
( (
@@ -388,7 +389,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'tl_class' => 'w50', 'tl_class' => 'w50',
'nullIfEmpty' => true, 'nullIfEmpty' => true,
), ),
'sql' => "varchar(64) NULL" 'sql' => 'varchar(64) NULL'
), ),
'shape' => array 'shape' => array
( (
@@ -400,7 +401,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'eval' => array( 'eval' => array(
'tl_class' => 'w50', 'tl_class' => 'w50',
), ),
'sql' => "varchar(64) NULL" 'sql' => 'varchar(64) NULL'
), ),
'iconColor' => array 'iconColor' => array
( (
@@ -415,7 +416,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'tl_class' => 'w50 wizard', 'tl_class' => 'w50 wizard',
'nullIfEmpty' => true, 'nullIfEmpty' => true,
), ),
'sql' => "varchar(16) NULL" 'sql' => 'varchar(16) NULL'
), ),
'markerColor' => array 'markerColor' => array
( (
@@ -444,7 +445,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'tl_class' => 'w50', 'tl_class' => 'w50',
'nullIfEmpty' => true, 'nullIfEmpty' => true,
), ),
'sql' => "varchar(16) NULL" 'sql' => 'varchar(16) NULL'
), ),
), ),
); );

File diff suppressed because it is too large Load Diff

View File

@@ -25,7 +25,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
) )
), ),
'onload_callback' => array( 'onload_callback' => array(
function() { function () {
\Controller::loadLanguageFile('leaflet'); \Controller::loadLanguageFile('leaflet');
} }
), ),
@@ -84,7 +84,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['delete'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['delete'],
'href' => 'act=delete', 'href' => 'act=delete',
'icon' => 'delete.gif', 'icon' => 'delete.gif',
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"' 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
. '\'))return false;Backend.getScrollOffset()"'
), ),
'show' => array 'show' => array
( (
@@ -151,7 +152,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
( (
'id' => array 'id' => array
( (
'sql' => "int(10) unsigned NOT NULL auto_increment" 'sql' => 'int(10) unsigned NOT NULL auto_increment'
), ),
'tstamp' => array 'tstamp' => array
( (
@@ -182,7 +183,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias') \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')
), ),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'center' => array 'center' => array
( (
@@ -200,7 +201,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'tl_class' => 'long clr', 'tl_class' => 'long clr',
'nullIfEmpty' => true, 'nullIfEmpty' => true,
), ),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'layers' => array 'layers' => array
( (
@@ -235,7 +236,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
), ),
'flatArray' => true 'flatArray' => true
), ),
'sql' => "mediumblob NULL" 'sql' => 'mediumblob NULL'
), ),
'zoom' => array 'zoom' => array
( (
@@ -251,7 +252,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'includeBlankOption' => true, 'includeBlankOption' => true,
'nullIfEmpty' => true 'nullIfEmpty' => true
), ),
'sql' => "int(4) NULL" 'sql' => 'int(4) NULL'
), ),
'adjustZoomExtra' => array 'adjustZoomExtra' => array
( (
@@ -275,7 +276,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'includeBlankOption' => true, 'includeBlankOption' => true,
'nullIfEmpty' => true 'nullIfEmpty' => true
), ),
'sql' => "int(4) NULL" 'sql' => 'int(4) NULL'
), ),
'maxZoom' => array 'maxZoom' => array
( (
@@ -290,7 +291,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'includeBlankOption' => true, 'includeBlankOption' => true,
'nullIfEmpty' => true 'nullIfEmpty' => true
), ),
'sql' => "int(4) NULL" 'sql' => 'int(4) NULL'
), ),
'zoomSnap' => array 'zoomSnap' => array
( (
@@ -304,7 +305,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'includeBlankOption' => true, 'includeBlankOption' => true,
'nullIfEmpty' => true 'nullIfEmpty' => true
), ),
'sql' => "varchar(4) NULL" 'sql' => 'varchar(4) NULL'
), ),
'zoomDelta' => array 'zoomDelta' => array
( (
@@ -318,7 +319,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'includeBlankOption' => true, 'includeBlankOption' => true,
'nullIfEmpty' => true 'nullIfEmpty' => true
), ),
'sql' => "varchar(4) NULL" 'sql' => 'varchar(4) NULL'
), ),
'dragging' => array 'dragging' => array
( (
@@ -461,7 +462,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'style' => 'min-height: 40px;', 'style' => 'min-height: 40px;',
'rte' => 'ace|json' 'rte' => 'ace|json'
), ),
'sql' => "text NULL" 'sql' => 'text NULL'
), ),
'adjustBounds' => array 'adjustBounds' => array
( (
@@ -494,7 +495,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'includeBlankOption' => true, 'includeBlankOption' => true,
'nullIfEmpty' => true 'nullIfEmpty' => true
), ),
'sql' => "varchar(32) NULL" 'sql' => 'varchar(32) NULL'
), ),
'locate' => array 'locate' => array
( (
@@ -529,7 +530,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'inputType' => 'text', 'inputType' => 'text',
'default' => null, 'default' => null,
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true),
'sql' => "int(9) NULL" 'sql' => 'int(9) NULL'
), ),
'locateMaximumAge' => array 'locateMaximumAge' => array
( (
@@ -538,7 +539,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'inputType' => 'text', 'inputType' => 'text',
'default' => null, 'default' => null,
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true),
'sql' => "int(9) NULL" 'sql' => 'int(9) NULL'
), ),
'enableHighAccuracy' => array 'enableHighAccuracy' => array
( (
@@ -562,7 +563,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'includeBlankOption' => true, 'includeBlankOption' => true,
'nullIfEmpty' => true 'nullIfEmpty' => true
), ),
'sql' => "int(4) NULL" 'sql' => 'int(4) NULL'
), ),
'cache' => array 'cache' => array
( (

View File

@@ -28,7 +28,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map_layer'] = array
( (
'id' => array 'id' => array
( (
'sql' => "int(10) unsigned NOT NULL auto_increment" 'sql' => 'int(10) unsigned NOT NULL auto_increment'
), ),
'tstamp' => array 'tstamp' => array
( (

View File

@@ -26,7 +26,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
) )
), ),
'onload_callback' => array( 'onload_callback' => array(
function() { function () {
\Controller::loadLanguageFile('leaflet'); \Controller::loadLanguageFile('leaflet');
} }
), ),
@@ -94,7 +94,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete'],
'href' => 'act=delete', 'href' => 'act=delete',
'icon' => 'delete.gif', 'icon' => 'delete.gif',
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"' 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
. '\'))return false;Backend.getScrollOffset()"'
), ),
'toggle' => array 'toggle' => array
( (
@@ -143,7 +144,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
( (
'id' => array 'id' => array
( (
'sql' => "int(10) unsigned NOT NULL auto_increment" 'sql' => 'int(10) unsigned NOT NULL auto_increment'
), ),
'tstamp' => array 'tstamp' => array
( (
@@ -185,7 +186,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
), ),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'coordinates' => array 'coordinates' => array
( (
@@ -215,7 +216,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'exclude' => true, 'exclude' => true,
'inputType' => 'text', 'inputType' => 'text',
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'sql' => "decimal(10,8) NULL" 'sql' => 'decimal(10,8) NULL'
), ),
'longitude' => array 'longitude' => array
( (
@@ -223,7 +224,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'exclude' => true, 'exclude' => true,
'inputType' => 'text', 'inputType' => 'text',
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'sql' => "decimal(11,8) NULL" 'sql' => 'decimal(11,8) NULL'
), ),
'altitude' => array 'altitude' => array
( (
@@ -231,7 +232,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'exclude' => true, 'exclude' => true,
'inputType' => 'text', 'inputType' => 'text',
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'sql' => "float NULL" 'sql' => 'float NULL'
), ),
'active' => array 'active' => array
( (
@@ -293,7 +294,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'inputType' => 'text', 'inputType' => 'text',
'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'), 'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'),
'explanation' => 'insertTags', 'explanation' => 'insertTags',
'sql' => "mediumtext NULL" 'sql' => 'mediumtext NULL'
), ),
'customIcon' => array 'customIcon' => array
( (
@@ -350,7 +351,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'inputType' => 'text', 'inputType' => 'text',
'default' => 0, 'default' => 0,
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'clr w50', 'nullIfEmpty' => true), 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'clr w50', 'nullIfEmpty' => true),
'sql' => "int(5) NULL" 'sql' => 'int(5) NULL'
), ),
'ignoreForBounds' => array 'ignoreForBounds' => array
( (
@@ -371,7 +372,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'style' => 'min-height: 40px;', 'style' => 'min-height: 40px;',
'rte' => 'ace|json' 'rte' => 'ace|json'
), ),
'sql' => "text NULL" 'sql' => 'text NULL'
), ),
), ),
); );

View File

@@ -93,7 +93,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['delete'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['delete'],
'href' => 'act=delete', 'href' => 'act=delete',
'icon' => 'delete.gif', 'icon' => 'delete.gif',
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"' 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
. '\'))return false;Backend.getScrollOffset()"'
), ),
'toggle' => array 'toggle' => array
( (
@@ -144,7 +145,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
( (
'id' => array 'id' => array
( (
'sql' => "int(10) unsigned NOT NULL auto_increment" 'sql' => 'int(10) unsigned NOT NULL auto_increment'
), ),
'tstamp' => array 'tstamp' => array
( (
@@ -173,7 +174,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
), ),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'maxWidth' => array 'maxWidth' => array
( (
@@ -182,7 +183,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
'inputType' => 'text', 'inputType' => 'text',
'default' => null, 'default' => null,
'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'),
'sql' => "int(4) NULL" 'sql' => 'int(4) NULL'
), ),
'minWidth' => array 'minWidth' => array
( (
@@ -191,7 +192,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
'inputType' => 'text', 'inputType' => 'text',
'default' => null, 'default' => null,
'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'),
'sql' => "int(4) NULL" 'sql' => 'int(4) NULL'
), ),
'maxHeight' => array 'maxHeight' => array
( (
@@ -200,7 +201,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
'inputType' => 'text', 'inputType' => 'text',
'default' => null, 'default' => null,
'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'),
'sql' => "int(4) NULL" 'sql' => 'int(4) NULL'
), ),
'autoPan' => array 'autoPan' => array
( (
@@ -242,7 +243,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
'tl_class' => 'w50', 'tl_class' => 'w50',
'nullIfEmpty' => true, 'nullIfEmpty' => true,
), ),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'autoPanPadding' => array 'autoPanPadding' => array
( (
@@ -256,7 +257,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
'multiple' => true, 'multiple' => true,
'size' => 2, 'size' => 2,
), ),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'zoomAnimation' => array 'zoomAnimation' => array
( (

View File

@@ -93,7 +93,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['delete'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['delete'],
'href' => 'act=delete', 'href' => 'act=delete',
'icon' => 'delete.gif', 'icon' => 'delete.gif',
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"' 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
. '\'))return false;Backend.getScrollOffset()"'
), ),
'toggle' => array 'toggle' => array
( (
@@ -138,7 +139,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
( (
'id' => array 'id' => array
( (
'sql' => "int(10) unsigned NOT NULL auto_increment" 'sql' => 'int(10) unsigned NOT NULL auto_increment'
), ),
'tstamp' => array 'tstamp' => array
( (
@@ -167,7 +168,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
), ),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'type' => array 'type' => array
( (
@@ -274,8 +275,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
'inputType' => 'select', 'inputType' => 'select',
'options' => array('butt', 'round', 'square', 'inherit'), 'options' => array('butt', 'round', 'square', 'inherit'),
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCaps'], 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCaps'],
'eval' => array('mandatory' => false, 'tl_class' => 'w50 clr', 'includeBlankOption' => true, 'helpwizard'), 'eval' => array(
'sql' => "varchar(8) NOT NULL default ''" 'mandatory' => false,
'tl_class' => 'w50 clr',
'includeBlankOption' => true,
'helpwizard' => true,
),
'sql' => "varchar(8) NOT NULL default ''",
), ),
'lineJoin' => array 'lineJoin' => array
( (

View File

@@ -26,7 +26,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
) )
), ),
'onload_callback' => array( 'onload_callback' => array(
function() { function () {
\Controller::loadLanguageFile('leaflet'); \Controller::loadLanguageFile('leaflet');
} }
), ),
@@ -101,7 +101,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['delete'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['delete'],
'href' => 'act=delete', 'href' => 'act=delete',
'icon' => 'delete.gif', 'icon' => 'delete.gif',
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"' 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
. '\'))return false;Backend.getScrollOffset()"'
), ),
'toggle' => array 'toggle' => array
( (
@@ -168,7 +169,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
( (
'id' => array 'id' => array
( (
'sql' => "int(10) unsigned NOT NULL auto_increment" 'sql' => 'int(10) unsigned NOT NULL auto_increment'
), ),
'tstamp' => array 'tstamp' => array
( (
@@ -211,7 +212,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias'),
), ),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'type' => array 'type' => array
( (
@@ -279,7 +280,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'inputType' => 'text', 'inputType' => 'text',
'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'), 'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'),
'explanation' => 'insertTags', 'explanation' => 'insertTags',
'sql' => "mediumtext NULL" 'sql' => 'mediumtext NULL'
), ),
'style' => array 'style' => array
( (
@@ -329,7 +330,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'nullIfEmpty' => true, 'nullIfEmpty' => true,
'mandatory' => true, 'mandatory' => true,
), ),
'sql' => "varchar(255) NULL" 'sql' => 'varchar(255) NULL'
), ),
'radius' => array 'radius' => array
( (
@@ -349,7 +350,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'save_callback' => array( 'save_callback' => array(
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateMultipleCoordinates') \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateMultipleCoordinates')
), ),
'sql' => "longblob NULL" 'sql' => 'longblob NULL'
), ),
'multiData' => array 'multiData' => array
( (
@@ -374,7 +375,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'save_callback' => array( 'save_callback' => array(
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateMultipleCoordinateSets') \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateMultipleCoordinateSets')
), ),
'sql' => "longblob NULL" 'sql' => 'longblob NULL'
), ),
'bounds' => array 'bounds' => array
( (
@@ -384,12 +385,12 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'save_callback' => array(), 'save_callback' => array(),
'eval' => array( 'eval' => array(
'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' => array
( (
@@ -410,7 +411,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'style' => 'min-height: 40px;', 'style' => 'min-height: 40px;',
'rte' => 'ace|json' 'rte' => 'ace|json'
), ),
'sql' => "text NULL" 'sql' => 'text NULL'
), ),
), ),
); );