mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-28 11:04:08 +01:00
Rework leaflet state button callbacks to be compatible with toolkit 3.0.
This commit is contained in:
@@ -86,10 +86,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'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.listeners.state_button_callback',
|
||||
'handleButtonCallback'
|
||||
],
|
||||
'toolkit' => [
|
||||
'state_button' => [
|
||||
'stateColumn' => ['active']
|
||||
]
|
||||
],
|
||||
),
|
||||
'show' => array
|
||||
(
|
||||
|
||||
@@ -101,10 +101,15 @@ $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\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_icon',
|
||||
'active'
|
||||
)
|
||||
'button_callback' => [
|
||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||
'handleButtonCallback'
|
||||
],
|
||||
'toolkit' => [
|
||||
'state_button' => [
|
||||
'stateColumn' => ['active']
|
||||
]
|
||||
],
|
||||
),
|
||||
'show' => array
|
||||
(
|
||||
|
||||
@@ -114,10 +114,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_layer',
|
||||
'active'
|
||||
),
|
||||
'button_callback' => [
|
||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||
'handleButtonCallback'
|
||||
],
|
||||
'toolkit' => [
|
||||
'state_button' => [
|
||||
'stateColumn' => ['active']
|
||||
]
|
||||
],
|
||||
],
|
||||
'show' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['show'],
|
||||
|
||||
@@ -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
|
||||
(
|
||||
|
||||
@@ -101,10 +101,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_popup',
|
||||
'active'
|
||||
)
|
||||
'button_callback' => [
|
||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||
'handleButtonCallback'
|
||||
],
|
||||
'toolkit' => [
|
||||
'state_button' => [
|
||||
'stateColumn' => ['active']
|
||||
]
|
||||
],
|
||||
),
|
||||
'show' => array
|
||||
(
|
||||
|
||||
@@ -101,10 +101,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_style',
|
||||
'active'
|
||||
)
|
||||
'button_callback' => [
|
||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||
'handleButtonCallback'
|
||||
],
|
||||
'toolkit' => [
|
||||
'state_button' => [
|
||||
'stateColumn' => ['active']
|
||||
]
|
||||
],
|
||||
),
|
||||
'show' => array
|
||||
(
|
||||
|
||||
@@ -109,10 +109,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
||||
'tl_leaflet_vector',
|
||||
'active'
|
||||
)
|
||||
'button_callback' => [
|
||||
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||
'handleButtonCallback'
|
||||
],
|
||||
'toolkit' => [
|
||||
'state_button' => [
|
||||
'stateColumn' => ['active']
|
||||
]
|
||||
],
|
||||
),
|
||||
'show' => array
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user