Updates yellow color and notices box-shadow.
This commit is contained in:
parent
f7008c2b5f
commit
e944aa7c82
|
@ -1571,25 +1571,6 @@
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</div>
|
</div>
|
||||||
<transition name="filter-item">
|
|
||||||
<div
|
|
||||||
v-if="selectedMarkerIndexes.length"
|
|
||||||
class="geocoordinate-panel--input">
|
|
||||||
<p>{{ selectedMarkerIndexes.length == 1 ? $i18n.get('label_one_selected_location') : $i18n.getWithVariables('label_%s_selected_locations', [ selectedMarkerIndexes.length ]) }}. <a @click="clearSelectedMarkers()">{{ $i18n.get('label_clean') }}</a></p>
|
|
||||||
</div>
|
|
||||||
</transition>
|
|
||||||
<section
|
|
||||||
v-if="!geocoordinateMetadata.length"
|
|
||||||
class="section">
|
|
||||||
<div class="content has-text-grey has-text-centered">
|
|
||||||
<p>
|
|
||||||
<span class="icon is-large">
|
|
||||||
<i class="tainacan-icon tainacan-icon-30px tainacan-icon-public" />
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p>{{ $i18n.get('info_empty_geocoordinate_metadata_list') }}</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
</l-control>
|
</l-control>
|
||||||
<l-control
|
<l-control
|
||||||
|
@ -2051,9 +2032,9 @@ export default {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) {
|
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) {
|
||||||
if (this.itemsLocations.length == 1)
|
if (this.itemsLocations.length == 1)
|
||||||
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 0] });
|
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 0] });
|
||||||
else
|
else
|
||||||
this.$refs['tainacan-admin-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 0] });
|
this.$refs['tainacan-admin-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 0] });
|
||||||
}
|
}
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
|
@ -2431,9 +2412,9 @@ export default {
|
||||||
this.selectedMarkerIndexes = [];
|
this.selectedMarkerIndexes = [];
|
||||||
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) {
|
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) {
|
||||||
if (this.itemsLocations.length == 1)
|
if (this.itemsLocations.length == 1)
|
||||||
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 0] });
|
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 0] });
|
||||||
else
|
else
|
||||||
this.$refs['tainacan-admin-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 0] });
|
this.$refs['tainacan-admin-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 0] });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showItemByLocation(index) {
|
showItemByLocation(index) {
|
||||||
|
@ -2441,7 +2422,7 @@ export default {
|
||||||
this.selectedMarkerIndexes = [];
|
this.selectedMarkerIndexes = [];
|
||||||
this.selectedMarkerIndexes.push(index);
|
this.selectedMarkerIndexes.push(index);
|
||||||
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject )
|
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject )
|
||||||
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds( [ this.itemsLocations[index].location ], { animate: true, maxZoom: 12, paddingTopLeft: [0, 286] });
|
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds( [ this.itemsLocations[index].location ], { animate: true, maxZoom: 16, paddingTopLeft: [0, 286] });
|
||||||
},
|
},
|
||||||
showLocationsByItem(item) {
|
showLocationsByItem(item) {
|
||||||
this.mapSelectedItemId = item.id;
|
this.mapSelectedItemId = item.id;
|
||||||
|
@ -2456,9 +2437,9 @@ export default {
|
||||||
if ( selectedLocationsByItem.length) {
|
if ( selectedLocationsByItem.length) {
|
||||||
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) {
|
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) {
|
||||||
if (selectedLocationsByItem.length > 1)
|
if (selectedLocationsByItem.length > 1)
|
||||||
this.$refs['tainacan-admin-view-mode-map'].mapObject.flyToBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 286] });
|
this.$refs['tainacan-admin-view-mode-map'].mapObject.flyToBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 286] });
|
||||||
else
|
else
|
||||||
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 286] });
|
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 286] });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$buefy.snackbar.open({
|
this.$buefy.snackbar.open({
|
||||||
|
|
|
@ -11,20 +11,8 @@
|
||||||
<b-input
|
<b-input
|
||||||
name="mapProvider"
|
name="mapProvider"
|
||||||
v-model="mapProvider"
|
v-model="mapProvider"
|
||||||
@input="emitValues()" />
|
@input="emitValues()"
|
||||||
</b-field>
|
placeholder="https://tile.openstreetmap.org/{z}/{x}/{y}.png" />
|
||||||
|
|
||||||
<b-field :addons="false" >
|
|
||||||
<label class="label is-inline">
|
|
||||||
{{ $i18n.getHelperTitle('tainacan-geocoordinate', 'extra_tile_layers') }}
|
|
||||||
<help-button
|
|
||||||
:title="$i18n.getHelperTitle('tainacan-geocoordinate', 'extra_tile_layers')"
|
|
||||||
:message="$i18n.getHelperMessage('tainacan-geocoordinate', 'extra_tile_layers')" />
|
|
||||||
</label>
|
|
||||||
<b-input
|
|
||||||
name="extraTileLayer"
|
|
||||||
v-model="extraTileLayer"
|
|
||||||
@input="emitValues()" />
|
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<b-field
|
<b-field
|
||||||
|
@ -39,7 +27,8 @@
|
||||||
<b-input
|
<b-input
|
||||||
name="attribution"
|
name="attribution"
|
||||||
v-model="attribution"
|
v-model="attribution"
|
||||||
@input="emitValues()" />
|
@input="emitValues()"
|
||||||
|
placeholder="© OpenStreetMap contributors" />
|
||||||
|
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
|
@ -52,12 +41,13 @@
|
||||||
:title="$i18n.getHelperTitle('tainacan-geocoordinate', 'initial_zoom')"
|
:title="$i18n.getHelperTitle('tainacan-geocoordinate', 'initial_zoom')"
|
||||||
:message="$i18n.getHelperMessage('tainacan-geocoordinate', 'initial_zoom')" />
|
:message="$i18n.getHelperMessage('tainacan-geocoordinate', 'initial_zoom')" />
|
||||||
</label>
|
</label>
|
||||||
<b-input
|
<b-numberinput
|
||||||
name="initialZoom"
|
name="initialZoom"
|
||||||
v-model="initialZoom"
|
v-model="initialZoom"
|
||||||
@input="emitValues()"
|
@input="emitValues()"
|
||||||
type="number"
|
:step="1"
|
||||||
step="1" />
|
:max="21"
|
||||||
|
:min="1" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<b-field
|
<b-field
|
||||||
|
@ -69,12 +59,13 @@
|
||||||
:title="$i18n.getHelperTitle('tainacan-geocoordinate', 'maximum_zoom')"
|
:title="$i18n.getHelperTitle('tainacan-geocoordinate', 'maximum_zoom')"
|
||||||
:message="$i18n.getHelperMessage('tainacan-geocoordinate', 'maximum_zoom')" />
|
:message="$i18n.getHelperMessage('tainacan-geocoordinate', 'maximum_zoom')" />
|
||||||
</label>
|
</label>
|
||||||
<b-input
|
<b-numberinput
|
||||||
name="maximumZoom"
|
name="maximumZoom"
|
||||||
v-model="maximumZoom"
|
v-model="maximumZoom"
|
||||||
@input="emitValues()"
|
@input="emitValues()"
|
||||||
type="number"
|
:step="1"
|
||||||
step="1" />
|
:max="21"
|
||||||
|
:min="1" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -96,18 +87,16 @@
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.value) {
|
if (this.value) {
|
||||||
this.mapProvider = this.value.map_provider || 'http://?';
|
this.mapProvider = this.value.map_provider || 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||||
this.extraTileLayer = this.value.extra_tile_layers || [];
|
this.attribution = this.value.attribution || '© <a target="_blank" href="http://osm.org/copyright">OpenStreetMap</a> contributors';
|
||||||
this.attribution = this.value.attribution || '';
|
this.initialZoom = Number(this.value.initial_zoom) || 5;
|
||||||
this.initialZoom = this.value.initial_zoom || 5;
|
this.maximumZoom = Number(this.value.maximum_zoom) || 12;
|
||||||
this.maximumZoom = this.value.maximum_zoom || 12;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
emitValues(){
|
emitValues(){
|
||||||
this.$emit('input',{
|
this.$emit('input',{
|
||||||
map_provider: this.mapProvider,
|
map_provider: this.mapProvider,
|
||||||
extra_tile_layers: this.extraTileLayer,
|
|
||||||
attribution: this.attribution,
|
attribution: this.attribution,
|
||||||
initial_zoom: this.initialZoom,
|
initial_zoom: this.initialZoom,
|
||||||
maximum_zoom: this.maximumZoom,
|
maximum_zoom: this.maximumZoom,
|
||||||
|
|
|
@ -137,9 +137,6 @@
|
||||||
attribution() {
|
attribution() {
|
||||||
return this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.attribution ? this.itemMetadatum.metadatum.metadata_type_options.attribution : '© <a target="_blank" href="http://osm.org/copyright">OpenStreetMap</a> contributors';
|
return this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.attribution ? this.itemMetadatum.metadatum.metadata_type_options.attribution : '© <a target="_blank" href="http://osm.org/copyright">OpenStreetMap</a> contributors';
|
||||||
},
|
},
|
||||||
extraTileLayers() {
|
|
||||||
return this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.extra_tile_layers ? this.itemMetadatum.metadatum.metadata_type_options.extra_tile_layers : [];
|
|
||||||
},
|
|
||||||
itemMetadatumIdentifier() {
|
itemMetadatumIdentifier() {
|
||||||
return 'tainacan-item-metadatum_id-' + this.itemMetadatum.metadatum.id + (this.itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + this.itemMetadatum.parent_meta_id) : '');
|
return 'tainacan-item-metadatum_id-' + this.itemMetadatum.metadatum.id + (this.itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + this.itemMetadatum.parent_meta_id) : '');
|
||||||
},
|
},
|
||||||
|
@ -198,7 +195,7 @@
|
||||||
this.selected = Array.isArray(this.value) ? (this.value.length == 1 && this.value[0] == "" ? [] : this.value) : [this.value];
|
this.selected = Array.isArray(this.value) ? (this.value.length == 1 && this.value[0] == "" ? [] : this.value) : [this.value];
|
||||||
|
|
||||||
// Listens to window resize event to update map bounds
|
// Listens to window resize event to update map bounds
|
||||||
// We need to pass mapComoponentRef here instead of creating it inside the function
|
// We need to pass mapComponentRef here instead of creating it inside the function
|
||||||
// otherwise the listener would conflict when multiple geo metadata are inserted.
|
// otherwise the listener would conflict when multiple geo metadata are inserted.
|
||||||
const mapComponentRef = 'map--' + this.itemMetadatumIdentifier;
|
const mapComponentRef = 'map--' + this.itemMetadatumIdentifier;
|
||||||
eventBusItemMetadata.$on('itemEditionFormResize', () => this.handleWindowResize(mapComponentRef));
|
eventBusItemMetadata.$on('itemEditionFormResize', () => this.handleWindowResize(mapComponentRef));
|
||||||
|
|
|
@ -23,7 +23,6 @@ class GeoCoordinate extends Metadata_Type {
|
||||||
$this->set_description( __('Represents a geographical location that is determined by latitude and longitude coordinates.', 'tainacan') );
|
$this->set_description( __('Represents a geographical location that is determined by latitude and longitude coordinates.', 'tainacan') );
|
||||||
$this->set_default_options([
|
$this->set_default_options([
|
||||||
'map_provider' => 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'map_provider' => 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
'extra_tile_layers' => [],
|
|
||||||
'attribution' => '© <a target="_blank" href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
'attribution' => '© <a target="_blank" href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||||
'initial_zoom' => 5,
|
'initial_zoom' => 5,
|
||||||
'maximum_zoom' => 12,
|
'maximum_zoom' => 12,
|
||||||
|
@ -43,12 +42,8 @@ class GeoCoordinate extends Metadata_Type {
|
||||||
public function get_form_labels(){
|
public function get_form_labels(){
|
||||||
return [
|
return [
|
||||||
'map_provider' => [
|
'map_provider' => [
|
||||||
'title' => __( 'Tile provides', 'tainacan' ),
|
'title' => __( 'Map Tiles provider', 'tainacan' ),
|
||||||
'description' => __( 'Link to the service used as source for displaying tile layers on the map', 'tainacan' ),
|
'description' => __( 'Link to the service used as source for displaying tile layers on the map.', 'tainacan' ),
|
||||||
],
|
|
||||||
'extra_tile_layers' => [
|
|
||||||
'title' => __( 'Extra tile layer', 'tainacan' ),
|
|
||||||
'description' => __( 'The extra layer of blocks to be displayed on the map', 'tainacan' ),
|
|
||||||
],
|
],
|
||||||
'attribution' => [
|
'attribution' => [
|
||||||
'title' => __( 'Attribution', 'tainacan' ),
|
'title' => __( 'Attribution', 'tainacan' ),
|
||||||
|
@ -101,6 +96,7 @@ class GeoCoordinate extends Metadata_Type {
|
||||||
public function get_value_as_html(\Tainacan\Entities\Item_Metadata_Entity $item_metadata) {
|
public function get_value_as_html(\Tainacan\Entities\Item_Metadata_Entity $item_metadata) {
|
||||||
global $TAINACAN_BASE_URL;
|
global $TAINACAN_BASE_URL;
|
||||||
$value = $item_metadata->get_value();
|
$value = $item_metadata->get_value();
|
||||||
|
$options = $this->get_options();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
( is_string( $value ) && empty( $value ) ) ||
|
( is_string( $value ) && empty( $value ) ) ||
|
||||||
|
@ -111,6 +107,7 @@ class GeoCoordinate extends Metadata_Type {
|
||||||
$metadatum = $item_metadata->get_metadatum();
|
$metadatum = $item_metadata->get_metadatum();
|
||||||
$item_metadatum_id = $metadatum->get_id();
|
$item_metadatum_id = $metadatum->get_id();
|
||||||
$item_metadatum_id .= $metadatum->get_parent() ? ( $metadatum->get_parent() . '_parent_meta_id-') : '';
|
$item_metadatum_id .= $metadatum->get_parent() ? ( $metadatum->get_parent() . '_parent_meta_id-') : '';
|
||||||
|
$zoom_geo_query = isset($options['initial_zoom']) ? ('z=' . $options['initial_zoom'] ) : '' ;
|
||||||
|
|
||||||
$return = '';
|
$return = '';
|
||||||
|
|
||||||
|
@ -125,7 +122,11 @@ class GeoCoordinate extends Metadata_Type {
|
||||||
$latitude = isset($coordinate_as_array[0]) ? $coordinate_as_array[0] : '';
|
$latitude = isset($coordinate_as_array[0]) ? $coordinate_as_array[0] : '';
|
||||||
$longitude = isset($coordinate_as_array[1]) ? $coordinate_as_array[1] : '';
|
$longitude = isset($coordinate_as_array[1]) ? $coordinate_as_array[1] : '';
|
||||||
|
|
||||||
$single_value = "<span class='tainacan-coordinates' data-latitude='{$latitude}' data-longitude='{$longitude}'><span>{$latitude}</span><span class='coordinates-separator'>,</span><span>{$longitude}</span></span>";
|
$single_value = "<a class='tainacan-coordinates' data-latitude='{$latitude}' data-longitude='{$longitude}' href='geo:{$latitude},{$longitude}?q={$latitude},{$longitude}&{$zoom_geo_query}'>
|
||||||
|
<span>{$latitude}</span>
|
||||||
|
<span class='coordinates-separator'>,</span>
|
||||||
|
<span>{$longitude}</span>
|
||||||
|
</a>";
|
||||||
$return .= empty($return)
|
$return .= empty($return)
|
||||||
? $prefix . $single_value . $suffix
|
? $prefix . $single_value . $suffix
|
||||||
: $separator . $prefix . $single_value . $suffix;
|
: $separator . $prefix . $single_value . $suffix;
|
||||||
|
@ -136,20 +137,21 @@ class GeoCoordinate extends Metadata_Type {
|
||||||
$latitude = isset($coordinate_as_array[0]) ? $coordinate_as_array[0] : '';
|
$latitude = isset($coordinate_as_array[0]) ? $coordinate_as_array[0] : '';
|
||||||
$longitude = isset($coordinate_as_array[1]) ? $coordinate_as_array[1] : '';
|
$longitude = isset($coordinate_as_array[1]) ? $coordinate_as_array[1] : '';
|
||||||
|
|
||||||
$return .= "<span class='tainacan-coordinates' data-latitude='{$latitude}' data-longitude='{$longitude}'><span>{$latitude}</span><span class='coordinates-separator'>,</span><span>{$longitude}</span></span>";
|
$return .= "<a class='tainacan-coordinates' data-latitude='{$latitude}' data-longitude='{$longitude}' href='geo:{$latitude},{$longitude}?q={$latitude},{$longitude}&{$zoom_geo_query}'>
|
||||||
|
<span>{$latitude}</span>
|
||||||
|
<span class='coordinates-separator'>,</span>
|
||||||
|
<span>{$longitude}</span>
|
||||||
|
</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
wp_enqueue_style( 'tainacan-geocoordinate-item-metadatum', $TAINACAN_BASE_URL . '/assets/css/tainacan-gutenberg-block-geocoordinate-item-metadatum.css', array(), TAINACAN_VERSION);
|
wp_enqueue_style( 'tainacan-geocoordinate-item-metadatum', $TAINACAN_BASE_URL . '/assets/css/tainacan-gutenberg-block-geocoordinate-item-metadatum.css', array(), TAINACAN_VERSION);
|
||||||
|
|
||||||
$options = $this->get_options();
|
|
||||||
$options_as_strings = '';
|
$options_as_strings = '';
|
||||||
foreach ( $options as $option_key => $option ) {
|
foreach ( $options as $option_key => $option ) {
|
||||||
if ( is_array($option) )
|
if ( is_array($option) )
|
||||||
$options_as_strings .= 'data-' . $option_key . '="' . json_encode($option) . '" ';
|
$options_as_strings .= 'data-' . $option_key . '="' . json_encode($option) . '" ';
|
||||||
else if ( $option_key == 'attribution' )
|
else if ( $option_key == 'attribution' )
|
||||||
$options_as_strings .= 'data-' . $option_key . '="' . htmlentities($option) . '" ';
|
$options_as_strings .= 'data-' . $option_key . '="' . htmlentities($option) . '" ';
|
||||||
else if ( $option_key == 'map_provider' )
|
|
||||||
$options_as_strings .= 'data-' . $option_key . '="' . esc_url($option) . '" ';
|
|
||||||
else
|
else
|
||||||
$options_as_strings .= 'data-' . $option_key . '="' . $option . '" ';
|
$options_as_strings .= 'data-' . $option_key . '="' . $option . '" ';
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
min-width: auto !important;
|
min-width: auto !important;
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
box-shadow: 0 0 8px -6px rgba(0, 0, 0, 0.25);
|
box-shadow: 0 2px 7px -4px rgba(0, 0, 0, 0.65);
|
||||||
|
|
||||||
&.is-dark,
|
&.is-dark,
|
||||||
&.is-dark .button,
|
&.is-dark .button,
|
||||||
|
|
|
@ -54,9 +54,9 @@ $green1-invert: findColorInvert($green1);
|
||||||
$green2: #25a189;
|
$green2: #25a189;
|
||||||
$green2-invert: findColorInvert($green2);
|
$green2-invert: findColorInvert($green2);
|
||||||
// Warning, used for warning messages
|
// Warning, used for warning messages
|
||||||
$yellow1: #fcebd9;
|
$yellow1: #fff7ee;
|
||||||
$yellow1-invert: findColorInvert($yellow1);
|
$yellow1-invert: findColorInvert($yellow1);
|
||||||
$yellow2: #e69810;
|
$yellow2: #bb7700;
|
||||||
$yellow2-invert: findColorInvert($yellow2);
|
$yellow2-invert: findColorInvert($yellow2);
|
||||||
|
|
||||||
// Text, no quite black
|
// Text, no quite black
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#tainacan-admin-view-mode-map,
|
#tainacan-admin-view-mode-map,
|
||||||
#tainacan-view-mode-map {
|
#tainacan-view-mode-map {
|
||||||
position: relative;
|
//position: relative;
|
||||||
border: none;
|
border: none;
|
||||||
border-left: 1px solid var(--tainacan-input-border-color);
|
border-left: 1px solid var(--tainacan-input-border-color);
|
||||||
float: right;
|
float: right;
|
||||||
|
|
|
@ -134,13 +134,6 @@
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</div>
|
</div>
|
||||||
<transition name="filter-item">
|
|
||||||
<div
|
|
||||||
v-if="selectedMarkerIndexes.length"
|
|
||||||
class="geocoordinate-panel--input">
|
|
||||||
<p>{{ selectedMarkerIndexes.length == 1 ? $i18n.get('label_one_selected_location') : $i18n.getWithVariables('label_%s_selected_locations', [ selectedMarkerIndexes.length ]) }}. <a @click="clearSelectedMarkers()">{{ $i18n.get('label_clean') }}</a></p>
|
|
||||||
</div>
|
|
||||||
</transition>
|
|
||||||
<section
|
<section
|
||||||
v-if="!geocoordinateMetadata.length"
|
v-if="!geocoordinateMetadata.length"
|
||||||
class="section">
|
class="section">
|
||||||
|
@ -441,9 +434,9 @@ export default {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) {
|
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) {
|
||||||
if (this.itemsLocations.length == 1)
|
if (this.itemsLocations.length == 1)
|
||||||
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 0] });
|
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 0] });
|
||||||
else
|
else
|
||||||
this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 0] });
|
this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 0] });
|
||||||
}
|
}
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
|
@ -474,9 +467,9 @@ export default {
|
||||||
this.selectedMarkerIndexes = [];
|
this.selectedMarkerIndexes = [];
|
||||||
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) {
|
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) {
|
||||||
if (this.itemsLocations.length == 1)
|
if (this.itemsLocations.length == 1)
|
||||||
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 0] });
|
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 0] });
|
||||||
else
|
else
|
||||||
this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 0] });
|
this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 0] });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showItemByLocation(index) {
|
showItemByLocation(index) {
|
||||||
|
@ -484,7 +477,7 @@ export default {
|
||||||
this.selectedMarkerIndexes = [];
|
this.selectedMarkerIndexes = [];
|
||||||
this.selectedMarkerIndexes.push(index);
|
this.selectedMarkerIndexes.push(index);
|
||||||
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject )
|
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject )
|
||||||
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds( [ this.itemsLocations[index].location ], { animate: true, maxZoom: 12, paddingTopLeft: [0, 286] });
|
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds( [ this.itemsLocations[index].location ], { animate: true, maxZoom: 16, paddingTopLeft: [0, 286] });
|
||||||
},
|
},
|
||||||
showLocationsByItem(item) {
|
showLocationsByItem(item) {
|
||||||
this.mapSelectedItemId = item.id;
|
this.mapSelectedItemId = item.id;
|
||||||
|
@ -499,9 +492,9 @@ export default {
|
||||||
if ( selectedLocationsByItem.length) {
|
if ( selectedLocationsByItem.length) {
|
||||||
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) {
|
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) {
|
||||||
if (selectedLocationsByItem.length > 1)
|
if (selectedLocationsByItem.length > 1)
|
||||||
this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 286] });
|
this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 286] });
|
||||||
else
|
else
|
||||||
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 12, paddingTopLeft: [0, 286] });
|
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [0, 286] });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$buefy.snackbar.open({
|
this.$buefy.snackbar.open({
|
||||||
|
|
|
@ -55,6 +55,6 @@ export default (element) => {
|
||||||
TainacanLeaflet.marker(coordinate).addTo(tainacanMap);
|
TainacanLeaflet.marker(coordinate).addTo(tainacanMap);
|
||||||
});
|
});
|
||||||
|
|
||||||
tainacanMap.flyToBounds(coordinates);
|
tainacanMap.flyToBounds(coordinates, { maxZoom: maximum_zoom });
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -257,7 +257,7 @@ export default {
|
||||||
color: #25a189 !important;
|
color: #25a189 !important;
|
||||||
}
|
}
|
||||||
.tainacan-icon-delete {
|
.tainacan-icon-delete {
|
||||||
color: #e69810 !important;
|
color: #bb7700 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.number-block--items,
|
&.number-block--items,
|
||||||
|
@ -301,7 +301,7 @@ export default {
|
||||||
background-color: #25a189;
|
background-color: #25a189;
|
||||||
}
|
}
|
||||||
&:nth-child(5) {
|
&:nth-child(5) {
|
||||||
background-color: #e69810;
|
background-color: #bb7700;
|
||||||
}
|
}
|
||||||
&:nth-child(6) {
|
&:nth-child(6) {
|
||||||
opacity: 0.35;
|
opacity: 0.35;
|
||||||
|
|
|
@ -45,7 +45,7 @@ export default (element) => {
|
||||||
'#298596', // Tainacan Turquoise
|
'#298596', // Tainacan Turquoise
|
||||||
'#01295c', // Tainacan Blue
|
'#01295c', // Tainacan Blue
|
||||||
'#25a189', // Tainacan Green
|
'#25a189', // Tainacan Green
|
||||||
'#e69810', // Tainacan Yellow
|
'#bb7700', // Tainacan Yellow
|
||||||
'#a23939', // Tainacan Red
|
'#a23939', // Tainacan Red
|
||||||
'#592570', // Tainacan Purple
|
'#592570', // Tainacan Purple
|
||||||
'#ed4f63', // Tainacan Pink
|
'#ed4f63', // Tainacan Pink
|
||||||
|
|
|
@ -555,7 +555,7 @@
|
||||||
padding: 1em 2em;
|
padding: 1em 2em;
|
||||||
}
|
}
|
||||||
.dashicons-info {
|
.dashicons-info {
|
||||||
color: #e69810;
|
color: #bb7700;
|
||||||
}
|
}
|
||||||
.capabilities-list {
|
.capabilities-list {
|
||||||
padding: 1em 0;
|
padding: 1em 0;
|
||||||
|
|
Loading…
Reference in New Issue