Add DivIcon support.

This commit is contained in:
David Molineus
2015-01-08 15:21:45 +01:00
parent 3386ff72b1
commit 7f79125495
10 changed files with 137 additions and 21 deletions

View File

@@ -51,6 +51,7 @@ $GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\Attribu
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\LoadingControlMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\UI\MarkerMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Type\ImageIconMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Type\DivIconMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Vector\PolylineMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Vector\MultiPolylineMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Vector\PolygonMapper';

View File

@@ -102,7 +102,6 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
),
'image extends default' => array(
'config' => array(
'',
'iconImage',
'iconRetinaImage',
'iconAnchor',
@@ -117,6 +116,19 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'active' => array(
'active'
)
),
'div extends default' => array(
'config' => array(
'html',
'iconSize',
'iconAnchor',
'popupAnchor',
'className',
),
'active' => array(
'active'
)
)
),
@@ -283,5 +295,32 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'eval' => array('mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'),
'sql' => "varchar(64) NOT NULL default ''"
),
'iconSize' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconSize'],
'exclude' => true,
'inputType' => 'text',
'eval' => array(
'maxlength' => 64,
'tl_class' => 'w50',
'nullIfEmpty' => true,
),
'sql' => "varchar(64) NULL"
),
'html' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['html'],
'exclude' => true,
'inputType' => 'textarea',
'eval' => array(
'style' => 'height:60px',
'preserveTags' => true,
'decodeEntities' => true,
'allowHtml' => true,
'rte' => 'ace|html',
'tl_class' => 'clr'
),
'sql' => "mediumtext NULL"
),
),
);

View File

@@ -35,6 +35,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
),
'global_operations' => array
(
'icons' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons'],
'href' => 'table=tl_leaflet_icon&id=',
'icon' => 'system/modules/leaflet/assets/img/icons.png',
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
),
'all' => array
(
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],

View File

@@ -17,6 +17,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_marker']['show'][0] = 'Show details';
$GLOBALS['TL_LANG']['tl_leaflet_marker']['show'][1] = 'Show marker ID %s details';
$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle'][0] = 'Toggle activation';
$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle'][1] = 'Toggle marker ID %s activation';
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons'][0] = 'Manage icons';
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons'][1] = 'Manage marker icons.';
$GLOBALS['TL_LANG']['tl_leaflet_marker']['title'][0] = 'Title';
$GLOBALS['TL_LANG']['tl_leaflet_marker']['title'][1] = 'Title of the map.';