Rework leaflet state button callbacks to be compatible with toolkit 3.0.

This commit is contained in:
David Molineus
2017-10-06 14:24:55 +02:00
parent ad6a4e9384
commit 594b10b0cf
7 changed files with 63 additions and 28 deletions

View File

@@ -100,10 +100,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle'],
'icon' => 'visible.gif',
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
'tl_leaflet_marker',
'active'
)
'button_callback' => [
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
'handleButtonCallback'
],
'toolkit' => [
'state_button' => [
'stateColumn' => ['active']
]
],
),
'show' => array
(