Ongoing development.

This commit is contained in:
David Molineus
2015-01-05 12:25:46 +01:00
parent 74a4d79aa0
commit be9060795d
25 changed files with 472 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
.tl_listing_container.tree_view ul > li.tl_file {
background: url('./../img/folPlus.gif') no-repeat 6px 1px;
background: url('./../img/fol-placeholder.gif') no-repeat 6px 1px;
}
.tl_listing_container.tree_view > ul > li.tl_file {

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
module/assets/img/tile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

View File

@@ -4,7 +4,7 @@
* Backend module.
*/
$GLOBALS['BE_MOD']['content']['leaflet'] = array(
'tables' => array('tl_leaflet_map', 'tl_leaflet_layer'),
'tables' => array('tl_leaflet_map', 'tl_leaflet_layer', 'tl_leaflet_control'),
'icon' => 'system/modules/leaflet/assets/img/leaflet.png',
'stylesheet' => 'system/modules/leaflet/assets/css/backend.css',
);
@@ -18,8 +18,9 @@ $GLOBALS['TL_CTE']['includes']['leaflet'] = 'Netzmacht\Contao\Leaflet\LeafletMap
/*
* Models.
*/
$GLOBALS['TL_MODELS']['tl_leaflet_map'] = 'Netzmacht\Contao\Leaflet\Model\MapModel';
$GLOBALS['TL_MODELS']['tl_leaflet_layer'] = 'Netzmacht\Contao\Leaflet\Model\LayerModel';
$GLOBALS['TL_MODELS']['tl_leaflet_map'] = 'Netzmacht\Contao\Leaflet\Model\MapModel';
$GLOBALS['TL_MODELS']['tl_leaflet_layer'] = 'Netzmacht\Contao\Leaflet\Model\LayerModel';
$GLOBALS['TL_MODELS']['tl_leaflet_control'] = 'Netzmacht\Contao\Leaflet\Model\ControlModel';
/*
@@ -30,6 +31,10 @@ $GLOBALS['TL_MODELS']['tl_leaflet_layer'] = 'Netzmacht\Contao\Leaflet\Model\Laye
$GLOBALS['LEAFLET_MAPPERS'] = array();
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\MapMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\ProviderLayerMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\ZoomControlMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\ScaleControlMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\LayersControlMapper';
/*
* Leaflet encoders.
@@ -50,12 +55,34 @@ $GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\RasterEncoder';
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\VectorEncoder';
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\Contao\Leaflet\Subscriber\EncoderSubscriber';
$GLOBALS['LEAFLET_LAYERS'][] = 'provider';
/*
* Leaflet layer types.
*
* The type is used for the database driven definitions.
*/
$GLOBALS['LEAFLET_LAYERS'] = array();
$GLOBALS['LEAFLET_LAYERS']['default'] = array('children' => true);
$GLOBALS['LEAFLET_LAYERS']['provider'] = array('children' => false);
$GLOBALS['LEAFLET_LAYERS']['group'] = array('children' => true, 'geojson' => true);
/*
* leaflet controls.
*
* Supported leaflet control types. Register your type for the database driven definition here.
*/
$GLOBALS['LEAFLET_CONTROLS'] = array();
$GLOBALS['LEAFLET_CONTROLS'][] = 'zoom';
$GLOBALS['LEAFLET_CONTROLS'][] = 'layers';
$GLOBALS['LEAFLET_CONTROLS'][] = 'scale';
$GLOBALS['LEAFLET_CONTROLS'][] = 'attribution';
/*
* Leaflet tile layer providers.
*/
require_once __DIR__ . '/leaflet_providers.php';
require_once TL_ROOT . '/system/modules/leaflet/config/leaflet_providers.php';
/*
* Leaflet assets.

View File

@@ -5,6 +5,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'config' => array(
'dataContainer' => 'Table',
'enableVersioning' => true,
'ptable' => 'tl_leaflet_map',
'sql' => array
(
'keys' => array
@@ -19,14 +20,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
(
'sorting' => array
(
'mode' => 1,
'fields' => array('title'),
'flag' => 1
'mode' => 4,
'fields' => array('sorting'),
'headerFields' => array('title'),
'flag' => 1,
'child_record_callback' => array('Netzmacht\Contao\Leaflet\Dca\Control', 'generateRow'),
),
'label' => array
(
'fields' => array('title'),
'format' => '%s'
'format' => '%s',
),
'global_operations' => array
(
@@ -68,18 +71,24 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
)
),
'palettes' => array(
'__selector__' => array('type')
),
'metapalettes' => array(
'default' => array(
'name' => array('title', 'type', 'position'),
'name' => array('title', 'alias', 'type', 'position'),
'config' => array(),
'active' => array('active')
),
'zoom extends default' => array(
'zoom' => array('zoomInText', 'zoomOutText', 'zoomInTitle', 'zoomOutTitle'),
'config' => array('zoomInText', 'zoomOutText', 'zoomInTitle', 'zoomOutTitle'),
),
'layers extends default' => array(
'layers' => array('collapsed', 'autoZIndex')
'config' => array('layers', 'collapsed', 'autoZIndex')
),
'scale extends default' => array(
'scale' => array('maxWidth', 'scale', 'updateWhenIdle')
'config' => array('maxWidth', 'metric', 'imperial', 'updateWhenIdle')
)
),
@@ -89,33 +98,72 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
(
'sql' => "int(10) unsigned NOT NULL auto_increment"
),
'pid' => array
(
'sql' => "int(10) unsigned NOT NULL default '0'"
),
'tstamp' => array
(
'sql' => "int(10) unsigned NOT NULL default '0'"
),
'sorting' => array
(
'sql' => "int(10) unsigned NOT NULL default '0'"
),
'title' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['title'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('mandatory' => true, 'maxlength' => 255),
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
'sql' => "varchar(255) NOT NULL default ''"
),
'alias' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['alias'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'sql' => "varchar(255) NOT NULL default ''"
),
'type' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['type'],
'exclude' => true,
'inputType' => 'select',
'eval' => array(
'mandatory' => true,
'tl_class' => 'w50',
'includeBlankOption' => true,
'submitOnChange' => true,
'chosen' => true,
),
'options' => $GLOBALS['LEAFLET_CONTROLS'],
'sql' => "varchar(32) NOT NULL default ''"
),
'position' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['position'],
'exclude' => true,
'inputType' => 'select',
'options' => array('topleft', 'topright', 'bottomleft', 'bottomright'),
'eval' => array('mandatory' => true, 'maxlength' => 255),
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
'sql' => "varchar(255) NOT NULL default ''"
),
'active' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['active'],
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class' => 'w50'),
'sql' => "char(1) NOT NULL default ''"
),
'zoomInText' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('mandatory' => true, 'maxlength' => 255),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'sql' => "varchar(255) NOT NULL default ''"
),
'zoomOutText' => array
@@ -123,7 +171,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('mandatory' => true, 'maxlength' => 255),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'sql' => "varchar(255) NOT NULL default ''"
),
'zoomInTitle' => array
@@ -131,7 +179,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('mandatory' => true, 'maxlength' => 255),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'sql' => "varchar(255) NOT NULL default ''"
),
'zoomOutTitle' => array
@@ -139,7 +187,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('mandatory' => true, 'maxlength' => 255),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'sql' => "varchar(255) NOT NULL default ''"
),
'collapsed' => array
@@ -148,7 +196,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'exclude' => true,
'inputType' => 'checkbox',
'default' => '1',
'eval' => array(),
'eval' => array('tl_class' => 'w50'),
'sql' => "char(1) NOT NULL default ''"
),
'autoZIndex' => array
@@ -157,7 +205,78 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'exclude' => true,
'inputType' => 'checkbox',
'default' => '1',
'eval' => array(),
'eval' => array('tl_class' => 'w50'),
'sql' => "char(1) NOT NULL default ''"
),
'layers' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layers'],
'exclude' => true,
'inputType' => 'multiColumnWizard',
'eval' => array
(
'tl_class' => 'clr',
'columnFields' => array
(
'layer' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Control', 'getLayers'),
'eval' => array(
'style' => 'width: 200px',
'chosen' => true,
'includeBlankOption' => true
),
),
'mode' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'],
'exclude' => true,
'inputType' => 'select',
'options' => array('base', 'overlay'),
'eval' => array(
'style' => 'width: 200px'
),
),
)
),
'sql' => "mediumblob NULL"
),
'maxWidth' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['maxWidth'],
'exclude' => true,
'inputType' => 'text',
'default' => 100,
'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'),
'sql' => "int(5) NOT NULL default '100'"
),
'metric' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['metric'],
'exclude' => true,
'inputType' => 'checkbox',
'default' => '1',
'eval' => array('tl_class' => 'w50 clr'),
'sql' => "char(1) NOT NULL default '1'"
),
'imperial' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['imperial'],
'exclude' => true,
'inputType' => 'checkbox',
'default' => '1',
'eval' => array('tl_class' => 'w50'),
'sql' => "char(1) NOT NULL default '1'"
),
'updateWhenIdle' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['updateWhenIdle'],
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class' => 'w50'),
'sql' => "char(1) NOT NULL default ''"
),
),

View File

@@ -20,7 +20,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
'mode' => 5,
'fields' => array('title'),
'flag' => 1,
'icon' => 'system/modules/leaflet/assets/img/layers.png'
'icon' => 'system/modules/leaflet/assets/img/layers.png',
'paste_button_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'getPasteButtons'),
),
'label' => array
(
@@ -29,6 +30,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
),
'global_operations' => array
(
'map' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['map'],
'href' => 'table=tl_leaflet_map',
'icon' => 'system/modules/leaflet/assets/img/leaflet.png',
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="m"'
),
'all' => array
(
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
@@ -51,6 +59,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
'href' => 'act=copy',
'icon' => 'copy.gif'
),
'cut' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['cut'],
'href' => 'act=paste&mode=cut',
'icon' => 'cut.gif',
'attributes' => 'onclick="Backend.getScrollOffset()"',
),
'delete' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['delete'],
@@ -129,7 +144,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
'submitOnChange' => true,
'chosen' => true,
),
'options' => &$GLOBALS['LEAFLET_LAYERS'],
'options' => array_keys($GLOBALS['LEAFLET_LAYERS']),
'sql' => "varchar(32) NOT NULL default ''"
),
'tile_provider' => array(

View File

@@ -5,6 +5,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'config' => array(
'dataContainer' => 'Table',
'enableVersioning' => true,
'ctable' => array('tl_leaflet_control'),
'sql' => array
(
'keys' => array
@@ -52,6 +53,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'href' => 'act=edit',
'icon' => 'header.gif'
),
'controls' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['controls'],
'href' => 'table=tl_leaflet_control',
'icon' => 'system/modules/leaflet/assets/img/control.png',
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
),
'copy' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['copy'],