mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-01 04:24:02 +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'],
|
'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(
|
'button_callback' => [
|
||||||
'tl_leaflet_control',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'active'
|
'handleButtonCallback'
|
||||||
)
|
],
|
||||||
|
'toolkit' => [
|
||||||
|
'state_button' => [
|
||||||
|
'stateColumn' => ['active']
|
||||||
|
]
|
||||||
|
],
|
||||||
),
|
),
|
||||||
'show' => array
|
'show' => array
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -101,10 +101,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = 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' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
'button_callback' => [
|
||||||
'tl_leaflet_icon',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'active'
|
'handleButtonCallback'
|
||||||
)
|
],
|
||||||
|
'toolkit' => [
|
||||||
|
'state_button' => [
|
||||||
|
'stateColumn' => ['active']
|
||||||
|
]
|
||||||
|
],
|
||||||
),
|
),
|
||||||
'show' => array
|
'show' => array
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -114,10 +114,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['toggle'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['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(
|
'button_callback' => [
|
||||||
'tl_leaflet_layer',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'active'
|
'handleButtonCallback'
|
||||||
),
|
],
|
||||||
|
'toolkit' => [
|
||||||
|
'state_button' => [
|
||||||
|
'stateColumn' => ['active']
|
||||||
|
]
|
||||||
|
],
|
||||||
],
|
],
|
||||||
'show' => [
|
'show' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['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'],
|
'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' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
'button_callback' => [
|
||||||
'tl_leaflet_marker',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'active'
|
'handleButtonCallback'
|
||||||
)
|
],
|
||||||
|
'toolkit' => [
|
||||||
|
'state_button' => [
|
||||||
|
'stateColumn' => ['active']
|
||||||
|
]
|
||||||
|
],
|
||||||
),
|
),
|
||||||
'show' => array
|
'show' => array
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -101,10 +101,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = 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' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
'button_callback' => [
|
||||||
'tl_leaflet_popup',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'active'
|
'handleButtonCallback'
|
||||||
)
|
],
|
||||||
|
'toolkit' => [
|
||||||
|
'state_button' => [
|
||||||
|
'stateColumn' => ['active']
|
||||||
|
]
|
||||||
|
],
|
||||||
),
|
),
|
||||||
'show' => array
|
'show' => array
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -101,10 +101,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = 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' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
'button_callback' => [
|
||||||
'tl_leaflet_style',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'active'
|
'handleButtonCallback'
|
||||||
)
|
],
|
||||||
|
'toolkit' => [
|
||||||
|
'state_button' => [
|
||||||
|
'stateColumn' => ['active']
|
||||||
|
]
|
||||||
|
],
|
||||||
),
|
),
|
||||||
'show' => array
|
'show' => array
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -109,10 +109,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = 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' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton(
|
'button_callback' => [
|
||||||
'tl_leaflet_vector',
|
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
|
||||||
'active'
|
'handleButtonCallback'
|
||||||
)
|
],
|
||||||
|
'toolkit' => [
|
||||||
|
'state_button' => [
|
||||||
|
'stateColumn' => ['active']
|
||||||
|
]
|
||||||
|
],
|
||||||
),
|
),
|
||||||
'show' => array
|
'show' => array
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user