forked from Snck3rs/contao-leaflet-maps
Adjust dca files and callbacks to work with toolkit v2.
This commit is contained in:
@@ -96,7 +96,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca::createToggleIconCallback(
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_icon',
|
||||
'active'
|
||||
)
|
||||
@@ -174,7 +174,12 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
\Netzmacht\Contao\Leaflet\Dca\Helper::createGenerateAliasCallback('tl_leaflet_icon', 'title'),
|
||||
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator(
|
||||
'tl_leaflet_icon',
|
||||
'alias',
|
||||
['title'],
|
||||
'leaflet.alias-generator'
|
||||
),
|
||||
),
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
@@ -265,7 +270,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
array('Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks', 'validateCoordinate')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
@@ -280,7 +285,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
array('Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks', 'validateCoordinate')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
@@ -295,7 +300,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
array('Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks', 'validateCoordinate')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
|
||||
Reference in New Issue
Block a user