Skip to content

Commit

Permalink
Merge branch 'color-mapping-bazarcarto' into doryphore
Browse files Browse the repository at this point in the history
  • Loading branch information
J9rem committed Feb 19, 2021
2 parents 7c1ee89 + e853891 commit 9e2df5b
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 267 deletions.
6 changes: 0 additions & 6 deletions tools/bazar/actions/BazarCartoAction.php
Expand Up @@ -6,11 +6,6 @@

class BazarCartoAction extends YesWikiAction
{
public static $availableColors = array(
'darkred', 'red', 'lightred', 'orange', 'beige', 'green', 'darkgreen', 'lightgreen', 'blue', 'darkblue',
'lightblue', 'purple', 'darkpurple', 'pink', 'cadetblue', 'white', 'gray', 'lightgray', 'black',
);

public function formatArguments($arg)
{
// PROVIDERS
Expand Down Expand Up @@ -89,7 +84,6 @@ public function formatArguments($arg)
'fullscreen' => $arg['fullscreen'] ?? 'true',
// Fournit une configuration JSON via un URL
'jsonconfurl' => $arg['jsonconfurl'] ?? null,
'availableColors' => BazarCartoAction::$availableColors ,
//template - default value map
'template' => (isset($arg['template']) &&
BazarListeAction::specialActionFromTemplate($arg['template'], 'BAZARCARTO_TEMPLATES'))
Expand Down
Binary file not shown.
Binary file removed tools/bazar/presentation/images/markers-xl-shadow.png
Binary file not shown.
Binary file removed tools/bazar/presentation/images/markers-xl-soft.png
Binary file not shown.
Binary file not shown.
Binary file removed tools/bazar/presentation/images/markers-xs-shadow.png
Binary file not shown.
Binary file removed tools/bazar/presentation/images/markers-xs-soft.png
Binary file not shown.
256 changes: 0 additions & 256 deletions tools/bazar/presentation/styles/bazar.css
Expand Up @@ -83,262 +83,6 @@ padding:0;
margin: 0 0 10px 0;
}


/** CARTO */
.leaflet-popup .BAZ_cadre_fiche, .BAZ_cadre_map {
font-size:12px;
height: 320px;
overflow: auto;
width: 320px;
margin: 0;
padding-right: 10px;
display:block;
text-align:left;
}
.leaflet-popup .BAZ_titre, .BAZ_cadre_map .BAZ_titre {
font-size: 10px;
line-height: 10px;
margin:0 0 10px;
}
.leaflet-popup .BAZ_fiche_titre, .BAZ_cadre_map .BAZ_fiche_titre {
font-size: 16px;
line-height: 20px;
margin:0 0 16px;
}

.leaflet-popup ul.css-tabs, .BAZ_cadre_map ul.css-tabs {
margin:0;
}
.leaflet-popup ul.css-tabs a, .BAZ_cadre_map ul.css-tabs a {
font-size:.8em;
height:auto;
margin:0 1px 0 0;
padding:3px;
}

.bazar-marker .bazar-entry {
background: url('../images/markers-xs-soft.png') no-repeat 0 0;
width: 15px;
height: 20px;
display: block;
text-align: center;
position:relative;
z-index: 2;
opacity: 1;
}

.bazar-marker .bazar-entry i {
color:#FFF;
font-size: 8px;
top: -1px;
left: 1px;
}
.bazar-marker .bazar-entry.icon-lightgreen i,
.bazar-marker .bazar-entry.icon-white i
{
color:#000;
}

.bazar-marker.xl .bazar-entry i {
font-size: 16px;
top: 10px;
position: absolute;
left: 0;
right: 0;
}

.bazar-marker::after {
content:' ';
background: url('../images/markers-xs-shadow.png') no-repeat 0 0;
width: 18px;
height: 8px;
display: block;
position:absolute;
bottom: 0;
right: -7px;
}

.bazar-marker.xl::after {
content:' ';
background: url('../images/markers-xl-shadow.png') no-repeat 0 0;
width: 35px;
height: 16px;
display: block;
position:absolute;
bottom: 0;
right: -9px;
}

.bazar-marker.xl .bazar-entry {
width: 35px;
height: 46px;
display: block;
text-align: center;
position:relative;
/*background:url(../images/markers-xl-matte.png) no-repeat 0 0;*/
background:url(../images/markers-xl-soft.png) no-repeat 0 0;
opacity: 1;
z-index: 2;
}

/* Colors */
.bazar-marker .bazar-entry.icon-red {
background-position: 0 0;
}

.bazar-marker .bazar-entry.icon-darkred {
background-position: -78px 0px;
}

.bazar-marker .bazar-entry.icon-lightred {
background-position: -235px 0;
}

.bazar-marker .bazar-entry.icon-orange {
background-position: -16px 0;
}

.bazar-marker .bazar-entry.icon-beige {
background-position: -172px 0;
}

.bazar-marker .bazar-entry.icon-green {
background-position: -31px 0;
}

.bazar-marker .bazar-entry.icon-darkgreen {
background-position: -109px 0;
}

.bazar-marker .bazar-entry.icon-lightgreen {
background-position: -188px 0;
}

.bazar-marker .bazar-entry.icon-blue {
background-position: -47px 0;
}

.bazar-marker .bazar-entry.icon-darkblue {
background-position: -94px 0;
}

.bazar-marker .bazar-entry.icon-lightblue {
background-position: -203px 0;
}

.bazar-marker .bazar-entry.icon-purple {
background-position: -62px 0;
}

.bazar-marker .bazar-entry.icon-darkpurple {
background-position: -125px 0;
}

.bazar-marker .bazar-entry.icon-pink {
background-position: -219px 0;
}

.bazar-marker .bazar-entry.icon-cadetblue {
background-position: -140px 0;
}

.bazar-marker .bazar-entry.icon-white {
background-position: -250px 0;
}

.bazar-marker .bazar-entry.icon-gray {
background-position: -282px 0;
}

.bazar-marker .bazar-entry.icon-lightgray {
background-position: -266px 0;
}

.bazar-marker .bazar-entry.icon-black {
background-position: -296px 0;
}

.bazar-marker.xl .bazar-entry.icon-red {
background-position: 0 0;
}

.bazar-marker.xl .bazar-entry.icon-darkred {
background-position: -180px 0;
}

.bazar-marker.xl .bazar-entry.icon-lightred {
background-position: -360px 0;
}

.bazar-marker.xl .bazar-entry.icon-orange {
background-position: -36px 0;
}

.bazar-marker.xl .bazar-entry.icon-beige {
background-position: -396px 0;
}

.bazar-marker.xl .bazar-entry.icon-green {
background-position: -72px 0;
}

.bazar-marker.xl .bazar-entry.icon-darkgreen {
background-position: -252px 0;
}

.bazar-marker.xl .bazar-entry.icon-lightgreen {
background-position: -432px 0;
}

.bazar-marker.xl .bazar-entry.icon-blue {
background-position: -108px 0;
}

.bazar-marker.xl .bazar-entry.icon-darkblue {
background-position: -216px 0;
}

.bazar-marker.xl .bazar-entry.icon-lightblue {
background-position: -468px 0;
}

.bazar-marker.xl .bazar-entry.icon-purple {
background-position: -144px 0;
}

.bazar-marker.xl .bazar-entry.icon-darkpurple {
background-position: -288px 0;
}

.bazar-marker.xl .bazar-entry.icon-pink {
background-position: -504px 0;
}

.bazar-marker.xl .bazar-entry.icon-cadetblue {
background-position: -324px 0;
}

.bazar-marker.xl .bazar-entry.icon-white {
background-position: -576px 0;
}

.bazar-marker.xl .bazar-entry.icon-gray {
background-position: -648px 0;
}

.bazar-marker.xl .bazar-entry.icon-lightgray {
background-position: -612px 0;
}

.bazar-marker.xl .bazar-entry.icon-black {
background-position: -682px 0;
}


/* end carto */



/* accordion pane */
.accordion {
background:transparent;
Expand Down
74 changes: 74 additions & 0 deletions tools/bazar/presentation/styles/bazarcarto.css
@@ -0,0 +1,74 @@
.leaflet-popup .BAZ_cadre_fiche,
.BAZ_cadre_map {
font-size: 12px;
height: 320px;
overflow: auto;
width: 320px;
margin: 0;
padding-right: 10px;
display: block;
text-align: left;
}
.leaflet-popup .BAZ_titre,
.BAZ_cadre_map .BAZ_titre {
font-size: 10px;
line-height: 10px;
margin: 0 0 10px;
}
.leaflet-popup .BAZ_fiche_titre,
.BAZ_cadre_map .BAZ_fiche_titre {
font-size: 16px;
line-height: 20px;
margin: 0 0 16px;
}

.leaflet-popup ul.css-tabs,
.BAZ_cadre_map ul.css-tabs {
margin: 0;
}
.leaflet-popup ul.css-tabs a,
.BAZ_cadre_map ul.css-tabs a {
font-size: 0.8em;
height: auto;
margin: 0 1px 0 0;
padding: 3px;
}

.bazar-marker .bazar-entry {
font-family: "Font Awesome 5 Free";
font-weight: 900;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 1;
font-size: 20px;
color: darkred;
position: relative;
text-align: center;
display: block;
text-align: center;
position: relative;
z-index: 2;
width: 15px;
height: 20px;
}
.bazar-marker .bazar-entry::before {
content: "\f041";
}
.bazar-marker.xl .bazar-entry {
width: 35px;
height: 46px;
font-size: 40px;
}
.bazar-marker .bazar-entry i {
position: absolute;
top: 3.5px;
left: 3.5px;
font-size: 8px;
color:#fff;
}
.bazar-marker.xl .bazar-entry i {
top: 8px;
left: 10px;
font-size: 16px;
}
8 changes: 3 additions & 5 deletions tools/bazar/presentation/templates/map.tpl.html
Expand Up @@ -6,6 +6,7 @@
echo $pager_links;

$GLOBALS['wiki']->AddCSSFile('tools/bazar/libs/vendor/leaflet/leaflet.css');
$GLOBALS['wiki']->AddCSSFile('tools/bazar/presentation/styles/bazarcarto.css');
$GLOBALS['wiki']->AddJavascriptFile('tools/bazar/libs/bazar.js');
$GLOBALS['wiki']->AddJavascriptFile('tools/bazar/libs/vendor/leaflet/leaflet.js');
$GLOBALS['wiki']->AddJavascriptFile('tools/bazar/libs/vendor/leaflet/leaflet-providers.js');
Expand Down Expand Up @@ -53,9 +54,6 @@

// couleur de marqueur
$color = getCustomValueForEntry($param['color'], $param['colorfield'], $fiche, $GLOBALS['wiki']->config['baz_marker_color']);
if (!in_array($color,$param['availableColors'])) {
$color = $param['availableColors'][0];
}

//icone de marqueur
$icon = $param['iconprefix']
Expand All @@ -75,8 +73,8 @@
iconAnchor: '.$param['iconAnchor'].',
popupAnchor: '.$param['popupAnchor'].',
className: \'bazar-marker'.$param['smallmarker'].'\',
html: \'<div class="bazar-entry icon-'.$color.'" '
.str_replace('\'', '', $fiche['html_data']).'>'
html: \'<div class="bazar-entry" '
.str_replace('\'', '', $fiche['html_data']).' style="color:'.$color.';">'
.(!empty($icon) ? '<i class="'.$icon.'"></i>' : '')
.'</div>\'
}),
Expand Down

0 comments on commit 9e2df5b

Please sign in to comment.