Skip to content

Commit

Permalink
Merge branch '10.0/bugfixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Dec 10, 2024
2 parents 78aa2b8 + 4a9ea24 commit 49cc906
Show file tree
Hide file tree
Showing 42 changed files with 972 additions and 196 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ jobs:
name: "Test on PHP ${{ matrix.php-version }} using ${{ matrix.db-image }}"
needs: "generate-tests-matrix"
runs-on: "ubuntu-latest"
timeout-minutes: 60
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-tests-matrix.outputs.matrix) }}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpunit/phpunit": "^11.2",
"squizlabs/php_codesniffer": "^3.10",
"squizlabs/php_codesniffer": "^3.11",
"symfony/browser-kit": "^6.4",
"symfony/http-client": "^6.4",
"symfony/stopwatch": "^6.4",
Expand Down
34 changes: 17 additions & 17 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions css/includes/components/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
&.vertical {
.nav-link {
border-bottom: 1px solid var(--glpi-tabs-border-color);
border-top-right-radius: 0;

&.active {
border-left-width: 5px;
Expand Down
8 changes: 4 additions & 4 deletions js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,11 +752,11 @@ var initMap = function(parent_elt, map_id, height, initial_view = {position: [0,

//add map, set a default arbitrary location
parent_elt.append($('<div id="'+map_id+'" style="height: ' + height + '"></div>'));
var map = L.map(map_id, {fullscreenControl: true}).setView(initial_view.position, initial_view.zoom);
var map = L.map(map_id, {fullscreenControl: true, minZoom: 2}).setView(initial_view.position, initial_view.zoom);

//setup tiles and © messages
L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href=\'https://osm.org/copyright\'>OpenStreetMap</a> contributors'
attribution: '&copy; <a href=\'https://osm.org/copyright\'>OpenStreetMap</a> contributors',
}).addTo(map);
return map;
};
Expand All @@ -772,10 +772,10 @@ var showMapForLocation = function(elt) {
glpi_html_dialog({
title: __("Display on map"),
body: "<div id='location_map_dialog'/>",
dialogclass: "modal-lg",
dialogclass: "modal-xl",
show: function() {
//add map, set a default arbitrary location
var map_elt = initMap($('#location_map_dialog'), 'location_map');
var map_elt = initMap($('#location_map_dialog'), 'location_map', '500px');
map_elt.spin(true);

$.ajax({
Expand Down
6 changes: 3 additions & 3 deletions js/modules/Form/GeolocationField.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class GeolocationField {
#init() {
// Geolocation may be disabled in the browser (e.g. geo.enabled = false in firefox)
if (!navigator.geolocation) {
this.map = initMap($(`#${this.element_id}`), `setlocation_${this.rand}`, '200px');
this.map = initMap($(`#${this.element_id}`), `setlocation_${this.rand}`, '400px');
this.#finalizeMap();
} else {
navigator.geolocation.getCurrentPosition((pos) => {
Expand All @@ -69,13 +69,13 @@ class GeolocationField {
// High accuracy
zoom = 20;
}
this.map = initMap($(`#${this.element_id}`), `setlocation_${this.rand}`, '200px', {
this.map = initMap($(`#${this.element_id}`), `setlocation_${this.rand}`, '400px', {
position: [pos.coords.latitude, pos.coords.longitude],
zoom: zoom
});
this.#finalizeMap();
}, () => {
this.map = initMap($(`#${this.element_id}`), `setlocation_${this.rand}`, '200px');
this.map = initMap($(`#${this.element_id}`), `setlocation_${this.rand}`, '400px');
this.#finalizeMap();
}, {enableHighAccuracy: true});
}
Expand Down
Loading

0 comments on commit 49cc906

Please sign in to comment.